Document wxMSW-specific wxMenuItem methods separately
Also remove obsolete note about having to call SetBitmap() before appending the item to the menu as this is not true any longer since quite some time.
This commit is contained in:
parent
c0dbe808a6
commit
d0b32e71f5
@ -160,12 +160,17 @@ public:
|
||||
*/
|
||||
wxColour& GetBackgroundColour() const;
|
||||
|
||||
/**
|
||||
Returns the item bitmap.
|
||||
*/
|
||||
wxBitmap GetBitmap() const;
|
||||
|
||||
/**
|
||||
Returns the checked or unchecked bitmap.
|
||||
|
||||
The @c checked parameter is only available in wxMSW.
|
||||
This overload only exists in wxMSW, avoid using it in portable code.
|
||||
*/
|
||||
virtual wxBitmap GetBitmap(bool checked = true) const;
|
||||
wxBitmap GetBitmap(bool checked) const;
|
||||
|
||||
/**
|
||||
Returns the bitmap used for disabled items.
|
||||
@ -351,23 +356,26 @@ public:
|
||||
/**
|
||||
Sets the bitmap for the menu item.
|
||||
|
||||
It is equivalent to wxMenuItem::SetBitmaps(bmp, wxNullBitmap) if
|
||||
@a checked is @true (default value) or SetBitmaps(wxNullBitmap, bmp)
|
||||
otherwise.
|
||||
|
||||
SetBitmap() must be called before the item is appended to the menu,
|
||||
i.e. appending the item without a bitmap and setting one later is not
|
||||
guaranteed to work. But the bitmap can be changed or reset later if it
|
||||
had been set up initially.
|
||||
|
||||
Notice that GTK+ uses a global setting called @c gtk-menu-images to
|
||||
determine if the images should be shown in the menus at all. If it is
|
||||
off (which is the case in e.g. Gnome 2.28 by default), no images will
|
||||
be shown, consistently with the native behaviour.
|
||||
|
||||
@onlyfor{wxmsw,wxosx,wxgtk}
|
||||
*/
|
||||
virtual void SetBitmap(const wxBitmapBundle& bmp, bool checked = true);
|
||||
void SetBitmap(const wxBitmapBundle& bmp);
|
||||
|
||||
/**
|
||||
Sets the checked or unchecked bitmap for the menu item.
|
||||
|
||||
It is equivalent to wxMenuItem::SetBitmaps(bmp, wxNullBitmap) if
|
||||
@a checked is @true or SetBitmaps(wxNullBitmap, bmp) otherwise.
|
||||
|
||||
Note that different bitmaps for checked and unchecked item states are
|
||||
not supported in most ports, while setting just a single bitmap using
|
||||
the overload above is supported in all of them.
|
||||
|
||||
@onlyfor{wxmsw}
|
||||
*/
|
||||
void SetBitmap(const wxBitmapBundle& bmp, bool checked);
|
||||
|
||||
/**
|
||||
Sets the checked/unchecked bitmaps for the menu item.
|
||||
|
Loading…
Reference in New Issue
Block a user