]>
Commit | Line | Data |
---|---|---|
324eeecb WS |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: src/palmos/datectrl.cpp | |
3 | // Purpose: wxDatePickerCtrl implementation | |
4 | // Author: Wlodzimierz ABX Skiba | |
5 | // Modified by: | |
6 | // Created: 02/14/05 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Wlodzimierz Skiba | |
9 | // Licence: wxWindows licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | // ============================================================================ | |
13 | // declarations | |
14 | // ============================================================================ | |
15 | ||
16 | // ---------------------------------------------------------------------------- | |
17 | // headers | |
18 | // ---------------------------------------------------------------------------- | |
19 | ||
20 | #include "wx/wxprec.h" | |
21 | ||
22 | #ifdef __BORLANDC__ | |
23 | #pragma hdrstop | |
24 | #endif | |
25 | ||
26 | #ifndef WX_PRECOMP | |
27 | #endif | |
28 | ||
29 | #if wxUSE_DATEPICKCTRL | |
30 | ||
31 | #include "wx/datectrl.h" | |
32 | #include "wx/app.h" | |
33 | #include "wx/intl.h" | |
34 | #include "wx/dynlib.h" | |
35 | ||
36 | #define _WX_DEFINE_DATE_EVENTS_ | |
37 | #include "wx/dateevt.h" | |
38 | ||
39 | // ============================================================================ | |
40 | // implementation | |
41 | // ============================================================================ | |
42 | ||
43 | // ---------------------------------------------------------------------------- | |
44 | // wxDatePickerCtrl creation | |
45 | // ---------------------------------------------------------------------------- | |
46 | ||
47 | bool wxDatePickerCtrl::Create(wxWindow *parent, | |
48 | wxWindowID id, | |
49 | const wxDateTime& dt, | |
50 | const wxPoint& pos, | |
51 | const wxSize& size, | |
52 | long style, | |
53 | const wxValidator& validator, | |
54 | const wxString& name) | |
55 | { | |
56 | if(!wxControl::Create(parent, id, pos, size, style, validator, name)) | |
57 | return false; | |
58 | ||
59 | wxString label; | |
60 | ||
61 | if ( dt.IsValid() ) | |
62 | label = _T("test2"); | |
63 | ||
64 | ig(!wxControl::PalmCreateControl(selectorTriggerCtl, label, pos, size)) | |
65 | return false; | |
66 | ||
67 | return true; | |
68 | } | |
69 | ||
70 | // ---------------------------------------------------------------------------- | |
71 | // wxDatePickerCtrl geometry | |
72 | // ---------------------------------------------------------------------------- | |
73 | ||
74 | wxSize wxDatePickerCtrl::DoGetBestSize() const | |
75 | { | |
76 | const int y = GetCharHeight(); | |
77 | ||
78 | return wxSize(DEFAULT_ITEM_WIDTH, EDIT_HEIGHT_FROM_CHAR_HEIGHT(y)); | |
79 | } | |
80 | ||
81 | // ---------------------------------------------------------------------------- | |
82 | // wxDatePickerCtrl operations | |
83 | // ---------------------------------------------------------------------------- | |
84 | ||
85 | void wxDatePickerCtrl::SetValue(const wxDateTime& dt) | |
86 | { | |
87 | SetLabel(_T("test1")); | |
88 | } | |
89 | ||
90 | wxDateTime wxDatePickerCtrl::GetValue() const | |
91 | { | |
92 | wxDateTime dt; | |
93 | // TODO | |
94 | return dt; | |
95 | } | |
96 | ||
97 | void wxDatePickerCtrl::SetRange(const wxDateTime& dt1, const wxDateTime& dt2) | |
98 | { | |
99 | // TODO | |
100 | } | |
101 | ||
102 | bool wxDatePickerCtrl::GetRange(wxDateTime *dt1, wxDateTime *dt2) const | |
103 | { | |
104 | // TODO | |
105 | return false; | |
106 | } | |
107 | ||
108 | #endif // wxUSE_DATEPICKCTRL | |
109 |