Skip to main content

Module steps

Module steps 

Source
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.

StepArgumentsDefault
tree.loadtree, key (null: the roots)asks the source for the branch’s children
tree.expandtree, key, expandedopens or closes the branch (loading it the first time)
tree.selecttree, keys, cursorsets the selection
tree.droptree, keys, target, position (before, after, inside)asks the source and the view (can_drop), then moves the nodes in the view
tree.renametree, key, from, torenames the node in the view
tree.activatetree, keynothing: the application opens the leaf
tree.contexttree, keyopens the row’s context menu, for that row
tree.actiontree, key, actionnothing: the application acts (TreeView::on_action)
list.selectlist, keys, cursorsets the selection
table.selecttable, keys, cursorsets the selection
table.sorttable, column (null: unsorted), descendingwrites the sort to the store
table.resizetable, widthswrites the widths to the store
table.select_columnstable, columnssets the column selection

Structs§

ViewsPlugin
Declares the views’ steps, the tree.filter command (Ctrl+F and / in a tree drawn with a FilterField, on its treeFilter surface) and the trees debug collector (each tree’s filter and rows shown, crate::tree::filter::drawn). Connect it when views run with an AppHandle: 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.