¤ menuF

Types

menuF :: (Graphic a, Graphic c) => a -> [(b, c)] -> F b b

Synopsis

menuF name alts

Description

menuF provides a drop down menu. A drop down menu consists of a menu activation button and a menu. The menu is normally hidden, but appears below the activation button when it is pressed, so that an item can be picked from the menu. The menu is removed as soon as the mouse button is released.

Input

Any input will be propagated to the output.

Output

When a menu item is selected, the corresponding value is output.

Arguments

name :: a
The name of the menu, which is shown in the menu activation button.
alts :: [(b, c)]
A list of items to choose from. Each item is paired with its visual representation (a string).

Example

 menuF "File" [(New,"New"), (Open,"Open..."), (Save, "Save"), (SaveAs, "Save as..."), (Close, "Close"), (Quit, "Quit")]

See Also

Related fudgets: buttonF, popupMenuF, radioGroupF, toggleButtonF.