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 |
Monomer.Widgets.Singles.Slider
Contents
Description
Slider widget, used for interacting with numeric values. It allows changing the value by keyboard arrows, dragging the mouse or using the wheel.
Similar in objective to Dial
, but more convenient in
some layouts.
Synopsis
- type SliderValue a = (Eq a, Show a, Real a, FromFractional a, Typeable a)
- data SliderCfg s e a
- hslider :: (SliderValue a, WidgetEvent e) => ALens' s a -> a -> a -> WidgetNode s e
- hslider_ :: (SliderValue a, WidgetEvent e) => ALens' s a -> a -> a -> [SliderCfg s e a] -> WidgetNode s e
- vslider :: (SliderValue a, WidgetEvent e) => ALens' s a -> a -> a -> WidgetNode s e
- vslider_ :: (SliderValue a, WidgetEvent e) => ALens' s a -> a -> a -> [SliderCfg s e a] -> WidgetNode s e
- hsliderV :: (SliderValue a, WidgetEvent e) => a -> (a -> e) -> a -> a -> WidgetNode s e
- hsliderV_ :: (SliderValue a, WidgetEvent e) => a -> (a -> e) -> a -> a -> [SliderCfg s e a] -> WidgetNode s e
- vsliderV :: (SliderValue a, WidgetEvent e) => a -> (a -> e) -> a -> a -> WidgetNode s e
- vsliderV_ :: (SliderValue a, WidgetEvent e) => a -> (a -> e) -> a -> a -> [SliderCfg s e a] -> WidgetNode s e
- sliderD_ :: (SliderValue a, WidgetEvent e) => Bool -> WidgetData s a -> a -> a -> [SliderCfg s e a] -> WidgetNode s e
Configuration
type SliderValue a = (Eq a, Show a, Real a, FromFractional a, Typeable a) Source #
Constraints for numeric types accepted by slider.
Configuration options for slider:
width
: sets the size of the secondary axis of the Slider.radius
: the radius of the corners of the Slider.wheelRate
: The rate at which wheel movement affects the number.dragRate
: The rate at which drag movement affects the number.thumbVisible
: whether a thumb should be visible or not.thumbFactor
: the size of the thumb relative to width.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.onChangeReq
:WidgetRequest
to generate when the value changes.
Instances
Constructors
hslider :: (SliderValue a, WidgetEvent e) => ALens' s a -> a -> a -> WidgetNode s e Source #
Creates a horizontal slider using the given lens, providing minimum and maximum values.
hslider_ :: (SliderValue a, WidgetEvent e) => ALens' s a -> a -> a -> [SliderCfg s e a] -> WidgetNode s e Source #
Creates a horizontal slider using the given lens, providing minimum and maximum values. Accepts config.
vslider :: (SliderValue a, WidgetEvent e) => ALens' s a -> a -> a -> WidgetNode s e Source #
Creates a vertical slider using the given lens, providing minimum and maximum values.
vslider_ :: (SliderValue a, WidgetEvent e) => ALens' s a -> a -> a -> [SliderCfg s e a] -> WidgetNode s e Source #
Creates a vertical slider using the given lens, providing minimum and maximum values. Accepts config.
hsliderV :: (SliderValue a, WidgetEvent e) => a -> (a -> e) -> a -> a -> WidgetNode s e Source #
Creates a horizontal slider using the given value and onChange
event handler,
providing minimum and maximum values.
hsliderV_ :: (SliderValue a, WidgetEvent e) => a -> (a -> e) -> a -> a -> [SliderCfg s e a] -> WidgetNode s e Source #
Creates a horizontal slider using the given value and onChange
event handler,
providing minimum and maximum values. Accepts config.
vsliderV :: (SliderValue a, WidgetEvent e) => a -> (a -> e) -> a -> a -> WidgetNode s e Source #
Creates a vertical slider using the given value and onChange
event handler,
providing minimum and maximum values.
vsliderV_ :: (SliderValue a, WidgetEvent e) => a -> (a -> e) -> a -> a -> [SliderCfg s e a] -> WidgetNode s e Source #
Creates a vertical slider using the given value and onChange
event handler,
providing minimum and maximum values. Accepts config.
sliderD_ :: (SliderValue a, WidgetEvent e) => Bool -> WidgetData s a -> a -> a -> [SliderCfg s e a] -> WidgetNode s e Source #
Creates a slider providing direction, a WidgetData
instance, minimum and
maximum values and config.