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.LabeledRadio

Description

Labeled radio widget, used for interacting with a fixed set of values. Each instance of labeled radio is associated with a single value. In contrast to radio, it includes a clickable label.

labeledRadio "First option" Option1 optionLens

With text in a different location:

labeledRadio_ "Radio with text below" Option1 optionLens [textBottom]
Synopsis

Configuration

data LabeledRadioCfg s e a Source #

Configuration options for labeledRadio:

  • General

  • Text related

    • textLeft: places the label to the left of the radio.
    • textRight: places the label to the right of the radio.
    • textTop: places the label to the top of the radio.
    • textBottom: places the label to the bottom of the radio.
    • trimSpaces: whether to remove leading/trailing spaces in the caption.
    • ellipsis: if ellipsis should be used for overflown text.
    • multiline: if text may be split in multiple lines.
    • maxLines: maximum number of text lines to show.
    • resizeFactor: flexibility to have more or less space assigned.
    • resizeFactorW: flexibility for more or less horizontal space assigned.
    • resizeFactorH: flexibility for more or less vertical space assigned.
  • Radio related

Instances

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

Defined in Monomer.Widgets.Singles.LabeledRadio

Semigroup (LabeledRadioCfg s e a) Source # 
Instance details

Defined in Monomer.Widgets.Singles.LabeledRadio

Methods

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

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

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

Default (LabeledRadioCfg s e a) Source # 
Instance details

Defined in Monomer.Widgets.Singles.LabeledRadio

Methods

def :: LabeledRadioCfg s e a #

CmbChildSpacing (LabeledRadioCfg s e a) Source # 
Instance details

Defined in Monomer.Widgets.Singles.LabeledRadio

CmbEllipsis (LabeledRadioCfg s e a) Source # 
Instance details

Defined in Monomer.Widgets.Singles.LabeledRadio

CmbMaxLines (LabeledRadioCfg s e a) Source # 
Instance details

Defined in Monomer.Widgets.Singles.LabeledRadio

Methods

maxLines :: Int -> LabeledRadioCfg s e a Source #

CmbMultiline (LabeledRadioCfg s e a) Source # 
Instance details

Defined in Monomer.Widgets.Singles.LabeledRadio

CmbResizeFactor (LabeledRadioCfg s e a) Source # 
Instance details

Defined in Monomer.Widgets.Singles.LabeledRadio

CmbResizeFactorDim (LabeledRadioCfg s e a) Source # 
Instance details

Defined in Monomer.Widgets.Singles.LabeledRadio

CmbTextBottom (LabeledRadioCfg s e a) Source # 
Instance details

Defined in Monomer.Widgets.Singles.LabeledRadio

CmbTextLeft (LabeledRadioCfg s e a) Source # 
Instance details

Defined in Monomer.Widgets.Singles.LabeledRadio

CmbTextRight (LabeledRadioCfg s e a) Source # 
Instance details

Defined in Monomer.Widgets.Singles.LabeledRadio

CmbTextTop (LabeledRadioCfg s e a) Source # 
Instance details

Defined in Monomer.Widgets.Singles.LabeledRadio

CmbTrimSpaces (LabeledRadioCfg s e a) Source # 
Instance details

Defined in Monomer.Widgets.Singles.LabeledRadio

CmbWidth (LabeledRadioCfg s e a) Source # 
Instance details

Defined in Monomer.Widgets.Singles.LabeledRadio

Methods

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

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

Defined in Monomer.Widgets.Singles.LabeledRadio

Methods

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

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

Defined in Monomer.Widgets.Singles.LabeledRadio

Methods

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

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

Defined in Monomer.Widgets.Singles.LabeledRadio

Methods

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

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

Defined in Monomer.Widgets.Singles.LabeledRadio

Methods

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

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

Defined in Monomer.Widgets.Singles.LabeledRadio

Methods

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

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

Defined in Monomer.Widgets.Singles.LabeledRadio

Methods

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

Constructors

labeledRadio Source #

Arguments

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

The caption.

-> a

The option value.

-> ALens' s a

The lens into the model.

-> WidgetNode s e

The created labeled radio.

Creates a labeled radio using the given lens.

labeledRadio_ Source #

Arguments

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

The caption.

-> a

The option value.

-> ALens' s a

The lens into the model.

-> [LabeledRadioCfg s e a]

The config options.

-> WidgetNode s e

The created labeled radio.

Creates a labeled radio using the given lens. Accepts config.

labeledRadioV Source #

Arguments

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

The caption.

-> a

The option value.

-> a

The current value.

-> (a -> e)

The event to raise on change.

-> WidgetNode s e

The created labeled radio.

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

labeledRadioV_ Source #

Arguments

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

The caption.

-> a

The option value.

-> a

The current value.

-> (a -> e)

The event to raise on change.

-> [LabeledRadioCfg s e a]

The config options.

-> WidgetNode s e

The created labeled radio.

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

labeledRadioD_ Source #

Arguments

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

The caption.

-> a

The option value.

-> WidgetData s a

The WidgetData to retrieve the value from.

-> [LabeledRadioCfg s e a]

The config options.

-> WidgetNode s e

The created labeled radio.

Creates a labeled radio providing a WidgetData instance and config.