Two panes with a draggable divider. position is the first pane's size along axis
(HORIZONTAL puts the panes side by side); the app keeps it so it can be saved. Use
for pane: split(.HORIZONTAL, *width) { if pane == 0 { ... } else { ... } }.
- axis: the direction the panes sit in.
- position: the first pane's size in points. It is clamped to the options' limits and updated while the divider is dragged.
- options: the smallest and largest size of the first pane.
- loc: the call site. It identifies the widget from one frame to the next, so leave the default.
split :: (
axis: Axis,
position: *float,
options: Split_Options = .{},
loc := #caller_location
) -> Split
Two panes with a draggable divider. position is the first pane's size along axis
(HORIZONTAL puts the panes side by side); the app keeps it so it can be saved. Use
for pane: split(.HORIZONTAL, *width) { if pane == 0 { ... } else { ... } }.
Parameters
- axis: Axis
- the direction the panes sit in.
- position: *float
- the first pane's size in points. It is clamped to the options' limits and updated while the divider is dragged.
- options: Split_Options
- the smallest and largest size of the first pane.
- loc := #caller_location
- the call site. It identifies the widget from one frame to the next, so leave the default.