Optionally support using wxImageList in wxRibbonBar

This allows to avoid consuming too many bitmap resources.

Closes #18657.
This commit is contained in:
wxBen
2020-02-07 17:25:34 +01:00
committed by Vadim Zeitlin
parent 249e5add7e
commit 23ebbb139d
5 changed files with 146 additions and 11 deletions

View File

@@ -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();