10 Commits
Author SHA1 Message Date
Muse 9e6f882575 Regen data tables from lightgui e474894: kTypes 36->38, EventDef lazarus
- 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.
2026-12-05 19:20:00 +00:00
Muse ad23184f1c Monitor widgets: visual fixes + palette pending-icons carve-out + shots
- 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.
2026-12-05 18:12:17 +00:00
Muse 76fad722d9 Add 15 XFrame monitor widgets (registry 547 -> 562)
New Archetype::Monitor (MonitorWidget, kind-dispatched draw) for
XHistoryGraph, XCoreGrid, XNetGraph, XTempHistory, XUsageBar,
XStackBar, XVerticalBar, XTachometer, XArcGauge, XDonutGauge,
XProcessList, XLoadBadge, XMonitorButton, XMonitorGrid, XSysBox.

- data/registry.json + data/palette.json: 15 entries, registry kept
  in sorted order (the C extractor requires it); palette Misc/X
  group re-sorted, other sections untouched, registry_index
  refreshed (XGraph 545->548, XSpreadsheet 546->555).
- crates/xframe-widgets/src/monitor.rs: stdlib-only live checks
  (/proc scan, systemctl is-active, TcpStream::connect_timeout),
  poll()/update() with a 2s staleness guard, deterministic demo
  seeding; unit tests incl. headless Canvas draw for all kinds.
- Placeholder 16x16 icons (assets/PROVENANCE.md notes they are
  placeholders pending the C port) + 15 demo examples + README
  monitor-family section (547 -> 562).
- xframe-common ico test tolerates the 15 monitor icons as
  pending until the C icons land (matched by name, not index).

cargo build --workspace: clean, warning-free. xframe-common lib
8/8, xframe-widgets lib 28/28, widget_tests 24/24, demo smoke
3/3, designer palette/seam 4/4 + 4/4 pass.
2026-12-05 17:30:17 +00:00
Muse 2819a316e4 Ind* indicators: OHLCV CSV loading for all 250 kinds
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.
2026-12-02 10:44:12 +00:00
Muse b42ab73b80 xframe-demo: per-widget cargo examples for all 547 kinds
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.
2026-12-02 06:10:24 +00:00
Muse 099e3122b1 xframe-demo: share run logic in lib so per-widget examples use the same path
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).
2026-12-02 06:01:33 +00:00
Muse 62f2d3651c widget_tests: drop unused mut in list_select_and_keys (clippy) 2026-11-29 08:15:22 +00:00
Muse bf50641662 Fix set_bounds for Chart/Indicator widgets (drew at 0,0 after a move)
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).
2026-11-29 07:47:36 +00:00
Muse aa019fa3bc GtkInvisible: draw nothing, ignore input (matches C++)
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.
2026-11-29 07:30:16 +00:00
Muse aad728a8aa Wire real xframe-widgets into demo/layout; delete stub Widget trait
- 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.
2026-11-29 07:12:46 +00:00