How to use these docs
These docs cover all 547 widgets in LightGUI's C++ XFrame set, one page per widget.
What is on each widget page
- Properties — every setter the widget exposes, with its type, default and setter name. Each has a matching getter (
get_<name>()). - Working example — a minimal complete C++ program (window + the widget + the standard event loop) that was actually built and run. The screenshot on the page was taken from that run under Xvfb. A runnable copy lives in the repo at examples/.
- Events — the widget's callbacks (
on_click,on_change, …) and the four input handlers every widget implements. - Walkthroughs — the operations that widget supports: changing fonts and labels, editing text, styling (colours, border radius, line width), calendar date changes, feeding data into stock widgets, and driving gauge levels.
Building and running an example
g++ -std=c++17 -I/opt/lightgui/widgets/components -I/opt/lightgui/widgets GtkButton.cpp -lX11 -o GtkButton
Xvfb :97 -screen 0 1024x768x24 &
DISPLAY=:97 ./GtkButtonClose the window to quit. The program opens an 800×600 window, creates the widget, draws it, and runs an event loop that dispatches button presses, releases, pointer motion and keys to the widget and redraws when one is handled.
How the widgets are organised
- XFrame (194) — the general-purpose widgets: windows and dialogs, containers, buttons, display, text and entry, choosers, views and lists, menus and toolbars.
- Stock (287) — market charts, technical indicators and drawing tools. They plot an
OHLCVSeries(open/high/low/close/volume bars); feed data withset_series(). - Instrumentation (66) — gauges, tanks, lamps, switches and readouts for panels and dashboards. Drive the reading with
set_value()orset_level().
Fonts and styles
Widgets take their font and colours from the style manager. The examples call styles.add_style_ex("default", fill, outline, line, text, corner_radius, line_width, font) with an XLFD font name; to restyle one widget, add a named style and call widget.set_style_name("name").
Browse: all 547 widgets · XFrame · Stock · Instrumentation