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