pub trait TableRows<K: Key> {
// Required methods
fn len(&self) -> usize;
fn key(&self, row: usize) -> K;
fn label(&self, row: usize) -> String;
fn cell(&mut self, ui: &mut Ui, row: usize, column: usize, selected: bool);
// Provided methods
fn is_empty(&self) -> bool { ... }
fn row_top(&self, row: usize, row_h: f32) -> f32 { ... }
}Expand description
The rows a table shows; the application owns them, sorted as the table’s sort says.
Required Methods§
Provided Methods§
fn is_empty(&self) -> bool
Sourcefn row_top(&self, row: usize, row_h: f32) -> f32
fn row_top(&self, row: usize, row_h: f32) -> f32
Where row row starts, from the top of the first row, rows being
row_h high unless the application says otherwise: rows of
several heights (a row expanded to several lines) give their
offsets here, 0.0 for row 0, and TableRows::len gives the
height of them all. Called for the rows in view and a binary
search over the rows, so keep it cheap.