Commit Graph
16 Commits
Author SHA1 Message Date
cnmcdee ba3b144383 Phase 5 follow-up: step-over lands in the caller; Hits column syncs
- debugger.py step_over: pdb stops once more at the --Return--
  event inside the finishing function, so one extra `next` lands
  in the caller (GDB `next` behaviour). A --Return-- stop at a
  breakpoint line is no longer misreported as a breakpoint hit.
- debugger_ui.py: sync hit counts from pdb on every stop so the
  breakpoint pane's Hits column shows the real count.
- tests: step over the last line of a function lands in the caller
  (new test_step_over_last_line_lands_in_caller).
  Full suite: 240 tests pass.
2026-12-01 03:35:16 +00:00
cnmcdee b6702c381e Phase 5: pdb step debugger (session + UI) + Install Libraries
- lightgui/debugger.py: PdbSession driving python3 -m pdb in a
  subprocess (start/run/restart, break/enable/disable/clear,
  continue, step into/over/out, stack, locals, watches, stop).
  State machine idle/running/stopped/exited; stop kills the whole
  process group (SIGTERM then SIGKILL) so Stop can never hang on a
  GUI app; Run from Stopped/Exited restarts with the current target
  and re-applies breakpoints; no temp breakpoints (stop-on-entry
  uses pdb's natural first stop, break-on-main is persistent).
- lightgui/debugger_ui.py: debugger window mirroring the C layout
  (toolbar, Target row, status, breakpoints left, locals/watches/
  stack right, output console). Breakpoint pane 420px / 320px
  location column; in-place row updates + id-based selection
  restore; checkbox toggles apply to the session first; watch and
  locals trees have search disabled (no search popup on click).
- lightgui/install_libs.py: Install Libraries flow (package to
  system site-packages, launcher to /usr/local/bin, .desktop to
  /usr/local/share/applications); pkexec first, sudo -S fallback
  with an Enter-submits password dialog; dry-run plan shown in the
  dialog. pkexec is not installed on the server (same honest limit
  as the C/Rust fix).
- app.py: Debug menu (Start Debugging, Toggle Breakpoint, Step
  Into/Over/Out, Continue, Stop) + Tools > Install Libraries;
  debugger stop scrolls the Code window to the stopped line.
- tests: 38 new tests (debugger session incl. breakpoint hit,
  step over/into/out, locals, watches, continue to end, stop
  kills the debuggee, restart from Exited, enable/disable;
  install dry-run command construction/file list/paths).
  Full suite: 239 tests pass.
2026-12-01 03:25:40 +00:00
cnmcdee c22ff1059f Phase 4: app-level tests; fix tab-label GTK critical + Gdk version warning 2026-12-01 03:15:00 +00:00
cnmcdee b2ea94c30d Phase 4: menus in Code window + File/View/Help wiring, dirty tracking, Generate/Build/Run 2026-12-01 03:12:14 +00:00
cnmcdee 12ac32272c Phase 4: project I/O (project_io.py) + build/run flow (build.py) with filling, scrolling console 2026-12-01 03:12:14 +00:00
cnmcdee 45037b23a3 Phase 4: code view (codeview.py) — gutter outside scroller, folding, Monokai, tabs, Ctrl+S 2026-12-01 03:12:14 +00:00
cnmcdee 9c52f535bf Phase 4: Python codegen (generator.py) — deterministic, anchors, events, model-only comments 2026-12-01 03:07:12 +00:00
cnmcdee caaebd9608 Phase 4: rename tooltip-text display to Tooltip (was a second Hint row) 2026-12-01 03:05:58 +00:00
cnmcdee 9383299f8b Phase 3 fix: shared 6px side margin on Inspector box
Bulk / Colour sections butted against the window edge and the
palette hint text was clipped at the left. One margin on the
props_box instead of per-widget margins.
2026-12-01 03:00:14 +00:00
cnmcdee 0cd61a3578 Phase 3: Object Inspector window + properties + font picker + bulk parameter
Inspector in its own window (LightGUI - Object Inspector, ~340px),
opened on startup beside the designer; closing hides it, palette
pane button reopens it. Scrolled grid: geometry spins, generic set,
custom props, Events group (OnClick etc. as editable text props,
stored as Event=handler in signals). Rows hexpand to fill the panel
width (b96e545/29751be fix); model-only rows flagged with *. Editors
by type: entry, spin -/+, checkbox, enum dropdown, colour entry +
Pick button, font-name entry + Pick button opening a
Gtk.FontChooserDialog (55daf32/6a7c4c7). Live-apply via set_prop.
Selection tracking via CanvasState.on_selection_change (fires only
when the selection moves, so typing never rebuilds the grid).
Bulk parameter (Set all / selected / filtered / Clear param) and
16-swatch colour palette (selected widget, or window background).
Canvas now paints project.background so a root swatch is visible.
Tests: 144 total, all pass under Xvfb.
2026-12-01 02:51:36 +00:00
cnmcdee 5692908b7b Phase 2 fix: calendar week numbers + tree expander
- Calendar: show-week-numbers now actually draws the ISO week
  numbers (44-49 for Nov 2026) in the left column; the column
  width was reserved but the numbers were never painted.
- TreeView: the expander triangle is only drawn on rows that have
  children (next row starts with path + "/"); leaf rows like
  "Other" no longer get a spurious triangle.
2026-12-01 02:44:56 +00:00
cnmcdee 7717194cbd Phase 2: faithful generic drawings + live-apply plumbing + tests
core.py: per-widget Cairo drawing inside the 14 archetypes, ported
from Rust archetypes.rs / C widget draws -- buttons (incl. link,
colour-swatch, lock, glyph, MenuButton direction arrow), toggles
(check/radio/switch/toggle-button/menu-check), labels (xalign/yalign,
wrap, accel stripping), entries (password masking, placeholder,
alignment, search/calc variants), text views (wrap modes, scrollbars,
cursor), ranges (scale with ticks/sel-range, scrollbar with thumb +
arrows, progress, spin, level bar), lists (combo, colour box, listbox,
checklistbox, tree, listview incl. icon style, menubar/menu, toolbar,
stack switcher), containers (frame/groupbox, notebook, calendar grid,
splitter, scrolled window, header/action bar, statusbar, window),
display (image scene, shape 0-9, separator, spinner, video,
drawing area), dialogs (title bar, file/color/about variants),
charts (line/bars/candles), spreadsheet grid. Drawings honour
background/foreground/border/font props; invisible draws nothing,
disabled dims. Pixel parity with C is NOT required.

Live-apply: Widget.set_prop validates against lightgui.props
(raises ValueError on unknown/bad/out-of-range props), updates
Name/geometry fields or props, marks the widget dirty and calls
on_change; CanvasState wires widget.on_change and clears dirty
after drawing. Widget setters: set_items (ComboBox/ListBox, prunes
CheckListBox checked-items), get/set_checked_items,
set_item_checked, set_password/set_show_password (masked until
revealed), set_direction (MenuButton), set_cursor_visible
(TextView), set_lower/set_page_increment (ScrollBar), set_value
(clamped), set_active, set_text (canonical caption prop).

model.py: caption seeding now uses the table's canonical prop
(label for Button/CheckBox, text for Entry); kinds with neither
get no seed.

tests: test_props.py (generic set on all 547 kinds, SS2.1-SS2.10
lists, validation, live-apply/dirty, setters, model-only flags)
and test_draw.py (headless Cairo smoke: every kind draws without
crashing and paints something; prop-driven branches). Five Phase 1
tests updated to the Phase 2 set_prop contract (label, not text,
for Button/Label; no arbitrary props). Full suite: 107 tests OK.
2026-12-01 02:42:21 +00:00
cnmcdee eeccee6c9a Phase 2: property tables (props.py) generated from C props.h
- tools/gen_props.py parses /opt/lightgui/src/props.h (common_props +
  props_for tables, enum labels/values) and the 547-kind palette,
  emitting lightgui/props.py; REQUIRED spot-checks enforce the
  proposal SS2.1-SS2.10 lists against the C tables.
- Every kind gets the 43-prop generic set (Name, geometry, Color,
  Font Name/Size/Color/Style, Border, Enabled, Visible, Hint,
  ShowHint, Cursor, TabOrder, TabStop, Constraints, BorderSpacing,
  AutoSize, Tag, Align, Anchors); 38 family custom tables cover the
  generic widgets. Stock/Instrumentation get the generic set only
  (Phase 6 adds theirs via register_custom_table()).
- Lazarus display names + model_only flags (stored, generator
  comments, no live canvas effect); validate() canonicalises
  bool/int/double/enum/color or raises ValueError.
2026-12-01 02:35:39 +00:00
cnmcdee ff1cadbd80 Phase 1 fixes: import cairo for the draw signal, Gdk version, hint wrap
- canvas.py imports cairo so the draw signal marshalling works
  (needs python3-gi-cairo on the server; installed 3.56.2-1)
- app.py: gi.require_version Gdk + hint label wraps in the palette pane
- README: python3-gi-cairo is a required package
2026-12-01 02:28:36 +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
cnmcdee e2ee6f8bc3 Phase 0 skeleton: PyGObject/GTK IDE chrome, XFrame-native canvas (Python port) 2026-12-01 02:16:44 +00:00