Tree of visible regions, built from the per-frame Layout plus active overlays.
Mouse routing uses this tree instead of asking every handler to re-check screen coordinates. Hit-testing finds the deepest visible node at a position, and the router dispatches to that node's handler before bubbling to ancestors when a handler returns {:passthrough, state}.
Children are stored in rendered z-order from back to front. Hit-tests walk children in reverse order, so later siblings win when regions overlap.
Summary
Types
Mouse route ordered from deepest target to root for bubbling.
Built focus tree, rooted at the viewport.
Functions
Builds a focus tree from a Layout. Pure; safe to call any time.
Builds a focus tree from editor or render-pipeline state.
Returns the cached focus tree from state, or builds one from the current state.
Returns the bubble path ordered from deepest node to root.
Hit-tests (row, col) and returns the deepest node whose rect contains the point.
Links parent and sibling references throughout a tree.
Returns the path starting at the deepest scrollable node under (row, col).
Adds a modal or float overlay node to the root in front of existing regions.
Types
@type path() :: [MingaEditor.FocusTree.Node.t()]
Mouse route ordered from deepest target to root for bubbling.
@type t() :: MingaEditor.FocusTree.Node.t()
Built focus tree, rooted at the viewport.
Functions
@spec from_layout(MingaEditor.Layout.t()) :: t()
Builds a focus tree from a Layout. Pure; safe to call any time.
Builds a focus tree from editor or render-pipeline state.
Returns the cached focus tree from state, or builds one from the current state.
Returns the bubble path ordered from deepest node to root.
@spec hit_test(t(), integer(), integer()) :: MingaEditor.FocusTree.Node.t() | nil
Hit-tests (row, col) and returns the deepest node whose rect contains the point.
Links parent and sibling references throughout a tree.
Returns the path starting at the deepest scrollable node under (row, col).
@spec with_overlay( t(), MingaEditor.FocusTree.Node.content_type(), MingaEditor.FocusTree.Node.rect(), keyword() ) :: t()
Adds a modal or float overlay node to the root in front of existing regions.