ltk-0.12.1.0: Leksah tool kit

Safe Haskell | None

Graphics.UI.Editor.MakeEditor

Description

Module for making editors out of descriptions

Synopsis

- buildEditor :: FieldDescription alpha -> alpha -> IO (Widget, Injector alpha, alpha -> Extractor alpha, Notifier)
- data FieldDescription alpha
  - = FD Parameters (alpha -> IO (Widget, Injector alpha, alpha -> Extractor alpha, Notifier))
  - | VFD Parameters [FieldDescription alpha]
  - | HFD Parameters [FieldDescription alpha]
  - | NFD [(String, FieldDescription alpha)]
- mkField :: Eq beta => MkFieldDescription alpha beta
- extractAndValidate :: alpha -> [alpha -> Extractor alpha] -> [String] -> Notifier -> IO (Maybe alpha)
- extract :: alpha -> [alpha -> Extractor alpha] -> IO (Maybe alpha)
- mkEditor :: (Container -> Injector alpha) -> Extractor alpha -> Editor alpha
- parameters :: FieldDescription alpha -> Parameters
- flattenFieldDescription :: FieldDescription alpha -> [FieldDescription alpha]
- getRealWidget :: Widget -> IO (Maybe Widget)
- type MkFieldDescription alpha beta = Parameters -> Getter alpha beta -> Setter alpha beta -> Editor beta -> FieldDescription alpha

# Documentation

buildEditor :: FieldDescription alpha -> alpha -> IO (Widget, Injector alpha, alpha -> Extractor alpha, Notifier)Source

data FieldDescription alpha Source

A type to describe a field of a record, which can be edited | alpha is the type of the individual field of the record

Constructors

FD Parameters (alpha -> IO (Widget, Injector alpha, alpha -> Extractor alpha, Notifier)) |
VFD Parameters [FieldDescription alpha] |
HFD Parameters [FieldDescription alpha] |
NFD [(String, FieldDescription alpha)] |

mkField :: Eq beta => MkFieldDescription alpha betaSource

Function to construct a field description

extractAndValidate :: alpha -> [alpha -> Extractor alpha] -> [String] -> Notifier -> IO (Maybe alpha)Source

Convenience method to validate and extract fields

extract :: alpha -> [alpha -> Extractor alpha] -> IO (Maybe alpha)Source

mkEditor :: (Container -> Injector alpha) -> Extractor alpha -> Editor alphaSource

Function to construct an editor

parameters :: FieldDescription alpha -> Parameters Source

flattenFieldDescription :: FieldDescription alpha -> [FieldDescription alpha]Source

getRealWidget :: Widget -> IO (Maybe Widget)Source

get through outerAlignment, frame, innerAlignment

type MkFieldDescription alpha beta = Parameters -> Getter alpha beta -> Setter alpha beta -> Editor beta -> FieldDescription alphaSource

A constructor type for a field desciption