| 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 |
Monomer.Widgets.Singles.ColorPicker
Contents
Description
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:WidgetRequestto generate when focus is received.onBlur: event to raise when focus is lost.onBlurReq:WidgetRequestto generate when focus is lost.onChange: event to raise when any of the values changes.onChangeReq:WidgetRequestto 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 Methods showsPrec :: Int -> ColorPickerEvt -> ShowS # show :: ColorPickerEvt -> String # showList :: [ColorPickerEvt] -> ShowS # | |
| Eq ColorPickerEvt Source # | |
Defined in Monomer.Widgets.Singles.ColorPicker Methods (==) :: ColorPickerEvt -> ColorPickerEvt -> Bool # (/=) :: ColorPickerEvt -> ColorPickerEvt -> Bool # | |
Constructors
Arguments
| :: (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.
Arguments
| :: (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.
Arguments
| :: (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.
Arguments
| :: (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.
Arguments
| :: (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.