Commit Graph
11 Commits
Author SHA1 Message Date
Muse 843d9f8c8a Registry 547 -> 562: XFrame monitor widgets + README + generator fix
Register the 15 new X* monitor widgets (includes, kWidgetNames,
kWidgetSection as Misc / X, factory cases 547-561, kWidgetCount
562); sections.py Misc / X assignment; regenerate
src/xframe_palette.h (562 entries, palette --check clean); 16x16
icons; README 547 -> 562 plus X* monitor-family section with
per-widget one-liners and example build/run commands.

Also fix a pre-existing seam-test failure (proven on clean main
9088092): the generator emitted .w.set_label() for the
Frame/GroupBox/Panel kinds, but TFrame / TGroupBox / TPanel only
have set_text — gate the GtkFrame-only setters on the mapped class
being GtkFrame so the other classes fall through to set_text.
make test (seam test) now passes: 562 mapped, generated project
builds.
2026-12-05 17:56:33 +00:00
cnmcdee 56a34bb1cf Task 3: placement sizes are max(bucket default, content minimum) so the outer border encloses each widget's content
27 widgets (18 dialogs, 2 calendars, 3 views, 4 choosers) get larger defaults via MIN_SIZES in widgets/tools/gen_registry.py, applied in default_size() and regenerated into widgets/common/registry.h. Verified live under Xvfb (dialogs sweep, 28 widgets, screenshots): 15 of the 18 originally-overflowing dialogs now fit at placement time (e.g. GtkAboutDialog 520x260, TPageSetupDialog 320x400, TColorDialog 520x300, picture dialogs 480x240). Three are internal draw-layout collisions, not placement size: TFindDialog Direction label overlaps Find Next, GtkFileChooserDialog Name header overlaps the path field, TFontDialog caption overlaps OK/Cancel (its lists expand to fill the dialog height).
2026-12-02 05:10:27 +00:00
cnmcdee 05a85ddf8a Phase 4: named live-apply dispatch in registry.h; repair gen_registry.py
registry.h gains 8 Phase 4 IWidget virtuals (set_named_color/double/int/
bool/string, set_y_range, set_anchor, set_value_str), one SFINAE trait per
distinct Stock/Instrumentation setter, and Holder overrides with if-chains
over (prop -> setter). The named dispatch keeps the virtual count flat
while covering all 116 Phase 4 prop names.

