- tools/extract_palette.py: kTypes expectation 36->38 (ToggleButton and
CheckListBox added in C); palette total 598->600
- tools/extract_events.py: parse 6th EventDef field `lazarus` (Flag 10
Lazarus Object Inspector name); scope table/dispatch parsing to
events_for() (raw_events_for() has its own `raw` table, deliberately
excluded); dispatch now tests the normalised key `t`, not `type`
- data/*.json regenerated via `make regen`: registry default sizes per
the C rule (incl. the 15 monitor widgets' hand-written sizes),
palette Misc/X order per C xframe_palette.h, props 37 types / 270
props / 25 enum tables / 35 common props, events 29 types with
lazarus names; indicators provenance head only
- crates/xframe-common: palette asserts 598->600, LightGUI 36->38
- crates/xframe-widgets: *_gen.rs regenerated; gen_data.py opt_f now
emits float literals for Option<f64> lo/hi (pre-existing latent bug:
running it on the old data also emitted Some(0)); stale eb0b5fc /
547 / 9 / 35 / 27 counts updated to e474894 / 562 / 25 / 37 / 29
make check: all 5 tables OK. cargo build warning-free. cargo test
--workspace --no-fail-fast: all suites green except 5 pre-existing
environmental failures, verified identical on HEAD: lightgui-debug
console (37) + gtk (7) need /usr/bin/gdb (not installed on dallas),
lightgui-support font/theme need a display (gtk::init fails), and
lightgui-gen fixtures is stale vs the Task 4 event routing in gen.rs.
- XArcGauge: face fill was a full white circle; now the top
half-disc only (was painting a white half-disc over the widget
background below the diameter line).
- XNetGraph: status split into two lines (one line overflowed a
320px widget).
- XTempHistory: threshold label left-aligned; right-aligning
under-measures the degree glyph and clipped at the border.
- xframe-palette: tolerate the 15 monitor icons as pending (same
carve-out as the xframe-common ico test) so the palette stays
usable until the C icons land; palette selftest passes.
- 15 screenshots in crates/xframe-demo/shots/ (Xvfb :108), all
non-blank per PIL check and visually verified.
Reuse the stock-chart CSV parser (same format, same sample file):
IndicatorWidget::populate_from_csv / Widget::load_csv_data replace
the demo bars and the lines recompute from the loaded series at draw
time, so no per-kind wiring was needed. Adds csv::bars_from_rows +
date_to_epoch_nanos (Bar::time is nanoseconds; this also makes the
four pivot widgets compute real lines instead of all-NaN). Demo
series stays as fallback (reset_to_demo, loaded_from_csv flag).
Tests: 9 new (all-250 load + recompute + headless draw, pivot fix,
bad-CSV keeps demo bars); full workspace suite clean except the
pre-existing lightgui-gen fixture failure. Screenshots: 250/250
CSV-loaded renders under Xvfb differ from demo goldens (RMSE
0.0060-0.0661). Docs: docs/indicators-csv.md; rustdoc Ind* pages
updated.
Generated examples/<WidgetName>.rs (547 files): each is a minimal
complete program calling xframe_demo::run_widget(name) — the same code
path as the xframe-demo binary. cargo check --examples passes for all
547; the 5 pilot examples were built, run under Xvfb and screenshotted.
Extract run_widget() from main.rs into src/lib.rs; the binary is now a
thin argv wrapper and each examples/<WidgetName>.rs is a minimal complete
program calling run_widget(name). Pilot: GtkButton, GtkLabel, GtkEntry,
GtkCalendar, InstPressureGauge (built, run under Xvfb, screenshotted).
ChartWidget and IndicatorWidget draw through an inner XGraph /
IndicatorWidget with its own state + PlotView, created at the
construction bounds. The Widget::set_bounds default only updated the
outer state, so after demo/layout called set_bounds(40,40,...) all
250 Indicator + 36 Chart widgets still drew at the top-left corner.
The runner masked it (whole-window draw metric + clicks landing
inside both rects); the pixel-diff crop exposed it (IndUpDownRatio
and IndUpDownVolumeRatio looked blank only because their 150x36
crop did not overlap the misplaced drawing at all).
Fix: Widget::set_bounds now calls a sync_bounds() hook (default
no-op); Chart/Indicator override it to propagate bounds to the
inner state + view. XGraph already synced its view; XSpreadsheet
draws from state only. Regression test
set_bounds_moves_widgets_to_their_rect places every widget at
(40,40) on a Canvas and asserts it paints inside its rect and
nothing at the origin (verified: fails without the fix).
The C++ GtkInvisible::draw() intentionally does nothing, not even a
design-time glyph, and all its event handlers return false. The Rust
DisplayWidget drew its 16x16 icon + label text for it, so the layout
script test CHECKDRAW BLANK-EXPECTED failed (67 non-white px in a
10x10 rect). Special-case kind == Invisible in draw/press/release/key.
Found by the layout script test after the real-widget swap.
- Delete xframe-common::widget (StubWidget + duplicate Widget trait);
the one trait is now xframe-widgets::Widget.
- New xframe-common::target::CtxTarget: xframe_core::DrawTarget (and
FontSource) adapter over DrawCtx, so the real widgets draw into the
demo/layout windows. Text goes through DrawCtx::draw_text (PolyText8),
keeping the black-bars fix intact.
- xframe-core X11Target::draw_string: ImageText8 -> PolyText8 (same
black-bars fix; the live target still had the bug).
- xframe-demo / xframe-layout: create widgets via xframe_widgets::create,
core StyleManager with the exact C++ default/dark styles, fonts
resolved through the target; label text = registry kind (closest
available approximation of each C++ constructor default text).
- xframe-test-runner: doc note updated (real widgets under test now).
- Fix pre-existing clippy error in xframe-common ico test (0*16+5 -> 5).
- NOTE: do not run cargo fmt --all here: rustfmt inserts commas in the
archetype_impl! macro call sites and breaks the build (verified);
generated files are intentionally unformatted.