X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2bda0e173844e8e0f8acf4e8ad8b5c26e5c6fe5d..89077ebcc8990c84d94a601b221210d3ff7a8ec7:/src/msw/menuitem.cpp diff --git a/src/msw/menuitem.cpp b/src/msw/menuitem.cpp index 8d7d27379b..916819d272 100644 --- a/src/msw/menuitem.cpp +++ b/src/msw/menuitem.cpp @@ -9,9 +9,9 @@ // Licence: wxWindows license /////////////////////////////////////////////////////////////////////////////// -// ============================================================================ -// headers & declarations -// ============================================================================ +#ifdef __GNUG__ +#pragma implementation "menuitem.h" +#endif // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -22,6 +22,10 @@ #ifndef WX_PRECOMP #include "wx/menu.h" +#include "wx/font.h" +#include "wx/bitmap.h" +#include "wx/settings.h" +#include "wx/font.h" #endif #include "wx/ownerdrw.h" @@ -29,6 +33,14 @@ #include +#ifdef GetClassInfo +#undef GetClassInfo +#endif + +#ifdef GetClassName +#undef GetClassName +#endif + // ============================================================================ // implementation // ============================================================================ @@ -38,7 +50,7 @@ // ---------------------------------------------------------------------------- #if !defined(USE_SHARED_LIBRARY) || !USE_SHARED_LIBRARY -#if USE_OWNER_DRAWN +#if wxUSE_OWNER_DRAWN IMPLEMENT_DYNAMIC_CLASS2(wxMenuItem, wxObject, wxOwnerDrawn) #else //!USE_OWNER_DRAWN IMPLEMENT_DYNAMIC_CLASS(wxMenuItem, wxObject) @@ -54,10 +66,10 @@ // ----------- wxMenuItem::wxMenuItem(wxMenu *pParentMenu, int id, - const wxTString& strName, const wxTString& strHelp, + const wxString& strName, const wxString& strHelp, bool bCheckable, wxMenu *pSubMenu) : -#if USE_OWNER_DRAWN +#if wxUSE_OWNER_DRAWN wxOwnerDrawn(strName, bCheckable), #else //no owner drawn support m_bCheckable(bCheckable), @@ -67,7 +79,7 @@ wxMenuItem::wxMenuItem(wxMenu *pParentMenu, int id, { wxASSERT( pParentMenu != NULL ); -#ifdef USE_OWNER_DRAWN +#if wxUSE_OWNER_DRAWN // set default menu colors #define SYS_COLOR(c) (wxSystemSettings::GetSystemColour(wxSYS_COLOUR_##c)) @@ -134,7 +146,7 @@ void wxMenuItem::Enable(bool bDoEnable) void wxMenuItem::Check(bool bDoCheck) { - wxCHECK ( IsCheckable() ); + wxCHECK_RET( IsCheckable(), "only checkable items may be checked" ); if ( m_bChecked != bDoCheck ) { CheckMenuItem((HMENU)m_pParentMenu->GetHMenu(), m_idItem,