]> git.saurik.com Git - wxWidgets.git/blame - src/palmos/listbox.cpp
Fixed linking errors related to wxAnyButton in wxUniv.
[wxWidgets.git] / src / palmos / listbox.cpp
CommitLineData
ffecfa5a
JS
1///////////////////////////////////////////////////////////////////////////////
2// Name: src/palmos/listbox.cpp
3// Purpose: wxListBox
e2731512 4// Author: William Osborne - minimal working wxPalmOS port
ffecfa5a
JS
5// Modified by:
6// Created: 10/13/04
e2731512 7// RCS-ID: $Id$
ffecfa5a
JS
8// Copyright: (c) William Osborne
9// Licence: wxWindows licence
10///////////////////////////////////////////////////////////////////////////////
11
ffecfa5a
JS
12// For compilers that support precompilation, includes "wx.h".
13#include "wx/wxprec.h"
14
15#ifdef __BORLANDC__
16 #pragma hdrstop
17#endif
18
19#if wxUSE_LISTBOX
20
e4db172a
WS
21#include "wx/listbox.h"
22
ffecfa5a 23#ifndef WX_PRECOMP
ad9835c9 24 #include "wx/dynarray.h"
ad9835c9
WS
25 #include "wx/settings.h"
26 #include "wx/brush.h"
27 #include "wx/font.h"
28 #include "wx/dc.h"
29 #include "wx/utils.h"
e4db172a 30 #include "wx/log.h"
cdccdfab 31 #include "wx/window.h"
ffecfa5a
JS
32#endif
33
ffecfa5a
JS
34#include "wx/palmos/private.h"
35
ffecfa5a
JS
36#if wxUSE_OWNER_DRAWN
37 #include "wx/ownerdrw.h"
38#endif
39
ffecfa5a
JS
40// ============================================================================
41// list box item declaration and implementation
42// ============================================================================
43
44#if wxUSE_OWNER_DRAWN
45
46class wxListBoxItem : public wxOwnerDrawn
47{
48public:
49 wxListBoxItem(const wxString& str = wxEmptyString);
50};
51
8228b893 52wxListBoxItem::wxListBoxItem(const wxString& str) : wxOwnerDrawn(str, false)
ffecfa5a
JS
53{
54 // no bitmaps/checkmarks
55 SetMarginWidth(0);
56}
57
58wxOwnerDrawn *wxListBox::CreateLboxItem(size_t WXUNUSED(n))
59{
60 return new wxListBoxItem();
61}
62
63#endif //USE_OWNER_DRAWN
64
65// ============================================================================
66// list box control implementation
67// ============================================================================
68
69// ----------------------------------------------------------------------------
70// creation
71// ----------------------------------------------------------------------------
72
73// Listbox item
74wxListBox::wxListBox()
75{
76}
77
78bool wxListBox::Create(wxWindow *parent,
79 wxWindowID id,
80 const wxPoint& pos,
81 const wxSize& size,
82 int n, const wxString choices[],
83 long style,
84 const wxValidator& validator,
85 const wxString& name)
86{
87 return false;
88}
89
90bool wxListBox::Create(wxWindow *parent,
91 wxWindowID id,
92 const wxPoint& pos,
93 const wxSize& size,
94 const wxArrayString& choices,
95 long style,
96 const wxValidator& validator,
97 const wxString& name)
98{
99 return false;
100}
101
102wxListBox::~wxListBox()
103{
104}
105
106WXDWORD wxListBox::MSWGetStyle(long style, WXDWORD *exstyle) const
107{
108 return 0;
109}
110
111// ----------------------------------------------------------------------------
112// implementation of wxListBoxBase methods
113// ----------------------------------------------------------------------------
114
115void wxListBox::DoSetFirstItem(int N)
116{
117}
118
a236aa20 119void wxListBox::DoDeleteOneItem(unsigned int n)
ffecfa5a
JS
120{
121}
122
a236aa20 123void wxListBox::DoClear()
ffecfa5a
JS
124{
125}
126
127void wxListBox::Free()
128{
129}
130
c6179a84 131void wxListBox::DoSetSelection(int N, bool select)
ffecfa5a
JS
132{
133}
134
135bool wxListBox::IsSelected(int N) const
136{
137 return false;
138}
139
aa61d352 140void *wxListBox::DoGetItemClientData(unsigned int n) const
ffecfa5a 141{
d3b9f782 142 return NULL;
ffecfa5a
JS
143}
144
aa61d352 145void wxListBox::DoSetItemClientData(unsigned int n, void *clientData)
ffecfa5a
JS
146{
147}
148
149// Return number of selections and an array of selected integers
150int wxListBox::GetSelections(wxArrayInt& aSelections) const
151{
152 return 0;
153}
154
155// Get single selection, for single choice list items
156int wxListBox::GetSelection() const
157{
158 return 0;
159}
160
161// Find string for position
aa61d352 162wxString wxListBox::GetString(unsigned int n) const
ffecfa5a 163{
aa61d352 164 return wxEmptyString;
ffecfa5a
JS
165}
166
a236aa20
VZ
167int wxListBox::DoInsertItems(const wxArrayStringsAdapter& items,
168 unsigned int pos,
169 void **clientData,
170 wxClientDataType type)
ffecfa5a 171{
a236aa20 172 return 0;
ffecfa5a 173}
aa61d352 174void wxListBox::SetString(unsigned int n, const wxString& s)
ffecfa5a
JS
175{
176}
177
aa61d352 178unsigned int wxListBox::GetCount() const
ffecfa5a 179{
8228b893 180 return 0;
ffecfa5a
JS
181}
182
183// ----------------------------------------------------------------------------
184// helpers
185// ----------------------------------------------------------------------------
186
187void wxListBox::SetHorizontalExtent(const wxString& s)
188{
189}
190
191wxSize wxListBox::DoGetBestSize() const
192{
193 return wxSize(0,0);
194}
195
196// ----------------------------------------------------------------------------
197// callbacks
198// ----------------------------------------------------------------------------
199
200bool wxListBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
201{
202 return false;
203}
204
205// ----------------------------------------------------------------------------
206// wxCheckListBox support
207// ----------------------------------------------------------------------------
208
209#if wxUSE_OWNER_DRAWN
210
211// drawing
212// -------
213
214// space beneath/above each row in pixels
215// "standard" checklistbox use 1 here, some might prefer 2. 0 is ugly.
216#define OWNER_DRAWN_LISTBOX_EXTRA_SPACE (1)
217
218// the height is the same for all items
219// TODO should be changed for LBS_OWNERDRAWVARIABLE style listboxes
220
221// NB: can't forward this to wxListBoxItem because LB_SETITEMDATA
222// message is not yet sent when we get here!
223bool wxListBox::MSWOnMeasure(WXMEASUREITEMSTRUCT *item)
224{
225 return true;
226}
227
228// forward the message to the appropriate item
229bool wxListBox::MSWOnDraw(WXDRAWITEMSTRUCT *item)
230{
231 return true;
232}
233
234#endif // wxUSE_OWNER_DRAWN
235
236#endif // wxUSE_LISTBOX