Expand description
The Studio’s tree: the file browser’s folders and files and the Logic column’s Syntax Tree are both drawn by it, so they read alike.
Tree holds the geometry, the lines’ snapping to the device-pixel grid and the chevron’s
look; TreeNode draws one node — the line it hangs from, its row, its parts while it is open.
Each user walks its own data and gives every node its row’s content.
A tree answers the keyboard as the WAI-ARIA tree pattern says: it is one tab stop, on the selected
row (or the row its user marks when none is), the arrows walk the rows a reader sees, Home and End
reach the ends, Right opens a node and then enters it, Left closes it and then climbs to its parent,
and Enter or Space press the row. next_row decides each key from the rows’ shapes alone.
Re-exports§
pub use Tree_completions::Component::Tree;pub use TreeNode_completions::Component::TreeNode;
Structs§
- RowShape
- A row as the keys see it.
- Tree
Node Props - Properties for the
TreeNodecomponent. - Tree
Props - Properties for the
Treecomponent.
Enums§
Constants§
- TREE_
STYLE - The tree’s geometry is one step. Its first line stands
--tree-stepfrom the tree’s edge, every level’s line one step further in, and every branch runs one step, from its parent’s line to its own; a row’s first glyph (a node’s chevron, else the first thing in its row) sits--tree-gappast the end of its branch. Every length snaps to whole device pixels (--dp, one device pixel in CSS pixels, is set from the page’s device pixel ratio), and the tree’s content starts on a device pixel wherever the layout puts the tree (--dp-nudge-x/-y, under one device pixel, pad it onto the grid), so each line covers whole screen pixels at any zoom and all read at one weight,--tree-hair: about 1.5px and never under two device pixels. A tree sets how far its content stands from its top and bottom with--tree-pad-topand--tree-pad-bottom(the Studio’s inset by default), each held to whole device pixels.
Functions§
- Tree
- A tree, its nodes drawn inside it.
kindnames it and its parts: the tree is the element of class{kind}(markeddata-tree), and each node, row and open node’s parts carry{kind}-node,{kind}-itemand{kind}-childrenbeside the shared classes. The file browser’s tree isfile-tree. - Tree
Node - One node of a
Tree: the line it hangs from (below the top level), its row — its branch, its chevron if it has parts, thenrow— and its parts,children, while it is open. - next_
row - What
keydoes from rowatofrows, the rows a reader sees in order. - tree_
key - The key a keyboard event names, if the tree answers it.