pub struct Overlap { /* private fields */ }Expand description
A node that contains many children which are stacked on top of each other and do not interact.
Implementations§
Source§impl Overlap
impl Overlap
Sourcepub fn with_child(self, index: NodeIndex) -> Self
pub fn with_child(self, index: NodeIndex) -> Self
Add a new child to the list.
Sourcepub fn with_align(self, align: (Alignment, Alignment)) -> Self
pub fn with_align(self, align: (Alignment, Alignment)) -> Self
Set the horizontal and vertical alignment of the container, not the children.
Sourcepub fn add_child(&mut self, index: NodeIndex)
pub fn add_child(&mut self, index: NodeIndex)
Add a child to the list. The child will appear on top (last-visited).
Sourcepub fn remove_child(&mut self, index: usize, tree: &mut UiTree) -> bool
pub fn remove_child(&mut self, index: usize, tree: &mut UiTree) -> bool
Remove a child from the list.
Returns true if the child was removed.
Sourcepub fn set_child_position(&mut self, index: usize, position: usize) -> bool
pub fn set_child_position(&mut self, index: usize, position: usize) -> bool
Move a child to a new index. Lower indices are visited first.
Returns true if the child was moved.
Sourcepub fn get_child_index(&self, index: usize) -> Option<NodeIndex>
pub fn get_child_index(&self, index: usize) -> Option<NodeIndex>
Returns the tree index associated with a child at a given list index.
Trait Implementations§
Source§impl UiNode for Overlap
impl UiNode for Overlap
Source§fn get_align_mut(&mut self) -> (&mut Alignment, &mut Alignment)
fn get_align_mut(&mut self) -> (&mut Alignment, &mut Alignment)
Get a mutable reference to the alignment of the node.
Source§fn calculate_min_size(&self, tree: &UiTree) -> (f32, f32)
fn calculate_min_size(&self, tree: &UiTree) -> (f32, f32)
Calculate the minimum size of the node. Read more
Source§fn calculate_rects(&self, cache: &NodeCache, tree: &UiTree) -> Vec<Rect>
fn calculate_rects(&self, cache: &NodeCache, tree: &UiTree) -> Vec<Rect>
Recalculate the position and size of child nodes, in the same order and count as
get_visible_children. Read moreSource§fn get_children(&self) -> Vec<NodeIndex>
fn get_children(&self) -> Vec<NodeIndex>
Get all children of the node, if applicable.
Auto Trait Implementations§
impl Freeze for Overlap
impl RefUnwindSafe for Overlap
impl Send for Overlap
impl Sync for Overlap
impl Unpin for Overlap
impl UnsafeUnpin for Overlap
impl UnwindSafe for Overlap
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more