3 Commits
Author SHA1 Message Date
cnmcdee 5b0c6f02fd Single-placement mode + code-view sync on placement
Task 1: placing a widget now disarms placement mode — the next canvas
click places nothing until another palette widget is selected. Escape
and clicking the selected palette row again also cancel an armed
placement. Previously pending_kind persisted across placements, so
every click placed another fresh widget.

Task 2: placing a widget refreshes the Code window at once
(Lazarus-style) via a new CanvasState.on_placed hook wired to
Application.refresh_code_view(), so the generated code shows the new
widget without pressing Generate.

Tests: replaced test_pending_kind_persists_across_placements with
test_pending_kind_disarms_after_one_placement, plus
test_escape_cancels_pending_kind and
test_on_placed_fires_after_canvas_click_placement (280 tests pass).

Verified live under Xvfb (p-place-verify.sh + screenshots): place-once,
Escape-cancel, toggle-cancel, re-arm, code sync, clean app log.
2026-12-02 03:15:36 +00:00
cnmcdee c8263b2035 Phase 7 tests: bounds-change hook + geometry refresh + debugger label placement
- CanvasState on_bounds_change: programmatic resize, set_prop width,
  set_bounds/move_to and handle drags fire it; selection changes and
  unrelated prop edits do not.
- Inspector refresh_geometry: programmatic resize updates the width/
  height spins in place (same editor widgets, no rebuild) and a spin
  edit still live-applies; no-op with nothing selected.
- DebuggerWindow: Breakpoints label is the first child of its pane
  (above the list) and sits above the tree in window coordinates;
  Output label has a 6px top margin.
2026-12-01 04:08:21 +00:00
cnmcdee cef7988a84 Phase 1: XFrame core + canvas + palette data + project model
- xframe/core.py: Widget base, 14 archetype draw classes (Cairo),
  registry over all 547 kinds; 13px handles, 8px grab pad, 450ms
  double-click, 8px drag threshold, 24x16 resize floor (C/Rust)
- xframe/canvas.py: CanvasState state machine (display-free, tested)
  + Gtk.DrawingArea shell; placement, selection, double-click
  handles, drag, handle resize, Delete/Escape, viewport tracking
- xframe/palette.py: generated from Rust registry_gen.rs, cross-checked
  vs C xframe_palette.h; 547 entries in 11 sections + 36 legacy
  model.h type keys as LEGACY_TYPES (583 total in the Rust data file)
- model.py: Project + .fdj save/load byte-compatible with the C writer
- app.py: main window with filterable palette list + canvas + status bar
- tests/: 62 stdlib unittest tests
2026-12-01 02:23:54 +00:00