monomer-1.6.0.1: A GUI library for writing native Haskell applications.
Copyright(c) 2018 Francisco Vallarino
LicenseBSD-3-Clause (see the LICENSE file)
Maintainerfjvallarino@gmail.com
Stabilityexperimental
Portabilitynon-portable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Monomer.Widgets.Singles.Dial

Description

Dial widget, used for interacting with numeric values. It allows changing the value using the keyboard arrows, dragging the mouse or using the wheel.

dial numericLens 0 100

Similar in objective to Monomer.Widgets.Singles.Slider, but uses less visual space in its parent container.

Synopsis

Configuration

type DialValue a = (Eq a, Show a, Real a, FromFractional a, Typeable a) Source #

Constraints for numeric types accepted by dial.

data DialCfg s e a Source #

Configuration options for dial:

Instances

Instances details
Monoid (DialCfg s e a) Source # 
Instance details

Defined in Monomer.Widgets.Singles.Dial

Methods

mempty :: DialCfg s e a #

mappend :: DialCfg s e a -> DialCfg s e a -> DialCfg s e a #

mconcat :: [DialCfg s e a] -> DialCfg s e a #

Semigroup (DialCfg s e a) Source # 
Instance details

Defined in Monomer.Widgets.Singles.Dial

Methods

(<>) :: DialCfg s e a -> DialCfg s e a -> DialCfg s e a #

sconcat :: NonEmpty (DialCfg s e a) -> DialCfg s e a #

stimes :: Integral b => b -> DialCfg s e a -> DialCfg s e a #

Default (DialCfg s e a) Source # 
Instance details

Defined in Monomer.Widgets.Singles.Dial

Methods

def :: DialCfg s e a #

CmbWidth (DialCfg s e a) Source # 
Instance details

Defined in Monomer.Widgets.Singles.Dial

Methods

width :: Double -> DialCfg s e a Source #

CmbDragRate (DialCfg s e a) Rational Source # 
Instance details

Defined in Monomer.Widgets.Singles.Dial

Methods

dragRate :: Rational -> DialCfg s e a Source #

CmbWheelRate (DialCfg s e a) Rational Source # 
Instance details

Defined in Monomer.Widgets.Singles.Dial

Methods

wheelRate :: Rational -> DialCfg s e a Source #

WidgetEvent e => CmbOnBlur (DialCfg s e a) e Path Source # 
Instance details

Defined in Monomer.Widgets.Singles.Dial

Methods

onBlur :: (Path -> e) -> DialCfg s e a Source #

WidgetEvent e => CmbOnChange (DialCfg s e a) a e Source # 
Instance details

Defined in Monomer.Widgets.Singles.Dial

Methods

onChange :: (a -> e) -> DialCfg s e a Source #

WidgetEvent e => CmbOnFocus (DialCfg s e a) e Path Source # 
Instance details

Defined in Monomer.Widgets.Singles.Dial

Methods

onFocus :: (Path -> e) -> DialCfg s e a Source #

CmbOnBlurReq (DialCfg s e a) s e Path Source # 
Instance details

Defined in Monomer.Widgets.Singles.Dial

Methods

onBlurReq :: (Path -> WidgetRequest s e) -> DialCfg s e a Source #

CmbOnChangeReq (DialCfg s e a) s e a Source # 
Instance details

Defined in Monomer.Widgets.Singles.Dial

Methods

onChangeReq :: (a -> WidgetRequest s e) -> DialCfg s e a Source #

CmbOnFocusReq (DialCfg s e a) s e Path Source # 
Instance details

Defined in Monomer.Widgets.Singles.Dial

Methods

onFocusReq :: (Path -> WidgetRequest s e) -> DialCfg s e a Source #

Constructors

dial Source #

Arguments

:: (DialValue a, WidgetEvent e) 
=> ALens' s a

The lens into the model.

-> a

Minimum value.

-> a

Maximum value.

-> WidgetNode s e

The created dial.

Creates a dial using the given lens, providing minimum and maximum values.

dial_ Source #

Arguments

:: (DialValue a, WidgetEvent e) 
=> ALens' s a

The lens into the model.

-> a

Minimum value.

-> a

Maximum value.

-> [DialCfg s e a]

The config options.

-> WidgetNode s e

The created dial.

Creates a dial using the given lens, providing minimum and maximum values. Accepts config.

dialV Source #

Arguments

:: (DialValue a, WidgetEvent e) 
=> a

The current value.

-> (a -> e)

The event to raise on change.

-> a

Minimum value.

-> a

Maximum value.

-> WidgetNode s e

The created dial.

Creates a dial using the given value and onChange event handler, providing minimum and maximum values.

dialV_ Source #

Arguments

:: (DialValue a, WidgetEvent e) 
=> a

The current value.

-> (a -> e)

The event to raise on change.

-> a

Minimum value.

-> a

Maximum value.

-> [DialCfg s e a]

The config options.

-> WidgetNode s e

The created dial.

Creates a dial using the given value and onChange event handler, providing minimum and maximum values. Accepts config.

dialD_ Source #

Arguments

:: (DialValue a, WidgetEvent e) 
=> WidgetData s a

The WidgetData to retrieve the value from.

-> a

Minimum value.

-> a

Maximum value.

-> [DialCfg s e a]

The config options.

-> WidgetNode s e

The created dial.

Creates a dial providing a WidgetData instance, minimum and maximum values and config.