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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.