pub enum GridColumn {
Auto,
Fixed(u32),
Grow(u16),
Percent(u8),
}Expand description
Column specification for crate::Context::grid_with().
Controls the width allocation of individual columns in a grid layout.
§Example
use slt::GridColumn;
ui.grid_with(&[
GridColumn::Fixed(8), // label column: exactly 8 chars
GridColumn::Grow(1), // flexible column
GridColumn::Grow(1), // flexible column
GridColumn::Fixed(4), // status column: exactly 4 chars
], |ui| {
// children placed left-to-right, wrapping to next row
});Variants§
Auto
Equal-width column with grow weight 1 (default grid() behavior).
Fixed(u32)
Fixed-width column in character cells. Does not grow or shrink.
Grow(u16)
Flexible column with a custom grow weight. Higher values take proportionally more space.
Percent(u8)
Column sized as a percentage (1–100) of the grid width.
Trait Implementations§
Source§impl Clone for GridColumn
impl Clone for GridColumn
Source§fn clone(&self) -> GridColumn
fn clone(&self) -> GridColumn
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for GridColumn
Source§impl Debug for GridColumn
impl Debug for GridColumn
impl Eq for GridColumn
Source§impl Hash for GridColumn
impl Hash for GridColumn
Source§impl PartialEq for GridColumn
impl PartialEq for GridColumn
Source§fn eq(&self, other: &GridColumn) -> bool
fn eq(&self, other: &GridColumn) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for GridColumn
Auto Trait Implementations§
impl Freeze for GridColumn
impl RefUnwindSafe for GridColumn
impl Send for GridColumn
impl Sync for GridColumn
impl Unpin for GridColumn
impl UnsafeUnpin for GridColumn
impl UnwindSafe for GridColumn
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.