Rename wxMenuItem::MustUseOwnerDrawn() to MSWMustUseOwnerDrawn().
No real changes, just make it clear that this method is MSW-specific and is about using owner drawn items at MSW level and not wx one. See #13878. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76201 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -114,7 +114,7 @@ private:
|
|||||||
void DrawStdCheckMark(WXHDC hdc, const tagRECT* rc, wxODStatus stat);
|
void DrawStdCheckMark(WXHDC hdc, const tagRECT* rc, wxODStatus stat);
|
||||||
|
|
||||||
// helper function to determine if the item must be owner-drawn
|
// helper function to determine if the item must be owner-drawn
|
||||||
bool MustUseOwnerDrawn();
|
bool MSWMustUseOwnerDrawn();
|
||||||
|
|
||||||
// helper function to get a handle of bitmap associated with item
|
// helper function to get a handle of bitmap associated with item
|
||||||
WXHBITMAP GetHBitmapForMenu(bool checked = true);
|
WXHBITMAP GetHBitmapForMenu(bool checked = true);
|
||||||
@@ -145,7 +145,7 @@ private:
|
|||||||
m_bmpDisabled;
|
m_bmpDisabled;
|
||||||
#endif // wxUSE_OWNER_DRAWN
|
#endif // wxUSE_OWNER_DRAWN
|
||||||
|
|
||||||
// Give wxMenu access to our MustUseOwnerDrawn() and GetHBitmapForMenu().
|
// Give wxMenu access to our MSWMustUseOwnerDrawn() and GetHBitmapForMenu().
|
||||||
friend class wxMenu;
|
friend class wxMenu;
|
||||||
|
|
||||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxMenuItem)
|
DECLARE_DYNAMIC_CLASS_NO_COPY(wxMenuItem)
|
||||||
|
@@ -511,7 +511,7 @@ bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos)
|
|||||||
{
|
{
|
||||||
// use InsertMenuItem() if possible as it's guaranteed to look
|
// use InsertMenuItem() if possible as it's guaranteed to look
|
||||||
// correct while our owner-drawn code is not
|
// correct while our owner-drawn code is not
|
||||||
if ( !pItem->MustUseOwnerDrawn() )
|
if ( !pItem->MSWMustUseOwnerDrawn() )
|
||||||
{
|
{
|
||||||
WinStruct<MENUITEMINFO> mii;
|
WinStruct<MENUITEMINFO> mii;
|
||||||
mii.fMask = MIIM_STRING | MIIM_DATA;
|
mii.fMask = MIIM_STRING | MIIM_DATA;
|
||||||
|
@@ -765,7 +765,7 @@ void wxMenuItem::DoSetBitmap(const wxBitmap& bmp, bool bChecked)
|
|||||||
// support instead of making the item owner-drawn
|
// support instead of making the item owner-drawn
|
||||||
SetOwnerDrawn(true);
|
SetOwnerDrawn(true);
|
||||||
|
|
||||||
if ( MustUseOwnerDrawn() )
|
if ( MSWMustUseOwnerDrawn() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// the item can be not attached to any menu yet and SetBitmap() is still
|
// the item can be not attached to any menu yet and SetBitmap() is still
|
||||||
@@ -1326,7 +1326,7 @@ void wxMenuItem::GetColourToUse(wxODStatus stat, wxColour& colText, wxColour& co
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxMenuItem::MustUseOwnerDrawn()
|
bool wxMenuItem::MSWMustUseOwnerDrawn()
|
||||||
{
|
{
|
||||||
// MIIM_BITMAP only works under WinME/2000+ so we always use owner
|
// MIIM_BITMAP only works under WinME/2000+ so we always use owner
|
||||||
// drawn item under the previous versions and we also have to use
|
// drawn item under the previous versions and we also have to use
|
||||||
|
Reference in New Issue
Block a user