3 Commits
Author SHA1 Message Date
cnmcdee caaebd9608 Phase 4: rename tooltip-text display to Tooltip (was a second Hint row) 2026-12-01 03:05:58 +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