added "bool checked" parameter to SetBitmap() too, for consisttency with GetBitmap()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59763 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -61,9 +61,14 @@ public:
|
|||||||
m_bmpUnchecked = bmpUnchecked;
|
m_bmpUnchecked = bmpUnchecked;
|
||||||
m_bOwnerDrawn = true; }
|
m_bOwnerDrawn = true; }
|
||||||
|
|
||||||
void SetBitmap(const wxBitmap& bmpChecked)
|
void SetBitmap(const wxBitmap& bmp, bool bChecked = true)
|
||||||
{ m_bmpChecked = bmpChecked;
|
{
|
||||||
m_bOwnerDrawn = true; }
|
if ( bChecked )
|
||||||
|
m_bmpChecked = bmp;
|
||||||
|
else
|
||||||
|
m_bmpUnchecked = bmp;
|
||||||
|
m_bOwnerDrawn = true;
|
||||||
|
}
|
||||||
|
|
||||||
void SetDisabledBitmap( const wxBitmap& bmpDisabled )
|
void SetDisabledBitmap( const wxBitmap& bmpDisabled )
|
||||||
{ m_bmpDisabled = bmpDisabled;
|
{ m_bmpDisabled = bmpDisabled;
|
||||||
|
@@ -274,11 +274,14 @@ public:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Sets the bitmap for the menu item.
|
Sets the bitmap for the menu item.
|
||||||
It is equivalent to wxMenuItem::SetBitmaps(bmp, wxNullBitmap).
|
|
||||||
|
It is equivalent to wxMenuItem::SetBitmaps(bmp, wxNullBitmap) if @a
|
||||||
|
checked is @true (default value) or SetBitmaps(wxNullBitmap, bmp)
|
||||||
|
otherwise.
|
||||||
|
|
||||||
@onlyfor{wxmsw,wxosx,wxgtk}
|
@onlyfor{wxmsw,wxosx,wxgtk}
|
||||||
*/
|
*/
|
||||||
virtual void SetBitmap(const wxBitmap& bmp);
|
virtual void SetBitmap(const wxBitmap& bmp, bool checked = true);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Sets the checked/unchecked bitmaps for the menu item.
|
Sets the checked/unchecked bitmaps for the menu item.
|
||||||
|
Reference in New Issue
Block a user