X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/61243a510fe15e04996a986daaa53ed9fee75484..ef344ff86223f1f0961f025c0b249c898529c095:/include/wx/os2/menu.h?ds=sidebyside diff --git a/include/wx/os2/menu.h b/include/wx/os2/menu.h index 381170896a..e75b73d6f0 100644 --- a/include/wx/os2/menu.h +++ b/include/wx/os2/menu.h @@ -21,6 +21,8 @@ class WXDLLEXPORT wxFrame; +void wxSetShortCutKey(wxChar* zText); + // ---------------------------------------------------------------------------- // Menu // ---------------------------------------------------------------------------- @@ -71,12 +73,6 @@ public: } #endif // wxUSE_MENU_CALLBACK - // - // OS2-specific - // - bool ProcessCommand(wxCommandEvent& rEvent); - - // // Implementation only from now on // ------------------------------- @@ -99,12 +95,6 @@ public: // WXHMENU GetHMenu() const { return m_hMenu; } - // - // Attach/detach menu to/from wxMenuBar - // - void Attach(wxMenuBar* pMenubar); - void Detach(void); - #if wxUSE_ACCEL // // Called by wxMenuBar to build its accel table from the accels of all menus @@ -123,6 +113,15 @@ public: // int FindAccel(int nId) const; #endif // wxUSE_ACCEL + // + // OS/2 specific Find + // + wxMenuItem* FindItem(int id, ULONG hItem, wxMenu **menu = NULL) const; + //virtual function hiding suppression + int FindItem(const wxString& rsString) const + { return wxMenuBase::FindItem(rsString); } + wxMenuItem* FindItem(int id, wxMenu **menu = NULL) const + { return wxMenuBase::FindItem(id, menu); } // // All OS/2PM Menu's have one of these @@ -152,6 +151,11 @@ private: // WXHMENU m_hMenu; + // + // The helper variable for creating unique IDs. + // + static USHORT m_nextMenuId; + #if wxUSE_ACCEL // // The accelerators for our menu items @@ -212,7 +216,10 @@ public: virtual wxMenuItem* FindItem( int nId ,wxMenu** ppMenu = NULL ) const; - + virtual wxMenuItem* FindItem( int nId + ,ULONG hItem + ,wxMenu** ppMenu = NULL + ) const; virtual void EnableTop( size_t nPos ,bool bFlag ); @@ -235,22 +242,8 @@ public: // Implementation from now on // WXHMENU Create(void); - void Detach(void); - - // - // Returns TRUE if we're attached to a frame - // - bool IsAttached(void) const { return m_pMenuBarFrame != NULL; } - - // - // Get the frame we live in - // - wxFrame * GetFrame(void) const { return m_pMenuBarFrame; } - - // - // Attach to a frame - // - void Attach(wxFrame* pFrame); + virtual void Detach(void); + virtual void Attach(wxFrame* pFrame); #if wxUSE_ACCEL // @@ -286,7 +279,6 @@ protected: wxArrayString m_titles; - wxFrame* m_pMenuBarFrame; WXHMENU m_hMenu; #if wxUSE_ACCEL @@ -296,6 +288,8 @@ protected: wxAcceleratorTable m_vAccelTable; #endif // wxUSE_ACCEL + wxFrame* m_pMenuBarFrame; + private: // // Virtual function hiding suppression