From 9a255463f9073b2700d55cd8ddc9ee2dc97d1a99 Mon Sep 17 00:00:00 2001 From: Maarten Bent Date: Thu, 14 Apr 2022 22:37:55 +0200 Subject: [PATCH] Fix wrong wxMenuItem::GetBitmap() return type documentation This function returns wxBitmap by object, not by (const) reference since wxBitmapBundle-related changes. Also change signature of the other methods taking wxBitmapBundle instead of wxBitmap now. And some other minor improvements. Closes #22306. --- interface/wx/menuitem.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/interface/wx/menuitem.h b/interface/wx/menuitem.h index fc5de12019..b33180ed38 100644 --- a/interface/wx/menuitem.h +++ b/interface/wx/menuitem.h @@ -138,7 +138,7 @@ public: For example: @code - wxMenuItem::GetLabelfromText("&Hello\tCtrl-h"); + wxMenuItem::GetLabelText("&Hello\tCtrl-h"); @endcode will return just @c "Hello". @@ -163,16 +163,16 @@ public: /** Returns the checked or unchecked bitmap. - @onlyfor{wxmsw} + The @c checked parameter is only available in wxMSW. */ - virtual const wxBitmap& GetBitmap(bool checked = true) const; + virtual wxBitmap GetBitmap(bool checked = true) const; /** - Returns the bitmap to be used for disabled items. + Returns the bitmap used for disabled items. @onlyfor{wxmsw} */ - virtual const wxBitmap& GetDisabledBitmap() const; + virtual wxBitmap GetDisabledBitmap() const; /** Returns the font associated with the menu item. @@ -256,7 +256,7 @@ public: @deprecated This function is deprecated in favour of GetItemLabel(). - @see GetLabelFromText() + @see GetItemLabel() */ const wxString& GetText() const; @@ -367,7 +367,7 @@ public: @onlyfor{wxmsw,wxosx,wxgtk} */ - virtual void SetBitmap(const wxBitmap& bmp, bool checked = true); + virtual void SetBitmap(const wxBitmapBundle& bmp, bool checked = true); /** Sets the checked/unchecked bitmaps for the menu item. @@ -375,15 +375,15 @@ public: @onlyfor{wxmsw} */ - void SetBitmaps(const wxBitmap& checked, - const wxBitmap& unchecked = wxNullBitmap); + void SetBitmaps(const wxBitmapBundle& checked, + const wxBitmapBundle& unchecked = wxNullBitmap); /** Sets the to be used for disabled menu items. @onlyfor{wxmsw} */ - void SetDisabledBitmap(const wxBitmap& disabled); + void SetDisabledBitmap(const wxBitmapBundle& disabled); /**