gen_registry.py was stale: regenerating it deleted the hand-added Phase 2
colour virtuals and the whole Phase 3 block. tools/port_registry_blocks.py
ports those 60 virtuals/traits/overrides back into the template (verified:
regeneration is a byte-identical no-op) and inserts the Phase 4 blocks, so
registry.h is generated again, not hand-edited.
2026-11-30 14:07:19 +00:00
cnmcdee 5c10871d15 Phase 2 widget setters (C++): Button default/cancel/kind/modal-result/layout with default ring and kind text; Entry alignment/char-case/numbers-only/hide-selection/auto-select with live filtering and max-length truncation; Label transparent/show-accel-char/focus-control with & stripping; CheckBox allow-grayed/alignment/value-checked/unchecked with right-box draw; RadioButton group-id; ComboBox style/drop-down-count/width/sorted/read-only/max-length/auto-complete/char-case; ListBox sorted; Scale show-sel-range/sel-start/sel-end with range draw; TextView/Memo max-length/alignment/scroll-bars/want-tabs/want-returns/hide-selection with Memo editable/cursor-visible; CheckListBox set_items/set_checked_items/selected-row/sorted; 35 new IWidget virtuals via SFINAE 2026-11-30 09:43:25 +00:00
cnmcdee c4057ced85 Phase 2 Flag 10: Lazarus event names (OnClick, OnChange, OnMouseDown, ...) in the Inspector Events pane; raw pointer/keyboard/double-click events wired through Holder IWidget callbacks (450ms double-click rule); generator find_map/event_callback normalise class names via xframe_type_key so event toggles reach generated code; cursor-changed on Spreadsheet/StringGrid wires on_select_cell (fixes generated XSpreadsheet compile error) 2026-11-30 09:24:07 +00:00
cnmcdee 2df40841ac Phase 1 C2 fix: placeholder detector uses the callable pattern
GtkEntry::set_placeholder_text takes std::string BY VALUE, so the
exact-signature static_cast detector never matched it and the
Holder set_placeholder_text was a silent no-op. The detector now
uses the callable pattern
decltype(std::declval<T&>().set_placeholder_text(std::declval<std::string>())).
registry.h regenerated; verified by the standalone registry test
(set_placeholder_text now resolves and returns true).
2026-11-30 05:54:57 +00:00
cnmcdee ca9abcc189 Phase 1 C2: IWidget live-apply virtuals for the generic property set
Adds set_value, set_active, set_active_index, set_items,
set_fill_color, set_range, set_digits, set_fraction, set_draw_value,
set_editable, set_max_length, set_placeholder_text, set_wrap,
set_wrap_mode, set_xalign, set_selectable, set_inconsistent,
set_show_heading, set_show_day_names, set_color_rgb,
set_orientation_vertical, set_page_size, set_upper, set_step,
set_lower, set_page_increment, set_password, set_show_password,
set_direction, set_cursor_visible, set_multi_select, and get_text.
Default no-op (false / empty), Holder overrides via SFINAE with
exact-signature static_cast member pointers, so a bool never matches
set_active(int) and a double never matches set_value(int). registry.h
is generated from gen_registry.py; the diff is additions only.
2026-11-30 05:30:57 +00:00
cnmcdee 37d53180cb Fix 6: Inspector tracks XFrame canvas selection
The Inspector read g_selected, a GTK Item* that real palette placements
never create, so it always showed Window (Root). The canvas now notifies
the designer on selection change (xframe_canvas_set_selection_callback,
fired after press/key/place/select/delete); the Inspector mirrors the
selected widget into g_xframe_sel with geometry spins, property editors
(mapped to the GTK prop/event tables), events and delete, and Inspector
edits live-apply (text/label/caption, enabled, visible via SFINAE
setters on IWidget/Holder) and persist to codegen through per-widget
props/signals stored in the core and copied by snapshot_project().
Also syncs the generator template (gen_registry.py) with the
hand-edited registry.h, verified by byte-identical regeneration.
2026-11-30 04:55:09 +00:00
cnmcdee c31b4b6a8b Step 5: cut .fdj to XFrame-only, drop the GTK palette (547 XFrame entries)
Palette is XFrame-only: the 36 GTK widgets are gone from designer.ui
and main.cpp (547 entries from xframe_palette.h). .fdj holds only
XFrame widgets; on load a GTK/unknown type is skipped with a clear
message, never migrated. snapshot/load now go through the embedded
XFrame canvas; the GTK Item machinery stays only as selftest
scaffolding (legacy_gtk_snapshot) until it is removed in a follow-up.
Selftest phases 3-8 rewritten for the step-4 XFrame generator (4
files, lg::Holder markers, file-level + XFrame round-trips, GTK skip
rule, bad-file rejection). Palette/converter tests updated to 547;
xframe_palette.h regenerated (one stale comment line). Docs updated.
Also: selftest cleans scratch generation dirs first, and the cleanup
call assigns its return value (void cast does not silence
-Wunused-result for system() on this toolchain).
2026-11-30 00:42:10 +00:00
cnmcdee 6e9e7b5fe3 Fix malformed 16px ICOs so all 547 palette icons load
Pillow writes 16px ICOs with unpadded 2-byte AND-mask rows (840 B vs spec
872 B, biSizeImage 768 vs 832); Ubuntu 26.04 glycin rejects them, so 0
icons attached to the palette. New widgets/tools/fix_icons.py pads each
mask row to 4 bytes and corrects the size fields (XOR pixels identical
547/547); gen_icons.py now calls it after every save; stale 32bpp
comments corrected to 24bpp. Glycin loads 547/547, ico.h harness 547/547,
palette self-test 583/583.
2026-11-29 04:49:52 +00:00
cnmcdee 77a5edfe2c Merge expanded widget set: 547 XFrame widgets, combined palette (583), layout, docs 2026-11-29 03:38:35 +00:00