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 |
Labeled checkbox, used for interacting with boolean values with an associated clickable label.
Synopsis
- data LabeledCheckboxCfg s e
- labeledCheckbox :: WidgetEvent e => Text -> ALens' s Bool -> WidgetNode s e
- labeledCheckbox_ :: WidgetEvent e => Text -> ALens' s Bool -> [LabeledCheckboxCfg s e] -> WidgetNode s e
- labeledCheckboxV :: WidgetEvent e => Text -> Bool -> (Bool -> e) -> WidgetNode s e
- labeledCheckboxV_ :: WidgetEvent e => Text -> Bool -> (Bool -> e) -> [LabeledCheckboxCfg s e] -> WidgetNode s e
- labeledCheckboxD_ :: WidgetEvent e => Text -> WidgetData s Bool -> [LabeledCheckboxCfg s e] -> WidgetNode s e
Configuration
data LabeledCheckboxCfg s e Source #
Configuration options for labeledCheckbox:
Text related
textLeft
: places the label to the left of the checkbox.textRight
: places the label to the right of the checkbox.textTop
: places the label to the top of the checkbox.textBottom
: places the label to the bottom of the checkbox.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.
Checkbox related
checkboxMark
: the type of checkbox mark.width
: sets the max width/height of the checkbox.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
labeledCheckbox :: WidgetEvent e => Text -> ALens' s Bool -> WidgetNode s e Source #
Creates a labeled checkbox using the given lens.
labeledCheckbox_ :: WidgetEvent e => Text -> ALens' s Bool -> [LabeledCheckboxCfg s e] -> WidgetNode s e Source #
Creates a labeled checkbox using the given lens. Accepts config.
labeledCheckboxV :: WidgetEvent e => Text -> Bool -> (Bool -> e) -> WidgetNode s e Source #
Creates a labeled checkbox using the given value and onChange
event
handler.
labeledCheckboxV_ :: WidgetEvent e => Text -> Bool -> (Bool -> e) -> [LabeledCheckboxCfg s e] -> WidgetNode s e Source #
Creates a labeled checkbox using the given value and onChange
event handler.
Accepts config.
labeledCheckboxD_ :: WidgetEvent e => Text -> WidgetData s Bool -> [LabeledCheckboxCfg s e] -> WidgetNode s e Source #
Creates a labeled checkbox providing a WidgetData
instance and config.