pub struct Grid {
pub rows: usize,
pub cols: usize,
pub spacing: f32,
}Expand description
Grid - lays out children in a 2D grid
Fields§
§rows: usize§cols: usize§spacing: f32Implementations§
Trait Implementations§
Source§impl LayoutView for Grid
impl LayoutView for Grid
Source§fn size_that_fits(
&self,
proposal: SizeProposal,
_subviews: &[&dyn LayoutView],
_cache: &mut LayoutCache,
) -> Size
fn size_that_fits( &self, proposal: SizeProposal, _subviews: &[&dyn LayoutView], _cache: &mut LayoutCache, ) -> Size
Propose a size for this view given the available space
Source§fn place_subviews(
&self,
bounds: Rect,
subviews: &mut [&mut dyn LayoutView],
cache: &mut LayoutCache,
)
fn place_subviews( &self, bounds: Rect, subviews: &mut [&mut dyn LayoutView], cache: &mut LayoutCache, )
Place subviews within the given bounds
Source§fn flex_weight(&self) -> f32
fn flex_weight(&self) -> f32
Returns the flex weight of this view (default is 0.0, which means fixed/intrinsic)
Source§fn debug_layout(&self, indent: usize) -> String
fn debug_layout(&self, indent: usize) -> String
Return a debug representation of this layout subtree.
The
indent parameter controls the indentation level for nested display.Auto Trait Implementations§
impl Freeze for Grid
impl RefUnwindSafe for Grid
impl Send for Grid
impl Sync for Grid
impl Unpin for Grid
impl UnsafeUnpin for Grid
impl UnwindSafe for Grid
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