Commit Graph
4 Commits
Author SHA1 Message Date
cnmcdee 3ed3f57151 XFrame border: per-widget border style via the place file
- SStyle_Manager::add_border_style clones the base style and overrides
  only the border fields (line colour, radius, line width) when set;
  unset fields keep the style defaults (radius 6, 1px dark-grey
  outline), so existing widgets look identical.
- IWidget::set_style_name (pure virtual, forwarded by Holder<T>) lets
  the layout give a placed widget its own border style.
- Place file extended (backwards compatible): x y [width color radius];
  a bare old-format x y still places with the default border.
- Placed records the border; write_state reports border=<w> <color> <r>.
- Designer: the XFrame placement border is set in the Inspector Window
  (Root) view (the designer cannot show an XFrame widget in its
  Inspector) and written into the place file on canvas click.
- Verified: place file 512 360 3 #ff0000 10 -> layout state
  border=3 #ff0000 10, 1072 red pixels drawn.
2026-11-29 19:54:09 +00:00
cnmcdee 75470266f3 XFrame placement, 16px handles, About, menu to Code window, tabbed editor
- XFrame placement: layout raises+activates itself via EWMH
  (_NET_ACTIVE_WINDOW + XRaiseWindow + XSetInputFocus) on every new
  palette selection, and the designer forwards a canvas click to the
  layout via a place-request file (/tmp/lightgui-place.txt,
  $LIGHTGUI_PLACE) when an XFrame widget is selected, so placement
  works even when the click lands on the designer canvas. Verified
  under openbox (real WM): selection raises the layout, place file
  centres the widget on the click.
- Resize handles: 16px drawn (was 12px), 32x32 grab target (8px hit
  pad around each handle centre). All 8 handles verified by real
  mouse drags under openbox: SE corner resizes both axes exactly,
  N edge height-only, W edge width-only; handles drawn last
  (foreground) so they are always on top.
- Help -> About: GtkAboutDialog with the git commit hash baked in
  at build time (Makefile -DLIGHTGUI_GIT_HASH) and the build date.
- Menu bar moved out of the main designer window into the LightGUI
  Code window (reparented from root_box at startup); the layout
  window is now just the layout manager. Ctrl+E on the main window
  toggles the Code window back in when it is hidden.
- Tabbed multi-file editor in the Code window: GtkNotebook, one
  codeview per tab, File -> Open File in Code... opens a file in a
  new tab, per-tab dirty flag / Ctrl+S save / close button (asks
  before dropping unsaved edits), Variables pane + splitter and
  //region folding kept per tab. Debugger opens the stopped file in
  its own tab instead of overwriting the current one; refresh shows
  generated code in its own tab and never clobbers a hand-opened file.
- tests/code_window_tests.sh: reopen check now uses Ctrl+E.
2026-11-29 17:51:24 +00:00
cnmcdee e7d35b6d9b Fix XFrame placement, resize handles, palette width lock, Variables splitter, //region folding
- XFrame placement: layout window now raises itself (XRaiseWindow) when a
  palette selection arrives, so it no longer stays buried behind the
  designer and the click lands on the layout window instead of the
  designer canvas. Verified: palette click + layout click places the
  widget (GtkAboutDialog 362 250 300 220).
- Resize handles: 9px -> 12px, hit padding 2 -> 4 (grab target ~20x20),
  and a 3px drag threshold so a double-click does not shift the widget
  out from under the second press. Verified: double-click shows 8
  orange handles; SE drag +40,+30 resizes 300x220 -> 340x250 exact.
- Palette window: fixed width via gtk_window_set_geometry_hints
  (min=max=250, height 200..10000). Verified under openbox: side-edge
  drag leaves width at 250, top/bottom drag changes height.
- Variables in scope pane: now a GtkPaned (vertical orientation =
  horizontal divider bar, dragged up/down) between the code area and
  the pane, replacing the fixed-size packing. Verified live: dragging
  the divider up grows the Variables pane; split_pos reported in the
  codewin dump for testing.
- Region folding: recognise //region / //endregion (and // region)
  in addition to #region / // #region (kept for compat); generator now
  emits //region / //endregion. Verified: fold test (4 regions, 3
  region folds, //region inside a string opens no fold) and live
  collapse of a //region block in the code view.
2026-11-29 14:29:16 +00:00
cnmcdee 77a5edfe2c Merge expanded widget set: 547 XFrame widgets, combined palette (583), layout, docs 2026-11-29 03:38:35 +00:00