The Inspector window had no scrolled window: props_grid sat directly
in props_box, so every row below the window bottom edge was built but
unreachable -- no scrolling was possible at all. Phase 1 added ~15
rows to the common set (constraints, margins, autosize, tag, anchors,
align), so the lower half of the generic set and the Events section
were invisible and uneditable. The grid now lives in a vertically
scrolling window (verified live: tag, anchor-top/left/right/bottom,
align and Events all reachable).
A wildcard XLFD pattern can match a two-byte font first (e.g. a JIS
fixed font at size 16, which has no misc twin). XDrawString with
1-byte Latin text draws nothing with such a font, so widget labels
vanished whenever the font size resolved to one (size 16 confirmed:
JIS min_byte1=33; Sony and misc 1-byte fonts render fine). Both
font-resolution paths now list every match per pattern and return
the full XLFD name of the first single-byte font
(min_byte1 == max_byte1 == 0): font_xlfd_for (designer canvas) and
the emitted lightgui_pick_font helper (generated apps). Also silences
the -Wmissing-field-initializers warning on the Placed aggregate init
and adds the missing <cstdio> include to the shared core header.
05_menus failed the matrix with -Wunused-parameter: a menubar-only
design uses new_w alone, so new_h is unused (and a bottom-only
anchor set would leave new_w unused). The generator now emits
(void)new_w; / (void)new_h; when the lambda body does not use that
size.
props.h: common_props gains enabled, visible, font-name/size/bold/
italic/underline/strikeout, hint, show-hint, cursor, tab-order,
tab-stop, min/max-width/height, margin-*/around, autosize, tag,
anchor-top/left/right/bottom and align (None|Top|Bottom|Left|Right|
Client); Entry visibility replaced by password + show-password
(generator still honours legacy visibility=false).
generator.cpp: Anchors/effective_anchors (align maps to anchor
sets), lightgui_pick_font helper (XLFD candidate chain, emitted
only when a widget has a custom font) + conditional <cctype>,
apply_autosize helper (emitted only when a widget has autosize),
per-widget font into emit_widget_styles, Entry password/
show-password, Listbox selection-mode 3 -> set_multi_select,
Menubutton direction, Scrollbar lower/page-increment, Text
cursor-visible, enabled/visible via the IWidget virtuals, a
model-only NOTE comment (hint, tooltip-text, tag, cursor,
tab-order, tab-stop, margins, show-hint, font-underline/
strikeout), the apply_anchors resize lambda (Flag 1) called from
ConfigureNotify, and an apply_autosize call per autosize widget.
New props emit only when non-default, so 02_all_types stays
byte-identical.
main.cpp: GTK apply_prop guard -- the new generic props never reach
g_object_set with unknown names (enabled -> set_sensitive, tab-stop
-> can-focus, min-width/height -> size request, hint -> tooltip,
margin-around -> margin; the rest model-only in the GTK designer).
XFrame Inspector handlers sync the geometry spins after apply
(autosize / constraint clamping can resize the widget).
The GtkMenuButton standalone demo includes the component-local
(core/xframe_core.h) copy first, which lacked xf::draw_triangle_left
that the direction work (C1) calls -- the demo build failed while
the designer build worked (registry.h includes another component
first, whose core include resolves to the shared copy, and the
include guard then skips this copy). Mirror of draw_triangle_right
in this file.
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).
rebuild_widget_style builds a per-widget w{id}_style (background,
foreground, border-width/color/radius, per-widget font via an XLFD
candidate chain probed with XListFonts) on the placement border style
when one exists; the w style always owns its font so delete_style is
safe, and the border_<id> style is never deleted. Background also
drives set_fill_color on the classes whose draw overrides style fill
(Entry/TextView/Memo/PasswordEntry/SearchEntry). Full apply_prop
dispatch for the generic set plus value/range/step/page/lower/upper/
fraction/digits/active/items/password/direction/cursor-visible/
selection-mode/orientation/draw-value/editable/max-length/placeholder/
wrap/xalign/selectable/inconsistent/show-heading/show-day-names/color,
autosize (resize to fit caption/text, measured with the resolved
style font) and min/max constraint clamping in resize paths and
handle drags. Model-only props (anchors, align, tab order, cursor,
tag, margins, hints, font underline/strikeout) are stored only.
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.
ComboBox/ComboBoxText/ListBox set_items (pipe-separated, live canvas
only; generator keeps emitting per-item calls); ListBox multi-select
(set_multi_select, toggle on click, draw highlights the set);
Scrollbar lower_ + page_increment_ (clamp/thumb/Home/End honour lower,
PgUp/PgDn use page-increment); Entry password_ + show_password_ (masked
with * unless revealed); MenuButton direction_ (0=Up 1=Down 2=Left
3=Right 4=None, arrow zone moves to the matching side); TextView
cursor_visible_ (gates the caret). Shared core gains
SStyle_Manager::add_widget_style (per-widget style clone that owns its
font, so delete_style is safe on it; unlike add_border_style, which
shares the base font) and xf::draw_triangle_left.
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.
The reported symptom (a blank line after every line of generated
source) was investigated Nov 29, 2026 and does NOT reproduce in the
current generator: all 16 gen_matrix cases measure a
blank-after-content ratio of 0.01-0.06 (section separators only),
while double-spaced output scores ~1.0. This guard pins the clean
output so a regression fails loudly: tests/blank_lines_guard.py
checks every generated .cpp/.h under tests/out/ for a
blank-after-content ratio >= 0.20, and run_matrix.sh runs it right
after generation. Scope is source files only (README/Makefile are
short files whose paragraph/rule breaks legitimately score 0.25-0.34).
Verified: PASS on clean output (16 files); FAILs a double-spaced
file at ratio 0.99. Matrix: all 16 cases + guard pass.
Widgets are header-only (common/ + core/ + components/, 1100
headers), so make install copies them to
PREFIX/include/lightgui (default /usr/local/include/lightgui).
The generator now emits that as the default WIDGETS_DIR /
LIGHTGUI_WIDGETS_DIR instead of the hardcoded /opt/lightgui/widgets;
the -DLIGHTGUI_WIDGETS_DIR / make WIDGETS_DIR override still works.
Verified: make install puts 1100 headers in place; a generated
project builds with -I/usr/local/include/lightgui only and its
Makefile/CMakeLists contain no /opt/lightgui reference.
The drag removal left on_button_release with an unused button
parameter in GtkWindow and GtkApplicationWindow. Add (void)button.
TForm uses button, so it needed no change. Build is 0 warnings.
Root cause: GtkWindow, TForm and GtkApplicationWindow implemented
title-bar drag-to-move (drag_/dragging_ set on title-bar press,
on_motion moved the whole widget). In the generated app that let the
user drag a window widget around by its title bar -- widgets behaved
like design objects. Verified: dragging Toplevel_001 (GtkWindow) by
its title bar moved it before this change; after, it stays put.
Regular widgets (Button etc.) never moved -- only the three window
widgets had drag code. Removed the drag-to-move from all three
(members, press-to-start-drag, motion move, release clear). The
designer canvas still moves widgets via its own set_bounds path, so
design-time moving is unaffected. The Rust repo shares these widget
headers (/opt/lightgui/widgets), so Rust-generated apps get the fix
too.
The XFrame canvas (GtkFixed + DrawingArea in the scrolled window)
kept its fixed 800x600 size request when the designer window was
resized, leaving the dark viewport background visible as a border
around it. A size-allocate handler on the viewport now resizes the
canvas (and the project, which shares its size) to the viewport
allocation. The resize is deferred to an idle callback: the
size-allocate signal fires after the viewport has already allocated
its child for this pass, so resizing inside the handler lagged one
resize behind.
Verified geometrically under Xvfb/openbox: canvas X window tracks
the viewport exactly (1150x683 @ 1150x720, 1400x863 @ 1400x900,
900x563 @ 900x600); unfixed build stayed 800x600 at all sizes.
SELFTEST PASS.
alloc_rgb was emitted unconditionally and warned as unused under
-Wall -Wextra when the project has no background. It is now emitted
only when has_bg. GtkTreeView Column/Node are public because
set_columns/set_roots/get_roots expose them in public signatures.
Rust fixtures were regenerated from this fixed gen_matrix.
Replace the C++/GTK generator with one that emits a self-contained
XFrame app: XOpenDisplay/XCreateSimpleWindow, SStyle_Manager, one
lg::Holder<T> per placed widget with getter/setter properties, X event
loop dispatching via IWidget (contains/on_button_press/on_key/...),
WM_DELETE_WINDOW close. Output is main.cpp + CMakeLists.txt + Makefile
+ README.md (no indicators.h/drawings.h, no GTK).
Colours: background via verified direct setters where they exist, else
per-widget style clone; foreground ALWAYS via the style clone, because
the widgets set_text_color_rgb only affects the DISABLED text (every
draw() gates it on !enabled_) while enabled text comes from the style.
Class names are namespace-qualified from the registry create_widget()
spelling (165 xframe:: classes, e.g. IndADX; 85 Ind* classes are global).
Verified: make 0 warnings, SELFTEST PASS, palette 547/547,
code_window_tests ALL PASS, make test (547-widget generate + CMake
build) SEAM TEST ALL PASS, demo app renders under Xvfb with colour
proof (button bg red 6051px vs plain 0; label fg blue 185px).
Motion below the threshold no longer moves a widget, so a human
double-click (which jiggles a few px) is not swallowed by a drag.
The double-click check already ran before any drag logic (the dbl
branch returns before dragging=true is set); verified, not
restructured. Comments updated to 8px.
ide just launches ./lightgui (builds only with --build via plain make;
the redundant cmake re-build is gone). Delete widgets/layout/ (the
standalone layout executable) and drop it from widgets/CMakeLists.txt.
The file-based IPC header widgets/common/ipc.h is KEPT: it is still
referenced by widgets/palette/main_palette.cpp, which is now dead code
(ide no longer launches the palette process) but was not authorized
for deletion in this step.
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).
Embed the XFrame canvas in the designer window: a GtkDrawingArea
(double-buffered FALSE) in the GtkFixed canvas area, with the pure-X11
core (xframe_canvas_core) drawing placed widgets on its X window and
the DrawingArea GTK signals (draw, button-press/release, motion,
key-press) driving place/move/resize/delete/select. Palette selection
is wired in-process (no selection/place files); the core owns the
Placed vector and exposes accessors for later save/codegen steps.
Ports the standalone layout interaction (16px handles, 8px hit pad,
450ms double-click rule, Delete/BackSpace/Escape) without modifying
widgets/layout/main_layout.cpp.
The canvas is deliberately NOT a GtkSocket + raw X child window: that
design rendered and interacted correctly but killed the whole app with
an untrapped XInputExtension BadWindow error (GDK X error handler
calls _exit(1)) whenever another toplevel (e.g. the code window) was
closed. Bisected against the parent binary (survives) and a socket
with no child (survives); removing the foreign GdkWindow, setting the
event mask with raw XSelectInput, and forwarding all canvas events to
gtk_main_do_event did not fix it, and without a foreign window GDK
drops canvas events entirely. A GtkDrawingArea keeps the canvas a
normal GDK-managed window (verified with /tmp/proto_da.c). Also fixes
a latent -Wmaybe-uninitialized in GtkInfoBar.h (bx/by/bw/bh).