1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/osx/core/private/datetime.h
4 // Author: Vadim Zeitlin
6 // Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
7 // Licence: wxWindows licence
8 ///////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_OSX_CORE_PRIVATE_DATETIMECTRL_H_
11 #define _WX_OSX_CORE_PRIVATE_DATETIMECTRL_H_
13 #if wxUSE_DATEPICKCTRL
15 #include "wx/osx/private.h"
17 #include "wx/datetime.h"
19 enum wxDateTimeWidgetKind
21 wxDateTimeWidget_YearMonthDay
,
22 wxDateTimeWidget_HourMinuteSecond
25 // ----------------------------------------------------------------------------
26 // wxDateTimeWidgetImpl: peer class for wxDateTimePickerCtrl.
27 // ----------------------------------------------------------------------------
29 class wxDateTimeWidgetImpl
31 : public wxWidgetCocoaImpl
32 #elif wxOSX_USE_CARBON
35 #error "Unsupported platform"
39 static wxDateTimeWidgetImpl
*
40 CreateDateTimePicker(wxDateTimePickerCtrl
* wxpeer
,
45 wxDateTimeWidgetKind kind
);
47 virtual void SetDateTime(const wxDateTime
& dt
) = 0;
48 virtual wxDateTime
GetDateTime() const = 0;
50 virtual void SetDateRange(const wxDateTime
& dt1
, const wxDateTime
& dt2
) = 0;
51 virtual bool GetDateRange(wxDateTime
* dt1
, wxDateTime
* dt2
) = 0;
53 virtual ~wxDateTimeWidgetImpl() { }
57 wxDateTimeWidgetImpl(wxDateTimePickerCtrl
* wxpeer
, WXWidget view
)
58 : wxWidgetCocoaImpl(wxpeer
, view
)
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
68 #endif // wxUSE_DATEPICKCTRL
70 #endif // _WX_OSX_CORE_PRIVATE_DATETIMECTRL_H_