GuiController

The toolkit-neutral core of the application: consumes GuiActions and exposes the resulting GuiModel. Every frontend (Swing, web, ...) talks to exactly one of these and never touches solver/state internals directly.

Inheritors

Properties

Link copied to clipboard
abstract val effects: Flow<GuiEffect>

Lossless, ordered, single-consumer requests to the hosting platform.

Link copied to clipboard
abstract val events: SharedFlow<GuiEvent>

Discrete, possibly-missed-if-unsubscribed notifications about what just happened (e.g. for logging/tests) - unlike effects, losing one doesn't break correctness since state always reflects the latest truth.

Link copied to clipboard
abstract val state: StateFlow<GuiState>

The full application state at any point in time; a frontend renders itself from this.

Functions

Link copied to clipboard
abstract suspend fun dispatch(action: GuiAction)

Applies one action, updating GuiModel.state and/or emitting GuiModel.events/GuiModel.effects.

Link copied to clipboard
abstract suspend fun shutdown()

Releases every resource this controller holds (solver sessions, coroutines); unusable afterwards.