tiny.ui.SolvedRoot
Defined in tiny.ui.
A solved root names a node by its node array index, and the admission survey rejects a node index at or past the node count with error.SolvedRootNodeOutOfBounds.
API (2)
Fields and members
Public fields and members.
Source
Source: lib/ui/src/abi/envelope.zig:175
zig
/// A solved root names a node by its `node` array index, and the admission survey rejects a/// `node` index at or past the node count with `error.SolvedRootNodeOutOfBounds`./// Solved roots must be sorted and must not overlap, or `error.SolvedRootsUnordered`./// Every node with `flags.solved` requires exactly one matching `SolvedRoot` entry, and/// admission returns `error.SolvedNodeWithoutRoot` when one is missing./// Admission rejects a retained subtree that contains a solved node with/// `error.RetainedSolvedSubtree`, because splice does not carry solved rectangles from/// the old publish.////// A `SolvedRoot` points to the first rectangle for one contiguous preorder subtree through/// `rect_first`. A node carrying `flags.solved` names the subtree: its descendants remain/// real UI nodes for hit testing, facts, and accessibility.////// The supplied rectangles are in the publisher's own frame, in layout units, because/// their absolute positions in the UI viewport are not known at publish time. The root/// rectangle's width and height are the size arrange uses when it treats the solved/// subtree as one leaf, and its x and y define the publisher frame's origin for the/// subtree. After arrange places that leaf, each descendant moves by the difference/// between the arranged root origin and the supplied root origin. Every supplied width,/// height, and relative offset remains the same.////// A descendant can have a negative relative offset or extend beyond the root box: this is/// visible overflow and belongs in subtree bounds. Scrolling uses the descendant's own/// scroll and clip flags. Supplied rectangles are positions before scroll offset is applied.pub const SolvedRoot = extern struct { /// `SolvedRoot.node` must carry the `solved` flag, or `error.SolvedRootNotSolved`. node: u32 = 0, /// `rect_first` is the first of `subtree_count + 1` rects, where `subtree_count` is that /// node's, and they must fit the rect table, or `error.SolvedRectsOutOfBounds`. rect_first: u32 = 0,};Source: lib/ui/src/root.zig:25
zig
pub const SolvedRoot = abi.SolvedRoot;Also reachable as
Audit
| Definitions | 1 |
|---|---|
| Public names | 2 |
| Members | 2 |
| Version | 26.7.0 |
| Revision | daab053ee433 |