inputPairF :: InF a1 b1 -> InF a2 b2 -> InF (a1, a2) (b1, b2) type InF a b = F a (InputMsg b) inputListF :: Eq a => [(a, InF b c)] -> InF [(a, b)] [(a, c)] inputThroughF :: InF a a -> InF a a
inputPairF f1 f2
These functions are used to create fill-in forms (fudgets for inputting composite values). These can, e.g., be used as arguments to inputPopupF to create popup dialog windows.
f1 :: InF a1 b1
f2 :: InF a2 b2
InputMsgcontaining x1 and analogously
f2outputs something. Here,
y0are values previously received from
We use the type
InF for fudgets that are suitable as form elements.
For the forms to work properly, such a fudget should
produce output that allows its state (the value it displays and allows the
user to edit) to be accurately tracked. This amounts to the following:
inputThroughFcan be used to make a fudget propagate changes received on the input to the output, in case a fudget doesn't do that by itself.)
To use fudgets like radioGroupF and toggleButtonF, whose output
aren't of type InputMsg, as form elements, the function
inputChange can be used as a postprocessor.
inputPairF ("Login:" `labLeftOfF` stringF) ("Password:" `labLeftOfF` passwdF)