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