Skip to main content

Module table_model

Module table_model 

Expand description

The editable table’s model: the document layout a Table shows, and the operations its owner applies inside its own action (apply with the widget’s TableEdits). The widget itself only reads the document.

Enums§

TableEdit
A change the user made to a table, in display coordinates, for its owner to submit as an action.

Functions§

apply
Apply edit to the table at t: what an owner’s action does with a TableEdit the widget handed it.
cell_obj
Resolve the Text object backing cell (r, c) in display coordinates.
cell_text
Current text of cell (r, c); empty string when the cell has no content.
col_ids
Column ids in display order.
dims
(rows, cols) dimensions.
ensure
Create the rows / cols / cells / widths containers if the table has never been initialised. Idempotent — safe to call every sync.
header
Whether the first row renders as a header band.
insert_column
Insert a fresh empty column at display index at (clamped to 0..=cols).
insert_row
Insert a fresh empty row at display index at (clamped to 0..=rows). Every current column gets an empty backing cell.
remove_column
Remove the column at display index at, deleting its cells + width.
remove_row
Remove the row at display index at, deleting its cells.
row_ids
Row ids in display order.
set_cell_text
Replace the whole content of cell (row, col). Creates the backing Text if it does not exist yet.
set_header