Copyright | (c) 2018 Francisco Vallarino |
---|---|
License | BSD-3-Clause (see the LICENSE file) |
Maintainer | fjvallarino@gmail.com |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Radio widget, used for interacting with a fixed set of values. Each instance of
the radio will be associated with a single value. It does not include text,
which should be added as a label in the desired position (usually with hstack).
Alternatively, LabeledRadio
provides this functionality out of the box.
Configs:
- width: sets the max width/height of the radio.
- onFocus: event to raise when focus is received.
- onFocusReq: WidgetRequest to generate when focus is received.
- onBlur: event to raise when focus is lost.
- onBlurReq: WidgetRequest to generate when focus is lost.
- onChange: event to raise when the value changes/is clicked.
- onChangeReq: WidgetRequest to generate when the value changes/is clicked.
Synopsis
- data RadioCfg s e a = RadioCfg {
- _rdcWidth :: Maybe Double
- _rdcOnFocusReq :: [Path -> WidgetRequest s e]
- _rdcOnBlurReq :: [Path -> WidgetRequest s e]
- _rdcOnChangeReq :: [a -> WidgetRequest s e]
- radio :: (Eq a, WidgetEvent e) => a -> ALens' s a -> WidgetNode s e
- radio_ :: (Eq a, WidgetEvent e) => a -> ALens' s a -> [RadioCfg s e a] -> WidgetNode s e
- radioV :: (Eq a, WidgetEvent e) => a -> a -> (a -> e) -> WidgetNode s e
- radioV_ :: (Eq a, WidgetEvent e) => a -> a -> (a -> e) -> [RadioCfg s e a] -> WidgetNode s e
- radioD_ :: (Eq a, WidgetEvent e) => a -> WidgetData s a -> [RadioCfg s e a] -> WidgetNode s e
Documentation
Configuration options for radio widget.
RadioCfg | |
|
Instances
Semigroup (RadioCfg s e a) Source # | |
Monoid (RadioCfg s e a) Source # | |
Default (RadioCfg s e a) Source # | |
Defined in Monomer.Widgets.Singles.Radio | |
CmbWidth (RadioCfg s e a) Source # | |
WidgetEvent e => CmbOnChange (RadioCfg s e a) a e Source # | |
Defined in Monomer.Widgets.Singles.Radio | |
WidgetEvent e => CmbOnBlur (RadioCfg s e a) e Path Source # | |
WidgetEvent e => CmbOnFocus (RadioCfg s e a) e Path Source # | |
CmbOnChangeReq (RadioCfg s e a) s e a Source # | |
Defined in Monomer.Widgets.Singles.Radio onChangeReq :: (a -> WidgetRequest s e) -> RadioCfg s e a Source # | |
CmbOnBlurReq (RadioCfg s e a) s e Path Source # | |
Defined in Monomer.Widgets.Singles.Radio | |
CmbOnFocusReq (RadioCfg s e a) s e Path Source # | |
Defined in Monomer.Widgets.Singles.Radio onFocusReq :: (Path -> WidgetRequest s e) -> RadioCfg s e a Source # |
radio :: (Eq a, WidgetEvent e) => a -> ALens' s a -> WidgetNode s e Source #
Creates a radio using the given lens.
radio_ :: (Eq a, WidgetEvent e) => a -> ALens' s a -> [RadioCfg s e a] -> WidgetNode s e Source #
Creates a radio using the given lens. Accepts config.
radioV :: (Eq a, WidgetEvent e) => a -> a -> (a -> e) -> WidgetNode s e Source #
Creates a radio using the given value and onChange event handler.
radioV_ :: (Eq a, WidgetEvent e) => a -> a -> (a -> e) -> [RadioCfg s e a] -> WidgetNode s e Source #
Creates a radio using the given value and onChange event handler. Accepts config.
radioD_ :: (Eq a, WidgetEvent e) => a -> WidgetData s a -> [RadioCfg s e a] -> WidgetNode s e Source #
Creates a radio providing a WidgetData instance and config.