Skip to main content

Module place

Module place 

Source
Expand description

Where a pane sits in its tab, read from the tab’s layout tree: its rectangle as fractions of the tab’s area, and the edge it is on. The tree is the one place a pane’s size is kept, so this is the answer for anything that needs a pane’s place without a screen (a pinned pane unpinned into another tab, an agent asking where a pane is). It is the share each pane’s flex size gives it; the gap between panes and a minimized pane’s chip are the page’s to draw.

Structs§

FracRect
A rectangle as fractions (0 to 1) of the tab’s area.
Frame
A pane’s rectangle rect in its tab, and the slots the rest of that tab’s area is cut into.
Slot
One piece of the free space around a pane’s rectangle: the subtree of the pane’s own tab that fills it.

Functions§

edge_band_of
The edge of the tab’s area a pane at rect belongs to, and how thick a band across that edge it makes (a fraction of the area). A pane that runs the whole length of an edge (a full-height column, a full-width row) is on one of those edges, the nearer; any other pane on its nearest edge. On a tie: left, top, right, bottom.
frac_rect_of
The rectangle of node node_id in root’s tab; none when the tree does not hold it.
frame_for
The frame of node node_id in root’s tab (SPEC_PIN_TRANSFORM_FACILITY_2026_12_02.md §3): its rectangle, and the free space around it cut into rectangles by the splits on the path from the root to it. In [a | [b / c]] the frame of c is the bottom right corner and two slots, a’s column and b’s cell; the frame of a is its column and one slot, the rest (a strip). A stack is one node, so it is framed whole. None when the tree does not hold the node, or the node is the root (a tab with nothing around it to frame).
rects_of
The rectangle of every node of root‘s tab, parents before children (the root is the whole area). A node’s share of its parent’s axis is its stored flex size over the sum of its siblings’; the stored tree is the only input, so a maximized pane and a minimized chip (display modes drawn over a tile) leave every rectangle as it is. The page’s twin is frontend/layout/lib/rectsOf.ts; both are checked against layout-rects-vectors.json.