X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/717a57c2fabb054c8f00dc5dae70df1d03cfe532..67c8c225f469529d86afa1c4e817e96d97c22d18:/include/wx/msw/menu.h diff --git a/include/wx/msw/menu.h b/include/wx/msw/menu.h index 31e2488996..30815349c3 100644 --- a/include/wx/msw/menu.h +++ b/include/wx/msw/menu.h @@ -49,16 +49,19 @@ 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 + + // MSW-specific + bool ProcessCommand(wxCommandEvent& event); // implementation only from now on // ------------------------------- @@ -140,7 +143,7 @@ public: 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,7 +153,6 @@ public: // implementation from now on WXHMENU Create(); - int FindMenu(const wxString& title); void Detach(); // returns TRUE if we're attached to a frame @@ -179,7 +181,7 @@ protected: // common part of all ctors void Init(); -#ifdef WXWIN_COMPATIBILITY +#if WXWIN_COMPATIBILITY wxEvtHandler *m_eventHandler; #endif // WXWIN_COMPATIBILITY