monomer-1.6.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.ZStack

Description

Layered container, stacking children one on top of the other. Useful for handling widgets that need to be visible in certain contexts only, such as dialogs, or to overlay unrelated widgets (text on top of an image).

The order of the widgets is from bottom to top.

The container will request the largest combination of horizontal and vertical size requested by its child nodes.

zstack [
    image_ "assets/test-image.png" [fitFill],
    label "Image caption"
      `styleBasic` [textFont "Bold", textSize 20, textCenter]
  ]
Synopsis

Configuration

data ZStackCfg Source #

Configuration options for zstack:

  • onlyTopActive: whether the top visible node is the only node that may receive events.

onlyTopActive :: ZStackCfg Source #

Makes the top visible node the only node that may receive events.

onlyTopActive_ :: Bool -> ZStackCfg Source #

Whether the top visible node is the only node that may receive events.

Constructors

zstack Source #

Arguments

:: Traversable t 
=> t (WidgetNode s e)

The list of child nodes.

-> WidgetNode s e

The created zstack container.

Creates a zstack container with the provided nodes.

zstack_ Source #

Arguments

:: Traversable t 
=> [ZStackCfg]

The config options.

-> t (WidgetNode s e)

The list of child nodes.

-> WidgetNode s e

The created zstack container.

Creates a zstack container with the provided nodes. Accepts config.