Things from the Fudget library used in the examples
Top level, main program
fudlogue :: F a b -> IO ()
- used on the top level to connect the
main fudget to the Haskell I/O system.
shellF :: String -> F a b -> F a b
- creates shell (top level) windows. All GUI programs need at least
one of these.
GUI building blocks (widgets)
labelF :: String -> F a b
- creates string labels.
quitButtonF :: F a b
- creates quit buttons.
intInputF :: F Int Int
- creates integer entry fields.
intDispF :: F Int a
- creates integer displays.
buttonF :: String -> F Click Click
- creates command buttons.
>==< :: F b c -> F a b -> F a c
- serial composition.
>+< :: F i1 o1 -> F i2 o2 -> F (Either i1 i2) (Either o1 o2)
- parallel composition of two fudgets, which can be of different type.
listF:: [(t,F i o)] -> F (t,i) (t,o)
- parallel composition of a list of fudgets. All parts must have
the same type.
Adding application specific code
mapF :: (i->o) -> F i o
- constructs stateless abstract fudgets.
mapstateF :: (s->i->(s,[o])) -> s -> F i o
- construct stateful abstract fudgets.
labLeftOfF :: String -> F i o -> F i o
- put a label to the left of a fudget
placerF :: Placer -> F i o -> F i o
- is used to explicitly specify the relative placement of the
parts of a composite fudget. The first argument is a placer,
e.g., one of the following:
verticalP :: Placer
- vertical placement, top to bottom.
revP :: Placer -> Placer
- used to place parts in the reverse order.
matrixP :: Int -> Placer
- creates a matrix with the given number of columns.
holeF :: F a b
- creates holes, e.g. if not all places in a matrix can be used.