Name

Menu —

A Menu is a vertically aligned set of options that can be selected. There are two kinds: Those that are part of a MenuBar and those that appear as a context menu (within the work space).

Synopsis

menuNew:: IO Menu
menuPopup:: MenuClass m => m -> Event -> IO ()
menuReorderChild:: (MenuClass m, MenuItemClass mi) => m -> mi -> Int -> IO ()

Todo

The following not bound functions might be useful: menuSetAccelGroup, menuSetAccelGroup, menuReposition

The function menuPopup at a specific position is difficult to bind: The callback function that determines at which position the menu is to be shown is keept after the call returns. Maybe we could destroy this function pointer with a destory event?

Constructors

menuNew

Make an empty Menu.

menuNew

Methods

menuPopup

Popup a context menu where a button press occurred.

menuPopup:: m:: Event:: IO ()

menuReorderChild

Move a child to a new position within the menu.

menuReorderChild:: m:: mi:: Int:: IO ()
mchildpos

The position is counted from 0 to n-1 if the menu contains n entries.