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 |
Layout container which distributes space evenly along the main axis. For the secondary axis children will receive as much space as available for the grid widget itself.
In the same way as with hstack and vstack, hgrid
and vgrid
can be combined
to create more complex layouts.
The hgrid widget requests maxWidth * elements as its width, and the max height as its height. The inverse happens for vgrid.
hgrid [ label "Third 1", label "Third 2", label "Third 3" ]
Synopsis
- data GridCfg
- hgrid :: Traversable t => t (WidgetNode s e) -> WidgetNode s e
- hgrid_ :: Traversable t => [GridCfg] -> t (WidgetNode s e) -> WidgetNode s e
- vgrid :: Traversable t => t (WidgetNode s e) -> WidgetNode s e
- vgrid_ :: Traversable t => [GridCfg] -> t (WidgetNode s e) -> WidgetNode s e
Configuration
Configuration options for grid:
childSpacing
: spacing between the child widgets.sizeReqUpdater
: allows modifying theSizeReq
generated by the grid.
Instances
Monoid GridCfg Source # | |
Semigroup GridCfg Source # | |
Default GridCfg Source # | |
Defined in Monomer.Widgets.Containers.Grid | |
CmbChildSpacing GridCfg Source # | |
Defined in Monomer.Widgets.Containers.Grid childSpacing :: GridCfg Source # childSpacing_ :: Double -> GridCfg Source # | |
CmbSizeReqUpdater GridCfg Source # | |
Defined in Monomer.Widgets.Containers.Grid |
Constructors
hgrid :: Traversable t => t (WidgetNode s e) -> WidgetNode s e Source #
Creates a grid of items with the same width.
hgrid_ :: Traversable t => [GridCfg] -> t (WidgetNode s e) -> WidgetNode s e Source #
Creates a grid of items with the same width. Accepts config.
vgrid :: Traversable t => t (WidgetNode s e) -> WidgetNode s e Source #
Creates a grid of items with the same height.
vgrid_ :: Traversable t => [GridCfg] -> t (WidgetNode s e) -> WidgetNode s e Source #
Creates a grid of items with the same height. Accepts config.