- XTachometer: the "RPM" title baseline now hangs below the top
numeral's bottom edge instead of a fixed cy - r*0.55, so it
cannot collide with the neighbouring numerals on small dials
(found in the Python demo at r=73, where 3200/RPM/4800 jammed).
- XVerticalBar: the "peak N" label shrinks 14px -> 11px when the
bar is too narrow for it to fit inside the frame.
- Graphs (XHistoryGraph/XNetGraph/XTempHistory): dynamic left margin from
widest Y label (fixes Y labels overflowing the plot), legend wrapped to
two lines when too wide, legend on top, 5 Y labels, humanised units in
NetGraph, TempHistory on the PY layout (now top-right, min/max/avg bottom,
threshold label above the line). Top/bottom Y labels hang clear of the
title and the strip below the plot.
- XTachometer: numerals 7.5% of dial diameter bold just inside the tick
ring, RPM bold centred in-dial, readout enlarged below the hub,
redline numerals in red.
- All 14 audit widgets: font sizes derived from widget dimensions per
the proportions audit (titles 16px bold, hero values 24-48px bold,
body/legend 13-16px, min 11px); CoreGrid 4x2 for 8 cores; UsageBar
labels outside the bar; StackBar block centred with grown bar;
VerticalBar value inside the bar; ArcGauge centre 40-48px + load
sub-label + endpoints; DonutGauge centre 36-44px, ring 8-10% of
diameter, duplicate title dropped; ProcessList 13px rows, colour-coded
CPU bars after the number; LoadBadge centred value block with 1/5/15
sub-labels; MonitorButton scaled label/dot/status + detail line;
MonitorGrid ceil(sqrt(n)) columns; SysBox hero 28-32px + max + bar %.
- New xframe::scaled_font() helper in InstData.h (scalable misc-fixed
XLFD, cached per size/bold) + font_text_width/draw_text_font.
- Deviations from the audit spec: UsageBar label capped at 40px (the
literal 0.45x rule gives 209px in the 464px-tall demo bar); SysBox
hero uses 10% of height clamped 20-32px (spec 6-7% conflicts with
the audited-correct PY value of 10.3%).
All 15 widget demos rebuild clean and were screenshot-verified.
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).
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).
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.
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).
A wildcard XLFD pattern can match a two-byte font first (e.g. a JIS
fixed font at size 16, which has no misc twin). XDrawString with
1-byte Latin text draws nothing with such a font, so widget labels
vanished whenever the font size resolved to one (size 16 confirmed:
JIS min_byte1=33; Sony and misc 1-byte fonts render fine). Both
font-resolution paths now list every match per pattern and return
the full XLFD name of the first single-byte font
(min_byte1 == max_byte1 == 0): font_xlfd_for (designer canvas) and
the emitted lightgui_pick_font helper (generated apps). Also silences
the -Wmissing-field-initializers warning on the Placed aggregate init
and adds the missing <cstdio> include to the shared core header.
The GtkMenuButton standalone demo includes the component-local
(core/xframe_core.h) copy first, which lacked xf::draw_triangle_left
that the direction work (C1) calls -- the demo build failed while
the designer build worked (registry.h includes another component
first, whose core include resolves to the shared copy, and the
include guard then skips this copy). Mirror of draw_triangle_right
in this file.
GtkEntry::set_placeholder_text takes std::string BY VALUE, so the
exact-signature static_cast detector never matched it and the
Holder set_placeholder_text was a silent no-op. The detector now
uses the callable pattern
decltype(std::declval<T&>().set_placeholder_text(std::declval<std::string>())).
registry.h regenerated; verified by the standalone registry test
(set_placeholder_text now resolves and returns true).
Adds set_value, set_active, set_active_index, set_items,
set_fill_color, set_range, set_digits, set_fraction, set_draw_value,
set_editable, set_max_length, set_placeholder_text, set_wrap,
set_wrap_mode, set_xalign, set_selectable, set_inconsistent,
set_show_heading, set_show_day_names, set_color_rgb,
set_orientation_vertical, set_page_size, set_upper, set_step,
set_lower, set_page_increment, set_password, set_show_password,
set_direction, set_cursor_visible, set_multi_select, and get_text.
Default no-op (false / empty), Holder overrides via SFINAE with
exact-signature static_cast member pointers, so a bool never matches
set_active(int) and a double never matches set_value(int). registry.h
is generated from gen_registry.py; the diff is additions only.
ComboBox/ComboBoxText/ListBox set_items (pipe-separated, live canvas
only; generator keeps emitting per-item calls); ListBox multi-select
(set_multi_select, toggle on click, draw highlights the set);
Scrollbar lower_ + page_increment_ (clamp/thumb/Home/End honour lower,
PgUp/PgDn use page-increment); Entry password_ + show_password_ (masked
with * unless revealed); MenuButton direction_ (0=Up 1=Down 2=Left
3=Right 4=None, arrow zone moves to the matching side); TextView
cursor_visible_ (gates the caret). Shared core gains
SStyle_Manager::add_widget_style (per-widget style clone that owns its
font, so delete_style is safe on it; unlike add_border_style, which
shares the base font) and xf::draw_triangle_left.
The Inspector read g_selected, a GTK Item* that real palette placements
never create, so it always showed Window (Root). The canvas now notifies
the designer on selection change (xframe_canvas_set_selection_callback,
fired after press/key/place/select/delete); the Inspector mirrors the
selected widget into g_xframe_sel with geometry spins, property editors
(mapped to the GTK prop/event tables), events and delete, and Inspector
edits live-apply (text/label/caption, enabled, visible via SFINAE
setters on IWidget/Holder) and persist to codegen through per-widget
props/signals stored in the core and copied by snapshot_project().
Also syncs the generator template (gen_registry.py) with the
hand-edited registry.h, verified by byte-identical regeneration.
The drag removal left on_button_release with an unused button
parameter in GtkWindow and GtkApplicationWindow. Add (void)button.
TForm uses button, so it needed no change. Build is 0 warnings.
Root cause: GtkWindow, TForm and GtkApplicationWindow implemented
title-bar drag-to-move (drag_/dragging_ set on title-bar press,
on_motion moved the whole widget). In the generated app that let the
user drag a window widget around by its title bar -- widgets behaved
like design objects. Verified: dragging Toplevel_001 (GtkWindow) by
its title bar moved it before this change; after, it stays put.
Regular widgets (Button etc.) never moved -- only the three window
widgets had drag code. Removed the drag-to-move from all three
(members, press-to-start-drag, motion move, release clear). The
designer canvas still moves widgets via its own set_bounds path, so
design-time moving is unaffected. The Rust repo shares these widget
headers (/opt/lightgui/widgets), so Rust-generated apps get the fix
too.
alloc_rgb was emitted unconditionally and warned as unused under
-Wall -Wextra when the project has no background. It is now emitted
only when has_bg. GtkTreeView Column/Node are public because
set_columns/set_roots/get_roots expose them in public signatures.
Rust fixtures were regenerated from this fixed gen_matrix.
ide just launches ./lightgui (builds only with --build via plain make;
the redundant cmake re-build is gone). Delete widgets/layout/ (the
standalone layout executable) and drop it from widgets/CMakeLists.txt.
The file-based IPC header widgets/common/ipc.h is KEPT: it is still
referenced by widgets/palette/main_palette.cpp, which is now dead code
(ide no longer launches the palette process) but was not authorized
for deletion in this step.
Palette is XFrame-only: the 36 GTK widgets are gone from designer.ui
and main.cpp (547 entries from xframe_palette.h). .fdj holds only
XFrame widgets; on load a GTK/unknown type is skipped with a clear
message, never migrated. snapshot/load now go through the embedded
XFrame canvas; the GTK Item machinery stays only as selftest
scaffolding (legacy_gtk_snapshot) until it is removed in a follow-up.
Selftest phases 3-8 rewritten for the step-4 XFrame generator (4
files, lg::Holder markers, file-level + XFrame round-trips, GTK skip
rule, bad-file rejection). Palette/converter tests updated to 547;
xframe_palette.h regenerated (one stale comment line). Docs updated.
Also: selftest cleans scratch generation dirs first, and the cleanup
call assigns its return value (void cast does not silence
-Wunused-result for system() on this toolchain).
Embed the XFrame canvas in the designer window: a GtkDrawingArea
(double-buffered FALSE) in the GtkFixed canvas area, with the pure-X11
core (xframe_canvas_core) drawing placed widgets on its X window and
the DrawingArea GTK signals (draw, button-press/release, motion,
key-press) driving place/move/resize/delete/select. Palette selection
is wired in-process (no selection/place files); the core owns the
Placed vector and exposes accessors for later save/codegen steps.
Ports the standalone layout interaction (16px handles, 8px hit pad,
450ms double-click rule, Delete/BackSpace/Escape) without modifying
widgets/layout/main_layout.cpp.
The canvas is deliberately NOT a GtkSocket + raw X child window: that
design rendered and interacted correctly but killed the whole app with
an untrapped XInputExtension BadWindow error (GDK X error handler
calls _exit(1)) whenever another toplevel (e.g. the code window) was
closed. Bisected against the parent binary (survives) and a socket
with no child (survives); removing the foreign GdkWindow, setting the
event mask with raw XSelectInput, and forwarding all canvas events to
gtk_main_do_event did not fix it, and without a foreign window GDK
drops canvas events entirely. A GtkDrawingArea keeps the canvas a
normal GDK-managed window (verified with /tmp/proto_da.c). Also fixes
a latent -Wmaybe-uninitialized in GtkInfoBar.h (bx/by/bw/bh).