/[pcsx2_0.9.7]/branch/r3113_0.9.7_beta/3rdparty/wxWidgets/include/wx/datectrl.h
ViewVC logotype

Contents of /branch/r3113_0.9.7_beta/3rdparty/wxWidgets/include/wx/datectrl.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 32 - (show annotations) (download)
Tue Sep 7 03:29:01 2010 UTC (9 years, 5 months ago) by william
File MIME type: text/plain
File size: 3824 byte(s)
branching from upstream revision (http://pcsx2.googlecode.com/svn/trunk
): r3113 to
https://svn.netsolutions.dnsalias.com/websvn/ps2/pcsx2/pcsx2_0.9.7/branch/r3113_0.9.7_beta
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/datectrl.h
3 // Purpose: implements wxDatePickerCtrl
4 // Author: Vadim Zeitlin
5 // Modified by:
6 // Created: 2005-01-09
7 // RCS-ID: $Id: datectrl.h 37663 2006-02-21 22:14:31Z MR $
8 // Copyright: (c) 2005 Vadim Zeitlin <vadim@wxwindows.org>
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_DATECTRL_H_
13 #define _WX_DATECTRL_H_
14
15 #include "wx/defs.h"
16
17 #if wxUSE_DATEPICKCTRL
18
19 #include "wx/control.h" // the base class
20 #include "wx/datetime.h"
21
22 #define wxDatePickerCtrlNameStr _T("datectrl")
23
24 // wxDatePickerCtrl styles
25 enum
26 {
27 // default style on this platform, either wxDP_SPIN or wxDP_DROPDOWN
28 wxDP_DEFAULT = 0,
29
30 // a spin control-like date picker (not supported in generic version)
31 wxDP_SPIN = 1,
32
33 // a combobox-like date picker (not supported in mac version)
34 wxDP_DROPDOWN = 2,
35
36 // always show century in the default date display (otherwise it depends on
37 // the system date format which may include the century or not)
38 wxDP_SHOWCENTURY = 4,
39
40 // allow not having any valid date in the control (by default it always has
41 // some date, today initially if no valid date specified in ctor)
42 wxDP_ALLOWNONE = 8
43 };
44
45 // ----------------------------------------------------------------------------
46 // wxDatePickerCtrl: allow the user to enter the date
47 // ----------------------------------------------------------------------------
48
49 class WXDLLIMPEXP_ADV wxDatePickerCtrlBase : public wxControl
50 {
51 public:
52 /*
53 The derived classes should implement ctor and Create() method with the
54 following signature:
55
56 bool Create(wxWindow *parent,
57 wxWindowID id,
58 const wxDateTime& dt = wxDefaultDateTime,
59 const wxPoint& pos = wxDefaultPosition,
60 const wxSize& size = wxDefaultSize,
61 long style = wxDP_DEFAULT | wxDP_SHOWCENTURY,
62 const wxValidator& validator = wxDefaultValidator,
63 const wxString& name = wxDatePickerCtrlNameStr);
64 */
65
66 // set/get the date
67 virtual void SetValue(const wxDateTime& dt) = 0;
68 virtual wxDateTime GetValue() const = 0;
69
70 // set/get the allowed valid range for the dates, if either/both of them
71 // are invalid, there is no corresponding limit and if neither is set
72 // GetRange() returns false
73 virtual void SetRange(const wxDateTime& dt1, const wxDateTime& dt2) = 0;
74 virtual bool GetRange(wxDateTime *dt1, wxDateTime *dt2) const = 0;
75 };
76
77 #if defined(__WXPALMOS__)
78 #include "wx/palmos/datectrl.h"
79
80 #define wxHAS_NATIVE_DATEPICKCTRL
81 #elif defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
82 #include "wx/msw/datectrl.h"
83
84 #define wxHAS_NATIVE_DATEPICKCTRL
85 #else
86 #include "wx/generic/datectrl.h"
87
88 class WXDLLIMPEXP_ADV wxDatePickerCtrl : public wxDatePickerCtrlGeneric
89 {
90 public:
91 wxDatePickerCtrl() { }
92 wxDatePickerCtrl(wxWindow *parent,
93 wxWindowID id,
94 const wxDateTime& date = wxDefaultDateTime,
95 const wxPoint& pos = wxDefaultPosition,
96 const wxSize& size = wxDefaultSize,
97 long style = wxDP_DEFAULT | wxDP_SHOWCENTURY,
98 const wxValidator& validator = wxDefaultValidator,
99 const wxString& name = wxDatePickerCtrlNameStr)
100 : wxDatePickerCtrlGeneric(parent, id, date, pos, size, style, validator, name)
101 {
102 }
103
104 private:
105 DECLARE_DYNAMIC_CLASS_NO_COPY(wxDatePickerCtrl)
106 };
107 #endif
108
109 #endif // wxUSE_DATEPICKCTRL
110
111 #endif // _WX_DATECTRL_H_
112

  ViewVC Help
Powered by ViewVC 1.1.22