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:
@@ -470,7 +470,7 @@ public :
|
||||
long style,
|
||||
long extraStyle);
|
||||
|
||||
#ifdef wxOSX_USE_NATIVE_COMBOBOX
|
||||
#if wxOSX_USE_COCOA
|
||||
static wxWidgetImplType* CreateComboBox( wxWindowMac* wxpeer,
|
||||
wxWindowMac* parent,
|
||||
wxWindowID id,
|
||||
@@ -612,6 +612,31 @@ public :
|
||||
virtual wxSize GetBestSize() const { return wxDefaultSize; }
|
||||
};
|
||||
|
||||
// common interface for all implementations
|
||||
class WXDLLIMPEXP_CORE wxComboWidgetImpl
|
||||
|
||||
{
|
||||
public :
|
||||
wxComboWidgetImpl() {}
|
||||
|
||||
virtual ~wxComboWidgetImpl() {}
|
||||
|
||||
virtual int GetSelectedItem() const { return -1; };
|
||||
virtual void SetSelectedItem(int WXUNUSED(item)) {};
|
||||
|
||||
virtual int GetNumberOfItems() const { return -1; };
|
||||
|
||||
virtual void InsertItem(int WXUNUSED(pos), const wxString& WXUNUSED(item)) {}
|
||||
|
||||
virtual void RemoveItem(int WXUNUSED(pos)) {}
|
||||
|
||||
virtual void Clear() {}
|
||||
|
||||
virtual wxString GetStringAtIndex(int WXUNUSED(pos)) const { return wxEmptyString; }
|
||||
|
||||
virtual int FindString(const wxString& WXUNUSED(text)) const { return -1; }
|
||||
};
|
||||
|
||||
//
|
||||
// common interface for buttons
|
||||
//
|
||||
|
Reference in New Issue
Block a user