Two resizable panes with a draggable divider: side by side (vertical = false) or stacked
(vertical = true). Add each pane's content to first / second (origin at the pane's
top-left); the panes are clipped to their region, so overflow is hidden and only in-region
content takes the pointer. Dragging the divider moves the split, honouring minFirst /
minSecond.
position is the first pane's size along the split axis, in UI pixels; onResized reports
the two pane sizes after a drag. Non-interactive except for the divider — pane content keeps
its own interactivity.
Constructor
new(vertical:Bool, width:Float, height:Float, ?position:Float)
Parameters:
vertical |
|
|---|---|
width | layout width |
height | layout height |
position | optional initial first-pane size (defaults to half) |
Variables
position:Float = 0
The first pane's size along the split axis, in UI pixels (clamped to the min sizes).
vertical:Bool
true stacks the panes (top/bottom, horizontal divider); false places them side by side.
onResized:(first:Float, second:Float) ‑> Void = null
Fired after a divider drag, with the first and second pane sizes.