pub struct Layout { /* private fields */ }Expand description
A node in the layout tree for creating splits and grids.
Implementations§
Source§impl Layout
impl Layout
Sourcepub fn with_ratio(self, ratio: u32) -> Self
pub fn with_ratio(self, ratio: u32) -> Self
Set a ratio for this layout (default is 1).
Sourcepub fn with_minimum_size(self, size: u16) -> Self
pub fn with_minimum_size(self, size: u16) -> Self
Set a minimum size for this layout.
Sourcepub fn update<R: Renderable + Send + Sync + 'static>(&mut self, renderable: R)
pub fn update<R: Renderable + Send + Sync + 'static>(&mut self, renderable: R)
Set the renderable content.
Sourcepub fn children_mut(&mut self) -> &mut Vec<Layout>
pub fn children_mut(&mut self) -> &mut Vec<Layout>
Get mutable access to children.
Sourcepub fn split_row(&mut self, layouts: Vec<Layout>)
pub fn split_row(&mut self, layouts: Vec<Layout>)
Split the layout horizontally (into columns).
Sourcepub fn split_column(&mut self, layouts: Vec<Layout>)
pub fn split_column(&mut self, layouts: Vec<Layout>)
Split the layout vertically (into rows).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Layout
impl !RefUnwindSafe for Layout
impl Send for Layout
impl Sync for Layout
impl Unpin for Layout
impl !UnwindSafe for Layout
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Measurable for Twhere
T: Renderable,
impl<T> Measurable for Twhere
T: Renderable,
Source§fn measure(&self, width: usize) -> Measurement
fn measure(&self, width: usize) -> Measurement
Measure this renderable at the given width.