monomer-1.5.1.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.Singles.Radio

Description

Radio widget, used for interacting with a fixed set of values. Each instance of the radio is associated with a single value. It does not include text, which can be added with a label in the desired position (usually with [hstack/vstack](Monomer.Widgets.Containers.Stack)). Alternatively, Monomer.Widgets.Singles.LabeledRadio provides this functionality out of the box.

radio Option1 optionLens

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

Synopsis

Configuration

type RadioValue a = (Eq a, Typeable a) Source #

Constraints for numeric types accepted by the radio widget.

data RadioCfg s e a Source #

Configuration options for radio:

Instances

Instances details
Monoid (RadioCfg s e a) Source # 
Instance details

Defined in Monomer.Widgets.Singles.Radio

Methods

mempty :: RadioCfg s e a #

mappend :: RadioCfg s e a -> RadioCfg s e a -> RadioCfg s e a #

mconcat :: [RadioCfg s e a] -> RadioCfg s e a #

Semigroup (RadioCfg s e a) Source # 
Instance details

Defined in Monomer.Widgets.Singles.Radio

Methods

(<>) :: RadioCfg s e a -> RadioCfg s e a -> RadioCfg s e a #

sconcat :: NonEmpty (RadioCfg s e a) -> RadioCfg s e a #

stimes :: Integral b => b -> RadioCfg s e a -> RadioCfg s e a #

Default (RadioCfg s e a) Source # 
Instance details

Defined in Monomer.Widgets.Singles.Radio

Methods

def :: RadioCfg s e a #

CmbWidth (RadioCfg s e a) Source # 
Instance details

Defined in Monomer.Widgets.Singles.Radio

Methods

width :: Double -> RadioCfg s e a Source #

WidgetEvent e => CmbOnClick (RadioCfg s e a) e Source # 
Instance details

Defined in Monomer.Widgets.Singles.Radio

Methods

onClick :: e -> RadioCfg s e a Source #

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

Defined in Monomer.Widgets.Singles.Radio

Methods

onBlur :: (Path -> e) -> RadioCfg s e a Source #

WidgetEvent e => CmbOnChange (RadioCfg s e a) a e Source # 
Instance details

Defined in Monomer.Widgets.Singles.Radio

Methods

onChange :: (a -> e) -> RadioCfg s e a Source #

CmbOnClickReq (RadioCfg s e a) s e Source # 
Instance details

Defined in Monomer.Widgets.Singles.Radio

Methods

onClickReq :: WidgetRequest s e -> RadioCfg s e a Source #

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

Defined in Monomer.Widgets.Singles.Radio

Methods

onFocus :: (Path -> e) -> RadioCfg s e a Source #

CmbOnBlurReq (RadioCfg s e a) s e Path Source # 
Instance details

Defined in Monomer.Widgets.Singles.Radio

Methods

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

CmbOnChangeReq (RadioCfg s e a) s e a Source # 
Instance details

Defined in Monomer.Widgets.Singles.Radio

Methods

onChangeReq :: (a -> WidgetRequest s e) -> RadioCfg s e a Source #

CmbOnFocusReq (RadioCfg s e a) s e Path Source # 
Instance details

Defined in Monomer.Widgets.Singles.Radio

Methods

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

Constructors

radio Source #

Arguments

:: (RadioValue a, WidgetEvent e) 
=> a

The option value.

-> ALens' s a

The lens into the model.

-> WidgetNode s e

The created radio.

Creates a radio using the given lens.

radio_ Source #

Arguments

:: (RadioValue a, WidgetEvent e) 
=> a

The option value.

-> ALens' s a

The lens into the model.

-> [RadioCfg s e a]

The config options.

-> WidgetNode s e

The created radio.

Creates a radio using the given lens. Accepts config.

radioV Source #

Arguments

:: (RadioValue a, WidgetEvent e) 
=> a

The option value.

-> a

The current value.

-> (a -> e)

The event to raise on change.

-> WidgetNode s e

The created radio.

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

radioV_ Source #

Arguments

:: (RadioValue a, WidgetEvent e) 
=> a

The option value.

-> a

The current value.

-> (a -> e)

The event to raise on change.

-> [RadioCfg s e a]

The config options.

-> WidgetNode s e

The created radio.

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

radioD_ Source #

Arguments

:: (RadioValue a, WidgetEvent e) 
=> a

The option value.

-> WidgetData s a

The WidgetData to retrieve the value from.

-> [RadioCfg s e a]

The config options.

-> WidgetNode s e

The created radio.

Creates a radio providing a WidgetData instance and config.