]> git.saurik.com Git - wxWidgets.git/blob - src/palmos/combobox.cpp
build fix
[wxWidgets.git] / src / palmos / combobox.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/palmos/combobox.cpp
3 // Purpose: wxComboBox class
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 #if wxUSE_COMBOBOX
28
29 #include "wx/combobox.h"
30
31 #ifndef WX_PRECOMP
32 #include "wx/settings.h"
33 #include "wx/log.h"
34 // for wxEVT_COMMAND_TEXT_ENTER
35 #include "wx/textctrl.h"
36 #include "wx/brush.h"
37 #endif
38
39 #include "wx/clipbrd.h"
40 #include "wx/palmos/private.h"
41
42 #if wxUSE_TOOLTIPS
43 #if !defined(__GNUWIN32_OLD__) || defined(__CYGWIN10__)
44 #include <commctrl.h>
45 #endif
46 #include "wx/tooltip.h"
47 #endif // wxUSE_TOOLTIPS
48
49 // ----------------------------------------------------------------------------
50 // wxWin macros
51 // ----------------------------------------------------------------------------
52
53 #if wxUSE_EXTENDED_RTTI
54 WX_DEFINE_FLAGS( wxComboBoxStyle )
55
56 wxBEGIN_FLAGS( wxComboBoxStyle )
57 // new style border flags, we put them first to
58 // use them for streaming out
59 wxFLAGS_MEMBER(wxBORDER_SIMPLE)
60 wxFLAGS_MEMBER(wxBORDER_SUNKEN)
61 wxFLAGS_MEMBER(wxBORDER_DOUBLE)
62 wxFLAGS_MEMBER(wxBORDER_RAISED)
63 wxFLAGS_MEMBER(wxBORDER_STATIC)
64 wxFLAGS_MEMBER(wxBORDER_NONE)
65
66 // old style border flags
67 wxFLAGS_MEMBER(wxSIMPLE_BORDER)
68 wxFLAGS_MEMBER(wxSUNKEN_BORDER)
69 wxFLAGS_MEMBER(wxDOUBLE_BORDER)
70 wxFLAGS_MEMBER(wxRAISED_BORDER)
71 wxFLAGS_MEMBER(wxSTATIC_BORDER)
72 wxFLAGS_MEMBER(wxBORDER)
73
74 // standard window styles
75 wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
76 wxFLAGS_MEMBER(wxCLIP_CHILDREN)
77 wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW)
78 wxFLAGS_MEMBER(wxWANTS_CHARS)
79 wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE)
80 wxFLAGS_MEMBER(wxALWAYS_SHOW_SB )
81 wxFLAGS_MEMBER(wxVSCROLL)
82 wxFLAGS_MEMBER(wxHSCROLL)
83
84 wxFLAGS_MEMBER(wxCB_SIMPLE)
85 wxFLAGS_MEMBER(wxCB_SORT)
86 wxFLAGS_MEMBER(wxCB_READONLY)
87 wxFLAGS_MEMBER(wxCB_DROPDOWN)
88
89 wxEND_FLAGS( wxComboBoxStyle )
90
91 IMPLEMENT_DYNAMIC_CLASS_XTI(wxComboBox, wxControl,"wx/combobox.h")
92
93 wxBEGIN_PROPERTIES_TABLE(wxComboBox)
94 wxEVENT_PROPERTY( Select , wxEVT_COMMAND_COMBOBOX_SELECTED , wxCommandEvent )
95 wxEVENT_PROPERTY( TextEnter , wxEVT_COMMAND_TEXT_ENTER , wxCommandEvent )
96
97 // TODO DELEGATES
98 wxPROPERTY( Font , wxFont , SetFont , GetFont , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
99 wxPROPERTY_COLLECTION( Choices , wxArrayString , wxString , AppendString , GetStrings , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
100 wxPROPERTY( Value ,wxString, SetValue, GetValue, EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
101 wxPROPERTY( Selection ,int, SetSelection, GetSelection, EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
102 wxPROPERTY_FLAGS( WindowStyle , wxComboBoxStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
103 wxEND_PROPERTIES_TABLE()
104
105 wxBEGIN_HANDLERS_TABLE(wxComboBox)
106 wxEND_HANDLERS_TABLE()
107
108 wxCONSTRUCTOR_5( wxComboBox , wxWindow* , Parent , wxWindowID , Id , wxString , Value , wxPoint , Position , wxSize , Size )
109 #else
110 IMPLEMENT_DYNAMIC_CLASS(wxComboBox, wxControl)
111 #endif
112
113 // ----------------------------------------------------------------------------
114 // function prototypes
115 // ----------------------------------------------------------------------------
116
117 // ---------------------------------------------------------------------------
118 // global vars
119 // ---------------------------------------------------------------------------
120
121 // the pointer to standard radio button wnd proc
122 static WNDPROC gs_wndprocEdit = (WNDPROC)NULL;
123
124 // ============================================================================
125 // implementation
126 // ============================================================================
127
128 // ----------------------------------------------------------------------------
129 // wxComboBox callbacks
130 // ----------------------------------------------------------------------------
131
132 WXLRESULT wxComboBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
133 {
134 return 0;
135 }
136
137 bool wxComboBox::MSWProcessEditMsg(WXUINT msg, WXWPARAM wParam, WXLPARAM lParam)
138 {
139 return false;
140 }
141
142 bool wxComboBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
143 {
144 return false;
145 }
146
147 WXHWND wxComboBox::GetEditHWND() const
148 {
149 return (WXHWND)0;
150 }
151
152 // ----------------------------------------------------------------------------
153 // wxComboBox creation
154 // ----------------------------------------------------------------------------
155
156 bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
157 const wxString& value,
158 const wxPoint& pos,
159 const wxSize& size,
160 int n, const wxString choices[],
161 long style,
162 const wxValidator& validator,
163 const wxString& name)
164 {
165 return false;
166 }
167
168 bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
169 const wxString& value,
170 const wxPoint& pos,
171 const wxSize& size,
172 const wxArrayString& choices,
173 long style,
174 const wxValidator& validator,
175 const wxString& name)
176 {
177 return false;
178 }
179
180 WXDWORD wxComboBox::MSWGetStyle(long style, WXDWORD *exstyle) const
181 {
182 return 0;
183 }
184
185 // ----------------------------------------------------------------------------
186 // wxComboBox text control-like methods
187 // ----------------------------------------------------------------------------
188
189 void wxComboBox::SetValue(const wxString& value)
190 {
191 }
192
193 // Clipboard operations
194 void wxComboBox::Copy()
195 {
196 }
197
198 void wxComboBox::Cut()
199 {
200 }
201
202 void wxComboBox::Paste()
203 {
204 }
205
206 void wxComboBox::SetEditable(bool WXUNUSED(editable))
207 {
208 }
209
210 void wxComboBox::SetInsertionPoint(long pos)
211 {
212 }
213
214 void wxComboBox::SetInsertionPointEnd()
215 {
216 }
217
218 long wxComboBox::GetInsertionPoint() const
219 {
220 return 0;
221 }
222
223 wxTextPos wxComboBox::GetLastPosition() const
224 {
225 return 0;
226 }
227
228 void wxComboBox::Replace(long from, long to, const wxString& value)
229 {
230 }
231
232 void wxComboBox::Remove(long from, long to)
233 {
234 }
235
236 void wxComboBox::SetSelection(long from, long to)
237 {
238 }
239
240 bool wxComboBox::IsEditable() const
241 {
242 return false;
243 }
244
245 void wxComboBox::Undo()
246 {
247 }
248
249 void wxComboBox::Redo()
250 {
251 }
252
253 void wxComboBox::SelectAll()
254 {
255 }
256
257 bool wxComboBox::CanCopy() const
258 {
259 return false;
260 }
261
262 bool wxComboBox::CanCut() const
263 {
264 return false;
265 }
266
267 bool wxComboBox::CanPaste() const
268 {
269 return false;
270 }
271
272 bool wxComboBox::CanUndo() const
273 {
274 return false;
275 }
276
277 bool wxComboBox::CanRedo() const
278 {
279 return false;
280 }
281
282
283 #endif // wxUSE_COMBOBOX