Expand description
The views’ steps (ADR 0011) and the plugin that declares them.
Experimental: may change in any release
(docs/stability.md).
Every moment a view acts on (a branch expanded, a selection changed, a drop, a rename, a sort) runs as a step: a plugin may watch it on the journal, veto or redirect it with a before-hook, do it its own way with a run-hook, or follow it with an after-hook. The default (the closure the view passes) changes the view’s own state; the application owns its data and applies the change there (from the step’s after-hook, or from the view’s output signals).
A view given no AppHandle runs its defaults directly: the signals
are still in its output, nothing is published.
| Step | Arguments | Default |
|---|---|---|
tree.load | tree, key (null: the roots) | asks the source for the branch’s children |
tree.expand | tree, key, expanded | opens or closes the branch (loading it the first time) |
tree.select | tree, keys, cursor | sets the selection |
tree.drop | tree, keys, target, position (before, after, inside) | asks the source and the view (can_drop), then moves the nodes in the view |
tree.rename | tree, key, from, to | renames the node in the view |
tree.activate | tree, key | nothing: the application opens the leaf |
tree.context | tree, key | opens the row’s context menu, for that row |
tree.action | tree, key, action | nothing: the application acts (TreeView::on_action) |
list.select | list, keys, cursor | sets the selection |
table.select | table, keys, cursor | sets the selection |
table.sort | table, column (null: unsorted), descending | writes the sort to the store |
table.resize | table, widths | writes the widths to the store |
table.select_columns | table, columns | sets the column selection |
Structs§
- Views
Plugin - Declares the views’ steps, the
tree.filtercommand (Ctrl+F and/in a tree drawn with aFilterField, on itstreeFiltersurface) and thetreesdebug collector (each tree’s filter and rows shown,crate::tree::filter::drawn). Connect it when views run with anAppHandle: a step nobody declares is reported.
Constants§
- CMD_
TREE_ FILTER - Moves the focus from a tree to its filter field (Ctrl+F,
/). - LIST_
SELECT - TABLE_
RESIZE - TABLE_
SELECT - TABLE_
SELECT_ COLUMNS - TABLE_
SORT - TREE_
ACTION - TREE_
ACTIVATE - TREE_
CONTEXT - TREE_
DROP - TREE_
EXPAND - TREE_
LOAD - TREE_
RENAME - TREE_
SELECT - VIEWS
- The plugin’s id.
Functions§
- specs
- Every step the views declare, with its description and an example of its arguments.