#[non_exhaustive]pub enum TableEvent {
Show 13 variants
Selection(Vec<usize>),
Activate(usize),
Sort(Sort),
Toggle {
row: usize,
column: String,
value: bool,
},
ColumnsChanged,
Edit {
row: usize,
column: String,
value: String,
},
RowsMoved {
rows: Vec<usize>,
before: Option<usize>,
},
FilesDropped {
paths: Vec<PathBuf>,
before: Option<usize>,
},
UrlsDropped {
urls: Vec<String>,
before: Option<usize>,
},
Paste(String),
Key {
key: TableKey,
rows: Vec<usize>,
},
FocusedColumn(Option<String>),
IconClicked {
row: usize,
column: String,
},
}Expand description
Something the user did in the table. Row indices are model indices
(positions in the rows given to TableModel::set_rows), whatever the sort.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Selection(Vec<usize>)
The selected rows changed.
Activate(usize)
Double-click or Return on a row.
Sort(Sort)
The user clicked a column header. With built-in sorting on (the default) the rows are already shown in the new order.
Toggle
A checkbox cell was clicked. The model doesn’t change the row: apply
it with TableModel::update_row.
Fields
ColumnsChanged
Columns were moved or resized; read TableModel::column_state.
Edit
The user finished editing a cell of an Column::editable column.
The model doesn’t change the row: apply it with
TableModel::update_row.
Fields
RowsMoved
The user dragged rows to a new place (see
TableModel::set_reorderable). The model doesn’t move them: apply
it with TableModel::move_rows.
Fields
FilesDropped
Files were dropped on the table (see TableModel::set_file_drop).
Fields
UrlsDropped
Web addresses were dropped on the table, dragged from a browser (see
TableModel::set_url_drop).
Fields
Paste(String)
The user pasted (⌘V) text (see TableModel::set_pastes); rows
copied from a table arrive as tab-separated lines.
Key
The user pressed a bare key the table handles (see
TableModel::set_keys) with rows selected.
FocusedColumn(Option<String>)
The focused column changed (see TableModel::set_cell_focus): the
user clicked a cell in another column, or pressed ← or →.
IconClicked
A cell’s icon was clicked (an Column::icon_action column).