Optionally support using wxImageList in wxRibbonBar
This allows to avoid consuming too many bitmap resources. Closes #18657.
This commit is contained in:
@@ -15,6 +15,8 @@
|
||||
|
||||
#if wxUSE_RIBBON
|
||||
|
||||
class wxImageList;
|
||||
|
||||
#include "wx/ribbon/control.h"
|
||||
#include "wx/ribbon/page.h"
|
||||
|
||||
@@ -152,6 +154,13 @@ public:
|
||||
|
||||
void HideIfExpanded();
|
||||
|
||||
void UseImageList(bool useImageList = true) { m_useImageList = useImageList; }
|
||||
bool UsesImageList() const { return m_useImageList; }
|
||||
// Implementation only.
|
||||
wxImageList* GetButtonImageList(wxSize* isize = NULL);
|
||||
// Implementation only.
|
||||
wxImageList* GetButtonSmallImageList(wxSize* isize = NULL);
|
||||
|
||||
protected:
|
||||
friend class wxRibbonPage;
|
||||
|
||||
@@ -208,6 +217,10 @@ protected:
|
||||
|
||||
wxRibbonDisplayMode m_ribbon_state;
|
||||
|
||||
bool m_useImageList;
|
||||
wxImageList* m_buttonImageList;
|
||||
wxImageList* m_buttonSmallImageList;
|
||||
|
||||
#ifndef SWIG
|
||||
wxDECLARE_CLASS(wxRibbonBar);
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
|
Reference in New Issue
Block a user