Expand description
DataTable (D115/Phase 32 Step 1) — the data-grid RENDERING layer on
top of Table (the layout primitive): header row with sort-direction
indicators, optional row-selection checkboxes, row striping. Sorting
itself is rendering-only (per PHASE_32.md’s Out of Scope note) — the
app owns the actual sort/comparator and re-passes already-sorted rows;
on_sort just reports which column/direction the user asked for.
Virtualization (windowed rendering for huge row counts) is explicitly
OUT OF SCOPE for this MVP — named, not silently dropped.
Cells are plain text (the common tabular-data case) — richer per-cell
widgets are future work. Rows are stored as Strings (Clone, cheap)
rather than built BoxedWidgets specifically so a fresh Table can
be constructed independently in both layout() and paint() (the
widget protocol calls them separately on a borrowed &self, and
Box<dyn Widget> isn’t Clone — building from owned strings sidesteps
that rather than fighting it).
Structs§
- Data
Table - A data grid: typed columns + text row data, rendered via
Tablewith a sortable header and optional selection checkboxes. - Data
Table Column - One column definition: header label + width policy.