]>
Commit | Line | Data |
---|---|---|
ffecfa5a | 1 | ///////////////////////////////////////////////////////////////////////////// |
e2731512 | 2 | // Name: src/palmos/radiobox.cpp |
ffecfa5a | 3 | // Purpose: wxRadioBox implementation |
e2731512 | 4 | // Author: William Osborne - minimal working wxPalmOS port |
a152561c | 5 | // Modified by: Wlodzimierz ABX Skiba - native wxRadioBox implementation |
ffecfa5a | 6 | // Created: 10/13/04 |
e2731512 | 7 | // RCS-ID: $Id$ |
a152561c | 8 | // Copyright: (c) William Osborne, Wlodzimierz Skiba |
ffecfa5a JS |
9 | // Licence: wxWindows licence |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | // =========================================================================== | |
13 | // declarations | |
14 | // =========================================================================== | |
15 | ||
16 | // --------------------------------------------------------------------------- | |
17 | // headers | |
18 | // --------------------------------------------------------------------------- | |
19 | ||
20 | #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) | |
21 | #pragma implementation "radiobox.h" | |
22 | #endif | |
23 | ||
24 | // For compilers that support precompilation, includes "wx.h". | |
25 | #include "wx/wxprec.h" | |
26 | ||
27 | #ifdef __BORLANDC__ | |
28 | #pragma hdrstop | |
29 | #endif | |
30 | ||
31 | #if wxUSE_RADIOBOX | |
32 | ||
33 | #ifndef WX_PRECOMP | |
34 | #include "wx/bitmap.h" | |
35 | #include "wx/brush.h" | |
36 | #include "wx/radiobox.h" | |
37 | #include "wx/settings.h" | |
38 | #include "wx/log.h" | |
39 | #endif | |
40 | ||
ffecfa5a JS |
41 | #if wxUSE_TOOLTIPS |
42 | #include "wx/tooltip.h" | |
43 | #endif // wxUSE_TOOLTIPS | |
44 | ||
45 | // TODO: wxCONSTRUCTOR | |
46 | #if 0 // wxUSE_EXTENDED_RTTI | |
47 | WX_DEFINE_FLAGS( wxRadioBoxStyle ) | |
48 | ||
49 | wxBEGIN_FLAGS( wxRadioBoxStyle ) | |
50 | // new style border flags, we put them first to | |
51 | // use them for streaming out | |
52 | wxFLAGS_MEMBER(wxBORDER_SIMPLE) | |
53 | wxFLAGS_MEMBER(wxBORDER_SUNKEN) | |
54 | wxFLAGS_MEMBER(wxBORDER_DOUBLE) | |
55 | wxFLAGS_MEMBER(wxBORDER_RAISED) | |
56 | wxFLAGS_MEMBER(wxBORDER_STATIC) | |
57 | wxFLAGS_MEMBER(wxBORDER_NONE) | |
e2731512 | 58 | |
ffecfa5a JS |
59 | // old style border flags |
60 | wxFLAGS_MEMBER(wxSIMPLE_BORDER) | |
61 | wxFLAGS_MEMBER(wxSUNKEN_BORDER) | |
62 | wxFLAGS_MEMBER(wxDOUBLE_BORDER) | |
63 | wxFLAGS_MEMBER(wxRAISED_BORDER) | |
64 | wxFLAGS_MEMBER(wxSTATIC_BORDER) | |
65 | wxFLAGS_MEMBER(wxBORDER) | |
66 | ||
67 | // standard window styles | |
68 | wxFLAGS_MEMBER(wxTAB_TRAVERSAL) | |
69 | wxFLAGS_MEMBER(wxCLIP_CHILDREN) | |
70 | wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW) | |
71 | wxFLAGS_MEMBER(wxWANTS_CHARS) | |
72 | wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE) | |
73 | wxFLAGS_MEMBER(wxALWAYS_SHOW_SB ) | |
74 | wxFLAGS_MEMBER(wxVSCROLL) | |
75 | wxFLAGS_MEMBER(wxHSCROLL) | |
76 | ||
77 | wxFLAGS_MEMBER(wxRA_SPECIFY_COLS) | |
78 | wxFLAGS_MEMBER(wxRA_HORIZONTAL) | |
79 | wxFLAGS_MEMBER(wxRA_SPECIFY_ROWS) | |
80 | wxFLAGS_MEMBER(wxRA_VERTICAL) | |
81 | ||
82 | wxEND_FLAGS( wxRadioBoxStyle ) | |
83 | ||
84 | IMPLEMENT_DYNAMIC_CLASS_XTI(wxRadioBox, wxControl,"wx/radiobox.h") | |
85 | ||
86 | wxBEGIN_PROPERTIES_TABLE(wxRadioBox) | |
87 | wxEVENT_PROPERTY( Select , wxEVT_COMMAND_RADIOBOX_SELECTED , wxCommandEvent ) | |
88 | wxPROPERTY_FLAGS( WindowStyle , wxRadioBoxStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style | |
89 | wxEND_PROPERTIES_TABLE() | |
90 | ||
91 | #else | |
92 | IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl) | |
93 | #endif | |
94 | ||
95 | /* | |
96 | selection | |
97 | content | |
98 | label | |
99 | dimension | |
100 | item | |
101 | */ | |
102 | ||
ffecfa5a JS |
103 | // =========================================================================== |
104 | // implementation | |
105 | // =========================================================================== | |
106 | ||
107 | // --------------------------------------------------------------------------- | |
108 | // wxRadioBox | |
109 | // --------------------------------------------------------------------------- | |
110 | ||
111 | int wxRadioBox::GetCount() const | |
112 | { | |
113 | return 0; | |
114 | } | |
115 | ||
116 | int wxRadioBox::GetColumnCount() const | |
117 | { | |
118 | return 0; | |
119 | } | |
120 | ||
121 | int wxRadioBox::GetRowCount() const | |
122 | { | |
123 | return 0; | |
124 | } | |
125 | ||
126 | // returns the number of rows | |
127 | int wxRadioBox::GetNumVer() const | |
128 | { | |
129 | return 0; | |
130 | } | |
131 | ||
132 | // returns the number of columns | |
133 | int wxRadioBox::GetNumHor() const | |
134 | { | |
135 | return 0; | |
136 | } | |
137 | ||
ffecfa5a JS |
138 | // Radio box item |
139 | wxRadioBox::wxRadioBox() | |
140 | { | |
141 | } | |
142 | ||
143 | bool wxRadioBox::Create(wxWindow *parent, | |
144 | wxWindowID id, | |
145 | const wxString& title, | |
146 | const wxPoint& pos, | |
147 | const wxSize& size, | |
148 | int n, | |
149 | const wxString choices[], | |
150 | int majorDim, | |
151 | long style, | |
152 | const wxValidator& val, | |
153 | const wxString& name) | |
154 | { | |
155 | return false; | |
156 | } | |
157 | ||
158 | bool wxRadioBox::Create(wxWindow *parent, | |
159 | wxWindowID id, | |
160 | const wxString& title, | |
161 | const wxPoint& pos, | |
162 | const wxSize& size, | |
163 | const wxArrayString& choices, | |
164 | int majorDim, | |
165 | long style, | |
166 | const wxValidator& val, | |
167 | const wxString& name) | |
168 | { | |
169 | return false; | |
170 | } | |
171 | ||
172 | wxRadioBox::~wxRadioBox() | |
173 | { | |
174 | } | |
175 | ||
176 | void wxRadioBox::SetString(int item, const wxString& label) | |
177 | { | |
178 | } | |
179 | ||
180 | void wxRadioBox::SetSelection(int N) | |
181 | { | |
182 | } | |
183 | ||
184 | // Get single selection, for single choice list items | |
185 | int wxRadioBox::GetSelection() const | |
186 | { | |
187 | return 0; | |
188 | } | |
189 | ||
190 | // Find string for position | |
191 | wxString wxRadioBox::GetString(int item) const | |
192 | { | |
193 | wxString ret; | |
e2731512 | 194 | |
ffecfa5a JS |
195 | return ret; |
196 | } | |
197 | ||
198 | // ---------------------------------------------------------------------------- | |
199 | // size calculations | |
200 | // ---------------------------------------------------------------------------- | |
201 | ||
202 | wxSize wxRadioBox::GetMaxButtonSize() const | |
203 | { | |
204 | return wxSize(0,0); | |
205 | } | |
206 | ||
207 | wxSize wxRadioBox::GetTotalButtonSize(const wxSize& sizeBtn) const | |
208 | { | |
209 | return wxSize(0,0); | |
210 | } | |
211 | ||
212 | wxSize wxRadioBox::DoGetBestSize() const | |
213 | { | |
214 | return wxSize(0,0); | |
215 | } | |
216 | ||
217 | // Restored old code. | |
218 | void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags) | |
219 | { | |
220 | } | |
221 | ||
ffecfa5a JS |
222 | void wxRadioBox::SetFocus() |
223 | { | |
224 | } | |
225 | ||
226 | bool wxRadioBox::Show(bool show) | |
227 | { | |
228 | return false; | |
229 | } | |
230 | ||
231 | // Enable a specific button | |
232 | void wxRadioBox::Enable(int item, bool enable) | |
233 | { | |
234 | } | |
235 | ||
236 | // Enable all controls | |
237 | bool wxRadioBox::Enable(bool enable) | |
238 | { | |
239 | return false; | |
240 | } | |
241 | ||
242 | // Show a specific button | |
243 | void wxRadioBox::Show(int item, bool show) | |
244 | { | |
245 | } | |
246 | ||
ffecfa5a JS |
247 | void wxRadioBox::Command(wxCommandEvent & event) |
248 | { | |
249 | } | |
250 | ||
ffecfa5a JS |
251 | void wxRadioBox::SendNotificationEvent() |
252 | { | |
253 | } | |
254 | ||
255 | bool wxRadioBox::SetFont(const wxFont& font) | |
256 | { | |
257 | return false; | |
258 | } | |
259 | ||
ffecfa5a | 260 | #endif // wxUSE_RADIOBOX |