The menu is used as a component of a wxMenuBar or as a popup menu. For a menu bar, create menus, append menu items (strings, separators or further menus), and finally append the menu to the menu bar.
A menu or menu bar string may contain an ampersand, which is taken to mean 'underline the next character and use it as the hotkey'. This gives the user the opportunity to use keystrokes to access menus and items.
wxMenu callback
wxMenu create
wxMenu append
wxMenu append-separator
wxMenu break
wxMenu check
wxMenu enable
symbol callback
This slot should be initialized if creating a popup menu. The name represents a function that will be called with the wxMenu instance and wxCommandEvent instance when the user selects an item. Use wxCommandEvent get-selection to retrieve the selected menu item id.
void ( create)
Create a menu and returns the menu's ID. The following slots may be initialized.
bool ( append long item-id
string item-string optional wxMenu submenu optional string help-string
optional bool checkable)
Append a string or submenu to the menu, passing the integer ID by which the menu item will be referenced, a string to be displayed, an optional pullright menu, and an optional flag for specifying whether this menu item can be checked.
A help string can be supplied, in which case the string will be shown on the first field of the status line (if any) in the frame containing the menu bar, when the mouse pointer moves over the menu item.
bool ( append-separator)
Append a menu separator.
bool ( break)
Inserts a column break into the menu.
bool ( check long item-id bool check)
Check (check = TRUE or uncheck check = FALSE the given menu item. MS Windows only.
bool ( enable long item-id bool enable)
Enable (enable = TRUE or disable enable = FALSE the given menu item.