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 |
Container which stacks its children along a main axis. The layout algorithm
considers the different type of size requirements and assigns the space
according to the logic defined in SizeReq
. If the requested fixed space is
larger that the viewport of the stack, the content will overflow.
Configs:
- ignoreEmptyArea: when the widgets do not use all the available space, ignoring the unassigned space allows for mouse events to pass through. This is useful in zstack layers.
- sizeReqUpdater: allows modifying the
SizeReq
generated by the stack.
Synopsis
- hstack :: Traversable t => t (WidgetNode s e) -> WidgetNode s e
- hstack_ :: Traversable t => [StackCfg] -> t (WidgetNode s e) -> WidgetNode s e
- vstack :: Traversable t => t (WidgetNode s e) -> WidgetNode s e
- vstack_ :: Traversable t => [StackCfg] -> t (WidgetNode s e) -> WidgetNode s e
- assignStackAreas :: Bool -> Rect -> Seq (WidgetNode s e) -> (Seq Rect, Double)
Documentation
hstack :: Traversable t => t (WidgetNode s e) -> WidgetNode s e Source #
Creates a horizontal stack.
hstack_ :: Traversable t => [StackCfg] -> t (WidgetNode s e) -> WidgetNode s e Source #
Creates a horizontal stack. Accepts config.
vstack :: Traversable t => t (WidgetNode s e) -> WidgetNode s e Source #
Creates a vertical stack.
vstack_ :: Traversable t => [StackCfg] -> t (WidgetNode s e) -> WidgetNode s e Source #
Creates a vertical stack. Accepts config.
:: Bool | True if horizontal, False for vertical. |
-> Rect | The available space to assign. |
-> Seq (WidgetNode s e) | The widgets that will be assigned space. |
-> (Seq Rect, Double) | The assigned areas and used space in main axis. |
Assigns space from rect to each of the provided widgets based on their size requirements.