X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6d5b2a57cf08040457f7a3e80a0d76e8c954bfe5..7509fa8caa43a1327175dd5fa8b7caf6b647e81b:/src/msw/menuitem.cpp diff --git a/src/msw/menuitem.cpp b/src/msw/menuitem.cpp index 6d084e9d4d..33e67a5d9f 100644 --- a/src/msw/menuitem.cpp +++ b/src/msw/menuitem.cpp @@ -28,6 +28,8 @@ #pragma hdrstop #endif +#if wxUSE_MENUS + #ifndef WX_PRECOMP #include "wx/font.h" #include "wx/bitmap.h" @@ -70,11 +72,7 @@ // dynamic classes implementation // ---------------------------------------------------------------------------- -#if wxUSE_OWNER_DRAWN - IMPLEMENT_DYNAMIC_CLASS2(wxMenuItem, wxMenuItemBase, wxOwnerDrawn) -#else //!USE_OWNER_DRAWN - IMPLEMENT_DYNAMIC_CLASS(wxMenuItem, wxMenuItemBase) -#endif //USE_OWNER_DRAWN +IMPLEMENT_DYNAMIC_CLASS(wxMenuItem, wxObject) // ---------------------------------------------------------------------------- // wxMenuItem @@ -97,7 +95,7 @@ wxMenuItem::wxMenuItem(wxMenu *pParentMenu, #if wxUSE_OWNER_DRAWN // set default menu colors - #define SYS_COLOR(c) (wxSystemSettings::GetSystemColour(wxSYS_COLOUR_##c)) + #define SYS_COLOR(c) (wxSystemSettings::GetColour(wxSYS_COLOUR_##c)) SetTextColour(SYS_COLOR(MENUTEXT)); SetBackgroundColour(SYS_COLOR(MENU)); @@ -150,18 +148,6 @@ wxString wxMenuItemBase::GetLabelFromText(const wxString& text) return wxStripMenuCodes(text); } -// accelerators -// ------------ - -#if wxUSE_ACCEL - -wxAcceleratorEntry *wxMenuItem::GetAccel() const -{ - return wxGetAccelFromString(GetText()); -} - -#endif // wxUSE_ACCEL - // change item state // ----------------- @@ -275,3 +261,5 @@ wxMenuItem *wxMenuItemBase::New(wxMenu *parentMenu, { return new wxMenuItem(parentMenu, id, name, help, isCheckable, subMenu); } + +#endif // wxUSE_MENUS