]> git.saurik.com Git - wxWidgets.git/blame - src/palmos/combobox.cpp
Implement support for gradient stops for OS X.
[wxWidgets.git] / src / palmos / combobox.cpp
CommitLineData
ffecfa5a 1/////////////////////////////////////////////////////////////////////////////
e2731512 2// Name: src/palmos/combobox.cpp
ffecfa5a 3// Purpose: wxComboBox class
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
12// ============================================================================
13// declarations
14// ============================================================================
15
16// ----------------------------------------------------------------------------
17// headers
18// ----------------------------------------------------------------------------
19
ffecfa5a
JS
20// For compilers that support precompilation, includes "wx.h".
21#include "wx/wxprec.h"
22
23#ifdef __BORLANDC__
24 #pragma hdrstop
25#endif
26
27#if wxUSE_COMBOBOX
28
c64755ed
WS
29#include "wx/combobox.h"
30
ffecfa5a
JS
31#ifndef WX_PRECOMP
32 #include "wx/settings.h"
33 #include "wx/log.h"
34 // for wxEVT_COMMAND_TEXT_ENTER
35 #include "wx/textctrl.h"
c64755ed 36 #include "wx/brush.h"
ffecfa5a
JS
37#endif
38
ffecfa5a
JS
39#include "wx/clipbrd.h"
40#include "wx/palmos/private.h"
41
42#if wxUSE_TOOLTIPS
ffecfa5a
JS
43 #include "wx/tooltip.h"
44#endif // wxUSE_TOOLTIPS
45
46// ----------------------------------------------------------------------------
47// wxWin macros
48// ----------------------------------------------------------------------------
49
50#if wxUSE_EXTENDED_RTTI
51WX_DEFINE_FLAGS( wxComboBoxStyle )
52
53wxBEGIN_FLAGS( wxComboBoxStyle )
54 // new style border flags, we put them first to
55 // use them for streaming out
56 wxFLAGS_MEMBER(wxBORDER_SIMPLE)
57 wxFLAGS_MEMBER(wxBORDER_SUNKEN)
58 wxFLAGS_MEMBER(wxBORDER_DOUBLE)
59 wxFLAGS_MEMBER(wxBORDER_RAISED)
60 wxFLAGS_MEMBER(wxBORDER_STATIC)
61 wxFLAGS_MEMBER(wxBORDER_NONE)
150e31d2 62
ffecfa5a
JS
63 // old style border flags
64 wxFLAGS_MEMBER(wxSIMPLE_BORDER)
65 wxFLAGS_MEMBER(wxSUNKEN_BORDER)
66 wxFLAGS_MEMBER(wxDOUBLE_BORDER)
67 wxFLAGS_MEMBER(wxRAISED_BORDER)
68 wxFLAGS_MEMBER(wxSTATIC_BORDER)
69 wxFLAGS_MEMBER(wxBORDER)
70
71 // standard window styles
72 wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
73 wxFLAGS_MEMBER(wxCLIP_CHILDREN)
74 wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW)
75 wxFLAGS_MEMBER(wxWANTS_CHARS)
76 wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE)
77 wxFLAGS_MEMBER(wxALWAYS_SHOW_SB )
78 wxFLAGS_MEMBER(wxVSCROLL)
79 wxFLAGS_MEMBER(wxHSCROLL)
80
81 wxFLAGS_MEMBER(wxCB_SIMPLE)
82 wxFLAGS_MEMBER(wxCB_SORT)
83 wxFLAGS_MEMBER(wxCB_READONLY)
84 wxFLAGS_MEMBER(wxCB_DROPDOWN)
85
86wxEND_FLAGS( wxComboBoxStyle )
87
88IMPLEMENT_DYNAMIC_CLASS_XTI(wxComboBox, wxControl,"wx/combobox.h")
89
90wxBEGIN_PROPERTIES_TABLE(wxComboBox)
91 wxEVENT_PROPERTY( Select , wxEVT_COMMAND_COMBOBOX_SELECTED , wxCommandEvent )
92 wxEVENT_PROPERTY( TextEnter , wxEVT_COMMAND_TEXT_ENTER , wxCommandEvent )
93
94 // TODO DELEGATES
95 wxPROPERTY( Font , wxFont , SetFont , GetFont , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
96 wxPROPERTY_COLLECTION( Choices , wxArrayString , wxString , AppendString , GetStrings , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
97 wxPROPERTY( Value ,wxString, SetValue, GetValue, EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
98 wxPROPERTY( Selection ,int, SetSelection, GetSelection, EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
99 wxPROPERTY_FLAGS( WindowStyle , wxComboBoxStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
100wxEND_PROPERTIES_TABLE()
101
102wxBEGIN_HANDLERS_TABLE(wxComboBox)
103wxEND_HANDLERS_TABLE()
104
105wxCONSTRUCTOR_5( wxComboBox , wxWindow* , Parent , wxWindowID , Id , wxString , Value , wxPoint , Position , wxSize , Size )
106#else
107IMPLEMENT_DYNAMIC_CLASS(wxComboBox, wxControl)
108#endif
109
110// ----------------------------------------------------------------------------
111// function prototypes
112// ----------------------------------------------------------------------------
113
114// ---------------------------------------------------------------------------
115// global vars
116// ---------------------------------------------------------------------------
117
118// the pointer to standard radio button wnd proc
119static WNDPROC gs_wndprocEdit = (WNDPROC)NULL;
120
121// ============================================================================
122// implementation
123// ============================================================================
124
ffecfa5a
JS
125// ----------------------------------------------------------------------------
126// wxComboBox callbacks
127// ----------------------------------------------------------------------------
128
129WXLRESULT wxComboBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
130{
131 return 0;
132}
133
134bool wxComboBox::MSWProcessEditMsg(WXUINT msg, WXWPARAM wParam, WXLPARAM lParam)
135{
136 return false;
137}
138
139bool wxComboBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
140{
141 return false;
142}
143
144WXHWND wxComboBox::GetEditHWND() const
145{
146 return (WXHWND)0;
147}
148
149// ----------------------------------------------------------------------------
150// wxComboBox creation
151// ----------------------------------------------------------------------------
152
153bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
154 const wxString& value,
155 const wxPoint& pos,
156 const wxSize& size,
157 int n, const wxString choices[],
158 long style,
159 const wxValidator& validator,
160 const wxString& name)
161{
162 return false;
163}
164
165bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
166 const wxString& value,
167 const wxPoint& pos,
168 const wxSize& size,
169 const wxArrayString& choices,
170 long style,
171 const wxValidator& validator,
172 const wxString& name)
173{
174 return false;
175}
176
177WXDWORD wxComboBox::MSWGetStyle(long style, WXDWORD *exstyle) const
178{
179 return 0;
180}
181
182// ----------------------------------------------------------------------------
183// wxComboBox text control-like methods
184// ----------------------------------------------------------------------------
185
186void wxComboBox::SetValue(const wxString& value)
187{
188}
189
190// Clipboard operations
191void wxComboBox::Copy()
192{
193}
194
195void wxComboBox::Cut()
196{
197}
198
199void wxComboBox::Paste()
200{
201}
202
203void wxComboBox::SetEditable(bool WXUNUSED(editable))
204{
205}
206
207void wxComboBox::SetInsertionPoint(long pos)
208{
209}
210
211void wxComboBox::SetInsertionPointEnd()
212{
213}
214
215long wxComboBox::GetInsertionPoint() const
216{
217 return 0;
218}
219
7d8268a1 220wxTextPos wxComboBox::GetLastPosition() const
ffecfa5a
JS
221{
222 return 0;
223}
224
225void wxComboBox::Replace(long from, long to, const wxString& value)
226{
227}
228
229void wxComboBox::Remove(long from, long to)
230{
231}
232
233void wxComboBox::SetSelection(long from, long to)
234{
235}
236
150e31d2
JS
237bool wxComboBox::IsEditable() const
238{
7d8268a1 239 return false;
150e31d2
JS
240}
241
242void wxComboBox::Undo()
243{
244}
245
246void wxComboBox::Redo()
247{
248}
249
250void wxComboBox::SelectAll()
251{
252}
253
254bool wxComboBox::CanCopy() const
255{
7d8268a1 256 return false;
150e31d2
JS
257}
258
259bool wxComboBox::CanCut() const
260{
7d8268a1 261 return false;
150e31d2
JS
262}
263
264bool wxComboBox::CanPaste() const
265{
7d8268a1 266 return false;
150e31d2
JS
267}
268
269bool wxComboBox::CanUndo() const
270{
7d8268a1 271 return false;
150e31d2
JS
272}
273
274bool wxComboBox::CanRedo() const
275{
7d8268a1 276 return false;
150e31d2
JS
277}
278
279
ffecfa5a 280#endif // wxUSE_COMBOBOX