Glyph is a modern C++ TUI (Terminal UI) engine prototype. It provides a clear semantic 2D canvas abstraction and pluggable rendering backends. Current status is 0.3.0 prototype, and APIs may change.
- Goal: provide a stable data model and rendering pipeline as a foundation for future UI components and layout systems
- Positioning: engine-level infrastructure (not a full UI framework)
View → Frame (semantic draw) → Renderer (backend output)
- core/: geometry / Cell / Buffer / width rules / dirty / diff
- view/: semantic drawing interfaces (View, Frame, Canvas)
- view/layout/: pure layout helpers (box/stack/inset/align/split/scroll)
- view/components/: Label/Panel/Bar/Table/Focus
- render/: backend output (ANSI / Debug)
- input/: unified event model + Windows input backend
Layering rule: upper layers do not depend on lower-level details; backends are replaceable.
- Semantic 2D canvas and minimal draw pipeline
Cellwidth policy + write-time dirty marking- ANSI renderer (diff/dirty optimized, true-color styles)
- Windows input (VT key sequences + mouse wheel)
- Layout helpers: box/stack/inset/align/split + scroll model
- Components: LabelView, PanelView, BarView, TableView
- Focus/selection models for list/table style components
- Demos: aurora_dashboard, components_demo, bar_demo, poll_stress_demo, snake_demo
Build & run:
cmake -S . -B build
cmake --build build
./build/ansi_render
Layout demo:
./build/layout_demo
Exit with Esc or Q.
Component demo:
./build/components_demo
UI demo:
./build/aurora_dashboard
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/path/to/install
cmake --build build
cmake --install build
Then use:
find_package(glyph CONFIG REQUIRED)
target_link_libraries(my_app PRIVATE glyph::glyph)
include/glyph/
core/ core types, geometry, Cell, Buffer, diff
view/ View/Frame/Canvas
view/layout/ box/stack/inset/align/split/scroll
view/components/ Label/Panel/Bar/Table/Focus
render/ Renderer/ANSI/Debug
input/ Event/Input/WinInput
src/
samples/
- Canvas semantics: draw by writing Cell grid, no direct control codes
- Pluggable backends: Renderer decoupled from View
- Lightweight core: keep core types small and stable
- Windows input only (no Unix/macOS backend yet)
- TableView is basic (no virtualization or column resizing)
- No chart/graph components yet
- No text input component yet
- Charts (line chart, progress bar)
- System stats (CPU/memory/process list)
- Glyph-Top demo (table + charts + status)
- Cross-platform input (Unix/macOS)
- Implement
glyph::render::Rendererinsrc/. - Add the header under
include/glyph/render/. - Register the source in
CMakeLists.txt. - Create a small sample in
samples/to validate output.
- Implement
glyph::input::Input(poll/read/set_mode/get_mode). - Translate platform input into
glyph::core::Event. - Add the header under
include/glyph/input/and source insrc/.
- Implement
glyph::view::View::render(Frame&, Rect). - Use
Frame::set()/Canvas::set()for drawing. - Keep rendering IO in render layer only.
Prototype APIs may change. Contributions to core/render/input and samples are welcome.