This takes care of propagating methods setting fonts and colours to the
subwindows automatically, so that setting font for the generic wxSpinCtrl now
works, unlike before.
Closes #14839.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72994
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
+#include "wx/compositewin.h"
+
class WXDLLIMPEXP_FWD_CORE wxSpinButton;
class WXDLLIMPEXP_FWD_CORE wxTextCtrl;
class WXDLLIMPEXP_FWD_CORE wxSpinButton;
class WXDLLIMPEXP_FWD_CORE wxTextCtrl;
// function ambiguity.
// ----------------------------------------------------------------------------
// function ambiguity.
// ----------------------------------------------------------------------------
-class WXDLLIMPEXP_CORE wxSpinCtrlGenericBase : public wxSpinCtrlBase
+class WXDLLIMPEXP_CORE wxSpinCtrlGenericBase
+ : public wxCompositeWindow<wxSpinCtrlBase>
{
public:
wxSpinCtrlGenericBase() { Init(); }
{
public:
wxSpinCtrlGenericBase() { Init(); }
// common part of all ctors
void Init();
// common part of all ctors
void Init();
+ // Implement pure virtual function inherited from wxCompositeWindow.
+ virtual wxWindowList GetCompositeWindowParts() const;
+
wxDELETE(m_spinButton);
}
wxDELETE(m_spinButton);
}
+wxWindowList wxSpinCtrlGenericBase::GetCompositeWindowParts() const
+{
+ wxWindowList parts;
+ parts.push_back(m_textCtrl);
+ parts.push_back(m_spinButton);
+ return parts;
+}
+
// ----------------------------------------------------------------------------
// geometry
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// geometry
// ----------------------------------------------------------------------------