Context
Global context singleton for the elements UI system.
Provides centralized access to:
- Theme configuration
- User preferences and window states
- Root view container
- Focused window tracking
- Shared assets management
The context automatically persists user data (window positions, sizes, etc.) to local storage and restores it on startup.
Access the singleton instance via Context.context
.
Static Members
Global singleton instance of the UI context
Instance Members
Default is false
, automatically set to true
when any of this instance's observable variables has changed.
The current UI theme controlling visual appearance
User preferences and persistent data storage
Read-only map of window data by window ID
The root view container for all UI elements
The currently focused window (receives keyboard input)
Shared assets instance for loading UI resources
Adds or updates window data in the persistent storage. Window data includes position, size, and other state information.
Name | Type | Description |
---|---|---|
windowData |
WindowData | The window data to store (must have non-null id) |
Private Members
Event when any observable value as changed on this instance.
Name | Type |
---|---|
instance |
Context |
fromSerializedField |
Bool |
Event when theme field changes.
Name | Type |
---|---|
current |
Theme |
previous |
Theme |
Private constructor for singleton pattern. Loads persisted user data and sets up auto-save.
Metadata
Name | Parameters |
---|---|
:build |
tracker.macros.ObservableMacro.build() |
:autoBuild |
tracker.macros.ObservableMacro.build() |
:build |
ceramic.macros.EntityMacro.buildForCompletion() |
:autoBuild |
ceramic.macros.EntityMacro.buildForCompletion() |
:build |
tracker.macros.EventsMacro.build() |
:autoBuild |
tracker.macros.EventsMacro.build() |
:allow |
elements.Im |
:allow |
elements.ImSystem |