monomer-1.6.0.1: 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.Singles.Checkbox

Description

Checkbox widget, used for interacting with boolean values. It does not include text, which can be added with a label in the desired position (usually with hstack/vstack). Alternatively, Monomer.Widgets.Singles.LabeledCheckbox provides this functionality out of the box.

checkbox booleanLens

Monomer.Widgets.Singles.ToggleButton provides similar functionality but with the look of a regular button.

Synopsis

Configuration

data CheckboxCfg s e Source #

Configuration options for checkbox:

Instances

Instances details
Monoid (CheckboxCfg s e) Source # 
Instance details

Defined in Monomer.Widgets.Singles.Checkbox

Methods

mempty :: CheckboxCfg s e #

mappend :: CheckboxCfg s e -> CheckboxCfg s e -> CheckboxCfg s e #

mconcat :: [CheckboxCfg s e] -> CheckboxCfg s e #

Semigroup (CheckboxCfg s e) Source # 
Instance details

Defined in Monomer.Widgets.Singles.Checkbox

Methods

(<>) :: CheckboxCfg s e -> CheckboxCfg s e -> CheckboxCfg s e #

sconcat :: NonEmpty (CheckboxCfg s e) -> CheckboxCfg s e #

stimes :: Integral b => b -> CheckboxCfg s e -> CheckboxCfg s e #

Default (CheckboxCfg s e) Source # 
Instance details

Defined in Monomer.Widgets.Singles.Checkbox

Methods

def :: CheckboxCfg s e #

CmbWidth (CheckboxCfg s e) Source # 
Instance details

Defined in Monomer.Widgets.Singles.Checkbox

Methods

width :: Double -> CheckboxCfg s e Source #

CmbCheckboxMark (CheckboxCfg s e) Source # 
Instance details

Defined in Monomer.Widgets.Singles.Checkbox

WidgetEvent e => CmbOnBlur (CheckboxCfg s e) e Path Source # 
Instance details

Defined in Monomer.Widgets.Singles.Checkbox

Methods

onBlur :: (Path -> e) -> CheckboxCfg s e Source #

WidgetEvent e => CmbOnChange (CheckboxCfg s e) Bool e Source # 
Instance details

Defined in Monomer.Widgets.Singles.Checkbox

Methods

onChange :: (Bool -> e) -> CheckboxCfg s e Source #

WidgetEvent e => CmbOnFocus (CheckboxCfg s e) e Path Source # 
Instance details

Defined in Monomer.Widgets.Singles.Checkbox

Methods

onFocus :: (Path -> e) -> CheckboxCfg s e Source #

CmbOnBlurReq (CheckboxCfg s e) s e Path Source # 
Instance details

Defined in Monomer.Widgets.Singles.Checkbox

Methods

onBlurReq :: (Path -> WidgetRequest s e) -> CheckboxCfg s e Source #

CmbOnChangeReq (CheckboxCfg s e) s e Bool Source # 
Instance details

Defined in Monomer.Widgets.Singles.Checkbox

Methods

onChangeReq :: (Bool -> WidgetRequest s e) -> CheckboxCfg s e Source #

CmbOnFocusReq (CheckboxCfg s e) s e Path Source # 
Instance details

Defined in Monomer.Widgets.Singles.Checkbox

Methods

onFocusReq :: (Path -> WidgetRequest s e) -> CheckboxCfg s e Source #

data CheckboxMark Source #

Type of drawing for the checkbox mark.

Constructors

checkbox Source #

Arguments

:: WidgetEvent e 
=> ALens' s Bool

The lens into the model.

-> WidgetNode s e

The created checkbox.

Creates a checkbox using the given lens.

checkbox_ Source #

Arguments

:: WidgetEvent e 
=> ALens' s Bool

The lens into the model.

-> [CheckboxCfg s e]

The config options.

-> WidgetNode s e

The created checkbox.

Creates a checkbox using the given lens. Accepts config.

checkboxV Source #

Arguments

:: WidgetEvent e 
=> Bool

The current value.

-> (Bool -> e)

The event to raise on change.

-> WidgetNode s e

The created checkbox.

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

checkboxV_ Source #

Arguments

:: WidgetEvent e 
=> Bool

The current value.

-> (Bool -> e)

The event to raise on change.

-> [CheckboxCfg s e]

The config options.

-> WidgetNode s e

The created checkbox.

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

checkboxD_ Source #

Arguments

:: WidgetEvent e 
=> WidgetData s Bool

The WidgetData to retrieve the value from.

-> [CheckboxCfg s e]

The config options.

-> WidgetNode s e

The created checkbox.

Creates a checkbox providing a WidgetData instance and config.