Expand description
Dock model — the tree of splits and tab groups behind the editor workbench.
Pure data and geometry: no backend, no painting, no interaction. The shell
asks for a DockLayout and paints it; the widget layer turns pointer
events into calls back into DockTree. Keeping the model here means the
rules that are easy to get wrong — where a drop lands, what happens to a
split when its last tab closes, how ratios clamp — are testable without a
window.
Chrome (title bar, spine, status bar) deliberately lives outside the dock: those are the frame the workbench sits in, not panels the user rearranges.
Structs§
- Dock
Layout - Everything the shell needs to paint one frame of the dock.
- Dock
Tree - A tree of splits and tab groups covering one workbench area.
- SplitId
- Stable handle for a split, so a resize drag can name the divider it grabbed without depending on the tree’s shape surviving the gesture.
- Splitter
Layout - One draggable divider placed on screen.
- TabGroup
Layout - One tab group placed on screen.
Enums§
- Dock
Node - A node of the dock tree.
- Drop
Zone - Where a dragged panel would land relative to the group under the pointer.
- Split
Axis - Which way a split divides its area.
Constants§
- MIN_
PANE - Smallest area a tab group may be squeezed to. Ratios clamp so a drag can never collapse a panel to nothing — a panel you cannot see is a panel you cannot get back without knowing the layout can be reset.
- SPLITTER_
THICKNESS - Thickness of a splitter’s grab band, in points. Wide enough to hit without aiming, narrow enough not to steal clicks from the panels either side.
Functions§
- ratio_
from_ pointer - Turns a pointer position on a splitter into the ratio it implies.
- zone_at
- Classifies a pointer position inside
rectinto a drop zone.
Type Aliases§
- Dock
Rect - A rectangle as
[x, y, width, height], matching the convention used byUiBuilderthroughout the UI layer.