X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/717a57c2fabb054c8f00dc5dae70df1d03cfe532..2b96d0fb4be7d684c17987d74f8f92d0cfe345b5:/include/wx/msw/menu.h diff --git a/include/wx/msw/menu.h b/include/wx/msw/menu.h index 31e2488996..29472ce14c 100644 --- a/include/wx/msw/menu.h +++ b/include/wx/msw/menu.h @@ -49,16 +49,16 @@ public: virtual void SetTitle(const wxString& title); - // MSW-specific - bool ProcessCommand(wxCommandEvent& event); - -#ifdef WXWIN_COMPATIBILITY + // deprecated functions +#if wxUSE_MENU_CALLBACK wxMenu(const wxString& title, const wxFunction func) : wxMenuBase(title) { + Init(); + Callback(func); } -#endif // WXWIN_COMPATIBILITY +#endif // wxUSE_MENU_CALLBACK // implementation only from now on // ------------------------------- @@ -71,10 +71,6 @@ public: // get the menu handle WXHMENU GetHMenu() const { return m_hMenu; } - // attach/detach menu to/from wxMenuBar - void Attach(wxMenuBar *menubar); - void Detach(); - #if wxUSE_ACCEL // called by wxMenuBar to build its accel table from the accels of all menus bool HasAccels() const { return !m_accels.IsEmpty(); } @@ -131,16 +127,12 @@ 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 void SetLabelTop( size_t pos, const wxString& label ); virtual wxString GetLabelTop( size_t pos ) const; // compatibility: these functions are deprecated -#ifdef WXWIN_COMPATIBILITY +#if WXWIN_COMPATIBILITY void SetEventHandler(wxEvtHandler *handler) { m_eventHandler = handler; } wxEvtHandler *GetEventHandler() { return m_eventHandler; } @@ -150,15 +142,8 @@ public: // implementation from now on WXHMENU Create(); - int FindMenu(const wxString& title); - void Detach(); - - // returns TRUE if we're attached to a frame - bool IsAttached() const { return m_menuBarFrame != NULL; } - // get the frame we live in - wxFrame *GetFrame() const { return m_menuBarFrame; } - // attach to a frame - void Attach(wxFrame *frame); + virtual void Detach(); + virtual void Attach(wxFrame *frame); #if wxUSE_ACCEL // get the accel table for all the menus @@ -179,13 +164,12 @@ protected: // common part of all ctors void Init(); -#ifdef WXWIN_COMPATIBILITY +#if WXWIN_COMPATIBILITY wxEvtHandler *m_eventHandler; #endif // WXWIN_COMPATIBILITY wxArrayString m_titles; - wxFrame *m_menuBarFrame; WXHMENU m_hMenu; #if wxUSE_ACCEL