*/
void Enable(int id, bool enable);
+ /**
+ Returns true if the menu with the given index is enabled.
+
+ @param pos
+ The menu position (0-based)
+
+ @since 2.9.4
+ */
+ bool IsEnabledTop(size_t pos) const;
+
/**
Enables or disables a whole menu.
The menubar to set.
@remarks Only exists on Mac, other platforms do not have this method.
+
+ @onlyfor{wxosx}
*/
static void MacSetCommonMenuBar(wxMenuBar* menubar);
@return The global menubar.
@remarks Only exists on Mac, other platforms do not have this method.
+
+ @onlyfor{wxosx}
*/
static wxMenuBar* MacGetCommonMenuBar();
If the menu is part of a menubar, then wxMenuBar event processing is used.
With a popup menu (see wxWindow::PopupMenu), there is a variety of ways to
- handle a menu selection event (@c wxEVT_COMMAND_MENU_SELECTED):
+ handle a menu selection event (@c wxEVT_MENU):
- Provide @c EVT_MENU handlers in the window which pops up the menu, or in an
ancestor of that window (the simplest method);
- Derive a new class from wxMenu and define event table entries using the @c EVT_MENU macro;
wxMenuItemList is a pseudo-template list class containing wxMenuItem
pointers, see wxList.
*/
- wxMenuItemList& GetMenuItems() const;
+ wxMenuItemList& GetMenuItems();
const wxMenuItemList& GetMenuItems() const;
//@}
bool IsEnabled(int id) const;
/**
- Inserts the given @a item at position 0, i.e. before all the other
+ Inserts the given @a item at position 0, i.e.\ before all the other
existing items.
@see Append(), Insert()
wxMenuItem* Prepend(wxMenuItem* item);
/**
- Inserts the given @a item at position 0, i.e. before all the other
+ Inserts the given @a item at position 0, i.e.\ before all the other
existing items.
@see Append(), Insert()