X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d427503c3696486ef84cd0e5081884ccd8d6b434..8d99be5f5381dad56492da02c2df1c3ec0750926:/include/wx/msw/menu.h diff --git a/include/wx/msw/menu.h b/include/wx/msw/menu.h index 5e553d3d4c..ed9641b35b 100644 --- a/include/wx/msw/menu.h +++ b/include/wx/msw/menu.h @@ -36,8 +36,20 @@ class WXDLLEXPORT wxMenu : public wxEvtHandler DECLARE_DYNAMIC_CLASS(wxMenu) public: - // ctor & dtor - wxMenu(const wxString& title = wxEmptyString, const wxFunction func = NULL); + // ctors & dtor +#ifdef WXWIN_COMPATIBILITY + wxMenu(const wxString& title, + const wxFunction func) + { + Init(title, func); + } +#endif + + wxMenu(const wxString& title = wxEmptyString, long WXUNUSED(style) = 0) + { + Init(title); + } + virtual ~wxMenu(); // construct menu @@ -143,6 +155,13 @@ private: #endif // WXWIN_COMPATIBILITY private: + // common part of all ctors + void Init(const wxString& title +#ifdef WXWIN_COMPATIBILITY + , const wxFunction func = NULL +#endif + ); + bool m_doBreak; // This is used when m_hMenu is NULL because we don't want to @@ -217,7 +236,7 @@ public: // notifications: return FALSE to prevent the menu from being // appended/deleted - virtual bool OnAppend(wxMenu *menu, const char *title); + virtual bool OnAppend(wxMenu *menu, const wxChar *title); virtual bool OnDelete(wxMenu *menu, int index); // item search