|
TinyMaterialDesign
|
Grid with explicit, independently-sized column widths and row heights. More...
#include <TableLayout.h>
Public Member Functions | |
| TableLayout (Bounds container, const int32_t *columnWidths, int columnCount, const int32_t *rowHeights, int rowCount, int32_t spacing=8) | |
| Bounds | cellRect (int row, int col) const |
Bounds for the cell at (row, col), 0-based. | |
| int | columns () const |
| int | rows () const |
| int32_t | totalWidth () const |
| Total width needed for all columns. | |
| int32_t | totalHeight () const |
| Total height needed for all rows. | |
Grid with explicit, independently-sized column widths and row heights.
Not a widget - see GridLayout.h for the rationale. GridLayout assumes uniform cells and computes the column count for you; TableLayout is for dashboards mixing wide/narrow columns or short/tall rows, where you supply the sizes explicitly:
int32_t colW[] = {120, 80, 80}; int32_t rowH[] = {48, 96}; TableLayout table(Bounds(16, 56, 280, 200), colW, 3, rowH, 2); cell.bounds = table.cellRect(row, col);
|
inline |
|
inline |
|
inline |
|
inline |
Total height needed for all rows.
|
inline |
Total width needed for all columns.