pub struct TableColumn { /* private fields */ }Expand description
One column (Table.Column).
Implementations§
Source§impl TableColumn
impl TableColumn
Sourcepub fn new(label: impl Into<SharedString>) -> Self
pub fn new(label: impl Into<SharedString>) -> Self
Creates a column with the given header label.
Sourcepub fn allows_resizing(self, v: bool) -> Self
pub fn allows_resizing(self, v: bool) -> Self
allowsResizing — put a drag handle on this column’s trailing edge.
Sourcepub fn default_width(self, width: impl Into<Pixels>) -> Self
pub fn default_width(self, width: impl Into<Pixels>) -> Self
defaultWidth — the column’s starting width, which a resize handle then
moves.
Sourcepub fn width(self, width: impl Into<Pixels>) -> Self
pub fn width(self, width: impl Into<Pixels>) -> Self
width — the caller-owned controlled width of this column.
Sourcepub fn min_width(self, width: impl Into<Pixels>) -> Self
pub fn min_width(self, width: impl Into<Pixels>) -> Self
minWidth — the width this column will not go below.
Sourcepub fn max_width(self, width: impl Into<Pixels>) -> Self
pub fn max_width(self, width: impl Into<Pixels>) -> Self
maxWidth — the width this column will not exceed.
Sourcepub fn allows_sorting(self, v: bool) -> Self
pub fn allows_sorting(self, v: bool) -> Self
allowsSorting — makes the header a sort control.
Sourcepub fn is_row_header(self, v: bool) -> Self
pub fn is_row_header(self, v: bool) -> Self
isRowHeader — this column names the row.
With no accessibility layer to expose it to, the effect here is visual: the column’s cells carry medium weight so the identifying value reads first.
Sourcepub fn frozen(self, frozen: bool) -> Self
pub fn frozen(self, frozen: bool) -> Self
Freezes this column at the table’s leading edge (HeroGPUI extension,
after gpui-kit’s fixed_left columns; not a HeroUI v3 prop): when the
table is wider than its box, the frozen columns (and the selection
column) stay put while the other columns scroll horizontally beneath
the header, which scrolls with them.
Frozen columns are always displayed first, in their relative order, so
a column_order that interleaves them is shown with the frozen ones
moved to the front, and a column move never crosses from the frozen
region into the scrolling one or back: unfreeze the column to move it
there. A frozen column is sized at its explicit, resized or measured
width rather than sharing out the free space. When every column is
frozen nothing scrolls and the table renders as an ordinary one.
Trait Implementations§
Source§impl Clone for TableColumn
impl Clone for TableColumn
Source§impl Debug for TableColumn
impl Debug for TableColumn
Source§impl From<&str> for TableColumn
impl From<&str> for TableColumn
Source§fn from(label: SharedString) -> Self
fn from(label: SharedString) -> Self
Auto Trait Implementations§
impl Freeze for TableColumn
impl RefUnwindSafe for TableColumn
impl Send for TableColumn
impl Sync for TableColumn
impl Unpin for TableColumn
impl UnsafeUnpin for TableColumn
impl UnwindSafe for TableColumn
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,
impl<T> ErasedDestructor for Twhere
T: 'static,
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