Module for making editors out of descriptions
- 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
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
mkEditor :: (Container -> Injector alpha) -> Extractor alpha -> Editor alphaSource
Function to construct an editor
parameters :: FieldDescription alpha -> ParametersSource
flattenFieldDescription :: FieldDescription alpha -> [FieldDescription alpha]Source
type MkFieldDescription alpha beta = Parameters -> Getter alpha beta -> Setter alpha beta -> Editor beta -> FieldDescription alphaSource
A constructor type for a field desciption