# cee-ry/guilib architecture

> Architecture diagram of the GitHub repository cee-ry/guilib, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/cee-ry/guilib
- Repository: https://github.com/cee-ry/guilib

## Overview

This is a small C++ GUI wrapper around raylib. Its demonstrated workflow is an application creating a window and texture, polling a button, then opening a render frame and drawing the texture and button. The header also exposes window controls, sizing and positioning, and alternate texture-display forms. The README provides no further capability detail; the graph reflects the sampled implementation and demo.

Main entry points: [`src/main.cpp`](https://github.com/cee-ry/guilib/blob/main/src/main.cpp) (Demo application), [`include/guilib.hpp`](https://github.com/cee-ry/guilib/blob/main/include/guilib.hpp) (Window)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_gui["GUI wrapper"]
  node_window["Window<br/>[guilib.hpp]"]
  node_renderer["Frame renderer<br/>[guilib.hpp]"]
  node_button["Button<br/>[guilib.hpp]"]
  node_texture["Texture<br/>[guilib.hpp]"]
end

node_demo["Demo application<br/>[main.cpp]"]
node_raylib["raylib"]

node_demo -->|"creates and polls"| node_window
node_demo -->|"updates and draws"| node_button
node_demo -->|"loads and displays"| node_texture
node_demo -->|"starts frames"| node_window
node_window -->|"creates frame"| node_renderer
node_window -->|"controls window"| node_raylib
node_renderer -->|"begins and ends drawing"| node_raylib
node_button -->|"checks input and draws"| node_raylib
node_texture -->|"loads and draws"| node_raylib

click node_demo "https://github.com/cee-ry/guilib/blob/main/src/main.cpp"
click node_window "https://github.com/cee-ry/guilib/blob/main/include/guilib.hpp"
click node_renderer "https://github.com/cee-ry/guilib/blob/main/include/guilib.hpp"
click node_button "https://github.com/cee-ry/guilib/blob/main/include/guilib.hpp"
click node_texture "https://github.com/cee-ry/guilib/blob/main/include/guilib.hpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_window,node_renderer,node_button,node_texture toneBlue
class node_demo toneTeal
class node_raylib toneIndigo
```

## Components

### GUI wrapper

- [Window](https://github.com/cee-ry/guilib/blob/main/include/guilib.hpp): `include/guilib.hpp`
- [Frame renderer](https://github.com/cee-ry/guilib/blob/main/include/guilib.hpp): `include/guilib.hpp`
- [Button](https://github.com/cee-ry/guilib/blob/main/include/guilib.hpp): `include/guilib.hpp`
- [Texture](https://github.com/cee-ry/guilib/blob/main/include/guilib.hpp): `include/guilib.hpp`

### Other components

- [Demo application](https://github.com/cee-ry/guilib/blob/main/src/main.cpp): `src/main.cpp`
- **raylib**

## Connections

- Demo application → Window: creates and polls (evidence: `src/main.cpp`)
- Demo application → Button: updates and draws (evidence: `src/main.cpp`)
- Demo application → Texture: loads and displays (evidence: `src/main.cpp`)
- Demo application → Window: starts frames (evidence: `src/main.cpp`)
- Window → Frame renderer: creates frame (evidence: `include/guilib.hpp`)
- Window → raylib: controls window (evidence: `include/guilib.hpp`)
- Frame renderer → raylib: begins and ends drawing (evidence: `include/guilib.hpp`)
- Button → raylib: checks input and draws (evidence: `include/guilib.hpp`)
- Texture → raylib: loads and draws (evidence: `include/guilib.hpp`)
