pub struct SubcomposeLayoutNode { /* private fields */ }Expand description
Node responsible for orchestrating measure-time subcomposition.
Implementations§
Source§impl SubcomposeLayoutNode
impl SubcomposeLayoutNode
pub fn new( modifier: Modifier, measure_policy: Rc<dyn for<'scope> Fn(&mut SubcomposeMeasureScopeImpl<'scope>, Constraints) -> MeasureResult>, ) -> Self
Sourcepub fn with_content_type_policy(
modifier: Modifier,
measure_policy: Rc<dyn for<'scope> Fn(&mut SubcomposeMeasureScopeImpl<'scope>, Constraints) -> MeasureResult>,
) -> Self
pub fn with_content_type_policy( modifier: Modifier, measure_policy: Rc<dyn for<'scope> Fn(&mut SubcomposeMeasureScopeImpl<'scope>, Constraints) -> MeasureResult>, ) -> Self
Creates a SubcomposeLayoutNode with ContentTypeReusePolicy.
Use this for lazy lists to enable content-type-aware slot reuse. Slots with matching content types can reuse each other’s nodes, improving efficiency when scrolling through items with different types.
pub fn handle(&self) -> SubcomposeLayoutNodeHandle
pub fn set_measure_policy( &mut self, policy: Rc<dyn for<'scope> Fn(&mut SubcomposeMeasureScopeImpl<'scope>, Constraints) -> MeasureResult>, )
pub fn set_modifier(&mut self, modifier: Modifier)
pub fn set_debug_modifiers(&mut self, enabled: bool)
pub fn modifier(&self) -> Modifier
pub fn resolved_modifiers(&self) -> ResolvedModifiers
Sourcepub fn layout_state(&self) -> LayoutState
pub fn layout_state(&self) -> LayoutState
Returns a clone of the current layout state.
Sourcepub fn set_position(&self, position: Point)
pub fn set_position(&self, position: Point)
Updates the position of this node. Called during placement.
Sourcepub fn set_measured_size(&self, size: Size)
pub fn set_measured_size(&self, size: Size)
Updates the measured size of this node. Called during measurement.
Sourcepub fn clear_placed(&self)
pub fn clear_placed(&self)
Clears the is_placed flag. Called at the start of a layout pass.
Sourcepub fn modifier_slices_snapshot(&self) -> Rc<ModifierNodeSlices>
pub fn modifier_slices_snapshot(&self) -> Rc<ModifierNodeSlices>
Returns the modifier slices snapshot for rendering.
pub fn state(&self) -> Ref<'_, SubcomposeState>
pub fn state_mut(&self) -> RefMut<'_, SubcomposeState>
pub fn active_children(&self) -> Vec<NodeId> ⓘ
Sourcepub fn mark_needs_measure(&self)
pub fn mark_needs_measure(&self)
Mark this node as needing measure. Also marks it as needing layout.
Sourcepub fn mark_needs_layout_flag(&self)
pub fn mark_needs_layout_flag(&self)
Mark this node as needing layout (but not necessarily measure).
Sourcepub fn mark_needs_redraw(&self)
pub fn mark_needs_redraw(&self)
Mark this node as needing redraw without forcing measure/layout.
Sourcepub fn needs_measure(&self) -> bool
pub fn needs_measure(&self) -> bool
Check if this node needs measure.
Sourcepub fn mark_needs_semantics(&self)
pub fn mark_needs_semantics(&self)
Mark this node as needing semantics recomputation.
Sourcepub fn needs_semantics_flag(&self) -> bool
pub fn needs_semantics_flag(&self) -> bool
Returns true when semantics need to be recomputed.
Sourcepub fn needs_redraw(&self) -> bool
pub fn needs_redraw(&self) -> bool
Returns true when this node requested a redraw since the last render pass.
pub fn clear_needs_redraw(&self)
Sourcepub fn mark_needs_pointer_pass(&self)
pub fn mark_needs_pointer_pass(&self)
Marks this node as needing a fresh pointer-input pass.
Sourcepub fn needs_pointer_pass(&self) -> bool
pub fn needs_pointer_pass(&self) -> bool
Returns true when pointer-input state needs to be recomputed.
Sourcepub fn clear_needs_pointer_pass(&self)
pub fn clear_needs_pointer_pass(&self)
Clears the pointer-input dirty flag after hosts service it.
Sourcepub fn mark_needs_focus_sync(&self)
pub fn mark_needs_focus_sync(&self)
Marks this node as needing a focus synchronization.
Sourcepub fn needs_focus_sync(&self) -> bool
pub fn needs_focus_sync(&self) -> bool
Returns true when focus state needs to be synchronized.
Sourcepub fn clear_needs_focus_sync(&self)
pub fn clear_needs_focus_sync(&self)
Clears the focus dirty flag after the focus manager processes it.
Sourcepub fn modifier_capabilities(&self) -> NodeCapabilities
pub fn modifier_capabilities(&self) -> NodeCapabilities
Returns the modifier capabilities for this node.
pub fn has_layout_modifier_nodes(&self) -> bool
pub fn has_draw_modifier_nodes(&self) -> bool
pub fn has_pointer_input_modifier_nodes(&self) -> bool
pub fn has_semantics_modifier_nodes(&self) -> bool
pub fn has_focus_modifier_nodes(&self) -> bool
Trait Implementations§
Source§impl Node for SubcomposeLayoutNode
impl Node for SubcomposeLayoutNode
Source§fn set_parent_for_bubbling(&mut self, parent: NodeId)
fn set_parent_for_bubbling(&mut self, parent: NodeId)
Minimal parent setter for dirty flag bubbling.