UiTree

A retained, platform-neutral UI tree.

Every operation is confined to the thread that creates this tree. Operational methods and close are not reentrant. The state property may be read on the owner thread during an active callback. An empty tree measures to IntSize.Zero. An empty tree performs no layout work and returns empty paint, input, and semantics results. A complete description is validated before mutation. Structural validation and local validation-hook failures leave an active tree unchanged and available for retry. Any failure after validation begins reconciliation, lifecycle work, or a pipeline operation poisons the tree. The tree clears retained ownership and attempts cleanup. Cleanup preserves the primary Throwable instance and suppresses later distinct failures on it.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

The current lifecycle state, read on the owning tree thread.

Functions

Link copied to clipboard
open override fun close()

Cleans all retained ownership in descendant-first order.

Link copied to clipboard

Dispatches event to the currently focused logical component.

Link copied to clipboard

Dispatches event to the reverse paint-order hit path.

Link copied to clipboard

Dispatches event to the currently focused logical component.

Link copied to clipboard
fun layout()

Places every measured node that participates in the current pass.

Link copied to clipboard
fun measure(constraints: Constraints): IntSize

Measures the retained tree under constraints.

Link copied to clipboard

Paints the laid-out tree in parent-before-child order.

Link copied to clipboard

Collects unresolved semantics in parent-before-child order.

Link copied to clipboard
fun update(description: Element)

Reconciles a complete immutable element description.