How maximinus/pyui works
Main Components
A. Core Framework Layer:
• Base Components (/pyui/base.py, widget_base.py)
• Theme System (theme.py)
• Setup Configuration (setup.py)
B. Event System:
• Event Loop (events/loop.py)
• Event Queue (events/queue.py)
• Event Handlers (events/events.py)
C. Widget System:
• Basic Widgets (buttons, labels, images, etc.)
• Container Widgets (frames, spacers)
• Layout Management (containers.py)
D. Resource Management:
• Asset Handling (assets/ directory)
• Theme Resources (assets/themes/)
• Nine-Patch Resources (assets/nine_patch/)
E. SDL Integration Layer:
• Rendering Interface
• Platform-specific Implementation
┌─────────────────────────────────────────┐
• Application Layer │
• ┘
• ↑
┌─────────────────────────────────────────┐
• Widget System │
• ┬─────────────┬────────────┤
• Containers │ Controls │ Layouts │
• ┴─────────────┴────────────┘
• ↑
┌─────────────────────────────────────────┐
• Event System │
• ┬─────────────┬────────────┤
• Event Loop │ Queue │ Handlers │
• ┴─────────────┴────────────┘
• ↑
┌─────────────────────────────────────────┐
• SDL Render Engine │
• ┘
Important Relationships
A. Component Dependencies:
• Widgets depend on the base framework
• Event system integrates with widgets
• Theme system affects all visual components
• SDL renderer used by all visual components
B. Data Flow:
• Event propagation through the system
• Widget hierarchy and containment
• Resource loading and management
• Rendering pipeline
Specific Implementation Details
• Widget inheritance hierarchy
• Event propagation paths
• Demonstrate the theme system's influence
• Asset management flow