]> git.saurik.com Git - wxWidgets.git/blob - src/palmos/spinctrl.cpp
Correct the direction passed to wxDataObject in wxGTK clipboard code.
[wxWidgets.git] / src / palmos / spinctrl.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/palmos/spinctrl.cpp
3 // Purpose: wxSpinCtrl class implementation for Palm OS
4 // Author: William Osborne - minimal working wxPalmOS port
5 // Modified by:
6 // Created: 10/13/04
7 // RCS-ID: $Id$
8 // Copyright: (c) William Osborne
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 // ============================================================================
13 // declarations
14 // ============================================================================
15
16 // ----------------------------------------------------------------------------
17 // headers
18 // ----------------------------------------------------------------------------
19
20 // for compilers that support precompilation, includes "wx.h".
21 #include "wx/wxprec.h"
22
23 #ifdef __BORLANDC__
24 #pragma hdrstop
25 #endif
26
27 #ifndef WX_PRECOMP
28 #include "wx/wx.h"
29 #endif
30
31 #if wxUSE_SPINCTRL
32
33 #if defined(__WIN95__)
34
35 #include "wx/spinctrl.h"
36 #include "wx/palmos/private.h"
37
38 // ----------------------------------------------------------------------------
39 // macros
40 // ----------------------------------------------------------------------------
41
42 BEGIN_EVENT_TABLE(wxSpinCtrl, wxSpinButton)
43 EVT_CHAR(wxSpinCtrl::OnChar)
44
45 EVT_SET_FOCUS(wxSpinCtrl::OnSetFocus)
46
47 EVT_SPIN(-1, wxSpinCtrl::OnSpinChange)
48 END_EVENT_TABLE()
49
50 #define GetBuddyHwnd() (HWND)(m_hwndBuddy)
51
52 // ----------------------------------------------------------------------------
53 // constants
54 // ----------------------------------------------------------------------------
55
56 // the margin between the up-down control and its buddy (can be arbitrary,
57 // choose what you like - or may be decide during run-time depending on the
58 // font size?)
59 static const int MARGIN_BETWEEN = 1;
60
61 // ============================================================================
62 // implementation
63 // ============================================================================
64
65 wxArraySpins wxSpinCtrl::ms_allSpins;
66
67 /* static */
68 wxSpinCtrl *wxSpinCtrl::GetSpinForTextCtrl(WXHWND hwndBuddy)
69 {
70 return NULL;
71 }
72
73 // process a WM_COMMAND generated by the buddy text control
74 bool wxSpinCtrl::ProcessTextCommand(WXWORD cmd, WXWORD WXUNUSED(id))
75 {
76 return false;
77 }
78
79 void wxSpinCtrl::OnChar(wxKeyEvent& event)
80 {
81 }
82
83 void wxSpinCtrl::OnSetFocus(wxFocusEvent& event)
84 {
85 }
86
87 // ----------------------------------------------------------------------------
88 // construction
89 // ----------------------------------------------------------------------------
90
91 bool wxSpinCtrl::Create(wxWindow *parent,
92 wxWindowID id,
93 const wxString& value,
94 const wxPoint& pos,
95 const wxSize& size,
96 long style,
97 int min, int max, int initial,
98 const wxString& name)
99 {
100 return false;
101 }
102
103 wxSpinCtrl::~wxSpinCtrl()
104 {
105 }
106
107 // ----------------------------------------------------------------------------
108 // wxTextCtrl-like methods
109 // ----------------------------------------------------------------------------
110
111 void wxSpinCtrl::SetValue(const wxString& text)
112 {
113 }
114
115 int wxSpinCtrl::GetValue() const
116 {
117 return 0;
118 }
119
120 void wxSpinCtrl::SetSelection(long from, long to)
121 {
122 }
123
124 // ----------------------------------------------------------------------------
125 // forward some methods to subcontrols
126 // ----------------------------------------------------------------------------
127
128 bool wxSpinCtrl::SetFont(const wxFont& font)
129 {
130 return false;
131 }
132
133 bool wxSpinCtrl::Show(bool show)
134 {
135 return false;
136 }
137
138 bool wxSpinCtrl::Enable(bool enable)
139 {
140 return false;
141 }
142
143 void wxSpinCtrl::SetFocus()
144 {
145 }
146
147 // ----------------------------------------------------------------------------
148 // event processing
149 // ----------------------------------------------------------------------------
150
151 void wxSpinCtrl::OnSpinChange(wxSpinEvent& eventSpin)
152 {
153 }
154
155 // ----------------------------------------------------------------------------
156 // size calculations
157 // ----------------------------------------------------------------------------
158
159 wxSize wxSpinCtrl::DoGetBestSize() const
160 {
161 return wxSize(0,0);
162 }
163
164 void wxSpinCtrl::DoMoveWindow(int x, int y, int width, int height)
165 {
166 }
167
168 // get total size of the control
169 void wxSpinCtrl::DoGetSize(int *x, int *y) const
170 {
171 }
172
173 void wxSpinCtrl::DoGetPosition(int *x, int *y) const
174 {
175 }
176
177 #endif // __WIN95__
178
179 #endif
180 // wxUSE_SPINCTRL
181