Get the OS X Cocoa native combobox building by having the native code compile if wxOSX_USE_NATIVE_COMBOBOX is defined. It must be explicitly enabled by adding that define to the build flags as the native implementation is mostly just stubs right now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63053 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Kevin Ollivier
2010-01-04 01:57:42 +00:00
parent da8b1d4b3b
commit f941a30bef
6 changed files with 109 additions and 394 deletions

View File

@@ -30,9 +30,11 @@ class WXDLLIMPEXP_CORE wxComboBox : public wxControl, public wxComboBoxBase
public:
virtual ~wxComboBox();
#ifndef wxOSX_USE_NATIVE_COMBOBOX
// forward these functions to all subcontrols
virtual bool Enable(bool enable = true);
virtual bool Show(bool show = true);
#endif
// callback functions
virtual void DelegateTextChanged( const wxString& value );
@@ -129,9 +131,11 @@ class WXDLLIMPEXP_CORE wxComboBox : public wxControl, public wxComboBoxBase
virtual bool OSXHandleClicked( double timestampsec );
#ifndef wxOSX_USE_NATIVE_COMBOBOX
wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST
WX_DECLARE_CONTROL_CONTAINER();
#endif
protected:
// common part of all ctors
@@ -145,9 +149,11 @@ protected:
virtual wxString DoGetValue() const;
virtual wxWindow *GetEditableWindow() { return this; }
#ifndef wxOSX_USE_NATIVE_COMBOBOX
// override the base class virtuals involved in geometry calculations
virtual wxSize DoGetBestSize() const;
virtual void DoMoveWindow(int x, int y, int width, int height);
#endif
virtual int DoInsertItems(const wxArrayStringsAdapter& items,
unsigned int pos,
@@ -164,7 +170,9 @@ protected:
wxComboBoxText* m_text;
wxComboBoxChoice* m_choice;
#ifndef wxOSX_USE_NATIVE_COMBOBOX
DECLARE_EVENT_TABLE()
#endif
};
#endif // _WX_COMBOBOX_H_