X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e9321277925fc8eb439dd713fc7015cc873f0c38..7344108e8a129a3f9b4df5ab0f98a1713db03b89:/interface/wx/menu.h diff --git a/interface/wx/menu.h b/interface/wx/menu.h index d1df2b809f..823253c4d2 100644 --- a/interface/wx/menu.h +++ b/interface/wx/menu.h @@ -107,6 +107,16 @@ public: */ 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. @@ -382,6 +392,8 @@ public: The menubar to set. @remarks Only exists on Mac, other platforms do not have this method. + + @onlyfor{wxosx} */ static void MacSetCommonMenuBar(wxMenuBar* menubar); @@ -392,9 +404,16 @@ public: @return The global menubar. @remarks Only exists on Mac, other platforms do not have this method. + + @onlyfor{wxosx} */ static wxMenuBar* MacGetCommonMenuBar(); - + + wxFrame *GetFrame() const; + bool IsAttached() const; + virtual void Attach(wxFrame *frame); + virtual void Detach(); + }; @@ -417,7 +436,6 @@ public: 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 @@ -802,7 +820,7 @@ public: wxMenuItemList is a pseudo-template list class containing wxMenuItem pointers, see wxList. */ - wxMenuItemList& GetMenuItems() const; + wxMenuItemList& GetMenuItems(); const wxMenuItemList& GetMenuItems() const; //@} @@ -994,5 +1012,18 @@ public: 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; + };