Skip to main content

Module layout

Module layout 

Source

Modules§

core
policies

Structs§

LayoutAllocationDebugStats
LayoutBox
Layout information for a single node.
LayoutMeasurements
Result of running the measure pass for a Compose layout tree.
LayoutNodeData
Snapshot of the data required to render a layout node.
LayoutTree
Result of running layout for a Compose tree.
MeasureLayoutOptions
SemanticsCallback
Discrete event callback reference produced during semantics extraction.
SemanticsDetails
What a semantics node reports beyond its place, its name, its value and its click: the properties few nodes set. A node holds them only when it sets one, so a node without any stays small.
SemanticsNode
A single node within the semantics tree.
SemanticsPlacement
Where layout put a semantics node: its offset inside its parent’s content and where its own content starts inside it.
SemanticsText
A text node’s text in the semantics tree, shared with the node’s modifier slices rather than copied out of them.
SemanticsTree
Rooted semantics tree extracted after layout.

Enums§

LayoutNodeKind
Classification of the node captured inside a LayoutBox.
SemanticsAction
Semantics action exposed to the input system.
SemanticsRole
Semantic role describing how a node should participate in accessibility and hit testing. Roles are now derived from SemanticsConfiguration rather than widget types.

Traits§

LayoutEngine
Extension trait that equips MemoryApplier with layout computation.

Functions§

build_layout_tree_from_applier
Builds a layout snapshot from retained layout state in the live applier tree.
build_semantics_tree_from_applier
Builds a semantics snapshot from retained layout state in the live applier tree.
build_semantics_tree_from_layout_tree
Builds a semantics tree from an existing LayoutTree.
can_skip_scroll_reveal_from_applier
Proves that revealing target cannot scroll any ancestor in root’s surface.
has_placed_content
Whether any box placed under root has area, as build_layout_tree_from_applier would place it: the walk stops at the first such box and reads no node’s modifiers or semantics.
measure_layout
Runs the measure phase for the subtree rooted at root.
measure_layout_with_options
placed_content_extent
The far right and bottom edges of the boxes with area placed under root, measured from the root’s origin as build_layout_tree_from_applier places them, reading no node’s modifiers or semantics. None while nothing under root has area.
top_modal_from_applier
The modal the semantics tree of root would be rooted at, found without building the tree: the topmost placed, visible modal that takes space, or None when no modal is open. Unlike a tree update, it leaves the nodes’ semantics dirty flags alone.
tree_needs_layout
Check if a node or any of its descendants needs measure (selective measure optimization). This can be used by the app shell to skip layout when the tree is clean.
tree_needs_semantics
Check if the root semantics snapshot is dirty.
update_semantics_tree_from_applier
Brings tree up to date with the placed nodes under root, as build_semantics_tree_from_applier would build it, reusing what tree held.