monomer-1.3.0.0: 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 HaskellNone
LanguageHaskell2010

Monomer.Widgets.Singles.TimeField

Description

Input field for time types.

Supports TimeOfDay type of the time library, but other types can be supported by implementing TimeOfDayConverter. Maybe is also supported.

Supports different time formats.

Handles mouse wheel and shift + vertical drag to increase/decrease minutes.

Synopsis

Configuration

data TimeFieldCfg s e a Source #

Configuration options for timeField:

Instances

Instances details
Semigroup (TimeFieldCfg s e a) Source # 
Instance details

Defined in Monomer.Widgets.Singles.TimeField

Methods

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

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

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

Monoid (TimeFieldCfg s e a) Source # 
Instance details

Defined in Monomer.Widgets.Singles.TimeField

Methods

mempty :: TimeFieldCfg s e a #

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

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

Default (TimeFieldCfg s e a) Source # 
Instance details

Defined in Monomer.Widgets.Singles.TimeField

Methods

def :: TimeFieldCfg s e a #

CmbResizeOnChange (TimeFieldCfg s e a) Source # 
Instance details

Defined in Monomer.Widgets.Singles.TimeField

CmbSelectOnFocus (TimeFieldCfg s e a) Source # 
Instance details

Defined in Monomer.Widgets.Singles.TimeField

CmbCaretMs (TimeFieldCfg s e a) Int Source # 
Instance details

Defined in Monomer.Widgets.Singles.TimeField

Methods

caretMs :: Int -> TimeFieldCfg s e a Source #

CmbCaretWidth (TimeFieldCfg s e a) Double Source # 
Instance details

Defined in Monomer.Widgets.Singles.TimeField

CmbWheelRate (TimeFieldCfg s e a) Double Source # 
Instance details

Defined in Monomer.Widgets.Singles.TimeField

Methods

wheelRate :: Double -> TimeFieldCfg s e a Source #

CmbDragRate (TimeFieldCfg s e a) Double Source # 
Instance details

Defined in Monomer.Widgets.Singles.TimeField

Methods

dragRate :: Double -> TimeFieldCfg s e a Source #

FormattableTime a => CmbMaxValue (TimeFieldCfg s e a) a Source # 
Instance details

Defined in Monomer.Widgets.Singles.TimeField

Methods

maxValue :: a -> TimeFieldCfg s e a Source #

FormattableTime a => CmbMinValue (TimeFieldCfg s e a) a Source # 
Instance details

Defined in Monomer.Widgets.Singles.TimeField

Methods

minValue :: a -> TimeFieldCfg s e a Source #

CmbValidInputV (TimeFieldCfg s e a) e Source # 
Instance details

Defined in Monomer.Widgets.Singles.TimeField

Methods

validInputV :: (Bool -> e) -> TimeFieldCfg s e a Source #

CmbValidInput (TimeFieldCfg s e a) s Source # 
Instance details

Defined in Monomer.Widgets.Singles.TimeField

Methods

validInput :: ALens' s Bool -> TimeFieldCfg s e a Source #

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

Defined in Monomer.Widgets.Singles.TimeField

Methods

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

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

Defined in Monomer.Widgets.Singles.TimeField

Methods

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

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

Defined in Monomer.Widgets.Singles.TimeField

Methods

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

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

Defined in Monomer.Widgets.Singles.TimeField

Methods

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

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

Defined in Monomer.Widgets.Singles.TimeField

Methods

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

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

Defined in Monomer.Widgets.Singles.TimeField

Methods

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

type FormattableTime a = (Eq a, Ord a, Show a, TimeTextConverter a, Typeable a) Source #

Constraints for time types accepted by timeField.

class (Eq a, Ord a, Show a, Typeable a) => TimeOfDayConverter a where Source #

Converter to and form the TimeOfDay type of the time library. To use types other than TimeOfDay of said library, this typeclass needs to be implemented. -

Constructors

timeField :: (FormattableTime a, WidgetEvent e) => ALens' s a -> WidgetNode s e Source #

Creates a time field using the given lens.

timeField_ :: (FormattableTime a, WidgetEvent e) => ALens' s a -> [TimeFieldCfg s e a] -> WidgetNode s e Source #

Creates a time field using the given lens. Accepts config.

timeFieldV :: (FormattableTime a, WidgetEvent e) => a -> (a -> e) -> WidgetNode s e Source #

Creates a time field using the given value and onChange event handler.

timeFieldV_ :: (FormattableTime a, WidgetEvent e) => a -> (a -> e) -> [TimeFieldCfg s e a] -> WidgetNode s e Source #

Creates a time field using the given value and onChange event handler. Accepts config.

timeFormatHHMM :: TimeFieldCfg s e a Source #

Time format HH:MM

timeFormatHHMMSS :: TimeFieldCfg s e a Source #

Time format HH:MM:SS