new()->wxMenuBar()
Construct an empty menu bar.
new(Style)->wxMenuBar()
Types:
Style = integer()
destroy(This::wxMenuBar())->ok
Destructor, destroying the menu bar and removing it from the parent frame (if any).
append(This,Menu,Title)->boolean()
Types:
This = wxMenuBar()
Menu = wxMenu:wxMenu()
Title = unicode:chardata()
Adds the item to the end of the menu bar.
Return: true on success, false if an error occurred.
See: insert/4check(This,Id,Check)->ok
Types:
This = wxMenuBar()
Id = integer()
Check = boolean()
Checks or unchecks a menu item.
Remark: Only use this when the menu bar has been associated with a frame; otherwise, use the
wxMenu equivalent call.
enable(This,Id,Enable)->ok
Types:
This = wxMenuBar()
Id = integer()
Enable = boolean()
Enables or disables (greys out) a menu item.
Remark: Only use this when the menu bar has been associated with a frame; otherwise, use the
wxMenu equivalent call.
enableTop(This,Pos,Enable)->ok
Types:
This = wxMenuBar()
Pos = integer()
Enable = boolean()
Enables or disables a whole menu.
Remark: Only use this when the menu bar has been associated with a frame.
findMenu(This,Title)->integer()
Types:
This = wxMenuBar()
Title = unicode:chardata()
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.
findMenuItem(This,MenuString,ItemString)->integer()
Types:
This = wxMenuBar()
MenuString = ItemString = unicode:chardata()
Finds the menu item id for a menu name/menu item string pair.
Return: The menu item identifier, or wxNOT_FOUND if none was found.
Remark: Any special menu codes are stripped out of source and target strings before matching.
findItem(This,Id)->wxMenuItem:wxMenuItem()
Types:
This = wxMenuBar()
Id = integer()
Finds the menu item object associated with the given menu item identifier.
Return: The found menu item object, or NULL if one was not found.
getHelpString(This,Id)->unicode:charlist()
Types:
This = wxMenuBar()
Id = integer()
Gets the help string associated with the menu item identifier.
Return: The help string, or the empty string if there was no help string or the menu item was not
found.
See: setHelpString/3getLabel(This,Id)->unicode:charlist()
Types:
This = wxMenuBar()
Id = integer()
Gets the label associated with a menu item.
Return: The menu item label, or the empty string if the item was not found.
Remark: Use only after the menubar has been associated with a frame.
getLabelTop(This,Pos)->unicode:charlist()
Types:
This = wxMenuBar()
Pos = integer()
See: getMenuLabel/2.
getMenuLabel(This,Pos)->unicode:charlist()
Types:
This = wxMenuBar()
Pos = integer()
Returns the label of a top-level menu.
Note that the returned string includes the accelerator characters that have been specified in the
menu title string during its construction.
Return: The menu label, or the empty string if the menu was not found.
Remark: Use only after the menubar has been associated with a frame.
See: getMenuLabelText/2, setMenuLabel/3getMenuLabelText(This,Pos)->unicode:charlist()
Types:
This = wxMenuBar()
Pos = integer()
Returns the label of a top-level menu.
Note that the returned string does not include any accelerator characters that may have been
specified in the menu title string during its construction.
Return: The menu label, or the empty string if the menu was not found.
Remark: Use only after the menubar has been associated with a frame.
See: getMenuLabel/2, setMenuLabel/3getMenu(This,MenuIndex)->wxMenu:wxMenu()
Types:
This = wxMenuBar()
MenuIndex = integer()
Returns the menu at menuIndex (zero-based).
getMenuCount(This)->integer()
Types:
This = wxMenuBar()
Returns the number of menus in this menubar.
insert(This,Pos,Menu,Title)->boolean()
Types:
This = wxMenuBar()
Pos = integer()
Menu = wxMenu:wxMenu()
Title = unicode:chardata()
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/1 is the same as calling append/3.
Return: true on success, false if an error occurred.
See: append/3isChecked(This,Id)->boolean()
Types:
This = wxMenuBar()
Id = integer()
Determines whether an item is checked.
Return: true if the item was found and is checked, false otherwise.
setAutoWindowMenu(Enable)->ok
Types:
Enable = boolean()
getAutoWindowMenu()->boolean()oSXGetAppleMenu(This)->wxMenu:wxMenu()
Types:
This = wxMenuBar()
Returns the Apple menu.
This is the leftmost menu with application's name as its title. You shouldn't remove any items
from it, but it is safe to insert extra menu items or submenus into it.
Only for:wxosx
Since: 3.0.1
isEnabled(This,Id)->boolean()
Types:
This = wxMenuBar()
Id = integer()
Determines whether an item is enabled.
Return: true if the item was found and is enabled, false otherwise.
remove(This,Pos)->wxMenu:wxMenu()
Types:
This = wxMenuBar()
Pos = integer()
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 insert/4 to change the menubar dynamically.
See: replace/4replace(This,Pos,Menu,Title)->wxMenu:wxMenu()
Types:
This = wxMenuBar()
Pos = integer()
Menu = wxMenu:wxMenu()
Title = unicode:chardata()
Replaces the menu at the given position with another one.
Return: The menu which was previously at position pos. The caller is responsible for deleting it.
See: insert/4, remove/2setHelpString(This,Id,HelpString)->ok
Types:
This = wxMenuBar()
Id = integer()
HelpString = unicode:chardata()
Sets the help string associated with a menu item.
See: getHelpString/2setLabel(This,Id,Label)->ok
Types:
This = wxMenuBar()
Id = integer()
Label = unicode:chardata()
Sets the label of a menu item.
Remark: Use only after the menubar has been associated with a frame.
See: getLabel/2setLabelTop(This,Pos,Label)->ok
Types:
This = wxMenuBar()
Pos = integer()
Label = unicode:chardata()
See: setMenuLabel/3.
setMenuLabel(This,Pos,Label)->ok
Types:
This = wxMenuBar()
Pos = integer()
Label = unicode:chardata()
Sets the label of a top-level menu.
Remark: Use only after the menubar has been associated with a frame.
wxWidgets team. wx 2.1.1 wxMenuBar(3erl)