]> git.saurik.com Git - wxWidgets.git/blame - src/palmos/choice.cpp
fixed operator[] in wxUSE_STL build
[wxWidgets.git] / src / palmos / choice.cpp
CommitLineData
ffecfa5a 1/////////////////////////////////////////////////////////////////////////////
e2731512 2// Name: src/palmos/choice.cpp
ffecfa5a 3// Purpose: wxChoice
e2731512 4// Author: William Osborne - minimal working wxPalmOS port
ffecfa5a 5// Created: 10/13/04
e2731512 6// RCS-ID: $Id$
ffecfa5a
JS
7// Copyright: (c) William Osborne
8// Licence: wxWindows licence
9/////////////////////////////////////////////////////////////////////////////
10
11// ============================================================================
12// declarations
13// ============================================================================
14
15// ----------------------------------------------------------------------------
16// headers
17// ----------------------------------------------------------------------------
18
ffecfa5a
JS
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
39WX_DEFINE_FLAGS( wxChoiceStyle )
40
41wxBEGIN_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
69wxEND_FLAGS( wxChoiceStyle )
70
71IMPLEMENT_DYNAMIC_CLASS_XTI(wxChoice, wxControl,"wx/choice.h")
72
73wxBEGIN_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
80wxEND_PROPERTIES_TABLE()
81
82wxBEGIN_HANDLERS_TABLE(wxChoice)
83wxEND_HANDLERS_TABLE()
84
85wxCONSTRUCTOR_4( wxChoice , wxWindow* , Parent , wxWindowID , Id , wxPoint , Position , wxSize , Size )
86#else
87IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl)
88#endif
89
90// ============================================================================
91// implementation
92// ============================================================================
93
94// ----------------------------------------------------------------------------
95// creation
96// ----------------------------------------------------------------------------
97
98bool 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
110bool 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{
324eeecb 119 return false;
ffecfa5a
JS
120}
121
122bool 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
134bool wxChoice::MSWShouldPreProcessMessage(WXMSG *pMsg)
135{
136 return false;
137}
138
139WXDWORD wxChoice::MSWGetStyle(long style, WXDWORD *exstyle) const
140{
141 return 0;
142}
143
144wxChoice::~wxChoice()
145{
146}
147
148// ----------------------------------------------------------------------------
149// adding/deleting items to/from the list
150// ----------------------------------------------------------------------------
151
152int wxChoice::DoAppend(const wxString& item)
153{
154 return 0;
155}
156
aa61d352 157int wxChoice::DoInsert(const wxString& item, unsigned int pos)
ffecfa5a
JS
158{
159 return 0;
160}
161
aa61d352 162void wxChoice::Delete(unsigned int n)
ffecfa5a
JS
163{
164}
165
166void wxChoice::Clear()
167{
168}
169
170void wxChoice::Free()
171{
172}
173
174// ----------------------------------------------------------------------------
175// selection
176// ----------------------------------------------------------------------------
177
178int wxChoice::GetSelection() const
179{
180 return 0;
181}
182
183void wxChoice::SetSelection(int n)
184{
185}
186
187// ----------------------------------------------------------------------------
188// string list functions
189// ----------------------------------------------------------------------------
190
aa61d352 191unsigned int wxChoice::GetCount() const
ffecfa5a
JS
192{
193 return 0;
194}
195
aa61d352 196void wxChoice::SetString(unsigned int n, const wxString& s)
ffecfa5a
JS
197{
198}
199
aa61d352 200wxString wxChoice::GetString(unsigned int n) const
ffecfa5a 201{
aa61d352 202 return wxEmptyString;
ffecfa5a
JS
203}
204
205// ----------------------------------------------------------------------------
206// client data
207// ----------------------------------------------------------------------------
208
aa61d352 209void wxChoice::DoSetItemClientData(unsigned int n, void* clientData)
ffecfa5a
JS
210{
211}
212
aa61d352 213void* wxChoice::DoGetItemClientData(unsigned int n) const
ffecfa5a
JS
214{
215 return (void *)NULL;
216}
217
aa61d352 218void wxChoice::DoSetItemClientObject(unsigned int n, wxClientData* clientData )
ffecfa5a
JS
219{
220}
221
aa61d352 222wxClientData* wxChoice::DoGetItemClientObject(unsigned int n) const
ffecfa5a
JS
223{
224 return (wxClientData *)DoGetItemClientData(n);
225}
226
227// ----------------------------------------------------------------------------
228// wxMSW specific helpers
229// ----------------------------------------------------------------------------
230
231void wxChoice::UpdateVisibleHeight()
232{
233}
234
235void wxChoice::DoMoveWindow(int x, int y, int width, int height)
236{
237}
238
239void wxChoice::DoGetSize(int *w, int *h) const
240{
241}
242
243void wxChoice::DoSetSize(int x, int y,
244 int width, int height,
245 int sizeFlags)
246{
247}
248
249wxSize wxChoice::DoGetBestSize() const
250{
251 return wxSize(0,0);
252}
253
254WXLRESULT wxChoice::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
255{
256 return 0;
257}
258
259bool wxChoice::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
260{
261 return false;
262}
263
ffecfa5a 264#endif // wxUSE_CHOICE