7 Commits
Author SHA1 Message Date
cnmcdee fea9ea368f Delete the standalone xframe-layout crate
The unified XFrame-native canvas lives inside the designer now, so the
standalone layout process, its file-based selection IPC and its
workspace membership are gone. The Flatpak launcher just starts the
designer; xframe-common no longer mentions the layout in its
description and activate_window is documented for its remaining use.
2026-11-30 01:48:43 +00:00
cnmcdee b421710785 lightgui-designer: XFrame-native canvas, XFrame-only palette and .fdj
Embed the XFrame canvas in the designer: GtkDrawingArea
(double-buffered FALSE) drawn on with x11rb on its GDK-managed X
window (no socket/foreign window), porting the standalone layout
interaction — 16px handles, 8px hit pad, 450ms double-click checked
before drag, 8px drag threshold. Palette is XFrame-only (547);
palette clicks arm placement in-process, no selection file. .fdj
is XFrame-only: GTK widgets are dropped on load, never migrated.
Seam converter is identity mapping (layout name IS the .fdj type).
cargo check clean; SELFTEST PASS; palette selftest 547/547 PASS.
2026-11-30 01:12:14 +00:00
cnmcdee aed11c9bd4 UI Theme editor: wire View -> Color Theme picker, Dracula preset
- View -> Color Theme now opens the real picker from lightgui-support
  (was a stub note); the designer depends on lightgui-support.
- Fifth built-in preset: Dracula (#282a36 bg, #ff79c6 keyword), same
  colours as the C designer.
- New theme_ui module: Apply repaints the code view (the plain
  TextView the designer actually uses) and the canvas; the canvas
  follows the theme when the project has no window background
  (project background still wins); the saved theme is applied to the
  canvas at startup. Clearing the project background reveals the
  theme background (bulk.rs).
- Theme tests updated to 5 built-ins with Dracula checks.
- Verified: cargo test --workspace 176 passed / 0 failed; all five
  presets + a custom colour applied live under Xvfb and persisted
  across a restart.
2026-11-29 14:56:13 +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
cnmcdee 04fd68c380 Add xframe-widgets: Widget trait + 14 archetypes for all 547 widgets
Widget trait + state machine (bounds, visible/enabled/focused/
pressed/hover, value/min/max, on_click, draw/button_press/release/
motion/key) with one implementation per archetype driven by
data/registry.json + data/props.json + data/events.json via
generator/gen_data.py (registry 547, props 35 types, events 27 types).
Outliers have their own modules: XGraph (graph.rs) and XSpreadsheet
(spreadsheet.rs, full formula engine). Indicator widgets hold one fdi
def from xframe-indicators (200 with a def, 50 without) and draw it as
a chart with the XGraph view model. The 547 .ico icons are copied as-is
under assets/icons/ (see PROVENANCE.md) and decoded by icons.rs.

xframe-core draw.rs: helpers now take &mut (impl DrawTarget + ?Sized)
so they accept &mut dyn DrawTarget (the Widget trait passes trait
objects); added a default put_image blit to the DrawTarget trait.

Tests: 23/23 pass (state machine, factory creates all 547, ICO decode
of all 547, XGraph view math, XSpreadsheet formulas, indicator
passthrough, props/events spot checks); warning-free.
2026-11-29 07:02:51 +00:00
cnmcdee 3d53281388 Add lightgui-debug and lightgui-support: GDB MI debugger + theme/preferences/codeview/cmake ports
lightgui-debug: GdbSession over gdb -q -i=mi2 pipes with hand-written MI
parser (mi.rs), settings/breakpoint/variable types, and the 44-check
C++ harness ported as Rust tests (37 console + 7 GTK, gdb 17.1).
lightgui-support: CodeTheme + C tokenizer/highlighter, FontSettings,
CodeView fold/gutter/inspection widget, CMake project builder.
Tests: debug 59/59, support 23/23 (incl. theme/font/cmake suites).
cargo test clean, zero rustc warnings, clippy clean, cargo fmt clean.
2026-11-29 06:10:11 +00:00
cnmcdee 122ae8bd45 Add lightgui-gen: byte-identical C++/GTK code generator port 2026-11-29 06:00:36 +00:00