A node in the focus tree: one visible region that can receive mouse routing.
Each node owns a rect, a content type tag, optional input handler module, and children in rendered z-order. Later children paint above earlier children, so hit-tests prefer later children. The id, parent, previous_sibling, and next_sibling fields are stable references inside the tree, not parent structs. That keeps the tree acyclic while still letting routing and tests reason about hierarchy.
See MingaEditor.FocusTree for tree construction and traversal.
Summary
Types
Tag identifying what the node represents.
Stable node reference inside a focus tree.
Pixel/cell rect. Same shape as MingaEditor.Layout.rect/0.
A node in the focus tree.
Functions
Returns true when (row, col) is inside the node's half-open rect.
Constructs a node with the given content type and rect.
Types
@type content_type() :: :viewport | :tab_bar | :file_tree | :editor_area | :window | :gutter | :buffer_content | :modeline | :status_bar | :agent_panel | :agent_chat_window | :agent_chat_content | :bottom_panel | :minibuffer | :modal_overlay | :picker_backdrop | :picker | :completion_backdrop | :completion_menu | :hover_popup | :signature_help | :float_popup | :agent_context | :tool_manager | :extension_panel | :observatory | :edit_timeline | :notifications | :extension_overlay | :which_key | {:custom, atom()}
Tag identifying what the node represents.
@type id() :: term()
Stable node reference inside a focus tree.
@type rect() :: {non_neg_integer(), non_neg_integer(), non_neg_integer(), non_neg_integer()}
Pixel/cell rect. Same shape as MingaEditor.Layout.rect/0.
@type t() :: %MingaEditor.FocusTree.Node{ children: [t()], content_type: content_type(), focusable?: boolean(), handler: module() | nil, id: id(), next_sibling: id() | nil, parent: id() | nil, previous_sibling: id() | nil, rect: rect(), ref: term(), scrollable?: boolean() }
A node in the focus tree.