¤ 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 a) => Transl a b -> Menu a -> MenuItem b
cmdItem :: (Graphic b) => a -> b -> Item (MenuItem a)
toggleItem :: (Graphic b) => Transl Bool a -> Bool -> b -> Item (MenuItem a)
radioGroupItem :: (Graphic c, Eq a) => Transl a b -> [Item a] -> a -> c -> Item (MenuItem b)
sepItem :: Item (MenuItem a)
subMenuItem :: (Graphic c, Eq a) => Transl a b -> Menu a -> c -> Item (MenuItem b)

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.