]> git.saurik.com Git - wxWidgets.git/blame - src/palmos/choice.cpp
don't overwrite the existing local file if we failed to open it but it does exist
[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
b36e08d0
WS
28#include "wx/choice.h"
29
ffecfa5a 30#ifndef WX_PRECOMP
ffecfa5a
JS
31 #include "wx/utils.h"
32 #include "wx/log.h"
33 #include "wx/brush.h"
34 #include "wx/settings.h"
35#endif
36
37#include "wx/palmos/private.h"
38
39#if wxUSE_EXTENDED_RTTI
40WX_DEFINE_FLAGS( wxChoiceStyle )
41
42wxBEGIN_FLAGS( wxChoiceStyle )
43 // new style border flags, we put them first to
44 // use them for streaming out
45 wxFLAGS_MEMBER(wxBORDER_SIMPLE)
46 wxFLAGS_MEMBER(wxBORDER_SUNKEN)
47 wxFLAGS_MEMBER(wxBORDER_DOUBLE)
48 wxFLAGS_MEMBER(wxBORDER_RAISED)
49 wxFLAGS_MEMBER(wxBORDER_STATIC)
50 wxFLAGS_MEMBER(wxBORDER_NONE)
51
52 // old style border flags
53 wxFLAGS_MEMBER(wxSIMPLE_BORDER)
54 wxFLAGS_MEMBER(wxSUNKEN_BORDER)
55 wxFLAGS_MEMBER(wxDOUBLE_BORDER)
56 wxFLAGS_MEMBER(wxRAISED_BORDER)
57 wxFLAGS_MEMBER(wxSTATIC_BORDER)
58 wxFLAGS_MEMBER(wxBORDER)
59
60 // standard window styles
61 wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
62 wxFLAGS_MEMBER(wxCLIP_CHILDREN)
63 wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW)
64 wxFLAGS_MEMBER(wxWANTS_CHARS)
65 wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE)
66 wxFLAGS_MEMBER(wxALWAYS_SHOW_SB )
67 wxFLAGS_MEMBER(wxVSCROLL)
68 wxFLAGS_MEMBER(wxHSCROLL)
69
70wxEND_FLAGS( wxChoiceStyle )
71
72IMPLEMENT_DYNAMIC_CLASS_XTI(wxChoice, wxControl,"wx/choice.h")
73
74wxBEGIN_PROPERTIES_TABLE(wxChoice)
75 wxEVENT_PROPERTY( Select , wxEVT_COMMAND_CHOICE_SELECTED , wxCommandEvent )
76
77 wxPROPERTY( Font , wxFont , SetFont , GetFont , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
78 wxPROPERTY_COLLECTION( Choices , wxArrayString , wxString , AppendString , GetStrings , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
79 wxPROPERTY( Selection ,int, SetSelection, GetSelection, EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
80 wxPROPERTY_FLAGS( WindowStyle , wxChoiceStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
81wxEND_PROPERTIES_TABLE()
82
83wxBEGIN_HANDLERS_TABLE(wxChoice)
84wxEND_HANDLERS_TABLE()
85
86wxCONSTRUCTOR_4( wxChoice , wxWindow* , Parent , wxWindowID , Id , wxPoint , Position , wxSize , Size )
87#else
b1294ada 88IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControlWithItems)
ffecfa5a
JS
89#endif
90
91// ============================================================================
92// implementation
93// ============================================================================
94
95// ----------------------------------------------------------------------------
96// creation
97// ----------------------------------------------------------------------------
98
99bool wxChoice::Create(wxWindow *parent,
100 wxWindowID id,
101 const wxPoint& pos,
102 const wxSize& size,
103 int n, const wxString choices[],
104 long style,
105 const wxValidator& validator,
106 const wxString& name)
107{
108 return false;
109}
110
111bool wxChoice::CreateAndInit(wxWindow *parent,
112 wxWindowID id,
113 const wxPoint& pos,
114 const wxSize& size,
115 int n, const wxString choices[],
116 long style,
117 const wxValidator& validator,
118 const wxString& name)
119{
324eeecb 120 return false;
ffecfa5a
JS
121}
122
123bool wxChoice::Create(wxWindow *parent,
124 wxWindowID id,
125 const wxPoint& pos,
126 const wxSize& size,
127 const wxArrayString& choices,
128 long style,
129 const wxValidator& validator,
130 const wxString& name)
131{
132 return false;
133}
134
135bool wxChoice::MSWShouldPreProcessMessage(WXMSG *pMsg)
136{
137 return false;
138}
139
140WXDWORD wxChoice::MSWGetStyle(long style, WXDWORD *exstyle) const
141{
142 return 0;
143}
144
145wxChoice::~wxChoice()
146{
147}
148
149// ----------------------------------------------------------------------------
150// adding/deleting items to/from the list
151// ----------------------------------------------------------------------------
152
a236aa20
VZ
153int wxChoice::DoInsertItems(const wxArrayStringsAdapter& items,
154 unsigned int pos,
155 void **clientData,
156 wxClientDataType type)
ffecfa5a
JS
157{
158 return 0;
159}
160
a236aa20 161void wxChoice::DoDeleteOneItem(unsigned int n)
ffecfa5a 162{
ffecfa5a
JS
163}
164
a236aa20 165void wxChoice::DoClear()
ffecfa5a
JS
166{
167}
168
169void wxChoice::Free()
170{
171}
172
173// ----------------------------------------------------------------------------
174// selection
175// ----------------------------------------------------------------------------
176
177int wxChoice::GetSelection() const
178{
179 return 0;
180}
181
182void wxChoice::SetSelection(int n)
183{
184}
185
186// ----------------------------------------------------------------------------
187// string list functions
188// ----------------------------------------------------------------------------
189
aa61d352 190unsigned int wxChoice::GetCount() const
ffecfa5a
JS
191{
192 return 0;
193}
194
aa61d352 195void wxChoice::SetString(unsigned int n, const wxString& s)
ffecfa5a
JS
196{
197}
198
aa61d352 199wxString wxChoice::GetString(unsigned int n) const
ffecfa5a 200{
aa61d352 201 return wxEmptyString;
ffecfa5a
JS
202}
203
204// ----------------------------------------------------------------------------
205// client data
206// ----------------------------------------------------------------------------
207
aa61d352 208void wxChoice::DoSetItemClientData(unsigned int n, void* clientData)
ffecfa5a
JS
209{
210}
211
aa61d352 212void* wxChoice::DoGetItemClientData(unsigned int n) const
ffecfa5a
JS
213{
214 return (void *)NULL;
215}
216
ffecfa5a
JS
217// ----------------------------------------------------------------------------
218// wxMSW specific helpers
219// ----------------------------------------------------------------------------
220
221void wxChoice::UpdateVisibleHeight()
222{
223}
224
225void wxChoice::DoMoveWindow(int x, int y, int width, int height)
226{
227}
228
229void wxChoice::DoGetSize(int *w, int *h) const
230{
231}
232
233void wxChoice::DoSetSize(int x, int y,
234 int width, int height,
235 int sizeFlags)
236{
237}
238
239wxSize wxChoice::DoGetBestSize() const
240{
241 return wxSize(0,0);
242}
243
244WXLRESULT wxChoice::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
245{
246 return 0;
247}
248
249bool wxChoice::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
250{
251 return false;
252}
253
ffecfa5a 254#endif // wxUSE_CHOICE