Source codeContentsIndex
InputForm
Description
the inputform
Synopsis
data InputForm a = InputForm Box (Ref (FormState a))
newInputForm :: Box -> Maybe a -> [Config (InputForm a)] -> IO (InputForm a)
class InputField f where
selector :: (GUIValue b) => (a -> b) -> Config (f a b)
modifier :: (GUIValue b) => (a -> b -> a) -> Config (f a b)
data FormState a
data EntryField a b
newEntryField :: (GUIValue b) => InputForm a -> [Config (EntryField a b)] -> IO (EntryField a b)
data EnumField a b
newEnumField :: (GUIValue b) => InputForm a -> [b] -> [Config (EnumField a b)] -> IO (EnumField a b)
data TextField a b
newTextField :: (GUIValue b) => InputForm a -> [Config (TextField a b)] -> IO (TextField a b)
getFormValue :: InputForm a -> IO a
setFormValue :: InputForm a -> a -> IO ()
data RecordField a b
newRecordField :: InputForm a -> (Box -> IO (InputForm b)) -> [Config (RecordField a b)] -> IO (RecordField a b, InputForm b)
undefinedFormValue :: IOError
Documentation
data InputForm a
The InputForm datatype.
Constructors
InputForm Box (Ref (FormState a))
Instances
Eq (InputForm a)
GUIObject (InputForm a)
HasColour (InputForm a)
HasFont (InputForm a)
HasEnable (InputForm a)
Widget (InputForm a)
HasSize (InputForm a)
HasBorder (InputForm a)
Synchronized (InputForm a)
Variable (InputForm a) a
newInputForm
:: Box parent container in which the form is embedded
-> Maybe a the datatype which contains the initial field values and the results
-> [Config (InputForm a)] list of configuration options for this form
-> IO (InputForm a) a InputForm
Creates a new InputForm
class InputField f where
Methods
selector :: (GUIValue b) => (a -> b) -> Config (f a b)
modifier :: (GUIValue b) => (a -> b -> a) -> Config (f a b)
Instances
InputField EntryField
InputField TextField
InputField EnumField
InputField RecordField
data FormState a
data EntryField a b
The EntryField datatype.
newEntryField
:: (GUIValue b)
=> InputForm a the form to which the field is added
-> [Config (EntryField a b)] a list of configuration options for this field
-> IO (EntryField a b) a EntryField
Add a new EntryField to the form
data EnumField a b
The EntryField datatype.
newEnumField
:: (GUIValue b)
=> InputForm a the form to which the field is added
-> [b] the list of choices in this field
-> [Config (EnumField a b)] a list of configuration options for this field
-> IO (EnumField a b) a EnumField
Add a new EnumField to the form
data TextField a b
The TextField datatype.
newTextField
:: (GUIValue b)
=> InputForm a the form to which the field is added
-> [Config (TextField a b)] a list of configuration options for this field
-> IO (TextField a b) a TextField
Add a new TextField to the form
getFormValue :: InputForm a -> IO a
setFormValue :: InputForm a -> a -> IO ()
data RecordField a b
newRecordField :: InputForm a -> (Box -> IO (InputForm b)) -> [Config (RecordField a b)] -> IO (RecordField a b, InputForm b)
undefinedFormValue :: IOError
Produced by Haddock version 0.3