plushie/widget/pane_grid

PaneGrid widget for resizable tiled pane layouts.

Children are keyed by their node ID. The Rust binary manages pane layout state; use PaneSplit/PaneClose/PaneSwap commands to modify the layout.

Types

Option type for pane grid properties.

pub type Opt {
  Panes(List(String))
  Spacing(Float)
  Width(length.Length)
  Height(length.Length)
  MinSize(Float)
  DividerColor(color.Color)
  DividerWidth(Float)
  Leeway(Float)
  SplitAxis(String)
  EventRate(Int)
  A11y(a11y.A11y)
}

Constructors

pub opaque type PaneGrid

Values

pub fn a11y(pg: PaneGrid, a: a11y.A11y) -> PaneGrid

Set accessibility properties for this widget.

pub fn build(pg: PaneGrid) -> node.Node

Build the pane grid into a renderable Node.

pub fn divider_color(pg: PaneGrid, c: color.Color) -> PaneGrid

Set the divider color.

pub fn divider_width(pg: PaneGrid, w: Float) -> PaneGrid

Set the divider width.

pub fn event_rate(pg: PaneGrid, rate: Int) -> PaneGrid

Set the event throttle rate in milliseconds.

pub fn extend(
  pg: PaneGrid,
  children: List(node.Node),
) -> PaneGrid

Add multiple child pane nodes.

pub fn height(pg: PaneGrid, h: length.Length) -> PaneGrid

Set the height.

pub fn leeway(pg: PaneGrid, l: Float) -> PaneGrid

Set the resize handle leeway in pixels.

pub fn min_size(pg: PaneGrid, s: Float) -> PaneGrid

Set the minimum size.

pub fn new(id: String) -> PaneGrid

Create a new pane grid builder.

pub fn panes(pg: PaneGrid, p: List(String)) -> PaneGrid

Set the pane IDs.

pub fn push(pg: PaneGrid, child: node.Node) -> PaneGrid

Add a child pane node.

pub fn spacing(pg: PaneGrid, s: Float) -> PaneGrid

Set the spacing between children.

pub fn split_axis(pg: PaneGrid, axis: String) -> PaneGrid

Set the split axis.

pub fn width(pg: PaneGrid, w: length.Length) -> PaneGrid

Set the width.

pub fn with_opts(pg: PaneGrid, opts: List(Opt)) -> PaneGrid

Apply a list of options to a pane grid builder.

Search Document