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