wxMenu: wxItem

A menu is a popup (or pull down) list of items, one of which may be selected before the menu goes away (clicking elsewhere dismisses the menu). At present, menus may only be used to construct menu bars, but will eventually have wider use.

A menu item has an integer ID associated with it which can be used to identify the selection, or to change the menu item in some way.

wxMenu::wxMenu

voidwxMenuchar *title = NULL, wxFunction func = NULL

Both arguments are presently ignored.

wxMenu::wxMenu

voidwxMenu

Destructor, destroying the menu.

wxMenu::Append

voidAppendint id, char * item

voidAppendint id, char * item, wxMenu *submenu

Adds the item to the end of the menu. item must be deallocated by the calling program. If the second form is used, the given menu will be a pullright submenu (must be created already). Do not use submenu after this call: it will be deallocated by wxWindows.

wxMenu::AppendSeparator

voidAppendSeparator

Adds a separator to the end of the menu. Under XView, this appears as a space.

wxMenu::Enable

voidEnableint id, Bool flag

If flag is TRUE, enables the given menu item, else disables it (greys it).

wxMenu::Check

voidCheckint id, Bool flag

If flag is TRUE, checks the given menu item, else unchecks it. Works in Windows 3 but has no effect in XView or Motif.