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_
20 * wxComboBox style flags
22 #define wxCB_SIMPLE 0x0004
23 #define wxCB_SORT 0x0008
24 #define wxCB_READONLY 0x0010
25 #define wxCB_DROPDOWN 0x0020
26 #define wxCB_FILENAME 0x0040
28 extern WXDLLEXPORT_DATA(const wxChar
) wxComboBoxNameStr
[];
30 // ----------------------------------------------------------------------------
31 // wxComboBoxBase: this interface defines the methods wxComboBox must implement
32 // ----------------------------------------------------------------------------
34 #include "wx/textctrl.h"
35 #include "wx/ctrlsub.h"
37 class WXDLLEXPORT wxComboBoxBase
: public wxItemContainer
40 // wxTextCtrl-like methods wxComboBox must implement
41 virtual wxString
GetValue() const = 0;
42 virtual void SetValue(const wxString
& value
) = 0;
44 virtual void Copy() = 0;
45 virtual void Cut() = 0;
46 virtual void Paste() = 0;
47 virtual void SetInsertionPoint(long pos
) = 0;
48 virtual long GetInsertionPoint() const = 0;
49 virtual wxTextPos
GetLastPosition() const = 0;
50 virtual void Replace(long from
, long to
, const wxString
& value
) = 0;
51 virtual void SetSelection(long from
, long to
) = 0;
52 virtual void SetEditable(bool editable
) = 0;
54 virtual void SetInsertionPointEnd()
55 { SetInsertionPoint(GetLastPosition()); }
56 virtual void Remove(long from
, long to
)
57 { Replace(from
, to
, wxEmptyString
); }
59 virtual bool IsEditable() const = 0;
61 virtual void Undo() = 0;
62 virtual void Redo() = 0;
63 virtual void SelectAll() = 0;
65 virtual bool CanCopy() const = 0;
66 virtual bool CanCut() const = 0;
67 virtual bool CanPaste() const = 0;
68 virtual bool CanUndo() const = 0;
69 virtual bool CanRedo() const = 0;
72 // redeclare inherited SetSelection() overload here as well to avoid
73 // virtual function hiding
74 virtual void SetSelection(int n
) = 0;
77 // ----------------------------------------------------------------------------
78 // include the platform-dependent header defining the real class
79 // ----------------------------------------------------------------------------
81 #if defined(__WXUNIVERSAL__)
82 #include "wx/univ/combobox.h"
83 #elif defined(__WXMSW__)
84 #include "wx/msw/combobox.h"
85 #elif defined(__WXMOTIF__)
86 #include "wx/motif/combobox.h"
87 #elif defined(__WXGTK20__)
88 #include "wx/gtk/combobox.h"
89 #elif defined(__WXGTK__)
90 #include "wx/gtk1/combobox.h"
91 #elif defined(__WXMAC__)
92 #include "wx/mac/combobox.h"
93 #elif defined(__WXCOCOA__)
94 #include "wx/cocoa/combobox.h"
95 #elif defined(__WXPM__)
96 #include "wx/os2/combobox.h"
99 #endif // wxUSE_COMBOBOX
102 // _WX_COMBOBOX_H_BASE_