Skip to main content

Module pane

Module pane 

Source
Expand description

M.4 follow-up: pane geometry moved to lattice-core::ui::pane. Re-exported here for transitional compatibility.

Structs§

PaneId
Process-monotonic pane id. Distinct from BufferId: a pane holds a buffer + viewport, but two panes can show the same buffer. Allocated by PaneId::next at split time.
PaneRect
Geometry rectangle in screen coordinates. Mirrors ratatui’s Rect shape so the renderer can hand the result straight to the layout routines without an extra conversion.
PaneState
One leaf in the pane tree. Carries the per-pane viewport state for its content buffer; switching the active pane swaps these fields with App::cursor / App::scroll so motion code stays unchanged.
PaneTree
The pane tree owned by App (DESIGN.md §5.9, lives in lattice-ui-tui). v1 supports arbitrary recursive splits; the sole constraint is that the active pane must always exist (closing the last pane is a no-op so the App is never “paneless”).

Enums§

PaneDirection
<C-w>h/j/k/l cardinal navigation. Geometry-aware: walks the tree to find the spatial neighbour of the active pane.
PaneNode
Internal node of the pane tree. Leaves reference a PaneState by index in PaneTree::leaves; splits hold two children with an explicit orientation and a ratio. New splits start at DEFAULT_SPLIT_RATIO; PaneTree::resize_active_split and PaneTree::equalize_ratios adjust them.
SplitOrientation
Direction the user pressed after <C-w> to navigate or split.