1 ///////////////////////////////////////////////////////////////////////////////
3 // Purpose: implements wxDatePickerCtrl
4 // Author: Vadim Zeitlin
8 // Copyright: (c) 2005 Vadim Zeitlin <vadim@wxwindows.org>
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_DATECTRL_H_
13 #define _WX_DATECTRL_H_
15 #include "wx/control.h" // the base class
16 #include "wx/datetime.h"
18 #define wxDatePickerCtrlNameStr _T("datectrl")
20 // ----------------------------------------------------------------------------
21 // wxDatePickerCtrl: allow the user to enter the date
22 // ----------------------------------------------------------------------------
24 class WXDLLIMPEXP_ADV wxDatePickerCtrlBase
: public wxControl
28 The derived classes should implement ctor and Create() method with the
31 bool Create(wxWindow *parent,
33 const wxDateTime& dt = wxDefaultDateTime,
34 const wxPoint& pos = wxDefaultPosition,
35 const wxSize& size = wxDefaultSize,
37 const wxValidator& validator = wxDefaultValidator,
38 const wxString& name = wxDatePickerCtrlNameStr);
42 virtual void SetValue(const wxDateTime
& dt
) = 0;
43 virtual wxDateTime
GetValue() const = 0;
45 // set/get the allowed valid range for the dates, if either/both of them
46 // are invalid, there is no corresponding limit and if neither is set
47 // GetRange() returns false
48 virtual void SetRange(const wxDateTime
& dt1
, const wxDateTime
& dt2
) = 0;
49 virtual bool GetRange(wxDateTime
*dt1
, wxDateTime
*dt2
) const = 0;
52 #if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
53 #include "wx/msw/datectrl.h"
55 // TODO: #include "wx/generic/datectrl.h"
58 #endif // _WX_DATECTRL_H_