]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/cocoa/combobox.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cocoa/combobox.h
3 // Purpose: wxComboBox class
4 // Author: David Elliott
8 // Copyright: (c) 2003 David Elliott
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef __WX_COCOA_COMBOBOX_H__
13 #define __WX_COCOA_COMBOBOX_H__
15 #include "wx/textctrl.h"
17 //#include "wx/cocoa/NSTableView.h"
19 // ========================================================================
21 // ========================================================================
22 class WXDLLEXPORT wxComboBox
: public wxTextCtrl
, public wxComboBoxBase
//, protected wxCocoaNSTableView
24 DECLARE_DYNAMIC_CLASS(wxComboBox
)
26 // WX_DECLARE_COCOA_OWNER(NSComboBox,NSTextField,NSView)
27 // ------------------------------------------------------------------------
29 // ------------------------------------------------------------------------
32 wxComboBox(wxWindow
*parent
, wxWindowID winid
,
33 const wxString
& value
= wxEmptyString
,
34 const wxPoint
& pos
= wxDefaultPosition
,
35 const wxSize
& size
= wxDefaultSize
,
36 int n
= 0, const wxString choices
[] = NULL
,
38 const wxValidator
& validator
= wxDefaultValidator
,
39 const wxString
& name
= wxComboBoxNameStr
)
41 Create(parent
, winid
, value
, pos
, size
, n
, choices
, style
, validator
, name
);
43 wxComboBox(wxWindow
*parent
, wxWindowID winid
,
44 const wxString
& value
,
47 const wxArrayString
& choices
,
49 const wxValidator
& validator
= wxDefaultValidator
,
50 const wxString
& name
= wxComboBoxNameStr
)
52 Create(parent
, winid
, value
, pos
, size
, choices
, style
,
56 bool Create(wxWindow
*parent
, wxWindowID winid
,
57 const wxString
& value
= wxEmptyString
,
58 const wxPoint
& pos
= wxDefaultPosition
,
59 const wxSize
& size
= wxDefaultSize
,
60 int n
= 0, const wxString choices
[] = NULL
,
62 const wxValidator
& validator
= wxDefaultValidator
,
63 const wxString
& name
= wxComboBoxNameStr
);
64 bool Create(wxWindow
*parent
, wxWindowID winid
,
65 const wxString
& value
,
68 const wxArrayString
& choices
,
70 const wxValidator
& validator
= wxDefaultValidator
,
71 const wxString
& name
= wxComboBoxNameStr
);
72 virtual ~wxComboBox();
74 // ------------------------------------------------------------------------
76 // ------------------------------------------------------------------------
78 // ------------------------------------------------------------------------
80 // ------------------------------------------------------------------------
83 virtual void SetSelection(int);
84 // Overlapping methods
85 virtual wxString
GetStringSelection();
87 virtual void SetStringSelection(const wxString
& selection
);
90 virtual void Delete(int);
91 virtual int GetCount() const;
92 virtual wxString
GetString(int) const;
93 virtual void SetString(int, const wxString
&);
94 virtual int FindString(const wxString
&) const;
95 virtual void Select(int) {}
96 virtual int GetSelection() const;
97 virtual int DoAppend(const wxString
&);
98 virtual int DoInsert(const wxString
&, int);
99 virtual void DoSetItemClientData(int, void*);
100 virtual void* DoGetItemClientData(int) const;
101 virtual void DoSetItemClientObject(int, wxClientData
*);
102 virtual wxClientData
* DoGetItemClientObject(int) const;
103 // wxComboBoxBase pure virtuals
104 virtual wxString
GetValue() const
105 { return wxTextCtrl::GetValue(); }
106 virtual void SetValue(const wxString
& value
)
107 { return wxTextCtrl::SetValue(value
); }
108 virtual void Cut() { wxTextCtrl::Cut(); }
109 virtual void Copy() { wxTextCtrl::Copy(); }
110 virtual void Paste() { wxTextCtrl::Paste(); }
111 virtual void SetInsertionPoint(long pos
)
112 { wxTextCtrl::SetInsertionPoint(pos
); }
113 virtual void SetInsertionPointEnd()
114 { wxTextCtrl::SetInsertionPointEnd(); }
115 virtual long GetInsertionPoint() const
116 { return wxTextCtrl::GetInsertionPoint(); }
117 virtual long GetLastPosition() const
118 { return wxTextCtrl::GetLastPosition(); }
119 virtual void Replace(long from
, long to
, const wxString
& value
)
120 { wxTextCtrl::Replace(from
,to
,value
); }
121 virtual void SetSelection(long from
, long to
)
122 { wxTextCtrl::SetSelection(from
,to
); }
123 virtual void SetEditable(bool editable
)
124 { wxTextCtrl::SetEditable(editable
); }
127 #endif // __WX_COCOA_COMBOBOX_H__