pub struct TableStyle {
pub header_height: f32,
pub row_height: f32,
pub ascending: &'static str,
pub descending: &'static str,
pub striped: bool,
pub resizable: bool,
}Expand description
The tones and metrics a table draws with.
Metrics only, and the tones come from Palette. That is the division this
crate already draws: FieldStyle carries gaps and a
marker while the colours stay in the palette, and a table’s colours are the
palette’s content, content_muted and action rather than six new ones.
makeover-tui splits it the other way round because its palette carries no
text tones at all.
Fields§
§header_height: f32The height of the heading row.
row_height: f32The height of a body row.
ascending: &'static strThe caret drawn after the heading of an ascending column.
Defaults to Sort::glyph, which is where the spelling lives now:
three renderers holding the same literal agreed by coincidence. Bare,
with no leading space – the gap is heading’s, written once for all
three states rather than baked into two strings and forgotten in the
third.
descending: &'static strDrawn after the heading of a descending column.
striped: boolWhether alternate rows take a different background.
egui_extras’ own striping, off by default: the description has no word for it, and a renderer that turned it on would be adding a claim the other two cannot make.
Not every setting egui_extras has becomes a field here. A sticky heading
is what TableBuilder::header does and there is no version that does
not, so the knob 0.12.0 briefly carried for it offered a choice this
renderer cannot make. This one and resizable are the
two that pass that test.
resizable: boolWhether the user can drag the divider between two columns.
The second knob that is not a metric, and it passes the same test
sticky_header failed: egui_extras offers both settings and a renderer
can honestly make either choice. Off by default for striped’s reason:
the description has no word for it, so a default that turned it on would
be this renderer adding a claim the other two cannot make.
It does not fight the narrowing. A drag moves a track for the frames it
is held; cutoff_for still decides which columns exist, off the widths
the app declared in Sizing, so a resize can never drop a column.
Trait Implementations§
Source§impl Clone for TableStyle
impl Clone for TableStyle
Source§fn clone(&self) -> TableStyle
fn clone(&self) -> TableStyle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for TableStyle
Source§impl Debug for TableStyle
impl Debug for TableStyle
Source§impl Default for TableStyle
impl Default for TableStyle
Source§impl PartialEq for TableStyle
impl PartialEq for TableStyle
impl StructuralPartialEq for TableStyle
Auto Trait Implementations§
impl Freeze for TableStyle
impl RefUnwindSafe for TableStyle
impl Send for TableStyle
impl Sync for TableStyle
impl Unpin for TableStyle
impl UnsafeUnpin for TableStyle
impl UnwindSafe for TableStyle
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> 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