ยค menuBarF, Menu, et al

Types

menuBarF :: Eq a => Menu a -> F a a
type Menu a = [MenuItem' a]

type MenuItem' a = Item (MenuItem a)

menu :: Eq b => Transl b a -> Menu b -> MenuItem a
cmdItem :: Graphic a1 => a2 -> a1 -> Item (MenuItem a2)
toggleItem :: Graphic a1 => Transl Bool a2 -> Bool -> a1 -> Item (MenuItem a2)
radioGroupItem :: (Graphic a1, Eq b) =>
                  Transl b a2 -> [Item b] -> b -> a1 -> Item (MenuItem a2)
sepItem :: Item (MenuItem a)
subMenuItem :: (Graphic a1, Eq b) => Transl b a2 -> Menu b -> a1 -> Item (MenuItem a2)

Synopsis

menuBarF menubar

menuBarF creates menu bars. Menus can have submenus nested to an arbitrary depth. Menu items can have keyboard shortcuts. The menu items can be

To allow menus/submenus of different types to be combined, translator functions are used.

Output

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

Input

Input is used to make selections under program control. Input is propagated to the output. In additions, if a toggle button or radio group is affected by the value, it will change its appearance accordingly.

Arguments

menubar :: Menu a
The menu bar. For a conventional menu bar, all items should be constructed with the function subMenuItem, but all items in a menu bar need not be menus.

See Also

Translator functions: Transl.

Adding graphics and keyboard shortcuts to menu items: Item.

Bugs

Documentation is incomplete.

This page documents work progress. Information on this page is subject to change without notice and does not represent a commitment on the part of the Fudgets corporation.

The types should be simplified.

Menu items can not be enables/disabled. Menus can not be modified dynamically.