LayoutNode

Struct LayoutNode 

Source
pub struct LayoutNode {
    pub modifier: Modifier,
    pub measure_policy: Rc<dyn MeasurePolicy>,
    pub children: IndexSet<NodeId>,
    /* private fields */
}

Fields§

§modifier: Modifier§measure_policy: Rc<dyn MeasurePolicy>§children: IndexSet<NodeId>

The actual children of this node (folded view - includes virtual nodes as-is)

Implementations§

Source§

impl LayoutNode

Source

pub fn new(modifier: Modifier, measure_policy: Rc<dyn MeasurePolicy>) -> Self

Source

pub fn new_virtual() -> Self

Create a virtual LayoutNode for subcomposition slot containers. Virtual nodes are transparent - their children are flattened into parent’s children list.

Source

pub fn set_modifier(&mut self, modifier: Modifier)

Source

pub fn set_measure_policy(&mut self, policy: Rc<dyn MeasurePolicy>)

Source

pub fn mark_needs_measure(&self)

Mark this node as needing measure. Also marks it as needing layout.

Source

pub fn mark_needs_layout(&self)

Mark this node as needing layout (but not necessarily measure).

Source

pub fn mark_needs_redraw(&self)

Mark this node as needing redraw without forcing measure/layout.

Source

pub fn needs_measure(&self) -> bool

Check if this node needs measure.

Source

pub fn needs_layout(&self) -> bool

Check if this node needs layout.

Source

pub fn mark_needs_semantics(&self)

Mark this node as needing semantics recomputation.

Source

pub fn needs_semantics(&self) -> bool

Returns true when semantics need to be recomputed.

Source

pub fn needs_redraw(&self) -> bool

Returns true when this node requested a redraw since the last render pass.

Source

pub fn clear_needs_redraw(&self)

Source

pub fn mark_needs_pointer_pass(&self)

Marks this node as needing a fresh pointer-input pass.

Source

pub fn needs_pointer_pass(&self) -> bool

Returns true when pointer-input state needs to be recomputed.

Source

pub fn clear_needs_pointer_pass(&self)

Clears the pointer-input dirty flag after hosts service it.

Source

pub fn mark_needs_focus_sync(&self)

Marks this node as needing a focus synchronization.

Source

pub fn needs_focus_sync(&self) -> bool

Returns true when focus state needs to be synchronized.

Source

pub fn clear_needs_focus_sync(&self)

Clears the focus dirty flag after the focus manager processes it.

Source

pub fn set_node_id(&mut self, id: NodeId)

Set this node’s ID (called by applier after creation).

Source

pub fn node_id(&self) -> Option<NodeId>

Get this node’s ID.

Source

pub fn set_parent(&self, parent: NodeId)

Set this node’s parent (called when node is added as child). Sets both folded_parent (direct) and parent (first non-virtual ancestor for bubbling).

Source

pub fn clear_parent(&self)

Clear this node’s parent (called when node is removed from parent).

Source

pub fn parent(&self) -> Option<NodeId>

Get this node’s parent for dirty flag bubbling (may skip virtual nodes).

Source

pub fn folded_parent(&self) -> Option<NodeId>

Get this node’s direct parent (may be a virtual node).

Source

pub fn is_virtual(&self) -> bool

Returns true if this is a virtual node (transparent container for subcomposition).

Source

pub fn resolved_modifiers(&self) -> ResolvedModifiers

Source

pub fn modifier_capabilities(&self) -> NodeCapabilities

Source

pub fn modifier_child_capabilities(&self) -> NodeCapabilities

Source

pub fn set_debug_modifiers(&mut self, enabled: bool)

Source

pub fn debug_modifiers_enabled(&self) -> bool

Source

pub fn modifier_locals_handle(&self) -> Rc<RefCell<ModifierLocalManager>>

Source

pub fn has_layout_modifier_nodes(&self) -> bool

Source

pub fn has_draw_modifier_nodes(&self) -> bool

Source

pub fn has_pointer_input_modifier_nodes(&self) -> bool

Source

pub fn has_semantics_modifier_nodes(&self) -> bool

Source

pub fn has_focus_modifier_nodes(&self) -> bool

Source

pub fn modifier_slices_snapshot(&self) -> ModifierNodeSlices

Source

pub fn semantics_configuration(&self) -> Option<SemanticsConfiguration>

Source

pub fn with_text_field_modifier_mut<R>( &mut self, f: impl FnMut(&mut TextFieldModifierNode) -> R, ) -> Option<R>

Access the text field modifier node (if present) with a mutable callback.

This is used for keyboard event dispatch to text fields. Returns None if no text field modifier is found in the chain.

Trait Implementations§

Source§

impl Clone for LayoutNode

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Drop for LayoutNode

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Node for LayoutNode

Source§

fn set_parent_for_bubbling(&mut self, parent: NodeId)

Minimal parent setter for dirty flag bubbling. Only sets the parent Cell without triggering registry updates. This is used during SubcomposeLayout measurement where we need parent pointers for bubble_measure_dirty but don’t want full attachment side effects.

Source§

fn mount(&mut self)

Source§

fn unmount(&mut self)

Source§

fn set_node_id(&mut self, id: NodeId)

Called after the node is created to record its own ID. Useful for nodes that need to store their ID for later operations.
Source§

fn insert_child(&mut self, child: NodeId)

Source§

fn remove_child(&mut self, child: NodeId)

Source§

fn move_child(&mut self, from: usize, to: usize)

Source§

fn update_children(&mut self, children: &[NodeId])

Source§

fn children(&self) -> Vec<NodeId>

Source§

fn on_attached_to_parent(&mut self, parent: NodeId)

Called when this node is attached to a parent. Nodes with parent tracking should set their parent reference here.
Source§

fn on_removed_from_parent(&mut self)

Called when this node is removed from its parent. Nodes with parent tracking should clear their parent reference here.
Source§

fn parent(&self) -> Option<NodeId>

Get this node’s parent ID (for nodes that track parents). Returns None if node has no parent or doesn’t track parents.
Source§

fn mark_needs_layout(&self)

Mark this node as needing layout (for nodes with dirty flags). Called during bubbling to propagate dirtiness up the tree.
Source§

fn needs_layout(&self) -> bool

Check if this node needs layout (for nodes with dirty flags).
Source§

fn mark_needs_measure(&self)

Mark this node as needing measure (size may have changed). Called during bubbling when children are added/removed.
Source§

fn needs_measure(&self) -> bool

Check if this node needs measure (for nodes with dirty flags).
Source§

fn mark_needs_semantics(&self)

Mark this node as needing semantics recomputation.
Source§

fn needs_semantics(&self) -> bool

Check if this node needs semantics recomputation.
Source§

fn update(&mut self)

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.