Safe Haskell | None |
---|---|
Language | Haskell98 |
the inputform
- data InputForm a = InputForm Box (Ref (FormState a))
- newInputForm :: Box -> Maybe a -> [Config (InputForm a)] -> IO (InputForm a)
- class InputField f where
- data FormState a
- data EntryField a b
- newEntryField :: GUIValue b => InputForm a -> [Config (EntryField a b)] -> IO (EntryField a b)
- data NumEntryField a b
- newNumEntryField :: (Ord b, Num b, GUIValue b) => InputForm a -> (b, b) -> b -> [Config (NumEntryField a b)] -> IO (NumEntryField a b)
- data CheckboxField a b
- newCheckboxField :: GUIValue b => InputForm a -> b -> [Config (CheckboxField a b)] -> IO (CheckboxField 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
The InputForm
datatype.
:: 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 |
Creates a new InputForm
class InputField f where Source
data EntryField a b Source
The EntryField
datatype.
InputField EntryField | |
Eq (EntryField a b) | |
Synchronized (EntryField a b) | |
GUIObject (EntryField a b) | |
HasEnable (EntryField a b) | |
HasFont (EntryField a b) | |
HasBorder (EntryField a b) | |
HasSize (EntryField a b) | |
HasColour (EntryField a b) | |
Widget (EntryField a b) | |
(GUIValue b, GUIValue c) => HasText (EntryField a b) c |
:: 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 |
Add a new EntryField
to the form
data NumEntryField a b Source
The NumEntryField
datatype.
InputField NumEntryField | |
Eq (NumEntryField a b) | |
Synchronized (NumEntryField a b) | |
GUIObject (NumEntryField a b) | |
HasEnable (NumEntryField a b) | |
HasFont (NumEntryField a b) | |
HasBorder (NumEntryField a b) | |
HasSize (NumEntryField a b) | |
HasColour (NumEntryField a b) | |
Widget (NumEntryField a b) | |
(GUIValue b, GUIValue c) => HasText (NumEntryField a b) c |
:: (Ord b, Num b, GUIValue b) | |
=> InputForm a | the form to which the field is added |
-> (b, b) | upper and lower bound (for the spin only) |
-> b | increment/decrement for the spin button |
-> [Config (NumEntryField a b)] | a list of configuration options for this field |
-> IO (NumEntryField a b) | a |
Add a new NumEntryField
to the form
data CheckboxField a b Source
The CheckboxField
datatype.
InputField CheckboxField | |
Eq (CheckboxField a b) | |
Synchronized (CheckboxField a b) | |
GUIObject (CheckboxField a b) | |
HasEnable (CheckboxField a b) | |
HasFont (CheckboxField a b) | |
HasBorder (CheckboxField a b) | |
HasSize (CheckboxField a b) | |
HasColour (CheckboxField a b) | |
Widget (CheckboxField a b) | |
(GUIValue b, GUIValue c) => HasText (CheckboxField a b) c |
:: GUIValue b | |
=> InputForm a | the form to which the field is added |
-> b | initial value |
-> [Config (CheckboxField a b)] | a list of configuration options for this field |
-> IO (CheckboxField a b) | a |
Add a new CheckboxField
to the form
The EnumField
datatype.
:: 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 |
Add a new EnumField
to the form
The TextField
datatype.
:: 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 |
Add a new TextField
to the form
getFormValue :: InputForm a -> IO a Source
setFormValue :: InputForm a -> a -> IO () Source
data RecordField a b Source
InputField RecordField | |
Eq (RecordField a b) | |
Synchronized (RecordField a b) | |
GUIObject (RecordField a b) | |
HasEnable (RecordField a b) | |
HasFont (RecordField a b) | |
HasBorder (RecordField a b) | |
HasSize (RecordField a b) | |
HasColour (RecordField a b) | |
Widget (RecordField a b) | |
GUIValue c => HasText (RecordField a b) c |
newRecordField :: InputForm a -> (Box -> IO (InputForm b)) -> [Config (RecordField a b)] -> IO (RecordField a b, InputForm b) Source