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 // wxDatePickerCtrl styles
23 // default style on this platform, either wxDP_SPIN or wxDP_DROPDOWN
26 // a spin control-like date picker (not supported in generic version)
29 // a combobox-like date picker (not supported in mac version)
33 // ----------------------------------------------------------------------------
34 // wxDatePickerCtrl: allow the user to enter the date
35 // ----------------------------------------------------------------------------
37 class WXDLLIMPEXP_ADV wxDatePickerCtrlBase
: public wxControl
41 The derived classes should implement ctor and Create() method with the
44 bool Create(wxWindow *parent,
46 const wxDateTime& dt = wxDefaultDateTime,
47 const wxPoint& pos = wxDefaultPosition,
48 const wxSize& size = wxDefaultSize,
49 long style = wxDP_DEFAULT,
50 const wxValidator& validator = wxDefaultValidator,
51 const wxString& name = wxDatePickerCtrlNameStr);
55 virtual void SetValue(const wxDateTime
& dt
) = 0;
56 virtual wxDateTime
GetValue() const = 0;
58 // set/get the allowed valid range for the dates, if either/both of them
59 // are invalid, there is no corresponding limit and if neither is set
60 // GetRange() returns false
61 virtual void SetRange(const wxDateTime
& dt1
, const wxDateTime
& dt2
) = 0;
62 virtual bool GetRange(wxDateTime
*dt1
, wxDateTime
*dt2
) const = 0;
65 #if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
66 #include "wx/msw/datectrl.h"
68 #include "wx/generic/datectrl.h"
71 #endif // _WX_DATECTRL_H_