]> git.saurik.com Git - wxWidgets.git/blame - include/wx/cocoa/combobox.h
Added RTL functions missing from WinCE to wxchar.h/cpp
[wxWidgets.git] / include / wx / cocoa / combobox.h
CommitLineData
421a8431
DE
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/cocoa/combobox.h
3// Purpose: wxComboBox class
4// Author: David Elliott
5// Modified by:
6// Created: 2003/07/14
7// RCS-ID: $Id$
8// Copyright: (c) 2003 David Elliott
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef __WX_COCOA_COMBOBOX_H__
13#define __WX_COCOA_COMBOBOX_H__
14
15#include "wx/textctrl.h"
16
17//#include "wx/cocoa/NSTableView.h"
18
19// ========================================================================
20// wxComboBox
21// ========================================================================
22class WXDLLEXPORT wxComboBox: public wxTextCtrl, public wxComboBoxBase //, protected wxCocoaNSTableView
23{
24 DECLARE_DYNAMIC_CLASS(wxComboBox)
25 DECLARE_EVENT_TABLE()
26// WX_DECLARE_COCOA_OWNER(NSComboBox,NSTextField,NSView)
27// ------------------------------------------------------------------------
28// initialization
29// ------------------------------------------------------------------------
30public:
31 wxComboBox() { }
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,
37 long style = 0,
38 const wxValidator& validator = wxDefaultValidator,
39 const wxString& name = wxComboBoxNameStr)
40 {
41 Create(parent, winid, value, pos, size, n, choices, style, validator, name);
42 }
43
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,
49 long style = 0,
50 const wxValidator& validator = wxDefaultValidator,
51 const wxString& name = wxComboBoxNameStr);
52 virtual ~wxComboBox();
53
54// ------------------------------------------------------------------------
55// Cocoa callbacks
56// ------------------------------------------------------------------------
57protected:
58// ------------------------------------------------------------------------
59// Implementation
60// ------------------------------------------------------------------------
61public:
62 // wxCombobox methods
63 virtual void SetSelection(int);
64 // Overlapping methods
65 virtual wxString GetStringSelection();
66 virtual void SetStringSelection(wxString& selection);
67 // wxItemContainer
68 virtual void Clear();
69 virtual void Delete(int);
70 virtual int GetCount() const;
71 virtual wxString GetString(int) const;
72 virtual void SetString(int, const wxString&);
73 virtual int FindString(const wxString&) const;
74 virtual void Select(int) {}
75 virtual int GetSelection() const;
76 virtual int DoAppend(const wxString&);
77 virtual int DoInsert(const wxString&, int);
78 virtual void DoSetItemClientData(int, void*);
79 virtual void* DoGetItemClientData(int) const;
80 virtual void DoSetItemClientObject(int, wxClientData*);
81 virtual wxClientData* DoGetItemClientObject(int) const;
82 // wxComboBoxBase pure virtuals
83 virtual wxString GetValue() const
84 { return wxTextCtrl::GetValue(); }
85 virtual void SetValue(const wxString& value)
86 { return wxTextCtrl::SetValue(value); }
87 virtual void Cut() { wxTextCtrl::Cut(); }
88 virtual void Copy() { wxTextCtrl::Copy(); }
89 virtual void Paste() { wxTextCtrl::Paste(); }
90 virtual void SetInsertionPoint(long pos)
91 { wxTextCtrl::SetInsertionPoint(pos); }
92 virtual void SetInsertionPointEnd()
93 { wxTextCtrl::SetInsertionPointEnd(); }
94 virtual long GetInsertionPoint() const
95 { return wxTextCtrl::GetInsertionPoint(); }
96 virtual long GetLastPosition() const
97 { return wxTextCtrl::GetLastPosition(); }
98 virtual void Replace(long from, long to, const wxString& value)
99 { wxTextCtrl::Replace(from,to,value); }
100 virtual void SetSelection(long from, long to)
101 { wxTextCtrl::SetSelection(from,to); }
102 virtual void SetEditable(bool editable)
103 { wxTextCtrl::SetEditable(editable); }
104};
105
106#endif // __WX_COCOA_COMBOBOX_H__