Guide API
Skip to main content

ov_expand_all

Function ov_expand_all 

Source
pub fn ov_expand_all<L: OutlineViewer + ?Sized>(this: &mut L, pos: i32)
Expand description

Expand the node at DFS position pos and all of its descendants.

Sibling nodes of the subtree at pos are left unchanged. This is the operation bound to the * key: press * to recursively expand everything under the focused node.

Because DFS positions shift each time a node expands, the algorithm restarts the traversal each round: it finds the nesting depth of pos once, then repeatedly locates the first unexpanded node-with-children inside that subtree and calls OutlineViewer::adjust to expand it. The loop terminates when no unexpanded node-with-children remains in the subtree.

After the loop, call ov_update to recount visible nodes and publish the new scrollbar limits.