X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c84030e020e56735cb4b7c1534e99d21a8bb48c0..b02dd12239c8a59b9a545d9fcb04974f8ad02c6b:/include/wx/osx/combobox.h diff --git a/include/wx/osx/combobox.h b/include/wx/osx/combobox.h index bf1b20861b..05c14a96aa 100644 --- a/include/wx/osx/combobox.h +++ b/include/wx/osx/combobox.h @@ -16,8 +16,6 @@ #include "wx/choice.h" #include "wx/textctrl.h" -WXDLLIMPEXP_DATA_CORE(extern const char) wxComboBoxNameStr[]; - WX_DEFINE_ARRAY( char * , wxComboBoxDataArray ) ; // forward declaration of private implementation classes @@ -27,7 +25,14 @@ class wxComboBoxChoice; class wxComboWidgetImpl; // Combobox item -class WXDLLIMPEXP_CORE wxComboBox : public wxControl, public wxComboBoxBase +class WXDLLIMPEXP_CORE wxComboBox : + public wxWindowWithItems< +#if wxOSX_USE_CARBON + wxNavigationEnabled, +#else + wxControl, +#endif + wxComboBoxBase> { DECLARE_DYNAMIC_CLASS(wxComboBox) @@ -44,7 +49,7 @@ class WXDLLIMPEXP_CORE wxComboBox : public wxControl, public wxComboBoxBase virtual void DelegateTextChanged( const wxString& value ); virtual void DelegateChoice( const wxString& value ); - wxComboBox() { Init(); } + wxComboBox() { } wxComboBox(wxWindow *parent, wxWindowID id, const wxString& value = wxEmptyString, @@ -55,7 +60,6 @@ class WXDLLIMPEXP_CORE wxComboBox : public wxControl, public wxComboBoxBase const wxValidator& validator = wxDefaultValidator, const wxString& name = wxComboBoxNameStr) { - Init(); Create(parent, id, value, pos, size, n, choices, style, validator, name); } @@ -68,7 +72,6 @@ class WXDLLIMPEXP_CORE wxComboBox : public wxControl, public wxComboBoxBase const wxValidator& validator = wxDefaultValidator, const wxString& name = wxComboBoxNameStr) { - Init(); Create(parent, id, value, pos, size, choices, style, validator, name); } @@ -100,7 +103,7 @@ class WXDLLIMPEXP_CORE wxComboBox : public wxControl, public wxComboBoxBase virtual void SetString(unsigned int n, const wxString& s); virtual unsigned int GetCount() const; - + // these methods are provided by wxTextEntry for the native impl. #if wxOSX_USE_CARBON // Text field functions @@ -132,31 +135,24 @@ class WXDLLIMPEXP_CORE wxComboBox : public wxControl, public wxComboBoxBase virtual bool CanRedo() const; virtual wxClientDataType GetClientDataType() const; -#endif + virtual wxTextWidgetImpl* GetTextPeer() const; +#endif // wxOSX_USE_CARBON + +#if wxOSX_USE_COCOA + virtual void Popup(); + virtual void Dismiss(); +#endif // wxOSX_USE_COCOA // osx specific event handling common for all osx-ports virtual bool OSXHandleClicked( double timestampsec ); -#if wxOSX_USE_CARBON - wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST - - WX_DECLARE_CONTROL_CONTAINER(); -#endif - - // only used by the native Cocoa combobox, but we must define it everywhere - // to maintain the wxTextEntry abstraction. - virtual wxTextWidgetImpl * GetTextPeer() const; - #if wxOSX_USE_COCOA wxComboWidgetImpl* GetComboPeer() const; #endif protected: - // common part of all ctors - void Init(); - // List functions virtual void DoDeleteOneItem(unsigned int n); virtual void DoClear(); @@ -167,9 +163,9 @@ protected: #endif virtual wxWindow *GetEditableWindow() { return this; } -#if wxOSX_USE_CARBON // override the base class virtuals involved in geometry calculations virtual wxSize DoGetBestSize() const; +#if wxOSX_USE_CARBON virtual void DoMoveWindow(int x, int y, int width, int height); #endif @@ -191,10 +187,6 @@ protected: wxComboBoxChoice* m_choice; wxComboBoxDataArray m_datas; - -#if wxOSX_USE_CARBON - DECLARE_EVENT_TABLE() -#endif }; #endif // _WX_COMBOBOX_H_