IupMenu
Creates a menu element, which groups 3 types of interface elements: item, submenu and separator. Any other interface element defined inside a menu will be ignored.
Parameters/Return
Ihandle* IupMenu(Ihandle *elem1, Ihandle *elem2,..., NULL); [in C] iupmenu{elem1, elem2, ...: iuplua_tag} -> (elem: iuplua_tag) [in IupLua3] iup.menu{elem1, elem2, ...: iuplua_tag} -> (elem: iuplua_tag) [in IupLua5] menu(elem1, elem2, ...) [in LED]elem1, elem2, ...: List of identifiers that will be grouped by the menu. NULL defines the end of the list in C.
This function returns the identifier of the created menu, or NULL if an error occurs.
Note
A menu can be that of a dialog bar, defined by the dialog's MENU attribute, or a popup menu. A popup menu is displayed for the user (usually on the mouse position) and disappears when an item is selected. Its implementation is done by means of a call to the IupPopup function. IupDestroy should be called only for popup menus.
Lua BindingĀ
Offers a "cleaner" syntax than LED for defining menu, submenu and separator items. The list of elements in the menu is described as a string, with one element after the other, separated by commas.
Each element can be:
1) {"<item_name>","<action>"} - menu item
2) {"<submenu_name>","<menu>"} - submenu
3) {} - separator
4) <interface element> - submenu item
Callbacks
OPEN_CB: Called just before a submenu is opened.
MENUCLOSE_CB: Called right before the submenu is closed.