Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Monomer.SaveManager.SaveManagerCfg
Contents
Synopsis
- type Saves a = Seq (a, Text)
- data SaveManagerCfg s e a = SaveManagerCfg {
- _smcOnFocusReq :: [Path -> WidgetRequest s e]
- _smcOnBlurReq :: [Path -> WidgetRequest s e]
- _smcOnChangeReq :: [a -> WidgetRequest s e]
- _smcOnSavesChangeReq :: [Saves a -> WidgetRequest s e]
- _smcCaptionMethod :: Maybe (a -> ZonedTime -> Text)
- _smcNoConfirm :: Maybe Bool
- onSavesChange :: WidgetEvent e => (Saves a -> e) -> SaveManagerCfg s e a
- onSavesChangeReq :: (Saves a -> WidgetRequest s e) -> SaveManagerCfg s e a
- captionMethod :: (a -> ZonedTime -> Text) -> SaveManagerCfg s e a
- noConfirm :: SaveManagerCfg s e a
- noConfirm_ :: Bool -> SaveManagerCfg s e a
Configuration
data SaveManagerCfg s e a Source #
Configuration options for saveManager:
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.onSavesChange
: event to raise when the saves change.onSavesChangeReq
:WidgetRequest
to generate when the saves change.captionMethod
: function to generate the caption for the slot.noConfirm
: don't show confirmation dialog.
Constructors
SaveManagerCfg | |
Fields
|
Instances
onSavesChange :: WidgetEvent e => (Saves a -> e) -> SaveManagerCfg s e a Source #
On saves change event.
onSavesChangeReq :: (Saves a -> WidgetRequest s e) -> SaveManagerCfg s e a Source #
On saves change WidgetRequest
.
captionMethod :: (a -> ZonedTime -> Text) -> SaveManagerCfg s e a Source #
Receives function which converts the value and current time into text and uses it to generate the caption for the slot. Should be used to show more information than just modification time about the stored value.
noConfirm :: SaveManagerCfg s e a Source #
Should be used when the confirmation dialog is not needed.
noConfirm_ :: Bool -> SaveManagerCfg s e a Source #