Add wxCompositeWindow<> and use it in wxDatePickerCtrlGeneric.

wxCompositeWindow<> is a convenient base class for composite windows, i.e.
windows consisting of several other wxWindows. Currently it just automatically
forwards various attributes setters calls to all of the composite window parts
but it could become more useful in the future.

Similarly, for now it is only used in wxDatePickerCtrlGeneric but it could
(and should) be used for other composite controls later and we probably should
even make this class public to allow its use in the client code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66534 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-01-03 11:24:13 +00:00
parent b9acd101f7
commit a9e41db760
13 changed files with 269 additions and 128 deletions

View File

@@ -12,12 +12,15 @@
#ifndef _WX_GENERIC_DATECTRL_H_
#define _WX_GENERIC_DATECTRL_H_
#include "wx/compositewin.h"
class WXDLLIMPEXP_FWD_CORE wxComboCtrl;
class WXDLLIMPEXP_FWD_ADV wxCalendarCtrl;
class WXDLLIMPEXP_FWD_ADV wxCalendarComboPopup;
class WXDLLIMPEXP_ADV wxDatePickerCtrlGeneric : public wxDatePickerCtrlBase
class WXDLLIMPEXP_ADV wxDatePickerCtrlGeneric
: public wxCompositeWindow<wxDatePickerCtrlBase>
{
public:
// creating the control
@@ -72,6 +75,9 @@ protected:
private:
void Init();
// return the list of the windows composing this one
virtual wxWindowList GetCompositeWindowParts() const;
void OnText(wxCommandEvent &event);
void OnSize(wxSizeEvent& event);
void OnFocus(wxFocusEvent& event);