pub struct GridConfig { /* private fields */ }Expand description
The tracks, gaps, flow and named areas of a Grid. Compose’s
GridConfigurationScope: a track call adds the next row or column, and
the last gap call for an axis sets it.
Implementations§
Source§impl GridConfig
impl GridConfig
Sourcepub fn column(self, size: GridTrackSize) -> Self
pub fn column(self, size: GridTrackSize) -> Self
Adds a column.
Sourcepub fn columns(self, sizes: impl IntoIterator<Item = GridTrackSize>) -> Self
pub fn columns(self, sizes: impl IntoIterator<Item = GridTrackSize>) -> Self
Adds a column for each size, in order.
Sourcepub fn row(self, size: GridTrackSize) -> Self
pub fn row(self, size: GridTrackSize) -> Self
Adds a row.
Sourcepub fn rows(self, sizes: impl IntoIterator<Item = GridTrackSize>) -> Self
pub fn rows(self, sizes: impl IntoIterator<Item = GridTrackSize>) -> Self
Adds a row for each size, in order.
Sourcepub fn column_gap(self, gap: f32) -> Self
pub fn column_gap(self, gap: f32) -> Self
Sets the gap between columns, in dp.
Sourcepub fn area(
self,
name: &'static str,
row: i32,
column: i32,
row_span: u32,
column_span: u32,
) -> Self
pub fn area( self, name: &'static str, row: i32, column: i32, row_span: u32, column_span: u32, ) -> Self
Names an area that children take with GridItem::area. Rows and
columns count from 1, and from the last explicit track when
negative. With GRID_INDEX_UNSPECIFIED on one axis the area is
that whole row or column, and its children fill it one after
another. Naming an area again moves it.
Sourcepub fn area_ranges(
self,
name: &'static str,
rows: RangeInclusive<i32>,
columns: RangeInclusive<i32>,
) -> Self
pub fn area_ranges( self, name: &'static str, rows: RangeInclusive<i32>, columns: RangeInclusive<i32>, ) -> Self
Names the area of the rows and columns of two ranges:
area_ranges("footer", 2..=3, 1..=2) is
area("footer", 2, 1, 2, 2).
Trait Implementations§
Source§impl Clone for GridConfig
impl Clone for GridConfig
Source§impl Debug for GridConfig
impl Debug for GridConfig
Source§impl Default for GridConfig
impl Default for GridConfig
Source§impl PartialEq for GridConfig
impl PartialEq for GridConfig
impl StructuralPartialEq for GridConfig
Auto Trait Implementations§
impl Freeze for GridConfig
impl RefUnwindSafe for GridConfig
impl Send for GridConfig
impl Sync for GridConfig
impl Unpin for GridConfig
impl UnsafeUnpin for GridConfig
impl UnwindSafe for GridConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more