The root interface for all ConsoleForge application models. More...
Public Member Functions | |
| ICmd? | Init () |
| Called once at program start. | |
| IWidget | View () |
| Produce the root widget for the current model state. | |
Public Attributes | |
| IModel | Model |
| Pure update function. | |
The root interface for all ConsoleForge application models.
Implement this to define your application's state and behavior.
| ICmd? ConsoleForge.Core.IModel.Init | ( | ) |
Called once at program start.
Return a command to execute on startup, or null for no initial side-effect.
| IWidget ConsoleForge.Core.IModel.View | ( | ) |
Produce the root widget for the current model state.
The framework renders this widget using a persistent double-buffered context. Called after every Update. MUST be a pure, side-effect-free function.
| IModel ConsoleForge.Core.IModel.Model |
Pure update function.
Given the current message, return the new model state and an optional follow-up command. Convention: return a new record copy (C# 'with' expression). MUST NOT return a null IModel.