]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/menuitem.cpp
1. always create the buttons with WS_CLIPSIBLINGS style, this prevetns them
[wxWidgets.git] / src / msw / menuitem.cpp
index 6d084e9d4daa4bf42984a9222473daab115dd7c1..33e67a5d9fe3f9cc04d1532e35348bef804ef6ea 100644 (file)
@@ -28,6 +28,8 @@
     #pragma hdrstop
 #endif
 
     #pragma hdrstop
 #endif
 
+#if wxUSE_MENUS
+
 #ifndef WX_PRECOMP
     #include "wx/font.h"
     #include "wx/bitmap.h"
 #ifndef WX_PRECOMP
     #include "wx/font.h"
     #include "wx/bitmap.h"
 // dynamic classes implementation
 // ----------------------------------------------------------------------------
 
 // 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
 
 // ----------------------------------------------------------------------------
 // wxMenuItem
@@ -97,7 +95,7 @@ wxMenuItem::wxMenuItem(wxMenu *pParentMenu,
 
 #if  wxUSE_OWNER_DRAWN
     // set default menu colors
 
 #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));
 
     SetTextColour(SYS_COLOR(MENUTEXT));
     SetBackgroundColour(SYS_COLOR(MENU));
@@ -150,18 +148,6 @@ wxString wxMenuItemBase::GetLabelFromText(const wxString& text)
     return wxStripMenuCodes(text);
 }
 
     return wxStripMenuCodes(text);
 }
 
-// accelerators
-// ------------
-
-#if wxUSE_ACCEL
-
-wxAcceleratorEntry *wxMenuItem::GetAccel() const
-{
-    return wxGetAccelFromString(GetText());
-}
-
-#endif // wxUSE_ACCEL
-
 // change item state
 // -----------------
 
 // change item state
 // -----------------
 
@@ -275,3 +261,5 @@ wxMenuItem *wxMenuItemBase::New(wxMenu *parentMenu,
 {
     return new wxMenuItem(parentMenu, id, name, help, isCheckable, subMenu);
 }
 {
     return new wxMenuItem(parentMenu, id, name, help, isCheckable, subMenu);
 }
+
+#endif // wxUSE_MENUS