pub struct LayoutEngine { /* private fields */ }Expand description
Layout engine powered by taffy.
Implementations§
Source§impl LayoutEngine
impl LayoutEngine
Sourcepub fn new_leaf(&mut self, style: &FlexStyle, width: f32, height: f32) -> u64
pub fn new_leaf(&mut self, style: &FlexStyle, width: f32, height: f32) -> u64
Create a new leaf node with measured size.
Sourcepub fn remove_child(&mut self, parent: u64, child: u64)
pub fn remove_child(&mut self, parent: u64, child: u64)
Remove a child from a parent node.
Sourcepub fn compute(&mut self, available_width: f32, available_height: f32)
pub fn compute(&mut self, available_width: f32, available_height: f32)
Compute layout for the entire tree.
Sourcepub fn node_count(&self) -> usize
pub fn node_count(&self) -> usize
Get the number of nodes.
Trait Implementations§
Auto Trait Implementations§
impl !Send for LayoutEngine
impl !Sync for LayoutEngine
impl Freeze for LayoutEngine
impl RefUnwindSafe for LayoutEngine
impl Unpin for LayoutEngine
impl UnsafeUnpin for LayoutEngine
impl UnwindSafe for LayoutEngine
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