X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d33e45f134004bdb8199de60d60a251569bbed96..ad05cdb74c4a1e632b6e9c5e56f463c6d798457b:/src/osx/carbon/combobox.cpp diff --git a/src/osx/carbon/combobox.cpp b/src/osx/carbon/combobox.cpp index a3a419dc6e..34aba5b850 100644 --- a/src/osx/carbon/combobox.cpp +++ b/src/osx/carbon/combobox.cpp @@ -11,7 +11,7 @@ #include "wx/wxprec.h" -#if wxUSE_COMBOBOX +#if wxUSE_COMBOBOX && wxOSX_USE_CARBON #include "wx/combobox.h" @@ -59,10 +59,6 @@ public: m_cb = cb; } - void ForwardEnableTextChangedEvents(bool enable) - { - EnableTextChangedEvents(enable); - } protected: void OnChar( wxKeyEvent& event ) { @@ -150,7 +146,7 @@ protected: event.Skip(); } - + private: wxComboBox *m_cb; @@ -292,7 +288,7 @@ void wxComboBox::DoMoveWindow(int x, int y, int width, int height) m_text->SetSize(TEXTFOCUSBORDER, TEXTFOCUSBORDER, wText, -1); wxSize tSize = m_text->GetSize(); wxSize cSize = m_choice->GetSize(); - + int yOffset = ( tSize.y + 2 * TEXTFOCUSBORDER - cSize.y ) / 2; // put it at an inset of 1 to have outer area shadows drawn as well @@ -402,7 +398,7 @@ bool wxComboBox::Create(wxWindow *parent, } void wxComboBox::EnableTextChangedEvents(bool enable) -{ +{ if ( m_text ) m_text->ForwardEnableTextChangedEvents(enable); } @@ -686,4 +682,12 @@ bool wxComboBox::OSXHandleClicked( double WXUNUSED(timestampsec) ) return true ; } -#endif // wxUSE_COMBOBOX +wxTextWidgetImpl* wxComboBox::GetTextPeer() const +{ + if (m_text) + return m_text->GetTextPeer(); + + return NULL; +} + +#endif // wxUSE_COMBOBOX && wxOSX_USE_CARBON