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

@@ -117,11 +117,15 @@ private:
bool MSWMustUseOwnerDrawn();
#endif // wxUSE_OWNER_DRAWN
// helper function to get a handle for normal bitmap associated with item
WXHBITMAP GetHBitmapForMenu(bool checked = true);
enum BitmapKind
{
Normal,
Checked,
Unchecked
};
// helper function to get a handle for checkable bitmap associated with item
WXHBITMAP GetHBitmapForMenuCheckable(bool checked);
// helper function to get a handle for bitmap associated with item
WXHBITMAP GetHBitmapForMenu(BitmapKind kind);
// helper function to set/change the bitmap
void DoSetBitmap(const wxBitmap& bmp, bool bChecked);