pub struct TableBuilder { /* private fields */ }Implementations§
Source§impl TableBuilder
impl TableBuilder
pub fn new() -> Self
Sourcepub fn fade_color(self, c: Color) -> Self
pub fn fade_color(self, c: Color) -> Self
Set the scroll-fade gradient colour on the body’s inner
ScrollView. Pass the visible ancestor background colour
(e.g. Visuals::panel_fill when the table sits on a panel) so
the fade dissolves invisibly instead of painting a bright halo
of the default window_fill. See ScrollView::with_fade_color.
pub fn columns(self, cols: Vec<TableColumn>) -> Self
pub fn striped(self, on: bool) -> Self
pub fn striped_cell(self, cell: Rc<Cell<bool>>) -> Self
pub fn sense_click(self, on: bool) -> Self
pub fn sense_click_cell(self, cell: Rc<Cell<bool>>) -> Self
pub fn rows(self, spec: TableRows) -> Self
pub fn rows_cell(self, cell: Rc<RefCell<TableRows>>) -> Self
Sourcepub fn rows_provider(self, p: RowsProvider) -> Self
pub fn rows_provider(self, p: RowsProvider) -> Self
Install a closure that produces the current row spec. The widget
invokes it during each layout pass and writes the result into the
internal rows cell, so external state changes flow in without
the caller having to manage an observer widget.
pub fn overline_pred(self, pred: RowPredicate) -> Self
Sourcepub fn selection(self, sel: Rc<RefCell<HashSet<usize>>>) -> Self
pub fn selection(self, sel: Rc<RefCell<HashSet<usize>>>) -> Self
Use a HashSet<usize> as the selection mask (highlights any row
whose internal index is in the set). Convenience over
Self::selection_pred for the common case where rows are not
reversed/transformed.
Sourcepub fn selection_pred(self, pred: RowPredicate) -> Self
pub fn selection_pred(self, pred: RowPredicate) -> Self
Pass an arbitrary predicate to compute “is row N selected?”. Useful when display indices differ from internal indices (e.g. reversed order) and the caller wants the highlight to track the display index rather than the internal one.
pub fn resizable(self, on: bool) -> Self
pub fn resizable_cell(self, cell: Rc<Cell<bool>>) -> Self
Sourcepub fn column_overrides_cell(self, cell: Rc<RefCell<Vec<Option<f64>>>>) -> Self
pub fn column_overrides_cell(self, cell: Rc<RefCell<Vec<Option<f64>>>>) -> Self
Adopt an external Rc<RefCell<Vec<Option<f64>>>> as the column
overrides cell. External code can clear it (e.g. on a Reset
button) to restore the configured widths.
pub fn scroll_to_row_cell(self, cell: Rc<Cell<Option<usize>>>) -> Self
pub fn scroll_offset_cell(self, cell: Rc<Cell<f64>>) -> Self
pub fn header_height(self, h: f64) -> Self
pub fn header_painter(self, p: HeaderPainter) -> Self
pub fn header_click(self, p: HeaderClick) -> Self
pub fn cell_painter(self, p: CellPainter) -> Self
pub fn on_row_click(self, f: Box<dyn FnMut(usize, usize)>) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TableBuilder
impl !RefUnwindSafe for TableBuilder
impl !Send for TableBuilder
impl !Sync for TableBuilder
impl Unpin for TableBuilder
impl UnsafeUnpin for TableBuilder
impl !UnwindSafe for TableBuilder
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().