Skip to contents

Two panes with a draggable divider. See split_pane().

Super class

Widget -> SplitPane

Public fields

direction

"horizontal" (panes side by side) or "vertical" (stacked).

min_size

Smallest size of a pane in cells (when there is room).

Active bindings

ratio

Share of the first pane (0 to 1). Assigning moves the divider (limited by min_size).

sizes

The current sizes (cells) of the two panes.

Methods

Inherited methods


SplitPane$new()

Create a split pane. See split_pane().

Usage

SplitPane$new(
  first,
  second,
  direction = "horizontal",
  ratio = 0.5,
  min_size = 3L,
  id = NULL,
  classes = NULL,
  style = NULL
)

Arguments

first, second

The two panes (widgets).

direction, ratio, min_size

See split_pane().

id, classes, style

See Widget.


SplitPane$default_style()

The built-in style.

Usage

SplitPane$default_style()


SplitPane$arrange_children()

Split the content area between the panes and the divider.

Usage

SplitPane$arrange_children(children, inner, st)

Arguments

children

Visible children.

inner

Content rectangle.

st

Computed style.


SplitPane$move_divider()

Move the divider by some cells.

Usage

SplitPane$move_divider(cells)

Arguments

cells

Positive: towards the second pane.


SplitPane$set_ratio()

Set the share of the first pane.

Usage

SplitPane$set_ratio(ratio)

Arguments

ratio

A number between 0 and 1.


SplitPane$drag_to()

Place the divider under a screen position (drags).

Usage

SplitPane$drag_to(x, y)

Arguments

x, y

Screen position.


SplitPane$announce()

Send "splitpane.resized" with the current ratio.

Usage

SplitPane$announce()


SplitPane$clone()

The objects of this class are cloneable with this method.

Usage

SplitPane$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.