| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
HTk.Toolkit.InputForm
Description
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.
Instances
| Eq (InputForm a) Source # | Internal. |
| Synchronized (InputForm a) Source # | |
| GUIObject (InputForm a) Source # | Internal. |
| HasEnable (InputForm a) Source # | |
| HasFont (InputForm a) Source # | |
| HasBorder (InputForm a) Source # | |
| HasSize (InputForm a) Source # | |
| HasColour (InputForm a) Source # | |
| Widget (InputForm a) Source # | |
| Container (InputForm a) Source # | |
Arguments
| :: 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.
Instances
| InputField EntryField Source # | |
| Eq (EntryField a b) Source # | |
| Synchronized (EntryField a b) Source # | |
| GUIObject (EntryField a b) Source # | |
| HasEnable (EntryField a b) Source # | |
| HasFont (EntryField a b) Source # | |
| HasBorder (EntryField a b) Source # | |
| HasSize (EntryField a b) Source # | |
| HasColour (EntryField a b) Source # | |
| Widget (EntryField a b) Source # | |
| (GUIValue b, GUIValue c) => HasText (EntryField a b) c Source # | |
Arguments
| :: 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.
Instances
| InputField NumEntryField Source # | |
| Eq (NumEntryField a b) Source # | |
| Synchronized (NumEntryField a b) Source # | |
| GUIObject (NumEntryField a b) Source # | |
| HasEnable (NumEntryField a b) Source # | |
| HasFont (NumEntryField a b) Source # | |
| HasBorder (NumEntryField a b) Source # | |
| HasSize (NumEntryField a b) Source # | |
| HasColour (NumEntryField a b) Source # | |
| Widget (NumEntryField a b) Source # | |
| (GUIValue b, GUIValue c) => HasText (NumEntryField a b) c Source # | |
Arguments
| :: (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.
Instances
| InputField CheckboxField Source # | |
| Eq (CheckboxField a b) Source # | |
| Synchronized (CheckboxField a b) Source # | |
| GUIObject (CheckboxField a b) Source # | |
| HasEnable (CheckboxField a b) Source # | |
| HasFont (CheckboxField a b) Source # | |
| HasBorder (CheckboxField a b) Source # | |
| HasSize (CheckboxField a b) Source # | |
| HasColour (CheckboxField a b) Source # | |
| Widget (CheckboxField a b) Source # | |
| (GUIValue b, GUIValue c) => HasText (CheckboxField a b) c Source # | |
Arguments
| :: 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.
Instances
| InputField EnumField Source # | |
| Eq (EnumField a b) Source # | |
| Synchronized (EnumField a b) Source # | |
| GUIObject (EnumField a b) Source # | |
| HasEnable (EnumField a b) Source # | |
| HasFont (EnumField a b) Source # | |
| HasBorder (EnumField a b) Source # | |
| HasSize (EnumField a b) Source # | |
| HasColour (EnumField a b) Source # | |
| Widget (EnumField a b) Source # | |
| GUIValue c => HasText (EnumField a b) c Source # | |
Arguments
| :: 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.
Instances
| InputField TextField Source # | |
| Eq (TextField a b) Source # | |
| Synchronized (TextField a b) Source # | |
| GUIObject (TextField a b) Source # | |
| HasEnable (TextField a b) Source # | |
| HasFont (TextField a b) Source # | |
| HasBorder (TextField a b) Source # | |
| HasSize (TextField a b) Source # | |
| HasColour (TextField a b) Source # | |
| (GUIValue b, GUIValue c) => HasText (TextField a b) c Source # | |
Arguments
| :: 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 #
Instances
| InputField RecordField Source # | |
| Eq (RecordField a b) Source # | |
| Synchronized (RecordField a b) Source # | |
| GUIObject (RecordField a b) Source # | |
| HasEnable (RecordField a b) Source # | |
| HasFont (RecordField a b) Source # | |
| HasBorder (RecordField a b) Source # | |
| HasSize (RecordField a b) Source # | |
| HasColour (RecordField a b) Source # | |
| Widget (RecordField a b) Source # | |
| GUIValue c => HasText (RecordField a b) c Source # | |
newRecordField :: InputForm a -> (Box -> IO (InputForm b)) -> [Config (RecordField a b)] -> IO (RecordField a b, InputForm b) Source #