Copyright | (c) 2018 Francisco Vallarino |
---|---|
License | BSD-3-Clause (see the LICENSE file) |
Maintainer | fjvallarino@gmail.com |
Stability | experimental |
Portability | non-portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Color picker, displayed inside its parent container as a regular widget.
Shows sliders for the color components.
colorPicker colorLens
Optionally shows a slider for the alpha channel.
colorPicker_ colorLens [showAlpha]
Synopsis
- data ColorPickerCfg s e
- data ColorPickerEvt
- colorPicker :: (WidgetModel s, WidgetEvent e) => ALens' s Color -> WidgetNode s e
- colorPicker_ :: (WidgetModel s, WidgetEvent e) => ALens' s Color -> [ColorPickerCfg s e] -> WidgetNode s e
- colorPickerV :: (WidgetModel s, WidgetEvent e) => Color -> (Color -> e) -> WidgetNode s e
- colorPickerV_ :: (WidgetModel s, WidgetEvent e) => Color -> (Color -> e) -> [ColorPickerCfg s e] -> WidgetNode s e
- colorPickerD_ :: (WidgetModel s, WidgetEvent e) => WidgetData s Color -> [ColorPickerCfg s e] -> [CompositeCfg Color ColorPickerEvt s e] -> WidgetNode s e
Configuration
data ColorPickerCfg s e Source #
Configuration options for colorPicker:
showAlpha
: whether to allow modifying the alpha channel or not.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 any of the values changes.onChangeReq
:WidgetRequest
to generate when any of the values changes.
Instances
data ColorPickerEvt Source #
Internal events for the colorPicker
widget.
Instances
Show ColorPickerEvt Source # | |
Defined in Monomer.Widgets.Singles.ColorPicker showsPrec :: Int -> ColorPickerEvt -> ShowS # show :: ColorPickerEvt -> String # showList :: [ColorPickerEvt] -> ShowS # | |
Eq ColorPickerEvt Source # | |
Defined in Monomer.Widgets.Singles.ColorPicker (==) :: ColorPickerEvt -> ColorPickerEvt -> Bool # (/=) :: ColorPickerEvt -> ColorPickerEvt -> Bool # |
Constructors
:: (WidgetModel s, WidgetEvent e) | |
=> ALens' s Color | The lens into the model. |
-> WidgetNode s e | The created color picker. |
Creates a color picker using the given lens.
:: (WidgetModel s, WidgetEvent e) | |
=> ALens' s Color | The lens into the model. |
-> [ColorPickerCfg s e] | The config options. |
-> WidgetNode s e | The created color picker. |
Creates a color picker using the given lens. Accepts config.
:: (WidgetModel s, WidgetEvent e) | |
=> Color | The current value. |
-> (Color -> e) | The event to raise on change. |
-> WidgetNode s e | The created color picker. |
Creates a color picker using the given value and onChange
event handler.
:: (WidgetModel s, WidgetEvent e) | |
=> Color | The current value. |
-> (Color -> e) | The event to raise on change. |
-> [ColorPickerCfg s e] | The config options. |
-> WidgetNode s e | The created color picker. |
Creates a color picker using the given value and onChange
event handler.
Accepts config.
:: (WidgetModel s, WidgetEvent e) | |
=> WidgetData s Color | The |
-> [ColorPickerCfg s e] | The config options. |
-> [CompositeCfg Color ColorPickerEvt s e] | The composite config options. |
-> WidgetNode s e | The created color picker. |
Creates a color picker providing a WidgetData
instance and config.