]>
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
);
44 bool Create(wxWindow
*parent
, wxWindowID winid
,
45 const wxString
& value
= wxEmptyString
,
46 const wxPoint
& pos
= wxDefaultPosition
,
47 const wxSize
& size
= wxDefaultSize
,
48 int n
= 0, const wxString choices
[] = NULL
,
50 const wxValidator
& validator
= wxDefaultValidator
,
51 const wxString
& name
= wxComboBoxNameStr
);
52 virtual ~wxComboBox();
54 // ------------------------------------------------------------------------
56 // ------------------------------------------------------------------------
58 // ------------------------------------------------------------------------
60 // ------------------------------------------------------------------------
63 virtual void SetSelection(int);
64 // Overlapping methods
65 virtual wxString
GetStringSelection();
67 virtual void SetStringSelection(const wxString
& selection
);
70 virtual void Delete(int);
71 virtual int GetCount() const;
72 virtual wxString
GetString(int) const;
73 virtual void SetString(int, const wxString
&);
74 virtual int FindString(const wxString
&) const;
75 virtual void Select(int) {}
76 virtual int GetSelection() const;
77 virtual int DoAppend(const wxString
&);
78 virtual int DoInsert(const wxString
&, int);
79 virtual void DoSetItemClientData(int, void*);
80 virtual void* DoGetItemClientData(int) const;
81 virtual void DoSetItemClientObject(int, wxClientData
*);
82 virtual wxClientData
* DoGetItemClientObject(int) const;
83 // wxComboBoxBase pure virtuals
84 virtual wxString
GetValue() const
85 { return wxTextCtrl::GetValue(); }
86 virtual void SetValue(const wxString
& value
)
87 { return wxTextCtrl::SetValue(value
); }
88 virtual void Cut() { wxTextCtrl::Cut(); }
89 virtual void Copy() { wxTextCtrl::Copy(); }
90 virtual void Paste() { wxTextCtrl::Paste(); }
91 virtual void SetInsertionPoint(long pos
)
92 { wxTextCtrl::SetInsertionPoint(pos
); }
93 virtual void SetInsertionPointEnd()
94 { wxTextCtrl::SetInsertionPointEnd(); }
95 virtual long GetInsertionPoint() const
96 { return wxTextCtrl::GetInsertionPoint(); }
97 virtual long GetLastPosition() const
98 { return wxTextCtrl::GetLastPosition(); }
99 virtual void Replace(long from
, long to
, const wxString
& value
)
100 { wxTextCtrl::Replace(from
,to
,value
); }
101 virtual void SetSelection(long from
, long to
)
102 { wxTextCtrl::SetSelection(from
,to
); }
103 virtual void SetEditable(bool editable
)
104 { wxTextCtrl::SetEditable(editable
); }
107 #endif // __WX_COCOA_COMBOBOX_H__