pub struct Grid(/* private fields */);Expand description
Lines of cells on shared tracks, shown by UiPop::grid: cells fill
the tracks left to right, a line per track count. Columns are
Space::Group apart, lines Space::Inline.
Implementations§
Source§impl Grid
impl Grid
Sourcepub fn new(
id_salt: impl AsIdSalt,
tracks: impl IntoIterator<Item = Track>,
) -> Self
pub fn new( id_salt: impl AsIdSalt, tracks: impl IntoIterator<Item = Track>, ) -> Self
A grid of tracks, under an id unique in its Ui.
Sourcepub fn align(self, align: Align) -> Self
pub fn align(self, align: Align) -> Self
How cells sit vertically in their line (Align::Baseline by
default).
Sourcepub fn equal_widths(self) -> Self
pub fn equal_widths(self) -> Self
Every content-sized column as wide as the widest.
Sourcepub fn fold_below(self, width: Length) -> Self
pub fn fold_below(self, width: Length) -> Self
Below width, one column: each line’s cells stacked full width (a
header over its value), Space::Inline apart, lines
Space::Group apart.
Trait Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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