Copyright | (c) 2018 Francisco Vallarino |
---|---|
License | BSD-3-Clause (see the LICENSE file) |
Maintainer | fjvallarino@gmail.com |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
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.
Synopsis
- data SplitCfg s e
- splitHandlePos :: ALens' s Double -> SplitCfg s e
- splitHandlePosV :: Double -> SplitCfg s e
- splitHandleSize :: Double -> SplitCfg s e
- splitIgnoreChildResize :: Bool -> SplitCfg s e
- hsplit :: WidgetEvent e => (WidgetNode s e, WidgetNode s e) -> WidgetNode s e
- hsplit_ :: WidgetEvent e => [SplitCfg s e] -> (WidgetNode s e, WidgetNode s e) -> WidgetNode s e
- vsplit :: WidgetEvent e => (WidgetNode s e, WidgetNode s e) -> WidgetNode s e
- vsplit_ :: WidgetEvent e => [SplitCfg s e] -> (WidgetNode s e, WidgetNode s e) -> WidgetNode s e
Configuration
Configuration options for split:
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.
Instances
Semigroup (SplitCfg s e) Source # | |
Monoid (SplitCfg s e) Source # | |
Default (SplitCfg s e) Source # | |
Defined in Monomer.Widgets.Containers.Split | |
WidgetEvent e => CmbOnChange (SplitCfg s e) Double e Source # | |
CmbOnChangeReq (SplitCfg s e) s e Double Source # | |
Defined in Monomer.Widgets.Containers.Split onChangeReq :: (Double -> WidgetRequest s e) -> SplitCfg s e Source # |
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.
Constructors
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.