monomer-1.4.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 HaskellNone
LanguageHaskell2010

Monomer.Widgets.Singles.ToggleButton

Description

Toggle button widget, used for boolean values.

toggleButton "Toggle" booleanLens

Its behavior is equivalent to Monomer.Widgets.Singles.Checkbox and Monomer.Widgets.Singles.LabeledCheckbox, with a different visual representation.

See Monomer.Widgets.Singles.OptionButton for detailed notes.

Synopsis

Configuration

type ToggleButtonCfg = OptionButtonCfg Source #

Configuration options for toggleButton:

toggleButtonOffStyle :: Style -> ToggleButtonCfg s e a Source #

Sets the style for the Off state of the toggle button.

Constructors

toggleButton :: Text -> ALens' s Bool -> WidgetNode s e Source #

Creates a toggleButton using the given lens.

toggleButton_ :: Text -> ALens' s Bool -> [ToggleButtonCfg s e Bool] -> WidgetNode s e Source #

Creates a toggleButton using the given lens. Accepts config.

toggleButtonV :: WidgetEvent e => Text -> Bool -> (Bool -> e) -> WidgetNode s e Source #

Creates a toggleButton using the given value and onChange event handler.

toggleButtonV_ :: WidgetEvent e => Text -> Bool -> (Bool -> e) -> [ToggleButtonCfg s e Bool] -> WidgetNode s e Source #

Creates a toggleButton using the given value and onChange event handler. Accepts config.

toggleButtonD_ :: Text -> WidgetData s Bool -> [ToggleButtonCfg s e Bool] -> WidgetNode s e Source #

Creates a toggleButton providing a WidgetData instance and config.