1 ///////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxComboBox declaration
4 // Author: Vadim Zeitlin
8 // Copyright: (c) 1996-2000 wxWidgets team
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_COMBOBOX_H_BASE_
13 #define _WX_COMBOBOX_H_BASE_
19 extern WXDLLIMPEXP_DATA_CORE(const char) wxComboBoxNameStr
[];
21 // ----------------------------------------------------------------------------
22 // wxComboBoxBase: this interface defines the methods wxComboBox must implement
23 // ----------------------------------------------------------------------------
25 #include "wx/ctrlsub.h"
26 #include "wx/textentry.h"
28 class WXDLLIMPEXP_CORE wxComboBoxBase
: public wxItemContainer
,
32 // override these methods to disambiguate between two base classes versions
36 wxItemContainer::Clear();
39 bool IsEmpty() const { return wxItemContainer::IsEmpty(); }
41 // also bring in GetSelection() versions of both base classes in scope
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;
50 virtual void Popup() { wxFAIL_MSG( wxT("Not implemented") ); };
51 virtual void Dismiss() { wxFAIL_MSG( wxT("Not implemented") ); };
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(); }
59 // ----------------------------------------------------------------------------
60 // include the platform-dependent header defining the real class
61 // ----------------------------------------------------------------------------
63 #if defined(__WXUNIVERSAL__)
64 #include "wx/univ/combobox.h"
65 #elif defined(__WXMSW__)
66 #include "wx/msw/combobox.h"
67 #elif defined(__WXMOTIF__)
68 #include "wx/motif/combobox.h"
69 #elif defined(__WXGTK20__)
70 #include "wx/gtk/combobox.h"
71 #elif defined(__WXGTK__)
72 #include "wx/gtk1/combobox.h"
73 #elif defined(__WXMAC__)
74 #include "wx/osx/combobox.h"
75 #elif defined(__WXCOCOA__)
76 #include "wx/cocoa/combobox.h"
77 #elif defined(__WXPM__)
78 #include "wx/os2/combobox.h"
81 #endif // wxUSE_COMBOBOX
83 #endif // _WX_COMBOBOX_H_BASE_