pub struct MaterialLayoutGrid<'a> { /* private fields */ }Expand description
Material Design layout grid component.
Layout grids provide structure and organize content across multiple screen sizes. They help create consistent layouts following Material Design principles.
let grid = MaterialLayoutGrid::new()
.columns(12)
.gutter(16.0)
.margin(24.0)
.cell(4, |ui| { ui.label("Column 1-4"); })
.cell(4, |ui| { ui.label("Column 5-8"); })
.cell(4, |ui| { ui.label("Column 9-12"); });
ui.add(grid);Implementations§
Source§impl<'a> MaterialLayoutGrid<'a>
impl<'a> MaterialLayoutGrid<'a>
Sourcepub fn debug_mode(self, debug: bool) -> Self
pub fn debug_mode(self, debug: bool) -> Self
Enable debug mode to visualize grid structure.
Sourcepub fn cell<F>(self, span: usize, content: F) -> Self
pub fn cell<F>(self, span: usize, content: F) -> Self
Add a cell that spans the specified number of columns.
Sourcepub fn cell_with_offset<F>(self, span: usize, offset: usize, content: F) -> Self
pub fn cell_with_offset<F>(self, span: usize, offset: usize, content: F) -> Self
Add a cell with an offset (empty columns before this cell).
Trait Implementations§
Source§impl<'a> Default for MaterialLayoutGrid<'a>
impl<'a> Default for MaterialLayoutGrid<'a>
Auto Trait Implementations§
impl<'a> Freeze for MaterialLayoutGrid<'a>
impl<'a> !RefUnwindSafe for MaterialLayoutGrid<'a>
impl<'a> !Send for MaterialLayoutGrid<'a>
impl<'a> !Sync for MaterialLayoutGrid<'a>
impl<'a> Unpin for MaterialLayoutGrid<'a>
impl<'a> UnsafeUnpin for MaterialLayoutGrid<'a>
impl<'a> !UnwindSafe for MaterialLayoutGrid<'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