wxMenuBar: wxItem

A menu bar is a series of menus accessible from the top of a frame. Selecting a title pulls down a menu; selecting a menu item causes a MenuSelection message to be passed to the frame with the menu item integer id as the only argument.

wxMenuBar::wxMenuBar

voidwxMenuBar

voidwxMenuBarint n, wxMenu *menus[], char *titles[]

Construct a menu bar. In the second form, the calling program must have created an array of menus and an array of titles. Do not use the submenus again after this call.

wxMenuBar::wxMenuBar

voidwxMenuBar

Destructor, destroying the menu bar and removing it from the parent frame (if any).

wxMenuBar::Append

voidAppendwxMenu *menu, char *title

Adds the item to the end of the menu bar. Do not use menu after this call: it will be deallocated by wxWindows.

wxMenuBar::Enable

voidEnableint id, Bool flag

If flag is TRUE, enables the given menu item, else disables it (greys it). Only use this when the menu bar has been associated with a frame; otherwise, use the wxMenu equivalent call.

wxMenuBar::Check

voidCheckint id, Bool flag

If flag is TRUE, checks the given menu item, else unchecks it. Works in Windows but has no effect in XView or Motif. Only use this when the menu bar has been associated with a frame; otherwise, use the wxMenu equivalent call.