Commit Graph
8 Commits
Author SHA1 Message Date
cnmcdee fbfab38e41 Designer: poll shared XFrame selection, editable ComboBox/Listbox items, Scrollbar adjustment, Text text, Memo preview, border props
- Placement hole: the designer only set g_xframe_selected from its own
  combined palette, so a widget chosen in the separate XFrame palette
  never placed (on_canvas_press saw an empty selection). Poll the
  shared selection file (same path rule as xframe_selection_path) on
  the 200ms timer and at the start of on_canvas_press, so either
  palette works. Verified under openbox: separate-palette flow now
  places (GtkButton 0->1), combined-palette flow still places (1->2).
- ComboBox/Listbox: new editable items prop (pipe-separated, default
  Item 1|Item 2|Item 3); preview rebuilds from it, generator emits one
  append/insert per item. active / selection-mode unchanged.
- Scrollbar: editable lower/upper/step-increment/page-increment/
  page-size; preview reconfigures the adjustment, generator emits them.
  value/inverted unchanged; defaults preserve 0-100/1/10/10.
- Text: new text prop (same as Memo); preview and generator use it,
  falling back to the widget name when empty.
- Memo: preview now uses the text prop (was hardcoded to the name);
  added cursor-visible (same as Text).
- Border (GTK): border-width/border-color/border-radius in the common
  prop set; preview and generator emit border + border-radius CSS.
  Defaults (0/empty/0) preserve the current appearance.
- Tests: SELFTEST 35 items, widget_tests 58 passed, widget_tests.sh
  5 passed. Border CSS verified in generated code; XFrame border
  verified in the layout (1072 red pixels, state border=3 #ff0000 10).
2026-11-29 19:53:40 +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 800883b024 Rename FDesigner/cfree to LightGUI (binary lightgui, all docs) 2026-11-29 03:35:48 +00:00
Muse 23425a4dfd Merge event-handlers (0492137): signal table, Events pane, generated stubs 2026-11-25 12:13:38 -05:00
Muse 0492137214 Event handlers on all widgets: signal table, Events pane, generated stubs, tests
- src/events.h (new): natural GTK signal per widget type for all 36
  types (27 with signals, 9 with an explicit no-events note); kinds
  cover simple, switch-page, row-activated, row-selected, text-buffer,
  delete-event, draw, per-item toolbar/menu, and spreadsheet cells.
- Generator emits a stub handler + g_signal_connect for every
  connected signal (Widget.signals); Shape/Plot/StockChart draw stays
  wired exactly once. Stubs print an EVENT trace line under
  FDESIGNER_EVENT_TRACE (test harness only).
- Designer: Events section in the property pane — one check button
  per signal, builtin draw shown as always-connected, no-event types
  show the reason. Connections persist in .fdj as "signals".
- Self-test Phase 8: UI check-button toggle, all-signal generation
  checks, .fdj round-trip.
- tests/event_handler_tests.sh/.cpp + event_handler_runtime.cpp:
  36/36 generation markers, warning-free generated build, 41/41
  runtime triggers under Xvfb.
2026-11-25 11:54:50 -05:00
root cd5f07f619 CMake handling: generate CMakeLists.txt, build with CMake from the designer, open/build existing CMake projects
- Generator emits CMakeLists.txt alongside Makefile (cmake_minimum_required
  3.10, project(<Class> CXX), C++17, PkgConfig gtk+-3.0, explicit source
  list, add_executable(app ...), GTK include/link wiring); exe named app
  to match the Makefile target.
- New src/cmake_build.h/.cpp: cmake_lists_text, cmake_build_project
  (configure + build, captured output), cmake_project_exists,
  CMakeSettings persisted to ~/.config/fdesigner/cmake.conf
  (FDESIGNER_CMAKE_CONF override for tests).
- Designer File menu: Build with CMake... (last generated project, or
  pick a folder), Open CMake Project... (any dir with a CMakeLists.txt),
  CMake Settings...; Generate now offers Build with CMake (the default
  build path for generated projects) and reports the log + exe path.
- Self-test gains a CMake phase (settings round-trip, CMakeLists.txt
  markers, real console build, broken-file failure, cmake build of the
  generated GTK project); file count 4+2N -> 5+2N.
- New tests/cmake_tests.sh + tests/cmake_probe.cpp (31 checks); matrix
  and widget test harnesses link cmake_build.cpp; tests/out/ gitignored.
- DESIGN.md: CMake handling section.
2026-11-25 06:59:14 -05:00
Muse 7828ced3d6 Add Lazarus-style custom widgets: Memo, GroupBox, Panel, Image, Shape, Notebook, ScrollBox, Splitter, StatusBar, ToolBar, MenuBar, SpinEdit, TrackBar, ProgressBar, DateTimePicker, ColorBox, ListView, TreeView, StringGrid, Plot
Twenty Lazarus-palette widgets, each placeable from the palette
(grouped sections), selectable/draggable/deletable, with a per-type
property table in props.h and a standalone generated class:
Memo (GtkTextView), GroupBox/Panel (GtkFrame), Image (GtkImage),
Shape (cairo drawing area), Notebook (GtkNotebook), ScrollBox
(GtkScrolledWindow), Splitter (GtkPaned), StatusBar (GtkStatusbar),
ToolBar (GtkToolbar), MenuBar (GtkMenuBar), SpinEdit (GtkSpinButton),
TrackBar (GtkScale), ProgressBar, DateTimePicker (GtkCalendar+entry),
ColorBox (GtkColorButton), ListView/TreeView (GtkTreeView),
StringGrid (GtkTreeView+ListStore), Plot (cairo sine wave).
Self-test Phase 7 + tests/widget_tests.sh cover place/edit/drag/
delete/generate/compile/run and .fdj round-trip per widget.
2026-11-25 03:49:56 -05:00
Muse 9c94d93ae5 Import FDesigner C++/GTK3 designer with StockChart Pro
GUI designer (C++/GTK3, Glade .ui, code generator) plus indicator/drawing
libraries, chart tests and test matrix.
2026-11-25 02:35:23 -05:00