Uir¶
Stl.UIRoutines
Import¶
import "_IVLS/std-library/nodes/components/uir.ksp"Node: Stl.UIRoutines¶
Uses: Init, PostReload
Overview¶
Stl.UIRoutines
Deferred UI update dispatcher for IVLS.
- Maintains a boolean cache ensuring each routine runs at most once per update cycle
- Flush all routines with
uir.update(), target one by ID withuir.update_by_id() - Dispatch groups of related routines with
uir.RunGroup
LIBRARY: std-library
API¶
Nodes¶
| Name | Description |
|---|---|
node Stl.UIRoutines |
Deferred UI update dispatcher node. |
Defines¶
| Name | Description |
|---|---|
define STL.UI_ROUTINES =+ debug |
Extension point constant for registering UI routine names into STL.UI_ROUTINES. |
Const Blocks¶
| Name | Description |
|---|---|
const uir.id |
Ordered list of registered UI routine names, one per STL.UI_ROUTINES entry. |
Macros¶
| Name | Description |
|---|---|
uir.Debug(#uir#) |
Emits a developer-mode trace message identifying which UI routine was posted. |
uir.Run(#uir#) |
Runs a single UI routine if it has not already been called this cycle. |
uir.RunConditional(#uir#) |
Emits a select-case branch that calls a UI routine when the active case matches ... |
uir.RunGroup(#grp#) |
Dispatches all UI routines registered under a named group constant. |
Functions¶
| Name | Description |
|---|---|
uir.empty_cache() |
Reset all entries in the update cache to FALSE. |
uir.update() |
Flushes the update cache and runs all registered UI routines once. |
uir.update_by_id(id) |
Runs a single UI routine identified by its integer ID. |
Nodes¶
node Stl.UIRoutines¶
Callbacks: Init, PostReload
Deferred UI update dispatcher node.
Defines¶
define STL.UI_ROUTINES =+ debug¶
Extension point constant for registering UI routine names into STL.UI_ROUTINES.
Const Blocks¶
const uir.id¶
Ordered list of registered UI routine names, one per STL.UI_ROUTINES entry.
Macros¶
uir.Debug(#uir#)¶
Emits a developer-mode trace message identifying which UI routine was posted.
| Parameter | Description |
|---|---|
#uir# |
UI routine name to include in the trace message. |
uir.Run(#uir#)¶
Runs a single UI routine if it has not already been called this cycle.
| Parameter | Description |
|---|---|
#uir# |
UI routine name; used to index uir.id and call uir. |
uir.RunConditional(#uir#)¶
Emits a select-case branch that calls a UI routine when the active case matches its ID.
| Parameter | Description |
|---|---|
#uir# |
UI routine name; used to generate the case label and call target. |
uir.RunGroup(#grp#)¶
Dispatches all UI routines registered under a named group constant.
| Parameter | Description |
|---|---|
#grp# |
Group constant name; expands to UIR. |
Functions¶
uir.empty_cache()¶
Reset all entries in the update cache to FALSE.
Iterates the full uir.id range and sets each cache slot to FALSE,
allowing every routine to be called again in the next update cycle.
Side effects: | Name | Type | Purpose | |------|------|---------| | u | integer | Loop index over uir.id.SIZE |
uir.update()¶
Flushes the update cache and runs all registered UI routines once.
uir.update_by_id(id)¶
Runs a single UI routine identified by its integer ID.
| Parameter | Type | Description |
|---|---|---|
id |
integer | UI routine ID from uir.id constants. |
Example¶
// TODO: Add usage example