Implement native OS X ComboBox for OS X Cocoa, and implement wxTextEntry methods to share code between wxComboBox and wxTextCtrl.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63105 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#ifndef _WX_OSX_COCOA_PRIVATE_TEXTIMPL_H_
|
||||
#define _WX_OSX_COCOA_PRIVATE_TEXTIMPL_H_
|
||||
|
||||
#include "wx/combobox.h"
|
||||
#include "wx/osx/private.h"
|
||||
|
||||
// implementation exposed, so that search control can pull it
|
||||
@@ -19,7 +20,7 @@
|
||||
class wxNSTextFieldControl : public wxWidgetCocoaImpl, public wxTextWidgetImpl
|
||||
{
|
||||
public :
|
||||
wxNSTextFieldControl( wxTextCtrl *wxPeer, WXWidget w );
|
||||
wxNSTextFieldControl( wxWindow *wxPeer, WXWidget w );
|
||||
virtual ~wxNSTextFieldControl();
|
||||
|
||||
virtual wxString GetStringValue() const ;
|
||||
@@ -69,4 +70,27 @@ protected:
|
||||
NSTextView* m_textView;
|
||||
};
|
||||
|
||||
class wxNSComboBoxControl : public wxNSTextFieldControl, public wxComboWidgetImpl
|
||||
{
|
||||
public :
|
||||
wxNSComboBoxControl( wxWindow *wxPeer, WXWidget w );
|
||||
virtual ~wxNSComboBoxControl();
|
||||
|
||||
virtual int GetSelectedItem() const;
|
||||
virtual void SetSelectedItem(int item);
|
||||
|
||||
virtual int GetNumberOfItems() const;
|
||||
|
||||
virtual void InsertItem(int pos, const wxString& item);
|
||||
virtual void RemoveItem(int pos);
|
||||
|
||||
virtual void Clear();
|
||||
|
||||
virtual wxString GetStringAtIndex(int pos) const;
|
||||
|
||||
virtual int FindString(const wxString& text) const;
|
||||
private:
|
||||
NSComboBox* m_comboBox;
|
||||
};
|
||||
|
||||
#endif // _WX_OSX_COCOA_PRIVATE_TEXTIMPL_H_
|
||||
|
Reference in New Issue
Block a user