Files
lightgui_python/lightgui/xframe/__init__.py
cnmcdee cef7988a84 Phase 1: XFrame core + canvas + palette data + project model
- xframe/core.py: Widget base, 14 archetype draw classes (Cairo),
  registry over all 547 kinds; 13px handles, 8px grab pad, 450ms
  double-click, 8px drag threshold, 24x16 resize floor (C/Rust)
- xframe/canvas.py: CanvasState state machine (display-free, tested)
  + Gtk.DrawingArea shell; placement, selection, double-click
  handles, drag, handle resize, Delete/Escape, viewport tracking
- xframe/palette.py: generated from Rust registry_gen.rs, cross-checked
  vs C xframe_palette.h; 547 entries in 11 sections + 36 legacy
  model.h type keys as LEGACY_TYPES (583 total in the Rust data file)
- model.py: Project + .fdj save/load byte-compatible with the C writer
- app.py: main window with filterable palette list + canvas + status bar
- tests/: 62 stdlib unittest tests
2026-12-01 02:23:54 +00:00

26 lines
611 B
Python

"""XFrame widgets: the home-brewed widget set the canvas draws with Cairo.
GTK is IDE chrome only; the canvas itself is XFrame-native, like the
C and Rust designers.
"""
from lightgui.xframe.core import ( # noqa: F401
HANDLE_HIT_PAD,
HANDLE_SIZE,
DBLCLICK_MS,
DRAG_THRESHOLD,
MIN_WIDTH,
MIN_HEIGHT,
Widget,
create,
lookup,
is_known_kind,
)
from lightgui.xframe import palette # noqa: F401
__all__ = [
"HANDLE_SIZE", "HANDLE_HIT_PAD", "DBLCLICK_MS", "DRAG_THRESHOLD",
"MIN_WIDTH", "MIN_HEIGHT",
"Widget", "create", "lookup", "is_known_kind", "palette",
]