egui/egui_extras
Wayne Warren e81a92d32d egui_extras: enable virtual scroll for heterogenous rows
Introduce `TableBody.heterogenous_rows` and `TableRowBuilder`, the former of which takes as an argument the latter. `TableRowBuilder` provides two methods that enable virtual scrolling for rows with non-uniform heights. Those methods are:

* `TableRowBuilder.row_heights` which returns an iterator over `f32` to allow incremental virtual scroll buffer calculation.
* `TableRowBuilder.populate_row` which `TableBody.heterogenous_rows` uses to allow `TableRowBuilder` implementations to, you guessed it, populate rows that are visible.

One thought that occurs to me while writing this description is that
`TableBody.heterogenous_rows` could look more like the following:

```
    pub fn heterogenous_rows(
        mut self,
        row_heights: impl Iterator<Item = f32> + '_,
        mut row: impl FnMut(usize, TableRow<'_, '_>),
    )
```

This could potentially be easier to use, considering all the trouble I had coming up with and implementing the trait. Happy to make this change if the maintainers prefer.
2022-04-03 00:18:17 -06:00
..
src egui_extras: enable virtual scroll for heterogenous rows 2022-04-03 00:18:17 -06:00
Cargo.toml Dynamic sized strips, tables, and date picker (#963) 2022-03-31 21:13:25 +02:00
CHANGELOG.md Table resize (#1438) 2022-04-01 12:01:00 +02:00
README.md egui_extras README grammar fixes (#1313) 2022-03-07 10:14:00 +01:00

egui_extras

Latest version Documentation MIT Apache

This is a crate that adds some features on top top of egui. This crate is for experimental features, and features that require big dependencies that do not belong in egui.