How kmukuch/ctuix works
CTUIX is a C library for building ncurses text interfaces from DTD-validated XML. Its documented user workflow initializes the terminal, parses one or more screen files into a manager, runs the UI loop, then frees manager and library resources. The graph preserves the XML widget types, tree/model layer, navigation, and error handling. Some runtime source was not excerpted; those gaps limit the call relationships shown.
Main entry points: ctuix_parse.c XML parser · ctuix_tree.c Node tree · ctuix_entry.c Text entry · ctuix_selection_box.c Selection box
Components 20
UI lifecycle
- Public API
include/ctuix.h - Terminal setup
src/ctuix_core.c - Event loop
src/ctuix_core.c
XML and tree
- XML parser
src/ctuix_parse.c - XML DTD
data/ctuix.dtd - Node tree
src/ctuix_tree.c
UI widgets
- Root widget
src/ctuix_root.c - Panel
src/ctuix_panel.c - Label
src/ctuix_label.c - Button
src/ctuix_button.c - Text entry
src/ctuix_entry.c - Selection box
src/ctuix_selection_box.c - List item
src/ctuix_selection_box.c - Scroll panel
src/ctuix_scroll_panel.c
Input and navigation
- Focus navigation
src/ctuix_nav.c
Errors and resources
- Error display
src/ctuix_error.c - Resource cleanup
src/ctuix_parse.c
Other components
- Application
- ncurses
- libxml2
Connections 24
- Application → Terminal setup: initializes
README.md - Application → XML parser: parses screens
README.md - XML parser → XML DTD: validates against
README.md - XML parser → libxml2: reads XML
src/ctuix_parse.c - XML parser → Node tree: builds manager
src/ctuix_parse.c - XML parser → Root widget: creates
src/ctuix_parse.c - XML parser → Panel: creates
src/ctuix_parse.c - XML parser → Label: creates
src/ctuix_parse.c - XML parser → Button: creates
src/ctuix_parse.c - XML parser → Text entry: creates
src/ctuix_parse.c - XML parser → Selection box: creates
src/ctuix_parse.c - XML parser → List item: creates
src/ctuix_parse.c - XML parser → Scroll panel: creates
src/ctuix_parse.c - XML parser → Error display: reports failures
src/ctuix_parse.c - Application → Event loop: runs manager
README.md - Event loop → Node tree: draws tree
README.md - Application → Resource cleanup: frees resources
README.md - Text entry → Focus navigation: selects next
src/ctuix_entry.c - Selection box → Focus navigation: selects next
src/ctuix_selection_box.c - Scroll panel → Focus navigation: selects next
src/ctuix_scroll_panel.c - Text entry → Node tree: redraws
src/ctuix_entry.c - Selection box → Node tree: redraws
src/ctuix_selection_box.c - Scroll panel → Node tree: redraws
src/ctuix_scroll_panel.c - Terminal setup → ncurses: initializes