*/
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.
context it returns a 2-element list (item, submenu).
@endWxPerlOnly
*/
- virtual wxMenuItem* FindItem(int id, wxMenu* menu = NULL) const;
+ virtual wxMenuItem* FindItem(int id, wxMenu** menu = NULL) const;
/**
Returns the index of the menu with the given @a title or @c wxNOT_FOUND if no
@remarks Use only after the menubar has been associated with a frame.
*/
virtual void SetMenuLabel(size_t pos, const wxString& label);
+
+ /**
+ Enables you to set the global menubar on Mac, that is, the menubar displayed
+ when the app is running without any frames open.
+
+ @param menubar
+ The menubar to set.
+
+ @remarks Only exists on Mac, other platforms do not have this method.
+ */
+ static void MacSetCommonMenuBar(wxMenuBar* menubar);
+
+ /**
+ Enables you to get the global menubar on Mac, that is, the menubar displayed
+ when the app is running without any frames open.
+
+ @return The global menubar.
+
+ @remarks Only exists on Mac, other platforms do not have this method.
+ */
+ static wxMenuBar* MacGetCommonMenuBar();
+
+ wxFrame *GetFrame() const;
+ bool IsAttached() const;
+ virtual void Attach(wxFrame *frame);
+ virtual void Detach();
+
};
and have a special meaning since entries using these IDs will be taken out
of the normal menus under MacOS X and will be inserted into the system menu
(following the appropriate MacOS X interface guideline).
- On PalmOS @e wxID_EXIT is disabled according to Palm OS Companion guidelines.
Menu items may be either @e normal items, @e check items or @e radio items.
Normal items don't have any special properties while the check items have a
@see Append(), Prepend()
*/
- wxMenuItem* Insert(size_t pos, wxMenuItem* item);
+ wxMenuItem* Insert(size_t pos, wxMenuItem* menuItem);
/**
Inserts the given @a item before the position @a pos.
but the application may call it at other times if required.
*/
void UpdateUI(wxEvtHandler* source = NULL);
+
+
+ void SetInvokingWindow(wxWindow *win);
+ wxWindow *GetInvokingWindow() const;
+ wxWindow *GetWindow() const;
+ long GetStyle() const;
+ void SetParent(wxMenu *parent);
+ wxMenu *GetParent() const;
+
+ virtual void Attach(wxMenuBar *menubar);
+ virtual void Detach();
+ bool IsAttached() const;
+
};