pub struct GridColumn { /* private fields */ }Expand description
One column of a grid.
key addresses the cells that belong to it and appears in every id the
column publishes, so it is the column’s business identity rather than its
place in the header.
Implementations§
Source§impl GridColumn
impl GridColumn
pub fn new( key: impl Into<SharedString>, header: impl Into<SharedString>, ) -> Self
pub fn width(self, width: ColumnWidth) -> Self
pub fn fixed(self, width: f32) -> Self
pub fn flex(self, share: f32) -> Self
Sourcepub fn min_width(self, min_width: f32) -> Self
pub fn min_width(self, min_width: f32) -> Self
The narrowest a resize may report, and the narrowest a flexible column is allowed to shrink to.
pub fn align(self, align: Align) -> Self
pub fn sortable(self, sortable: bool) -> Self
Sourcepub fn resizable(self, resizable: bool) -> Self
pub fn resizable(self, resizable: bool) -> Self
Puts a grab handle on the column’s trailing edge. The grid reports the width the pointer asks for and applies nothing.
Sourcepub fn reorderable(self, reorderable: bool) -> Self
pub fn reorderable(self, reorderable: bool) -> Self
Lets the header be picked up and put down somewhere else. The order is the caller’s state; a drop reports where the column should go.
Sourcepub fn pinned(self, pinned: bool) -> Self
pub fn pinned(self, pinned: bool) -> Self
Keeps the column at the left edge whatever order the caller declares, and takes it out of the reorder. See the module documentation for what pinning does not do here.
Sourcepub fn editable(self, editable: bool) -> Self
pub fn editable(self, editable: bool) -> Self
Marks the column’s cells as fields a double click or enter opens. The grid never writes the value; it reports the edit.
pub fn key(&self) -> &SharedString
Trait Implementations§
Source§impl Clone for GridColumn
impl Clone for GridColumn
Source§fn clone(&self) -> GridColumn
fn clone(&self) -> GridColumn
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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