Run the repo generator instead of the hand-appended batch-4 registry:
kWidgetNames now in sorted order (Rust extract_registry requires it),
kWidgetDefaultW/H extended 547 -> 562 with the default_size() rule,
factory cases reordered to match, XGraph index 545 -> 548.
Palette re-indexed via gen_xframe_palette_data.py (XGraph 548, --check clean).
widgets/README.md palette table: Misc / X 4 -> 19, 562 widgets.
Verified: Rust extract_registry build OK (562); make test SEAM ALL PASS.
Register the 15 new X* monitor widgets (includes, kWidgetNames,
kWidgetSection as Misc / X, factory cases 547-561, kWidgetCount
562); sections.py Misc / X assignment; regenerate
src/xframe_palette.h (562 entries, palette --check clean); 16x16
icons; README 547 -> 562 plus X* monitor-family section with
per-widget one-liners and example build/run commands.
Also fix a pre-existing seam-test failure (proven on clean main
9088092): the generator emitted .w.set_label() for the
Frame/GroupBox/Panel kinds, but TFrame / TGroupBox / TPanel only
have set_text — gate the GtkFrame-only setters on the mapped class
being GtkFrame so the other classes fall through to set_text.
make test (seam test) now passes: 562 mapped, generated project
builds.
Live process table from /proc (sortable columns, in-cell CPU% bars,
colour-coded rows, refresh()), load-average badge (1/5/15 min,
threshold colours, uptime from /proc), monitor button bound to a
process (/proc scan), systemd unit (systemctl is-active) or TCP port
(connect to localhost) with poll()/update() and click-for-details,
grid panel of monitor buttons with one shared poll_all(), composite
resource box (title + big number + history + usage bar). Header-only
C++, demo mains (polling loop for the live three), examples, Xvfb
screenshots.
Gradient usage bar (green->yellow->red, absolute scale), stacked
multi-segment bar with legend, vertical bar meter with scale +
peak-hold marker (click resets peak), round tachometer (needle,
redline zone, digital readout, peak hold), semicircular arc gauge
with coloured zones + big %, circular progress ring with centred %.
Header-only C++, demo mains, examples, Xvfb screenshots.
Every Ind* widget recomputes its lines from a loaded OHLCV series:
private recompute_lines() (moved out of the constructor), public
set_series()/load_csv()/clear_series()/series() matching the Stock*
chart widgets, same loader and CSV spec (StockData.h). Constructor
defaults keep the seeded 250-bar template; failed loads leave the
series untouched; clear_series() empties lines and draws clean.
Params that were constructor-only (fast/slow/period/...) are now
stored as members so a reloaded series uses the same settings.
Tests: widgets/tests/ind_csv_harness.cpp + test_ind_csv.py — 250/250
harnesses build, 250/250 numeric PASS, 39/39 screenshots PASS, 250/250
demo mains build. Docs: docs/stock-market-csv-data.md Indicators
section rewritten; all 250 cdoc pages updated (update-ind-csv.py).
Troubleshooting entries rewritten as FIXED with the fixing commits:
backend e6678e1 (Step Out in main, Stop/async, Run target switch,
temp main bp) and UI a3df7cd (narrow pane incl. the wrapping hint
root cause, sticky selection/checkbox, search popup). Run table row
updated (Target/Args read every time), stale-breakpoints note
updated (kept staged), First-run quirk callout removed, Known bugs
section rewritten as all fixed.
(a) The breakpoint pane opened with its # and Location columns
clipped off-screen left. The divider was at 380px (now 560px),
but the real cause was the hint line under the list: one
unwrapped ~700px line forced the pane minimum width to ~734px,
wider than the paned 560px slot, so GTK right-aligned the
overflowing pane. The hint now wraps; the pane fits its slot
exactly, # and Location are fully visible, the rest scrolls.
The list also keeps a 480px minimum width with a horizontal
scrollbar, Location has a 140px minimum and expands, and all
columns are resizable.
(b)/(h) The 150ms poll cleared and rebuilt every list on every tick,
wiping the selection (Edit/Remove did nothing) and dropping
quick checkbox clicks. Lists are now rebuilt only when their
contents change (fingerprint), the selection is preserved across
a rebuild (by breakpoint id, row index for staged rows, watch
name), the horizontal scroll offset is preserved too, and the
Enabled checkbox flips optimistically, reverting only on a
backend error.
(c) Step Out in main() checks can_step_out() first and writes a
sticky status-line note instead of showing gdb modal error.
(e) Run and autorun use restart_or_start(), so a changed Target or
Args switches target instead of re-running the loaded exe.
(g) Interactive search disabled on every debugger list
(gtk_tree_view_set_enable_search FALSE), so typing with a list
focused can no longer open GTK search popup.
Verified live under Xvfb with screenshots; console 42/42, GTK 8/8.
(c) step_out() refused in the outermost frame instead of sending
-exec-finish: new can_step_out() (frames>1, fallback on the stop
frame level); the UI now shows a status-line note, no modal.
(d) gdb runs in synchronous mode by default, so -exec-interrupt sat
unread while the target ran: enable mi-async at spawn, and
interrupt() falls back to SIGINT then SIGSTOP on the inferior pid.
Interrupt of a target in gtk_main now lands in ~0.1s (was a 5s
timeout, timed out waiting for gdb reply).
(e) new restart_or_start(exe, args): same target restarts, a changed
Target/Args kills the old target (via gdb kill, so it is reaped
at once) and starts the new one. kill_target() uses gdb kill as
primary; raw SIGKILL left a dead-but-unreaped inferior that made
-file-exec-and-symbols fail. Failed breakpoint re-applies stay
staged (id 0) so they come back when switching back.
(f) break-on-main breakpoint is now marked temporary: never written
to debugger_bps.conf, never duplicated on the next session, and
load dedupes stale duplicate main lines. add_breakpoint and the
refresh merge preserve the temporary flag.
Tests: harness 37-41 console (step_out refused, can_step_out in a
call, break-on-main not persisted, restart_or_start switches target,
interrupt stops a running target) + gtkspin target and GTK test 37
(interrupt_gtkapp_in_gtk_main). Console 42/42, GTK 8/8.
One command rebuilds every examples Widget.cpp, re-renders it under
Xvfb, and diffs the screenshot against its golden with ImageMagick
RMSE (0.5 pct threshold):
tools/visreg/run.sh (also: make visreg)
Reuses the cdoc docs sweep render path (same g++ flags, same
Widget - XFrame demo window capture with the root-capture fallback).
Goldens vendored from /opt/lightgui-docs/shots (Dec 2, 2026). Report goes
to tools/visreg/report/report.txt (plus report.tsv and shots/); exit code
is 0 only when every gated widget passes.
Two deliberate behaviours, both documented in tools/visreg/README.md:
- failed shots are retried 3x (transient XOpenDisplay flakes; the docs
sweep needed a retry pass for the same four widgets)
- TTimeEdit, TDateEdit and TCalendar render the wall clock, so they are
reported SKIP (RMSE recorded, not gated) instead of FAIL
Baseline full run (Dec 2, 2026, HEAD beec92b): 544 PASS, 3 SKIP, 0 FAIL;
max RMSE among PASS 0.0000 pct (every passing widget pixel-identical).
Each examples/<Widget>.cpp is a minimal complete program: window +
widget (setup mirrors the widget demo) + standard event loop. Built,
run under Xvfb and screenshotted for the C widget docs.
Generated event loop now tracks pressed_widget (set on a handled ButtonPress) and focused_widget (click-to-focus). ButtonRelease goes to the pressed widget even if the pointer moved off it; MotionNotify goes to the pressed widget while a press is held (drag), otherwise to the topmost widget under the pointer; KeyPress goes to the focused widget only. ButtonPress hit-testing, Expose, ConfigureNotify and ClientMessage unchanged. Verified live under Xvfb with a generated 4-widget app (2 buttons + 2 entries) and an instrumented event log: keys go only to the focused entry, hover only to the widget under the pointer, drag motion and release only to the pressed button. The designer canvas does NOT share this loop (it already targets release/motion/keys by selection/hit-test), so it is unchanged.
27 widgets (18 dialogs, 2 calendars, 3 views, 4 choosers) get larger defaults via MIN_SIZES in widgets/tools/gen_registry.py, applied in default_size() and regenerated into widgets/common/registry.h. Verified live under Xvfb (dialogs sweep, 28 widgets, screenshots): 15 of the 18 originally-overflowing dialogs now fit at placement time (e.g. GtkAboutDialog 520x260, TPageSetupDialog 320x400, TColorDialog 520x300, picture dialogs 480x240). Three are internal draw-layout collisions, not placement size: TFindDialog Direction label overlaps Find Next, GtkFileChooserDialog Name header overlaps the path field, TFontDialog caption overlaps OK/Cancel (its lists expand to fill the dialog height).
Task 1: placing a widget now disarms placement mode — the next canvas
click places nothing until another palette widget is selected. Escape
(canvas or palette window) and clicking the selected palette entry
again also cancel an armed placement. Previously sel_type persisted
across placements, so every click placed another fresh widget.
Task 2: placing a widget refreshes the Code window at once
(Lazarus-style) via the placed callback -> refresh_code_view(), so the
generated code shows the new widget without pressing Generate.
Verified live under Xvfb (9/9 in c-place-verify.sh): place-once,
Escape-cancel, toggle-cancel, re-arm, code sync, clean app log.
Replace screenshots/01_designer.png with the newer designer shot:
canvas with Dialog/TextView/Option/TTimer, Object Inspector with
Widget properties, Bulk parameter and Colour palette, and the
Widgets palette. Same path, so the README link is unchanged.
The new shot is 1425x823 (the old one was 2560x1440).
The gutter (line numbers + fold markers) lived inside the scrolled
window, so clicking in the code let the text view scroll the whole
row horizontally: the scrolled window's hadj jumped to 76, exactly
the gutter width, and the gutter scrolled off-screen left. Resizing
did not bring it back.
Move the gutter out of the horizontal scroll: it now sits beside the
scrolled window in code_box, so it can never be scrolled away, and
only tracks the vertical scroll (on_gutter_draw shifts line positions
by the vadj value; gutter_line_at_y adds it back for fold/breakpoint
clicks; on_scroll_changed repaints). The scrolled window's shadow
is off so the first line starts exactly at the gutter's top edge.
Horizontal scrolling of long lines still works.
Verified live under Xvfb: click in the code leaves the gutter in
place; vertical scroll keeps line numbers aligned; clicking a fold
marker while scrolled collapses the region correctly.
The property editors in the grid sat at their natural width while
the Bulk parameter fields below filled the panel. Set hexpand on the
control in add_row so the control column takes the extra width, like
the Bulk fields. Entries, spins, combos and the entry+Pick boxes all
stretch; the label column stays narrow.
The font-name entry gets a Pick button (same pattern as the Color
Pick button) that opens a font chooser listing the available system
fonts. Choosing one sets font-name to the picked family; setting the
entry text fires the existing changed handler, so the pick
live-applies exactly like typing the name. Only the family is stored
(size/bold/italic stay separate properties). Added to both the GTK
and the XFrame property editors.
Pressing Enter in the password entry did nothing (the default-widget
chain does not fire under a nested gtk_dialog_run). Wire the entry
activate signal directly to Accept so Enter submits, matching the
usual password-dialog convention.
Adds Tools > Install Libraries: builds the designer as the user, then
installs system-wide as root (pkexec when present, else a GTK password
dialog feeding sudo -S). Installs the designer binary to
/usr/local/bin/lightgui, widget headers to /usr/local/include/lightgui,
designer UI + 547 palette icons to /usr/local/share/lightgui, and a
desktop entry + icon to the app menu. Headers are header-only, so no
shared libraries and no ldconfig step. The installed binary now finds
its UI and palette icons under /usr/local/share/lightgui, so it runs
from anywhere without the checkout. Install output is shown in the
scrollable log dialog.
The build-result dialog packed its ScrolledWindow with
gtk_container_add(), which packs a GtkBox child with expand=FALSE,
so the log area stayed at its ~2-line natural height pinned to the
top and the rest of the 700x420 window was wasted space. Pack it
with gtk_box_pack_start(..., TRUE, TRUE, 0) so it fills the dialog.
Also drop the 6000-char tail truncation (the log now scrolls, so the
whole build log is visible), wrap long lines so cmake command lines
are readable without horizontal scrolling, and start scrolled to the
end of the log (via an idle callback, so the scroll happens after
realisation/allocation and lands on the true last line) where build
failures are.
Verification find: typing rgb(255,0,0) into a StockChart up-color row
stored the value in the model but never redrew -- parse_hex_color()
accepted only #rrggbb, while the XFrame Inspector stores the raw entry
text and the Phase 4 colour defaults/display use the rgb(...) form
(the Pick... chooser stores hex, so chooser edits worked). Extend the
parser to the same set the generator's parse_color() accepts -- named
colours, #rgb/#rrggbb, rgb(r,g,b) (clamped) -- so live-apply and
generation can never disagree on a colour again. Affects every colour
prop edited by typing, not just Stock/Inst: background, foreground,
border-color go through the same parser.
The Rust generator needs the same capability/background tables in Rust
syntax (PHASE4_CAPS / PHASE4_BG_COLOR in crates/lightgui-gen/src/
gen.rs); the C++ modes emit C++ syntax, so add Rust-syntax modes.
emit_widget_props gains a generic Phase 4 loop driven by the capability
table from tools/gen_phase4_props.py (caps mode): one setter call per
Inspector-table prop the widget actually has, with the arg form from the
table kind (set_value(double) for gauges, set_value("...") for Seg
displays). Pairs are emitted together (minimum/maximum -> set_range,
y-min/y-max -> set_y_range, anchor-1/2/3 -> set_anchors3 when all six
components are present, else one set_anchor per complete anchor). The
StockChart branch keeps only the NOTE for data-file/indicators/drawings/
compare-files/scale-mode; its up/down colours now come from the generic
loop. The common background prop falls back to set_bg_color for
Stock/Inst classes that have it (kPhase4BgColor, bg mode).
xframe_core_apply_prop gains a Phase 4 block, first in the type-specific
section: for Stock*/Inst* classes, pairs apply together from the model
(minimum/maximum -> set_range, y-min/y-max -> set_y_range, anchor-N-bar/
price -> set_anchor) and every other table prop goes through the named
dispatch in registry.h (kind from find_prop). Unhandled props fall through
to the generic branches. background drives set_bg_color via
set_named_color(bg-color) for these classes, and a non-numeric value
falls back to set_value_str (Seg displays). props.h must be included before
X11 headers (Xlib.h defines Bool as int, breaking PropKind::Bool) and the
Bool kind is the else branch, never named.
Also fixes -Wmisleading-indentation in StockSectorComparison::set_labels_text.
src/props.h gains the generated Phase 4 tables (103 classes, 1008 props)
from tools/gen_phase4_props.py, dispatched on the exact XFrame class name.
The StockChart table is the legacy 8 props plus the candlestick chart's
own Phase 4 props; its up/down defaults are corrected to the widget's
real defaults rgb(0,150,0)/rgb(200,30,30) (the legacy rgb(0,200,0)/
rgb(220,0,0) did not match the widget). src/main.cpp refresh_xframe_props
falls back to the exact class name when xframe_type_key() returns "" so
every Stock*/Inst* class shows its own table, not just common props.
registry.h gains 8 Phase 4 IWidget virtuals (set_named_color/double/int/
bool/string, set_y_range, set_anchor, set_value_str), one SFINAE trait per
distinct Stock/Instrumentation setter, and Holder overrides with if-chains
over (prop -> setter). The named dispatch keeps the virtual count flat
while covering all 116 Phase 4 prop names.
gen_registry.py was stale: regenerating it deleted the hand-added Phase 2
colour virtuals and the whole Phase 3 block. tools/port_registry_blocks.py
ports those 60 virtuals/traits/overrides back into the template (verified:
regeneration is a byte-identical no-op) and inserts the Phase 4 blocks, so
registry.h is generated again, not hand-edited.
8 tank widgets gain set_alarm_hi_hi/hi/lo/lo_lo (member bands_);
StockSectorComparison gains set_labels_text (pipe-separated labels);
InstControlPanel gains set_grid_rows/set_grid_cols. tools/gen_phase4_props.py
parses the C headers and emits the per-widget Inspector tables (C++ and
Rust) plus the generator capability table from one source of truth.
set_anchors() leaves only 2 anchors, but draw() indexed anchors_[2]
unconditionally (abort under _GLIBCXX_DEBUG; stale slot read otherwise).
ParallelChannel now falls back to the midline for the outer line and
draws only the anchors present; Pitchfork falls back to a trendline
through the two anchors (tines need the third anchor).
The Inspector window had no scrolled window: props_grid sat directly
in props_box, so every row below the window bottom edge was built but
unreachable -- no scrolling was possible at all. Phase 1 added ~15
rows to the common set (constraints, margins, autosize, tag, anchors,
align), so the lower half of the generic set and the Events section
were invisible and uneditable. The grid now lives in a vertically
scrolling window (verified live: tag, anchor-top/left/right/bottom,
align and Events all reachable).