~brian-sidebotham/wxwidgets-cmake/wxpython-2.9.4

« back to all changes in this revision

Viewing changes to include/wx/osx/core/private/datetimectrl.h

  • Committer: Brian Sidebotham
  • Date: 2013-08-03 14:30:08 UTC
  • Revision ID: brian.sidebotham@gmail.com-20130803143008-c7806tkych1tp6fc
Initial import into Bazaar

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
///////////////////////////////////////////////////////////////////////////////
 
2
// Name:        wx/osx/core/private/datetime.h
 
3
// Purpose:
 
4
// Author:      Vadim Zeitlin
 
5
// Created:     2011-12-19
 
6
// RCS-ID:      $Id: datetimectrl.h 70071 2011-12-20 21:27:14Z VZ $
 
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
 
 
20
enum wxDateTimeWidgetKind
 
21
{
 
22
    wxDateTimeWidget_YearMonthDay,
 
23
    wxDateTimeWidget_HourMinuteSecond
 
24
};
 
25
 
 
26
// ----------------------------------------------------------------------------
 
27
// wxDateTimeWidgetImpl: peer class for wxDateTimePickerCtrl.
 
28
// ----------------------------------------------------------------------------
 
29
 
 
30
class 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
{
 
39
public:
 
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
 
 
56
protected:
 
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_