|
Portals0.7.0 · dev (544a5c68c72e · 2026-11-28 UTC)
|
| Term | Meaning in Portals | Read next |
|---|---|---|
| Description / recipe | Owning single-use value describing controls to construct; awaiting construction and mount | Definition |
| UI stage | Object describing an operation applied to a scene with the pipe operator | Definition |
| Ownership | Responsibility for storing data and keeping it alive | Definition |
| Borrowing | Temporary access to data stored by another owner | Ownership |
| Grapheme | Text cluster treated as one cursor/editing unit | Text units |
| Terminal cell | One column and row position of the terminal grid | Text units |
| Frame | One layout/paint result encoded in a cell buffer | Definition |
| Model pin | Retained model data and availability captured by ModelFrame<T> | Definition |
| Backpressure | Refusal or delay when bounded delivery capacity is exhausted | Definition |
| Cancellation scope | UiScope groups subscriptions and timers for collective cancellation | Definition |
| Scene | The ui::Scene facade for recipe, setup, running and cleanup | Definition |
| ManagedScene | Scene-owned registrations, properties and models over the existing Application/tree | Managed controls |
| Ref | Observing typed handle; copying it does not keep a scene or widget alive | Text properties |
| Node | Checked tree identity with slot/generation; observes a mounted widget | Widget tree |
| Property | UI-owned typed value publishing immutable snapshots | Properties |
| ManagedState | Weak handle to a scene-owned Property | Managed controls |
| Snapshot | Owning immutable value/revision retained independently of later updates | Properties |
| Binding | Explicit connection between model/state and a view; ordinary text assignment copies a value | Bindings guide |
| PSS | Portals stylesheet syntax; resembles CSS but has its own small grammar | Styling guide |
| Theme | A palette expressed as ordinary style rules, installed in the THEME tier | Themes guide |
| Theme token | Named palette value; typed theme parameters differ from unsupported PSS string variables | Themes guide |
| LiveTheme | Typed parameter controller which recomputes ordinary sheets using the existing resolver | Compile-time styles |
| Layer / tier | Independently installed sheet / its precedence class | Style layers |
| Selector | Predicate over explicit type/id/classes/state metadata | Styles |
| Invalidation | Request to recompute layout or paint; layout includes paint | Properties |
| UI owner thread | Thread on which scene/tree mutation and lifecycle operations are admitted | Managed controls |
| Diagnostic / final report | Operation record / report delivered after attempted cleanup | Declarative UI |
| $name | TBD — M5: code-provided or observed parameter, separate from theme parameters | Themes |
| theme.* | TBD — M5: namespace of semantic PSS theme parameters | Themes |
| this.text / len | TBD — M5: localized control text / its terminal-cell width under WidthPolicy | Styling |
| Checked parameter assignment | TBD — M5: validate a candidate before atomic publication; optional policy must be explicit | Themes |
| TBD | Planned behavior or unfinished guide section; see the planned-feature milestones | Planned features |
| Milestone | Planned group and order of work; delivery dates are specified separately | Planned features |
A recipe is a ui::Description<T> value describing how to create a control and its children. For example, ui::label("Hello") describes a label; ui::vbox(ui::label("Hello")) describes a container with that label. The recipe stores constructor arguments, child recipes and callbacks. It can be moved and is consumed once by mounting, including a failed mount. Creating a recipe does not insert controls into a tree.
ui::scene(std::move(recipe)) returns a ui::Scene object that owns the application's runtime and manages preparation, configuration, running and cleanup. Construction stores the recipe; it does not mount controls or enter terminal mode. Preparation mounts the recipe: it creates controls in WidgetTree and registers their bindings with ManagedScene. ui::runApp() prepares the scene before running it. See declarative composition for preparation errors and lifecycle constraints.
A UI stage describes an operation applied to a scene with |. ui::style(...) returns a configuration object that specifies stylesheet rules. For example, auto styling = ui::style(pss); creates a ui::StyleStage. scene | styling applies its rules to the scene. The stage can also appear inline: scene | ui::style(pss). ui::runApp() returns a stage that runs the scene and produces an exit code.
An owning object stores the data it needs for its lifetime. The style object returned by ui::style(pss) owns the parsed stylesheet, so it does not need the caller's original string after that call returns. A borrowed reference is valid only while its owner and the granting operation permit access. For example, references supplied by WidgetTree::read are limited to its callback. An observing reference such as ui::Ref<T> accesses another owner's object and does not extend its lifetime.
GraphemeText divides Unicode text into extended grapheme clusters. A letter and its combining accent can form one cluster used for cursor movement. A terminal cell is one grid position. WidthPolicy determines how many cells a supported text cluster occupies; bytes, clusters and cells are counted separately. See text and width.
The application prepares data, calculates layout and consumes the widgets' paint commands into CellBuffer. FrameWriter then encodes the changed cells for the terminal. Entering WidgetTree::frame restricts which tree operations are allowed; frame preparation and output delivery are described in the runner.
model.pin() captures a ModelFrame<T> that keeps the provider snapshot and one immutable table of consumer results alive. Pass the same pin to every view of that model during a frame so they see consistent data and availability. This model frame is distinct from the painted terminal frame. See models.
A bounded queue can refuse a publication with WOULD_BLOCK when it is full. The caller decides whether to retry after delivery, report the refusal, or use an explicitly permitted replacement policy. See scheduler queues.
UiScope groups scheduler registrations. Closing it prevents new invocations, including queued deliveries; a running callback keeps its captures until it returns. Model requests use cooperative cancellation through request.cancel(). Stopping and joining producer threads remains the application's responsibility. See scheduler cancellation and model requests.