X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dca0f651782d5c2659203c97b3243f613966998d..3cfde7c049bddf6fd3b4c2e35a6b8ecdcdc1d74f:/src/msw/menuitem.cpp diff --git a/src/msw/menuitem.cpp b/src/msw/menuitem.cpp index 32b92ee7d2..cc55d41996 100644 --- a/src/msw/menuitem.cpp +++ b/src/msw/menuitem.cpp @@ -137,6 +137,7 @@ wxMenuItem::wxMenuItem(wxMenu *pParentMenu, Init(); } +#if WXWIN_COMPATIBILITY_2_8 wxMenuItem::wxMenuItem(wxMenu *parentMenu, int id, const wxString& text, @@ -151,6 +152,7 @@ wxMenuItem::wxMenuItem(wxMenu *parentMenu, { Init(); } +#endif void wxMenuItem::Init() { @@ -170,7 +172,7 @@ void wxMenuItem::Init() ResetOwnerDrawn(); // switch ownerdraw back on if using a non default margin - if ( GetId() != wxID_SEPARATOR ) + if ( !IsSeparator() ) SetMarginWidth(GetMarginWidth()); // tell the owner drawing code to show the accel string as well @@ -193,7 +195,7 @@ WXWPARAM wxMenuItem::GetMSWId() const // generating WM_COMMAND messages with negative high word of wParam), so // use the cast to ensure the id is in range return m_subMenu ? wxPtrToUInt(m_subMenu->GetHMenu()) - : wx_static_cast(unsigned short, GetId()); + : static_cast(GetId()); } // get item state @@ -203,7 +205,7 @@ bool wxMenuItem::IsChecked() const { // fix that RTTI is always getting the correct state (separators cannot be checked, but the call below // returns true - if ( GetId() == wxID_SEPARATOR ) + if ( IsSeparator() ) return false ; int flag = ::GetMenuState(GetHMenuOf(m_parentMenu), GetMSWId(), MF_BYCOMMAND); @@ -211,12 +213,6 @@ bool wxMenuItem::IsChecked() const return (flag & MF_CHECKED) != 0; } -/* static */ -wxString wxMenuItemBase::GetLabelText(const wxString& text) -{ - return wxStripMenuCodes(text); -} - // radio group stuff // -----------------