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
(x1,y0)
if f1
outputs an
InputMsg
containing x1 and analogously (x0,y1)
if
f2
outputs something. Here, x0
and y0
are values
previously received from f1
and f2
.
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:
inputThroughF
can 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)