Copyright | (c) 2018 Francisco Vallarino |
---|---|
License | BSD-3-Clause (see the LICENSE file) |
Maintainer | fjvallarino@gmail.com |
Stability | experimental |
Portability | non-portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Splits the assigned space into two areas, 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.
actionPanel = vstack [ button "Image 1" ShowImage1, button "Image 2" ShowImage2, button "Image 3" ShowImage3 ] contentPanel = scroll (image activeImage) mainPanel = hsplit (actionPanel, contentPanel)
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 WidgetRequest when the handle is moved.
Instances
Monoid (SplitCfg s e) Source # | |
Semigroup (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
:: WidgetEvent e | |
=> (WidgetNode s e, WidgetNode s e) | The child nodes. |
-> WidgetNode s e | The created split. |
Creates a horizontal split between the two provided nodes.
:: WidgetEvent e | |
=> [SplitCfg s e] | The config options. |
-> (WidgetNode s e, WidgetNode s e) | The child nodes. |
-> WidgetNode s e | The created split. |
Creates a horizontal split between the two provided nodes. Accepts config.
:: WidgetEvent e | |
=> (WidgetNode s e, WidgetNode s e) | The child nodes. |
-> WidgetNode s e | The created split. |
Creates a vertical split between the two provided nodes.
:: WidgetEvent e | |
=> [SplitCfg s e] | The config options. |
-> (WidgetNode s e, WidgetNode s e) | The child nodes. |
-> WidgetNode s e | The created split. |
Creates a vertical split between the two provided nodes. Accepts config.