Skip to main content

Module table_grid

Module table_grid 

Source
Expand description

A table of a note: cells in rows and columns, each column as wide as what is widest in it, and all of them together no wider than the room there is.

A table that fits is as wide as what it holds, and no wider. One that doesn’t is as wide as the room: the columns that would take less than an even share of it keep their width, and the others share what is left evenly and wrap what they hold. Every cell of a row is as tall as the tallest of them, so that rows stay rows.

Under each row but the last is a line, the one under the first row the plainest: that row says what the columns are.

The cells are elements like any other, and are told of everything a cell could want to know: a link in one can be clicked. The table itself takes no click, so one on it is one on what is under it.

Structs§

Rows 🔒
How tall each row came out, the room around its cells included: what the lines are drawn by.
TableGrid
A table of cells: see the module.

Constants§

COLUMN_MIN_WIDTH 🔒
How narrow a column may get, whatever else wants the room.
TABLE_CELL_PADDING_X
The room around what a cell holds: beside it, and above and under it.
TABLE_CELL_PADDING_Y
TABLE_LINE
How thick the line under a row is.

Functions§

column_widths 🔒
How wide each column is, of columns that would be natural wide if they had the room, in room: as wide as that if they fit, and otherwise the narrow ones as they are and the rest sharing what is left.