Pytigon's window system provides the application shell — frames, notebooks, and pages that host controls.
| Frame | Class | Purpose |
|---|---|---|
| Application Frame | guiframe.appframe |
Main application window — wx.Frame subclass with Django embedding, toolbar integration, and notebook management |
| Browser Frame | guiframe.browserframe |
Web browser frame |
| Form Frame | guiframe.form |
Dynamic form generation from Django model definitions or tag-based layouts |
| Base Frame | guiframe.baseframe |
Base frame class with plugin initialization support |
The guiframe.notebook module provides a tabbed notebook container:
guiframe.notebookpage manages individual page lifecycleEach page in a notebook is managed by guiframe.page:
- Dynamic creation — Pages created on demand from configuration
- Django integration — Pages can host Django views
- Lifecycle — Initialize, activate, deactivate, close events
The main application window:
from pytigon_gui.pytigon import main
# Starts the application with:
# - Login dialog
# - Main menu bar
# - Toolbar (modern, standard, or tree style)
# - Notebook container for child pages
# - WebSocket bridge for real-time backend communication
main()
The appframe integrates:
1. Django embedding — HTTP requests to the backend for data
2. Toolbar system — Configurable toolbars (modern ribbon-style, classic, tree-based)
3. Notebook management — Tabbed document interface
4. Plugin initialization — init_plugins() discovers and loads plugins at startup
Windows communicate via:
- Signal system — Event-driven pub/sub between components
- WebSocket — Real-time bidirectional communication with Django backend
- Thread-safe operations — wx.CallAfter for cross-thread UI updates via guilib.threadwindow