pub struct Grid<'a> { /* private fields */ }Expand description
A grid layout container.
Implementations§
Source§impl<'a> Grid<'a>
impl<'a> Grid<'a>
Sourcepub fn new(columns: Vec<GridLength>, rows: Vec<GridLength>) -> Self
pub fn new(columns: Vec<GridLength>, rows: Vec<GridLength>) -> Self
Create Grid.
Sourcepub fn from_str(
columns: impl AsRef<str>,
rows: impl AsRef<str>,
) -> Result<Self, ParseGridLengthError>
pub fn from_str( columns: impl AsRef<str>, rows: impl AsRef<str>, ) -> Result<Self, ParseGridLengthError>
Create Grid with string-representative of grid lengths.
Sourcepub fn push<'b>(
&'b mut self,
widget: &'a mut dyn Layoutable,
) -> GridChildBuilder<'a, 'b>
pub fn push<'b>( &'b mut self, widget: &'a mut dyn Layoutable, ) -> GridChildBuilder<'a, 'b>
Push a child into the panel.
Trait Implementations§
Source§impl Layoutable for Grid<'_>
impl Layoutable for Grid<'_>
Source§fn preferred_size(&self) -> Size
fn preferred_size(&self) -> Size
The preferred size.
Auto Trait Implementations§
impl<'a> Freeze for Grid<'a>
impl<'a> !RefUnwindSafe for Grid<'a>
impl<'a> !Send for Grid<'a>
impl<'a> !Sync for Grid<'a>
impl<'a> Unpin for Grid<'a>
impl<'a> !UnwindSafe for Grid<'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