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