X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8e6efd1fd2f6cedda23140aff17f56b26ef7c2d2..f78b3d1fc09db60a1b06d7be92bc971f303d579b:/include/wx/osx/menu.h diff --git a/include/wx/osx/menu.h b/include/wx/osx/menu.h index 56bbe5789c..17f351efd6 100644 --- a/include/wx/osx/menu.h +++ b/include/wx/osx/menu.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: menu.h +// Name: wx/osx/menu.h // Purpose: wxMenu, wxMenuBar classes // Author: Stefan Csomor // Modified by: @@ -41,10 +41,6 @@ public: bool ProcessCommand(wxCommandEvent& event); - // semi-private accessors - - // get the window which contains this menu - wxWindow *GetWindow() const; // get the menu handle WXHMENU GetHMenu() const ; @@ -87,6 +83,10 @@ private: // terminate the current radio group, if any void EndRadioGroup(); + // Common part of HandleMenu{Opened,Closed}(). + void DoHandleMenuOpenedOrClosed(wxEventType evtType); + + // if TRUE, insert a breal before appending the next item bool m_doBreak; @@ -130,11 +130,8 @@ public: virtual wxMenu *Replace(size_t pos, wxMenu *menu, const wxString& title); virtual wxMenu *Remove(size_t pos); - virtual int FindMenuItem(const wxString& menuString, - const wxString& itemString) const; - virtual wxMenuItem* FindItem( int id, wxMenu **menu = NULL ) const; - virtual void EnableTop( size_t pos, bool flag ); + virtual bool IsEnabledTop(size_t pos) const; virtual void SetMenuLabel( size_t pos, const wxString& label ); virtual wxString GetMenuLabel( size_t pos ) const; virtual bool Enable( bool enable = true ); @@ -145,7 +142,6 @@ public: } // implementation from now on - int FindMenu(const wxString& title); void Detach(); // returns TRUE if we're attached to a frame @@ -155,12 +151,6 @@ public: // attach to a frame void Attach(wxFrame *frame); - // clear the invoking window for all menus and submenus - void UnsetInvokingWindow() ; - - // set the invoking window for all menus and submenus - void SetInvokingWindow( wxFrame* frame ) ; - // if the menubar is modified, the display is not updated automatically, // call this function to update it (m_menuBarFrame should be !NULL) void Refresh(bool eraseBackground = true, const wxRect *rect = NULL); @@ -178,9 +168,7 @@ public: protected: // common part of all ctors void Init(); - wxWindow *m_invokingWindow; - wxArrayString m_titles; static bool s_macAutoWindowMenu ; static WXHMENU s_macWindowMenuHandle ;