]> git.saurik.com Git - wxWidgets.git/blame_incremental - src/palmos/radiobox.cpp
Fixed a long-standing issue where wxSlider controls with a hardcoded size would mispl...
[wxWidgets.git] / src / palmos / radiobox.cpp
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: src/palmos/radiobox.cpp
3// Purpose: wxRadioBox implementation
4// Author: William Osborne - minimal working wxPalmOS port
5// Modified by:
6// Created: 10/13/04
7// RCS-ID: $Id$
8// Copyright: (c) William Osborne
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
41#include "wx/palmos/private.h"
42
43#if wxUSE_TOOLTIPS
44 #include "wx/tooltip.h"
45#endif // wxUSE_TOOLTIPS
46
47// TODO: wxCONSTRUCTOR
48#if 0 // wxUSE_EXTENDED_RTTI
49WX_DEFINE_FLAGS( wxRadioBoxStyle )
50
51wxBEGIN_FLAGS( wxRadioBoxStyle )
52 // new style border flags, we put them first to
53 // use them for streaming out
54 wxFLAGS_MEMBER(wxBORDER_SIMPLE)
55 wxFLAGS_MEMBER(wxBORDER_SUNKEN)
56 wxFLAGS_MEMBER(wxBORDER_DOUBLE)
57 wxFLAGS_MEMBER(wxBORDER_RAISED)
58 wxFLAGS_MEMBER(wxBORDER_STATIC)
59 wxFLAGS_MEMBER(wxBORDER_NONE)
60
61 // old style border flags
62 wxFLAGS_MEMBER(wxSIMPLE_BORDER)
63 wxFLAGS_MEMBER(wxSUNKEN_BORDER)
64 wxFLAGS_MEMBER(wxDOUBLE_BORDER)
65 wxFLAGS_MEMBER(wxRAISED_BORDER)
66 wxFLAGS_MEMBER(wxSTATIC_BORDER)
67 wxFLAGS_MEMBER(wxBORDER)
68
69 // standard window styles
70 wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
71 wxFLAGS_MEMBER(wxCLIP_CHILDREN)
72 wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW)
73 wxFLAGS_MEMBER(wxWANTS_CHARS)
74 wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE)
75 wxFLAGS_MEMBER(wxALWAYS_SHOW_SB )
76 wxFLAGS_MEMBER(wxVSCROLL)
77 wxFLAGS_MEMBER(wxHSCROLL)
78
79 wxFLAGS_MEMBER(wxRA_SPECIFY_COLS)
80 wxFLAGS_MEMBER(wxRA_HORIZONTAL)
81 wxFLAGS_MEMBER(wxRA_SPECIFY_ROWS)
82 wxFLAGS_MEMBER(wxRA_VERTICAL)
83
84wxEND_FLAGS( wxRadioBoxStyle )
85
86IMPLEMENT_DYNAMIC_CLASS_XTI(wxRadioBox, wxControl,"wx/radiobox.h")
87
88wxBEGIN_PROPERTIES_TABLE(wxRadioBox)
89 wxEVENT_PROPERTY( Select , wxEVT_COMMAND_RADIOBOX_SELECTED , wxCommandEvent )
90 wxPROPERTY_FLAGS( WindowStyle , wxRadioBoxStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
91wxEND_PROPERTIES_TABLE()
92
93#else
94IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl)
95#endif
96
97/*
98 selection
99 content
100 label
101 dimension
102 item
103*/
104
105#define RADIOBTN_PARENT_IS_RADIOBOX 0
106
107// ---------------------------------------------------------------------------
108// private functions
109// ---------------------------------------------------------------------------
110
111// ---------------------------------------------------------------------------
112// global vars
113// ---------------------------------------------------------------------------
114
115// the pointer to standard radio button wnd proc
116static WXFARPROC s_wndprocRadioBtn = (WXFARPROC)NULL;
117
118// ===========================================================================
119// implementation
120// ===========================================================================
121
122// ---------------------------------------------------------------------------
123// wxRadioBox
124// ---------------------------------------------------------------------------
125
126int wxRadioBox::GetCount() const
127{
128 return 0;
129}
130
131int wxRadioBox::GetColumnCount() const
132{
133 return 0;
134}
135
136int wxRadioBox::GetRowCount() const
137{
138 return 0;
139}
140
141// returns the number of rows
142int wxRadioBox::GetNumVer() const
143{
144 return 0;
145}
146
147// returns the number of columns
148int wxRadioBox::GetNumHor() const
149{
150 return 0;
151}
152
153bool wxRadioBox::MSWCommand(WXUINT cmd, WXWORD id)
154{
155 return FALSE;
156}
157
158// Radio box item
159wxRadioBox::wxRadioBox()
160{
161}
162
163bool wxRadioBox::Create(wxWindow *parent,
164 wxWindowID id,
165 const wxString& title,
166 const wxPoint& pos,
167 const wxSize& size,
168 int n,
169 const wxString choices[],
170 int majorDim,
171 long style,
172 const wxValidator& val,
173 const wxString& name)
174{
175 return false;
176}
177
178bool wxRadioBox::Create(wxWindow *parent,
179 wxWindowID id,
180 const wxString& title,
181 const wxPoint& pos,
182 const wxSize& size,
183 const wxArrayString& choices,
184 int majorDim,
185 long style,
186 const wxValidator& val,
187 const wxString& name)
188{
189 return false;
190}
191
192wxRadioBox::~wxRadioBox()
193{
194}
195
196void wxRadioBox::SetString(int item, const wxString& label)
197{
198}
199
200void wxRadioBox::SetSelection(int N)
201{
202}
203
204// Get single selection, for single choice list items
205int wxRadioBox::GetSelection() const
206{
207 return 0;
208}
209
210// Find string for position
211wxString wxRadioBox::GetString(int item) const
212{
213 wxString ret;
214
215 return ret;
216}
217
218// ----------------------------------------------------------------------------
219// size calculations
220// ----------------------------------------------------------------------------
221
222wxSize wxRadioBox::GetMaxButtonSize() const
223{
224 return wxSize(0,0);
225}
226
227wxSize wxRadioBox::GetTotalButtonSize(const wxSize& sizeBtn) const
228{
229 return wxSize(0,0);
230}
231
232wxSize wxRadioBox::DoGetBestSize() const
233{
234 return wxSize(0,0);
235}
236
237// Restored old code.
238void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags)
239{
240}
241
242void wxRadioBox::GetSize(int *width, int *height) const
243{
244}
245
246void wxRadioBox::GetPosition(int *x, int *y) const
247{
248}
249
250void wxRadioBox::SetFocus()
251{
252}
253
254bool wxRadioBox::Show(bool show)
255{
256 return false;
257}
258
259// Enable a specific button
260void wxRadioBox::Enable(int item, bool enable)
261{
262}
263
264// Enable all controls
265bool wxRadioBox::Enable(bool enable)
266{
267 return false;
268}
269
270// Show a specific button
271void wxRadioBox::Show(int item, bool show)
272{
273}
274
275bool wxRadioBox::ContainsHWND(WXHWND hWnd) const
276{
277 return false;
278}
279
280void wxRadioBox::Command(wxCommandEvent & event)
281{
282}
283
284void wxRadioBox::SubclassRadioButton(WXHWND hWndBtn)
285{
286}
287
288void wxRadioBox::SendNotificationEvent()
289{
290}
291
292bool wxRadioBox::SetFont(const wxFont& font)
293{
294 return false;
295}
296
297// ----------------------------------------------------------------------------
298// our window proc
299// ----------------------------------------------------------------------------
300
301WXLRESULT wxRadioBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
302{
303 return 0;
304}
305
306WXHBRUSH wxRadioBox::OnCtlColor(WXHDC pDC, WXHWND WXUNUSED(pWnd), WXUINT WXUNUSED(nCtlColor),
307 WXUINT WXUNUSED(message),
308 WXWPARAM WXUNUSED(wParam),
309 WXLPARAM WXUNUSED(lParam)
310 )
311{
312 return (WXHBRUSH)0;
313}
314
315#endif // wxUSE_RADIOBOX