monomer-1.5.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 HaskellSafe-Inferred
LanguageHaskell2010

Monomer.Widgets.Containers.Grid

Description

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

Configuration

data GridCfg Source #

Configuration options for 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.