]> git.saurik.com Git - wxWidgets.git/blob - include/wx/osx/core/private/datetimectrl.h
Remove all lines containing cvs/svn "$Id$" keyword.
[wxWidgets.git] / include / wx / osx / core / private / datetimectrl.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/osx/core/private/datetime.h
3 // Purpose:
4 // Author: Vadim Zeitlin
5 // Created: 2011-12-19
6 // Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
7 // Licence: wxWindows licence
8 ///////////////////////////////////////////////////////////////////////////////
9
10 #ifndef _WX_OSX_CORE_PRIVATE_DATETIMECTRL_H_
11 #define _WX_OSX_CORE_PRIVATE_DATETIMECTRL_H_
12
13 #if wxUSE_DATEPICKCTRL
14
15 #include "wx/osx/private.h"
16
17 #include "wx/datetime.h"
18
19 enum wxDateTimeWidgetKind
20 {
21 wxDateTimeWidget_YearMonthDay,
22 wxDateTimeWidget_HourMinuteSecond
23 };
24
25 // ----------------------------------------------------------------------------
26 // wxDateTimeWidgetImpl: peer class for wxDateTimePickerCtrl.
27 // ----------------------------------------------------------------------------
28
29 class wxDateTimeWidgetImpl
30 #if wxOSX_USE_COCOA
31 : public wxWidgetCocoaImpl
32 #elif wxOSX_USE_CARBON
33 : public wxMacControl
34 #else
35 #error "Unsupported platform"
36 #endif
37 {
38 public:
39 static wxDateTimeWidgetImpl*
40 CreateDateTimePicker(wxDateTimePickerCtrl* wxpeer,
41 const wxDateTime& dt,
42 const wxPoint& pos,
43 const wxSize& size,
44 long style,
45 wxDateTimeWidgetKind kind);
46
47 virtual void SetDateTime(const wxDateTime& dt) = 0;
48 virtual wxDateTime GetDateTime() const = 0;
49
50 virtual void SetDateRange(const wxDateTime& dt1, const wxDateTime& dt2) = 0;
51 virtual bool GetDateRange(wxDateTime* dt1, wxDateTime* dt2) = 0;
52
53 virtual ~wxDateTimeWidgetImpl() { }
54
55 protected:
56 #if wxOSX_USE_COCOA
57 wxDateTimeWidgetImpl(wxDateTimePickerCtrl* wxpeer, WXWidget view)
58 : wxWidgetCocoaImpl(wxpeer, view)
59 {
60 }
61 #elif wxOSX_USE_CARBON
62 // There is no Carbon implementation of this control yet so we don't need
63 // any ctor for it yet but it should be added here if Carbon version is
64 // written later.
65 #endif
66 };
67
68 #endif // wxUSE_DATEPICKCTRL
69
70 #endif // _WX_OSX_CORE_PRIVATE_DATETIMECTRL_H_