Expand description
A real NSTableView (in its NSScrollView) backed by a typed Rust model.
AppKit pulls cell values lazily, during its own layout and scrolling, so
the data lives in the model rather than in the host’s view code. The model
is a cheap handle (Clone, main thread only); the native view is created
once and updated in place, and removed when the last handle is dropped.
User actions (selection, activation, sorting, checkbox toggles, column
moves and resizes, drops, pastes) are queued on the model and announced
with crate::request_redraw; the host’s table widget drains them.
⌘C copies the selected rows as tab-separated text. Dragging rows out,
reordering by drag, file drops and pasting are opt-in
(TableModel::set_row_drag, TableModel::set_reorderable,
TableModel::set_file_drop, TableModel::set_pastes).
Structs§
- Cell
Style - How a cell’s text looks (see
Column::style): the default for each field is the table’s own look. - Column
- A column: an id (stable, used for sorting and saved state), a title, and how to get the cell value from a row.
- Column
State - A column’s place and width, as the user arranged them (for saving).
- Sort
- The table’s sort: a column id and a direction.
- Table
Model - A native table backed by rows of
T. See the module docs.
Enums§
- Cell
Image - A small image shown before a cell’s text (see
Column::icon). - Table
Key - A key a table can take without ⌘ (see
TableModel::set_keys). - Value
- A cell’s value.
Type Aliases§
- Group
Key - A row’s group (see
TableModel::set_group_by).