pub struct TableBuilder<'a> { /* private fields */ }Expand description
A table with a header row and selectable body rows. Start with table.
Implementations§
Source§impl<'a> TableBuilder<'a>
impl<'a> TableBuilder<'a>
Sourcepub fn columns(self, tracks: &'a str) -> Self
pub fn columns(self, tracks: &'a str) -> Self
Column widths as CSS grid tracks ("2fr 1fr 80px", minmax()); default equal 1fr.
Sourcepub fn row_height(self, h: f64) -> Self
pub fn row_height(self, h: f64) -> Self
Header and row height in px (default 28).
Sourcepub fn scroll(self, y: f64) -> Self
pub fn scroll(self, y: f64) -> Self
Body scroll offset in px (the header stays put, like position: sticky).
Sourcepub fn bind(self, i: &'a mut Option<usize>) -> Self
pub fn bind(self, i: &'a mut Option<usize>) -> Self
Read the selection from i and write a row click back to it.
Sourcepub fn content_height(&self) -> f64
pub fn content_height(&self) -> f64
Body content height, for a scrollbar.
Auto Trait Implementations§
impl<'a> !UnwindSafe for TableBuilder<'a>
impl<'a> Freeze for TableBuilder<'a>
impl<'a> RefUnwindSafe for TableBuilder<'a>
impl<'a> Send for TableBuilder<'a>
impl<'a> Sync for TableBuilder<'a>
impl<'a> Unpin for TableBuilder<'a>
impl<'a> UnsafeUnpin for TableBuilder<'a>
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