pub struct Layout<'a> { /* private fields */ }Expand description
A 2D grid-based layout container.
Children are placed at grid coordinates with optional spanning. The grid solver distributes space according to row/column constraints.
Implementations§
Source§impl<'a> Layout<'a>
impl<'a> Layout<'a>
Sourcepub fn rows(self, constraints: impl IntoIterator<Item = Constraint>) -> Self
pub fn rows(self, constraints: impl IntoIterator<Item = Constraint>) -> Self
Set the row constraints.
Sourcepub fn columns(self, constraints: impl IntoIterator<Item = Constraint>) -> Self
pub fn columns(self, constraints: impl IntoIterator<Item = Constraint>) -> Self
Set the column constraints.
Sourcepub fn child(
self,
widget: impl Widget + 'a,
row: usize,
col: usize,
rowspan: usize,
colspan: usize,
) -> Self
pub fn child( self, widget: impl Widget + 'a, row: usize, col: usize, rowspan: usize, colspan: usize, ) -> Self
Add a child widget at a specific grid position with spanning.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Layout<'a>
impl<'a> !RefUnwindSafe for Layout<'a>
impl<'a> !Send for Layout<'a>
impl<'a> !Sync for Layout<'a>
impl<'a> Unpin for Layout<'a>
impl<'a> !UnwindSafe for Layout<'a>
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