pub struct Grid<'a, E> { /* private fields */ }Expand description
A grid layout container.
Implementations§
Source§impl<'a, E> Grid<'a, E>
impl<'a, E> Grid<'a, E>
Sourcepub fn new(columns: Vec<GridLength>, rows: Vec<GridLength>) -> Grid<'a, E>
pub fn new(columns: Vec<GridLength>, rows: Vec<GridLength>) -> Grid<'a, E>
Create Grid.
Sourcepub fn from_str(
columns: impl AsRef<str>,
rows: impl AsRef<str>,
) -> Result<Grid<'a, E>, ParseGridLengthError>
pub fn from_str( columns: impl AsRef<str>, rows: impl AsRef<str>, ) -> Result<Grid<'a, E>, ParseGridLengthError>
Create Grid with string-representative of grid lengths.
Sourcepub fn push<'b>(
&'b mut self,
widget: &'a mut dyn LayoutChild<Error = E>,
) -> GridChildBuilder<'a, 'b, E>
pub fn push<'b>( &'b mut self, widget: &'a mut dyn LayoutChild<Error = E>, ) -> GridChildBuilder<'a, 'b, E>
Push a child into the panel.
Sourcepub fn set_loc(
&mut self,
p: Point2D<f64, LogicalSpace>,
) -> Result<(), LayoutError<E>>
pub fn set_loc( &mut self, p: Point2D<f64, LogicalSpace>, ) -> Result<(), LayoutError<E>>
Move the location.
Sourcepub fn set_size(
&mut self,
s: Size2D<f64, LogicalSpace>,
) -> Result<(), LayoutError<E>>
pub fn set_size( &mut self, s: Size2D<f64, LogicalSpace>, ) -> Result<(), LayoutError<E>>
Resize.
Sourcepub fn set_rect(
&mut self,
r: Rect<f64, LogicalSpace>,
) -> Result<(), LayoutError<E>>
pub fn set_rect( &mut self, r: Rect<f64, LogicalSpace>, ) -> Result<(), LayoutError<E>>
Set the location and size.
Trait Implementations§
Auto Trait Implementations§
impl<'a, E> Freeze for Grid<'a, E>
impl<'a, E> !RefUnwindSafe for Grid<'a, E>
impl<'a, E> !Send for Grid<'a, E>
impl<'a, E> !Sync for Grid<'a, E>
impl<'a, E> Unpin for Grid<'a, E>
impl<'a, E> UnsafeUnpin for Grid<'a, E>
impl<'a, E> !UnwindSafe for Grid<'a, E>
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