]> git.saurik.com Git - wxWidgets.git/blob - src/palmos/choice.cpp
Include wx/log.h according to precompiled headers of wx/wx.h (with other minor cleaning).
[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, unsigned int pos)
158 {
159 return 0;
160 }
161
162 void wxChoice::Delete(unsigned 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 unsigned int wxChoice::GetCount() const
192 {
193 return 0;
194 }
195
196 void wxChoice::SetString(unsigned int n, const wxString& s)
197 {
198 }
199
200 wxString wxChoice::GetString(unsigned int n) const
201 {
202 return wxEmptyString;
203 }
204
205 // ----------------------------------------------------------------------------
206 // client data
207 // ----------------------------------------------------------------------------
208
209 void wxChoice::DoSetItemClientData(unsigned int n, void* clientData)
210 {
211 }
212
213 void* wxChoice::DoGetItemClientData(unsigned int n) const
214 {
215 return (void *)NULL;
216 }
217
218 void wxChoice::DoSetItemClientObject(unsigned int n, wxClientData* clientData )
219 {
220 }
221
222 wxClientData* wxChoice::DoGetItemClientObject(unsigned int n) const
223 {
224 return (wxClientData *)DoGetItemClientData(n);
225 }
226
227 // ----------------------------------------------------------------------------
228 // wxMSW specific helpers
229 // ----------------------------------------------------------------------------
230
231 void wxChoice::UpdateVisibleHeight()
232 {
233 }
234
235 void wxChoice::DoMoveWindow(int x, int y, int width, int height)
236 {
237 }
238
239 void wxChoice::DoGetSize(int *w, int *h) const
240 {
241 }
242
243 void wxChoice::DoSetSize(int x, int y,
244 int width, int height,
245 int sizeFlags)
246 {
247 }
248
249 wxSize wxChoice::DoGetBestSize() const
250 {
251 return wxSize(0,0);
252 }
253
254 WXLRESULT wxChoice::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
255 {
256 return 0;
257 }
258
259 bool wxChoice::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
260 {
261 return false;
262 }
263
264 #endif // wxUSE_CHOICE