Clean up GetHBitmapForMenu.

Merge wxMenuItem::GetHBitmapForMenuCheckable and ::DoGetHBitmapForMenu
into wxMenuItem::GetHBitmapForMenu. Change its boolean parameter to an
enum specifying the kind of bitmap that is wanted (normal, checked, or
unchecked).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76760 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Dimitri Schoolwerth
2014-06-24 18:54:05 +00:00
parent dadc0ed341
commit d201caad89
3 changed files with 53 additions and 65 deletions

View File

@@ -573,13 +573,13 @@ bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos)
if ( pItem->IsCheckable() )
{
mii.fMask |= MIIM_CHECKMARKS;
mii.hbmpChecked = pItem->GetHBitmapForMenuCheckable(true);
mii.hbmpUnchecked = pItem->GetHBitmapForMenuCheckable(false);
mii.hbmpChecked = pItem->GetHBitmapForMenu(wxMenuItem::Checked);
mii.hbmpUnchecked = pItem->GetHBitmapForMenu(wxMenuItem::Unchecked);
}
else if ( pItem->GetBitmap().IsOk() )
{
mii.fMask |= MIIM_BITMAP;
mii.hbmpItem = pItem->GetHBitmapForMenu();
mii.hbmpItem = pItem->GetHBitmapForMenu(wxMenuItem::Normal);
}
mii.cch = itemText.length();