ltk-0.12.1.0: Leksah tool kit

Safe Haskell | None

Graphics.UI.Editor.DescriptionPP

Description

Description of a editor with additional fileds for printing and parsing

Synopsis

- type Applicator beta gamma = beta -> gamma ()
- data FieldDescriptionPP alpha gamma
  - = FDPP {
    - parameters :: Parameters
    - fieldPrinter :: alpha -> Doc
    - fieldParser :: alpha -> CharParser () alpha
    - fieldEditor :: alpha -> IO (Widget, Injector alpha, alpha -> Extractor alpha, Notifier)
    - applicator :: alpha -> alpha -> gamma ()
    }
  - | VFDPP Parameters [FieldDescriptionPP alpha gamma]
  - | HFDPP Parameters [FieldDescriptionPP alpha gamma]
  - | NFDPP [(String, FieldDescriptionPP alpha gamma)]
- mkFieldPP :: (Eq beta, Monad gamma) => MkFieldDescriptionPP alpha beta gamma
- extractFieldDescription :: FieldDescriptionPP alpha gamma -> FieldDescription alpha
- flattenFieldDescriptionPP :: FieldDescriptionPP alpha gamma -> [FieldDescriptionPP alpha gamma]
- flattenFieldDescriptionPPToS :: FieldDescriptionPP alpha gamma -> [FieldDescriptionS alpha]

# Documentation

type Applicator beta gamma = beta -> gamma ()Source

A type for the application of a value to be reflected in the GUI

data FieldDescriptionPP alpha gamma Source

Constructors

FDPP |

Fields

parameters :: Parameters
fieldPrinter :: alpha -> Doc
fieldParser :: alpha -> CharParser () alpha
fieldEditor :: alpha -> IO (Widget, Injector alpha, alpha -> Extractor alpha, Notifier)
applicator :: alpha -> alpha -> gamma ()

VFDPP Parameters [FieldDescriptionPP alpha gamma] |
HFDPP Parameters [FieldDescriptionPP alpha gamma] |
NFDPP [(String, FieldDescriptionPP alpha gamma)] |

mkFieldPP :: (Eq beta, Monad gamma) => MkFieldDescriptionPP alpha beta gammaSource

extractFieldDescription :: FieldDescriptionPP alpha gamma -> FieldDescription alphaSource

flattenFieldDescriptionPP :: FieldDescriptionPP alpha gamma -> [FieldDescriptionPP alpha gamma]Source

flattenFieldDescriptionPPToS :: FieldDescriptionPP alpha gamma -> [FieldDescriptionS alpha]Source