Function tile_grid

Source
fn tile_grid<T>(
    ui: &mut Ui,
    indent: f32,
    items: &[T],
    tile_w: f32,
    draw: impl FnMut(&mut Ui, &T),
)
Expand description

Lay items out as a grid of tiles, wrapping every time tile_w more would not fit the pane. horizontal_wrapped cannot do this for tiles: a tile is a drag source whose size is not known until after its contents are drawn, so the wrap test always says the row still has room and a gallery grows one row deep, sideways, forever. Compute the columns instead.