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 with an associated clickable label. Each instance of the radio will be associated with a single value.
Synopsis
- data LabeledRadioCfg s e a
- labeledRadio :: (Eq a, WidgetEvent e) => Text -> a -> ALens' s a -> WidgetNode s e
- labeledRadio_ :: (Eq a, WidgetEvent e) => Text -> a -> ALens' s a -> [LabeledRadioCfg s e a] -> WidgetNode s e
- labeledRadioV :: (Eq a, WidgetEvent e) => Text -> a -> a -> (a -> e) -> WidgetNode s e
- labeledRadioV_ :: (Eq a, WidgetEvent e) => Text -> a -> a -> (a -> e) -> [LabeledRadioCfg s e a] -> WidgetNode s e
- labeledRadioD_ :: (Eq a, WidgetEvent e) => Text -> a -> WidgetData s a -> [LabeledRadioCfg s e a] -> WidgetNode s e
Configuration
data LabeledRadioCfg s e a Source #
Configuration options for labeledRadio:
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 spaced assigned.resizeFactorW
: flexibility for more or less horizontal spaced assigned.resizeFactorH
: flexibility for more or less vertical spaced assigned.
Radio related
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.
Instances
Constructors
labeledRadio :: (Eq a, WidgetEvent e) => Text -> a -> ALens' s a -> WidgetNode s e Source #
Creates a labeled radio using the given lens.
labeledRadio_ :: (Eq a, WidgetEvent e) => Text -> a -> ALens' s a -> [LabeledRadioCfg s e a] -> WidgetNode s e Source #
Creates a labeled radio using the given lens. Accepts config.
labeledRadioV :: (Eq a, WidgetEvent e) => Text -> a -> a -> (a -> e) -> WidgetNode s e Source #
Creates a labeled radio using the given value and onChange
event handler.
labeledRadioV_ :: (Eq a, WidgetEvent e) => Text -> a -> a -> (a -> e) -> [LabeledRadioCfg s e a] -> WidgetNode s e Source #
Creates a labeled radio using the given value and onChange
event handler.
Accepts config.
labeledRadioD_ :: (Eq a, WidgetEvent e) => Text -> a -> WidgetData s a -> [LabeledRadioCfg s e a] -> WidgetNode s e Source #
Creates a labeled radio providing a WidgetData
instance and config.