monomer-widgets-0.1.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Monomer.SaveManager.SaveManagerModel

Description

The composite works with the field of type SaveManagerModel a. This structure contains four fields:

  • Saved data - sequence of saved objects: Seq (a, Text).
  • Current data - the active value a.
  • Selected data - Maybe Int position of the selected slot. When there are no slots, it is Nothing.
  • Whether confirmation dialog is currently shown. Used internally.

It should be initialized with initSaveManagerModel a if there is no need to initialize slots (e.g. from file). Otherwise initSaveManagerModel_ should be used.

Synopsis

Documentation

savedData :: HasSavedData s a => Lens' s a Source #

currentData :: HasCurrentData s a => Lens' s a Source #

selectedData :: HasSelectedData s a => Lens' s a Source #

showConfirmRemove :: HasShowConfirmRemove s a => Lens' s a Source #

initSaveManagerModel :: a -> SaveManagerModel a Source #

Receives a value and returns composite model with no slots.

initSaveManagerModel_ :: a -> Seq (a, Text) -> SaveManagerModel a Source #

Receives a value with slots and returns composite model.