]> git.saurik.com Git - wxWidgets.git/blame - include/wx/combobox.h
Set wxTextCtrl::m_verRichEdit to 4 for RichEdit 4.1.
[wxWidgets.git] / include / wx / combobox.h
CommitLineData
1e6feb95
VZ
1///////////////////////////////////////////////////////////////////////////////
2// Name: wx/combobox.h
3// Purpose: wxComboBox declaration
4// Author: Vadim Zeitlin
5// Modified by:
6// Created: 24.12.00
7// RCS-ID: $Id$
77ffb593 8// Copyright: (c) 1996-2000 wxWidgets team
65571936 9// Licence: wxWindows licence
1e6feb95
VZ
10///////////////////////////////////////////////////////////////////////////////
11
34138703
JS
12#ifndef _WX_COMBOBOX_H_BASE_
13#define _WX_COMBOBOX_H_BASE_
c801d85f 14
1e6feb95
VZ
15#include "wx/defs.h"
16
83beee57
RR
17#if wxUSE_COMBOBOX
18
53a2db12 19extern WXDLLIMPEXP_DATA_CORE(const char) wxComboBoxNameStr[];
1e6feb95
VZ
20
21// ----------------------------------------------------------------------------
22// wxComboBoxBase: this interface defines the methods wxComboBox must implement
23// ----------------------------------------------------------------------------
24
25#include "wx/ctrlsub.h"
0ec1179b 26#include "wx/textentry.h"
1e6feb95 27
53a2db12 28class WXDLLIMPEXP_CORE wxComboBoxBase : public wxItemContainer,
8bd9fa33 29 public wxTextEntry
1e6feb95
VZ
30{
31public:
f7dfb0b5 32 // override these methods to disambiguate between two base classes versions
0ec1179b
VZ
33 virtual void Clear()
34 {
35 wxTextEntry::Clear();
36 wxItemContainer::Clear();
37 }
38
f7dfb0b5
VZ
39 bool IsEmpty() const { return wxItemContainer::IsEmpty(); }
40
0ec1179b
VZ
41 // also bring in GetSelection() versions of both base classes in scope
42 //
43 // NB: GetSelection(from, to) could be already implemented in wxTextEntry
44 // but still make it pure virtual because for some platforms it's not
45 // implemented there and also because the derived class has to override
46 // it anyhow to avoid ambiguity with the other GetSelection()
47 virtual int GetSelection() const = 0;
48 virtual void GetSelection(long *from, long *to) const = 0;
150e31d2 49
d1d1f817
VZ
50 virtual void Popup() { wxFAIL_MSG( wxT("Not implemented") ); };
51 virtual void Dismiss() { wxFAIL_MSG( wxT("Not implemented") ); };
52
c63312c4
VZ
53 // may return value different from GetSelection() when the combobox
54 // dropdown is shown and the user selected, but not yet accepted, a value
55 // different from the old one in it
56 virtual int GetCurrentSelection() const { return GetSelection(); }
1e6feb95
VZ
57};
58
59// ----------------------------------------------------------------------------
60// include the platform-dependent header defining the real class
61// ----------------------------------------------------------------------------
62
63#if defined(__WXUNIVERSAL__)
64 #include "wx/univ/combobox.h"
65#elif defined(__WXMSW__)
66 #include "wx/msw/combobox.h"
2049ba38 67#elif defined(__WXMOTIF__)
1e6feb95 68 #include "wx/motif/combobox.h"
1be7a35c 69#elif defined(__WXGTK20__)
1e6feb95 70 #include "wx/gtk/combobox.h"
1be7a35c
MR
71#elif defined(__WXGTK__)
72 #include "wx/gtk1/combobox.h"
34138703 73#elif defined(__WXMAC__)
ef0e9220 74 #include "wx/osx/combobox.h"
421a8431
DE
75#elif defined(__WXCOCOA__)
76 #include "wx/cocoa/combobox.h"
1777b9bb 77#elif defined(__WXPM__)
1e6feb95 78 #include "wx/os2/combobox.h"
c801d85f
KB
79#endif
80
1e6feb95
VZ
81#endif // wxUSE_COMBOBOX
82
0ec1179b 83#endif // _WX_COMBOBOX_H_BASE_