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)
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
cmdItem
).
These trigger some action when selected.
toggleItem
).
These allow the user to switch on/off some setting. The
current setting can be seen in the menu and can be changed under
program control.
radioGroupItem
).
These allow the user to change a setting that has a finite
set of possible values. The current setting can be seen in the menu and
can be changed under program control.
To allow menus/submenus of different types to be combined, translator functions are used.
menubar :: Menu a
subMenuItem
, but all
items in a menu bar need not be menus.
Adding graphics and keyboard shortcuts to menu items: Item.
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.