Pytigon's native GUI controls are organized into a layered architecture built on wxPython.
guictrl.basectrl — Base classes (SchBaseCtrl)
└── guictrl.ctrl — Core orchestration and control tree management
├── guictrl.input — Text, choice, combo, numeric, date/time pickers
├── guictrl.button — Standard and toolbar buttons
├── guictrl.grids — Grid/wxGrid containers with cell editors
├── guictrl.panels — Scrollable panel containers
└── guictrl.popup — Popup dialogs and selectors
All Pytigon GUI controls inherit from SchBaseCtrl, which provides:
- Attribute handling — Tag attributes → widget properties
- Layout management — Sizer-based automatic layout
- Event binding — Event → handler method wiring
- Command routing — Action commands → application dispatch
The guictrl.factory module implements the Factory pattern:
- Registration — Map tag names to control classes
- Creation — Instantiate controls from tag definitions
- Lookup — Find control classes by name
This allows the tag parser to remain agnostic of control implementations — it delegates creation to the factory.
The guictrl.display module handles rendering controls to wxPython Device Contexts, sharing the Device Context abstraction with pytigon_lib.schhtml for consistent rendering between desktop and document output.