]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/timectrl.h
Use /bin/echo for creation of Mac OS X PkgInfo files.
[wxWidgets.git] / include / wx / timectrl.h
... / ...
CommitLineData
1///////////////////////////////////////////////////////////////////////////////
2// Name: wx/timectrl.h
3// Purpose: Declaration of wxTimePickerCtrl class.
4// Author: Vadim Zeitlin
5// Created: 2011-09-22
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_TIMECTRL_H_
12#define _WX_TIMECTRL_H_
13
14#include "wx/defs.h"
15
16#if wxUSE_TIMEPICKCTRL
17
18#include "wx/datetimectrl.h"
19
20#define wxTimePickerCtrlNameStr wxS("timectrl")
21
22// No special styles are currently defined for this control but still define a
23// symbolic constant for the default style for consistency.
24enum
25{
26 wxTP_DEFAULT = 0
27};
28
29// ----------------------------------------------------------------------------
30// wxTimePickerCtrl: Allow the user to enter the time.
31// ----------------------------------------------------------------------------
32
33class WXDLLIMPEXP_ADV wxTimePickerCtrlBase : public wxDateTimePickerCtrl
34{
35public:
36 /*
37 The derived classes should implement ctor and Create() method with the
38 following signature:
39
40 bool Create(wxWindow *parent,
41 wxWindowID id,
42 const wxDateTime& dt = wxDefaultDateTime,
43 const wxPoint& pos = wxDefaultPosition,
44 const wxSize& size = wxDefaultSize,
45 long style = wxTP_DEFAULT,
46 const wxValidator& validator = wxDefaultValidator,
47 const wxString& name = wxTimePickerCtrlNameStr);
48 */
49
50 /*
51 We also inherit Set/GetValue() methods from the base class which define
52 our public API. Notice that the date portion of the date passed as
53 input is ignored and for the result date it's always today, but only
54 the time part of wxDateTime objects is really significant here.
55 */
56};
57
58#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
59 #include "wx/msw/timectrl.h"
60
61 #define wxHAS_NATIVE_TIMEPICKERCTRL
62#elif defined(__WXOSX_COCOA__) && !defined(__WXUNIVERSAL__)
63 #include "wx/osx/timectrl.h"
64
65 #define wxHAS_NATIVE_TIMEPICKERCTRL
66#else
67 #include "wx/generic/timectrl.h"
68
69 class WXDLLIMPEXP_ADV wxTimePickerCtrl : public wxTimePickerCtrlGeneric
70 {
71 public:
72 wxTimePickerCtrl() { }
73 wxTimePickerCtrl(wxWindow *parent,
74 wxWindowID id,
75 const wxDateTime& date = wxDefaultDateTime,
76 const wxPoint& pos = wxDefaultPosition,
77 const wxSize& size = wxDefaultSize,
78 long style = wxTP_DEFAULT,
79 const wxValidator& validator = wxDefaultValidator,
80 const wxString& name = wxTimePickerCtrlNameStr)
81 : wxTimePickerCtrlGeneric(parent, id, date, pos, size, style, validator, name)
82 {
83 }
84
85 private:
86 wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxTimePickerCtrl);
87 };
88#endif
89
90#endif // wxUSE_TIMEPICKCTRL
91
92#endif // _WX_TIMECTRL_H_