monomer-1.0.0.0: A GUI library for writing native Haskell applications.
Copyright(c) 2018 Francisco Vallarino
LicenseBSD-3-Clause (see the LICENSE file)
Maintainerfjvallarino@gmail.com
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Monomer.Widgets.Containers.Split

Description

Splits the assigned space into two parts, vertically or horizontally, which are assigned to its two child nodes. The space assigned depends on the style and size requirements of each child node.

Configs:

  • splitHandlePos: lens to a model field which provides the handle position.
  • splitHandlePosV: value which provides the handle position.
  • splitHandleSize: width of the handle.
  • splitIgnoreChildResize: whether to ignore changes in size to its children (otherwise, the handle position may change because of this).
  • onChange: raises an event when the handle is moved.
  • onChangeReq: generates a WidgetReqest when the handle is moved.
Synopsis

Documentation

hsplit :: WidgetEvent e => (WidgetNode s e, WidgetNode s e) -> WidgetNode s e Source #

Creates a horizontal split between the two provided nodes.

hsplit_ :: WidgetEvent e => [SplitCfg s e] -> (WidgetNode s e, WidgetNode s e) -> WidgetNode s e Source #

Creates a horizontal split between the two provided nodes. Accepts config.

vsplit :: WidgetEvent e => (WidgetNode s e, WidgetNode s e) -> WidgetNode s e Source #

Creates a vertical split between the two provided nodes.

vsplit_ :: WidgetEvent e => [SplitCfg s e] -> (WidgetNode s e, WidgetNode s e) -> WidgetNode s e Source #

Creates a vertical split between the two provided nodes. Accepts config.

splitHandlePos :: ALens' s Double -> SplitCfg s e Source #

Lens to a model field which provides the handle position.

splitHandlePosV :: Double -> SplitCfg s e Source #

Value which provides the handle position.

splitHandleSize :: Double -> SplitCfg s e Source #

Width of the handle.

splitIgnoreChildResize :: Bool -> SplitCfg s e Source #

Whether to ignore changes in size to its children.