Skip to main content

Module graph

Module graph 

Source
Expand description

Directed graph for focus navigation relationships.

Each node represents a focusable widget identified by a FocusId. Edges encode navigation direction (up/down/left/right/next/prev).

§Invariants

  1. Node IDs are unique within the graph.
  2. Removing a node removes all edges incident on it (both incoming and outgoing).
  3. Edges reference only nodes that exist in the graph.
  4. Tab-order traversal visits nodes in ascending tab_index order, breaking ties by insertion order (via FocusId).

§Complexity

OperationTime
insertO(1)
removeO(E) worst case (cleans incoming edges)
connectO(1)
navigateO(1)
find_cycleO(V+E)

Structs§

FocusGraph
Directed graph for focus navigation.
FocusNode
A focusable node in the graph.

Enums§

NavDirection
Navigation direction for focus traversal.

Type Aliases§

FocusId
Unique identifier for a focusable widget.