]> git.saurik.com Git - wxWidgets.git/blame - include/wx/timectrl.h
wxGraphicsRenderer::CreateContextFromImage is not static
[wxWidgets.git] / include / wx / timectrl.h
CommitLineData
569c7d8c
VZ
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#else
63 #include "wx/generic/timectrl.h"
64
65 class WXDLLIMPEXP_ADV wxTimePickerCtrl : public wxTimePickerCtrlGeneric
66 {
67 public:
68 wxTimePickerCtrl() { }
69 wxTimePickerCtrl(wxWindow *parent,
70 wxWindowID id,
71 const wxDateTime& date = wxDefaultDateTime,
72 const wxPoint& pos = wxDefaultPosition,
73 const wxSize& size = wxDefaultSize,
74 long style = wxTP_DEFAULT,
75 const wxValidator& validator = wxDefaultValidator,
76 const wxString& name = wxTimePickerCtrlNameStr)
77 : wxTimePickerCtrlGeneric(parent, id, date, pos, size, style, validator, name)
78 {
79 }
80
81 private:
82 wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxTimePickerCtrl);
83 };
84#endif
85
86#endif // wxUSE_TIMEPICKCTRL
87
88#endif // _WX_TIMECTRL_H_