X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4a5d352f8a257854a05087cad5ed700aed116d2f..a55d039a23c730975a8b5efedab6b4940fb4009b:/src/mac/carbon/combobox.cpp diff --git a/src/mac/carbon/combobox.cpp b/src/mac/carbon/combobox.cpp index 40caccafc8..d1cc089a88 100644 --- a/src/mac/carbon/combobox.cpp +++ b/src/mac/carbon/combobox.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: combobox.cpp +// Name: src/mac/carbon/combobox.cpp // Purpose: wxComboBox class // Author: Stefan Csomor // Modified by: @@ -9,10 +9,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "combobox.h" -#endif - #include "wx/wxprec.h" #if wxUSE_COMBOBOX @@ -22,9 +18,7 @@ #include "wx/menu.h" #include "wx/mac/uma.h" -#if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxComboBox, wxControl) -#endif // composite combobox implementation by Dan "Bud" Keith bud@otsys.com @@ -91,7 +85,7 @@ protected: if (m_cb->GetEventHandler()->ProcessEvent(kevt)) // If the event was handled and not skipped then we're done return; - + if ( event.GetKeyCode() == WXK_RETURN ) { wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_cb->GetId()); @@ -142,14 +136,14 @@ protected: if (! m_cb->GetEventHandler()->ProcessEvent(event)) event.Skip(); } - + void OnText( wxCommandEvent& event ) { event.SetEventObject(m_cb); event.SetId(m_cb->GetId()); if (! m_cb->GetEventHandler()->ProcessEvent(event)) event.Skip(); - } + } private: wxComboBox *m_cb; @@ -297,6 +291,9 @@ bool wxComboBox::Enable(bool enable) if ( !wxControl::Enable(enable) ) return false; + if (m_text) + m_text->Enable(enable); + return true; } @@ -384,7 +381,7 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id, SetBestSize(size); // Needed because it is a wxControlWithItems SetStringSelection(value); - + return true; } @@ -571,9 +568,9 @@ void wxComboBox::SetSelection(int n) } } -int wxComboBox::FindString(const wxString& s) const +int wxComboBox::FindString(const wxString& s, bool bCase) const { - return m_choice->FindString( s ); + return m_choice->FindString( s, bCase ); } wxString wxComboBox::GetString(int n) const