ยค oldMenuF, simpleMenuF

Types

oldMenuF :: (Graphic c, Eq b, Graphic a) =>
            FontName -> a -> [(b, [(ModState, KeySym)])] -> (b -> c) -> F a b
simpleMenuF :: (Eq b, Graphic c, Graphic a) =>
               FontName -> a -> [b] -> (b -> c) -> F a b

Synopsis

oldMenuF fname name alts show_alt

Description

oldMenuF 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.

oldMenuF allows keyboard shortcuts to be specified. simpleMenuF is does not have this possibility.

Input

Changes the text in the activation button.

Output

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

Arguments

fname :: FontName
Name of the font to use for text. Fonts can be examined by using the command xfontsel. (This argument is likely to disappear in the near future. It will be replaced by some resource mechanism.) A good default for menus is menuFont.
name :: a
The name of the menu, which is shown in the menu activation button.
alts :: [(b, [(ModState, KeySym)])]
A list of items to choose from. Each item is paired with a list of keyboard shortcuts.
show_alt :: b -> c
A function that determines the text string that is shown for each item in the menu.

Example

 simpleMenuF menuFont "File" ["New", "Open...", "Save", "Save as...", "Close", "Quit"] id

See Also

menuF, buttonF, popupMenuF, radioGroupF, toggleButtonF, menuFont.