Move GetBitmapFromBundle() to wxMenuItemBase

This is just a refactoring to avoid duplicating this function code in
all ports and just have it once in the base class.
This commit is contained in:
Vadim Zeitlin
2022-02-05 20:35:46 +01:00
parent bec31f1919
commit 338cd95c2d
8 changed files with 25 additions and 49 deletions

View File

@@ -21,6 +21,8 @@
#include "wx/object.h" // base class
#include "wx/bmpbndl.h"
#include "wx/windowid.h"
#include "wx/vector.h"
@@ -164,6 +166,10 @@ public:
}
protected:
// Helper function returning the appropriate bitmap from the given bundle
// (which may be invalid, in which case invalid bitmap is returned).
wxBitmap GetBitmapFromBundle(const wxBitmapBundle& bundle) const;
wxWindowIDRef m_id; // numeric id of the item >= 0 or wxID_ANY or wxID_SEPARATOR
wxMenu *m_parentMenu, // the menu we belong to
*m_subMenu; // our sub menu or NULL