]> git.saurik.com Git - wxWidgets.git/blob - include/wx/combobox.h
OS X savvy implementation
[wxWidgets.git] / include / wx / combobox.h
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$
8 // Copyright: (c) 1996-2000 wxWidgets team
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_COMBOBOX_H_BASE_
13 #define _WX_COMBOBOX_H_BASE_
14
15 #include "wx/defs.h"
16
17 #if wxUSE_COMBOBOX
18
19 WXDLLEXPORT_DATA(extern const wxChar*) wxComboBoxNameStr;
20
21 // ----------------------------------------------------------------------------
22 // wxComboBoxBase: this interface defines the methods wxComboBox must implement
23 // ----------------------------------------------------------------------------
24
25 #include "wx/ctrlsub.h"
26
27 class WXDLLEXPORT wxComboBoxBase : public wxItemContainer
28 {
29 public:
30 // wxTextCtrl-like methods wxComboBox must implement
31 virtual wxString GetValue() const = 0;
32 virtual void SetValue(const wxString& value) = 0;
33
34 virtual void Copy() = 0;
35 virtual void Cut() = 0;
36 virtual void Paste() = 0;
37 virtual void SetInsertionPoint(long pos) = 0;
38 virtual long GetInsertionPoint() const = 0;
39 virtual long GetLastPosition() const = 0;
40 virtual void Replace(long from, long to, const wxString& value) = 0;
41 virtual void SetSelection(long from, long to) = 0;
42 virtual void SetEditable(bool editable) = 0;
43
44 virtual void SetInsertionPointEnd()
45 { SetInsertionPoint(GetLastPosition()); }
46 virtual void Remove(long from, long to)
47 { Replace(from, to, wxEmptyString); }
48
49 virtual bool IsEditable() const = 0;
50
51 virtual void Undo() = 0;
52 virtual void Redo() = 0;
53 virtual void SelectAll() = 0;
54
55 virtual bool CanCopy() const = 0;
56 virtual bool CanCut() const = 0;
57 virtual bool CanPaste() const = 0;
58 virtual bool CanUndo() const = 0;
59 virtual bool CanRedo() const = 0;
60
61 };
62
63 // ----------------------------------------------------------------------------
64 // include the platform-dependent header defining the real class
65 // ----------------------------------------------------------------------------
66
67 #if defined(__WXUNIVERSAL__)
68 #include "wx/univ/combobox.h"
69 #elif defined(__WXMSW__)
70 #include "wx/msw/combobox.h"
71 #elif defined(__WXMOTIF__)
72 #include "wx/motif/combobox.h"
73 #elif defined(__WXGTK__)
74 #include "wx/gtk/combobox.h"
75 #elif defined(__WXMAC__)
76 #include "wx/mac/combobox.h"
77 #elif defined(__WXCOCOA__)
78 #include "wx/cocoa/combobox.h"
79 #elif defined(__WXPM__)
80 #include "wx/os2/combobox.h"
81 #endif
82
83 #endif // wxUSE_COMBOBOX
84
85 #endif
86 // _WX_COMBOBOX_H_BASE_