]> git.saurik.com Git - wxWidgets.git/blob - src/palmos/choice.cpp
Compile fixes for the const patch
[wxWidgets.git] / src / palmos / choice.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/palmos/choice.cpp
3 // Purpose: wxChoice
4 // Author: William Osborne - minimal working wxPalmOS port
5 // Created: 10/13/04
6 // RCS-ID: $Id$
7 // Copyright: (c) William Osborne
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 // ============================================================================
12 // declarations
13 // ============================================================================
14
15 // ----------------------------------------------------------------------------
16 // headers
17 // ----------------------------------------------------------------------------
18
19 // For compilers that support precompilation, includes "wx.h".
20 #include "wx/wxprec.h"
21
22 #ifdef __BORLANDC__
23 #pragma hdrstop
24 #endif
25
26 #if wxUSE_CHOICE
27
28 #ifndef WX_PRECOMP
29 #include "wx/choice.h"
30 #include "wx/utils.h"
31 #include "wx/log.h"
32 #include "wx/brush.h"
33 #include "wx/settings.h"
34 #endif
35
36 #include "wx/palmos/private.h"
37
38 #if wxUSE_EXTENDED_RTTI
39 WX_DEFINE_FLAGS( wxChoiceStyle )
40
41 wxBEGIN_FLAGS( wxChoiceStyle )
42 // new style border flags, we put them first to
43 // use them for streaming out
44 wxFLAGS_MEMBER(wxBORDER_SIMPLE)
45 wxFLAGS_MEMBER(wxBORDER_SUNKEN)
46 wxFLAGS_MEMBER(wxBORDER_DOUBLE)
47 wxFLAGS_MEMBER(wxBORDER_RAISED)
48 wxFLAGS_MEMBER(wxBORDER_STATIC)
49 wxFLAGS_MEMBER(wxBORDER_NONE)
50
51 // old style border flags
52 wxFLAGS_MEMBER(wxSIMPLE_BORDER)
53 wxFLAGS_MEMBER(wxSUNKEN_BORDER)
54 wxFLAGS_MEMBER(wxDOUBLE_BORDER)
55 wxFLAGS_MEMBER(wxRAISED_BORDER)
56 wxFLAGS_MEMBER(wxSTATIC_BORDER)
57 wxFLAGS_MEMBER(wxBORDER)
58
59 // standard window styles
60 wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
61 wxFLAGS_MEMBER(wxCLIP_CHILDREN)
62 wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW)
63 wxFLAGS_MEMBER(wxWANTS_CHARS)
64 wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE)
65 wxFLAGS_MEMBER(wxALWAYS_SHOW_SB )
66 wxFLAGS_MEMBER(wxVSCROLL)
67 wxFLAGS_MEMBER(wxHSCROLL)
68
69 wxEND_FLAGS( wxChoiceStyle )
70
71 IMPLEMENT_DYNAMIC_CLASS_XTI(wxChoice, wxControl,"wx/choice.h")
72
73 wxBEGIN_PROPERTIES_TABLE(wxChoice)
74 wxEVENT_PROPERTY( Select , wxEVT_COMMAND_CHOICE_SELECTED , wxCommandEvent )
75
76 wxPROPERTY( Font , wxFont , SetFont , GetFont , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
77 wxPROPERTY_COLLECTION( Choices , wxArrayString , wxString , AppendString , GetStrings , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
78 wxPROPERTY( Selection ,int, SetSelection, GetSelection, EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
79 wxPROPERTY_FLAGS( WindowStyle , wxChoiceStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
80 wxEND_PROPERTIES_TABLE()
81
82 wxBEGIN_HANDLERS_TABLE(wxChoice)
83 wxEND_HANDLERS_TABLE()
84
85 wxCONSTRUCTOR_4( wxChoice , wxWindow* , Parent , wxWindowID , Id , wxPoint , Position , wxSize , Size )
86 #else
87 IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl)
88 #endif
89
90 // ============================================================================
91 // implementation
92 // ============================================================================
93
94 // ----------------------------------------------------------------------------
95 // creation
96 // ----------------------------------------------------------------------------
97
98 bool wxChoice::Create(wxWindow *parent,
99 wxWindowID id,
100 const wxPoint& pos,
101 const wxSize& size,
102 int n, const wxString choices[],
103 long style,
104 const wxValidator& validator,
105 const wxString& name)
106 {
107 return false;
108 }
109
110 bool wxChoice::CreateAndInit(wxWindow *parent,
111 wxWindowID id,
112 const wxPoint& pos,
113 const wxSize& size,
114 int n, const wxString choices[],
115 long style,
116 const wxValidator& validator,
117 const wxString& name)
118 {
119 return false;
120 }
121
122 bool wxChoice::Create(wxWindow *parent,
123 wxWindowID id,
124 const wxPoint& pos,
125 const wxSize& size,
126 const wxArrayString& choices,
127 long style,
128 const wxValidator& validator,
129 const wxString& name)
130 {
131 return false;
132 }
133
134 bool wxChoice::MSWShouldPreProcessMessage(WXMSG *pMsg)
135 {
136 return false;
137 }
138
139 WXDWORD wxChoice::MSWGetStyle(long style, WXDWORD *exstyle) const
140 {
141 return 0;
142 }
143
144 wxChoice::~wxChoice()
145 {
146 }
147
148 // ----------------------------------------------------------------------------
149 // adding/deleting items to/from the list
150 // ----------------------------------------------------------------------------
151
152 int wxChoice::DoAppend(const wxString& item)
153 {
154 return 0;
155 }
156
157 int wxChoice::DoInsert(const wxString& item, int pos)
158 {
159 return 0;
160 }
161
162 void wxChoice::Delete(int n)
163 {
164 }
165
166 void wxChoice::Clear()
167 {
168 }
169
170 void wxChoice::Free()
171 {
172 }
173
174 // ----------------------------------------------------------------------------
175 // selection
176 // ----------------------------------------------------------------------------
177
178 int wxChoice::GetSelection() const
179 {
180 return 0;
181 }
182
183 void wxChoice::SetSelection(int n)
184 {
185 }
186
187 // ----------------------------------------------------------------------------
188 // string list functions
189 // ----------------------------------------------------------------------------
190
191 int wxChoice::GetCount() const
192 {
193 return 0;
194 }
195
196 int wxChoice::FindString(const wxString& s) const
197 {
198 return 0;
199 }
200
201 void wxChoice::SetString(int n, const wxString& s)
202 {
203 }
204
205 wxString wxChoice::GetString(int n) const
206 {
207 wxString str;
208
209 return str;
210 }
211
212 // ----------------------------------------------------------------------------
213 // client data
214 // ----------------------------------------------------------------------------
215
216 void wxChoice::DoSetItemClientData( int n, void* clientData )
217 {
218 }
219
220 void* wxChoice::DoGetItemClientData( int n ) const
221 {
222 return (void *)NULL;
223 }
224
225 void wxChoice::DoSetItemClientObject( int n, wxClientData* clientData )
226 {
227 }
228
229 wxClientData* wxChoice::DoGetItemClientObject( int n ) const
230 {
231 return (wxClientData *)DoGetItemClientData(n);
232 }
233
234 // ----------------------------------------------------------------------------
235 // wxMSW specific helpers
236 // ----------------------------------------------------------------------------
237
238 void wxChoice::UpdateVisibleHeight()
239 {
240 }
241
242 void wxChoice::DoMoveWindow(int x, int y, int width, int height)
243 {
244 }
245
246 void wxChoice::DoGetSize(int *w, int *h) const
247 {
248 }
249
250 void wxChoice::DoSetSize(int x, int y,
251 int width, int height,
252 int sizeFlags)
253 {
254 }
255
256 wxSize wxChoice::DoGetBestSize() const
257 {
258 return wxSize(0,0);
259 }
260
261 WXLRESULT wxChoice::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
262 {
263 return 0;
264 }
265
266 bool wxChoice::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
267 {
268 return false;
269 }
270
271 #endif // wxUSE_CHOICE