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