Skip to main content

Module grid

Module grid 

Source
Expand description

Grid widget: children placed left to right, top to bottom in equal cells.

The cell arithmetic lives in the pure function grid_cells, which never panics and never returns a non-finite coordinate, whatever the bounds, column count or gap. Grid lays each child out with its cell as bounds.

Contract: contracts/present-grid-widget-v1.yaml.

Structs§

Grid
Grid widget: a fixed number of equal-width columns.

Functions§

grid_cells
Cells of a grid with columns equal-width columns inside bounds.
grid_cells_with
Like grid_cells, with an optional fixed row height.