.\" This is a wxWidgets manpage page generated from the XML docs .TH wxMenuBar 3wx 2005-02-15 "wxWidgets" "wxWidgets class documentation" .SH NAME wxMenuBar \- Contains a series of menus for use with a frame .SH DESCRIPTION A menu bar is a series of menus accessible from the top of a frame. .SH "PARENTS" wxWindow wxEvtHandler wxObject .SH "INCLUDE FILES" wx/menu.h .SH MEMBERS .SS wxMenuBar (long style = 0) Default constructor. .SS wxMenuBar (size_t nwxMenu* menus[]const wxString titles[]long style = 0) Construct a menu bar from arrays of menus and titles. .SS void ~wxMenuBar () Destructor, destroying the menu bar and removing it from the parent frame (if any). .SS bool Append (wxMenu *menuconst wxString& title) Adds the item to the end of the menu bar. .SS void Check (int idconst bool check) Checks or unchecks a menu item. .SS void Enable (int idconst bool enable) Enables or disables (greys out) a menu item. .SS void EnableTop (int posconst bool enable) Enables or disables a whole menu. .SS int FindMenu (const wxString& title) Returns the index of the menu with the given title or wxNOT_FOUND if no such menu exists in this menubar. The title parameter may specify either the menu title (with accelerator characters, i.e. "&File" ) or just the menu label ( "File" ) indifferently. .SS int FindMenuItem (const wxString& menuStringconst wxString& itemString) Finds the menu item id for a menu name/menu item string pair. .SS wxMenuItem * FindItem (int idwxMenu **menu = NULL) Finds the menu item object associated with the given menu item identifier. .SS wxString GetHelpString (int id) Gets the help string associated with the menu item identifier. .SS wxString GetLabel (int id) Gets the label associated with a menu item. .SS wxString GetLabelTop (int pos) Returns the label of a top-level menu. Note that the returned string does not include the accelerator characters which could have been specified in the menu title string during its construction. .SS wxMenu* GetMenu (int menuIndex) Returns the menu at menuIndex (zero-based). .SS int GetMenuCount () Returns the number of menus in this menubar. .SS bool Insert (size_t poswxMenu *menuconst wxString& title) Inserts the menu at the given position into the menu bar. Inserting menu at position 0 will insert it in the very beginning of it, inserting at position GetMenuCount() is the same as calling Append() . .SS bool IsChecked (int id) Determines whether an item is checked. .SS bool IsEnabled (int id) Determines whether an item is enabled. .SS void Refresh () Redraw the menu bar .SS wxMenu * Remove (size_t pos) Removes the menu from the menu bar and returns the menu object - the caller is responsible for deleting it. This function may be used together with wxMenuBar::Insert to change the menubar dynamically. .SS wxMenu * Replace (size_t poswxMenu *menuconst wxString& title) Replaces the menu at the given position with another one. .SS void SetHelpString (int idconst wxString& helpString) Sets the help string associated with a menu item. .SS void SetLabel (int idconst wxString& label) Sets the label of a menu item. .SS void SetLabelTop (int posconst wxString& label) Sets the label of a top-level menu. .SH EVENTS .SH "SEE ALSO" wxWindow wxEvtHandler wxObject wxMenu Event handling overview .SH "AUTHORS" Documentation content by Julian Smart, Robert Roebling, Vadim Zeitlin, Robin Dunn, et al Conversion to manpage format by Arnout Engelen (http://bzzt.net), bugreports welcome.