egui/egui_demo_lib
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
..
benches Refactor TessellationOptions to expose slider for feathering size (#1408) 2022-03-23 11:41:38 +01: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
README.md Add inter-linking between different forms of documentations and examples 2021-12-29 21:44:48 +01:00

egui demo library

Latest version Documentation unsafe forbidden MIT Apache

This crate contains example code for egui.

The demo library is a separate crate for three reasons:

  • To ensure it only uses the public egui api.
  • To remove the amount of code in egui proper.
  • To make it easy for other integrations to use the egui demos a test.