X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/150e31d2088687cbfbab548f9e98918f8683d9b5..761598d4e5b9f59bfc773e06f843c070d920f8b9:/src/univ/combobox.cpp?ds=sidebyside diff --git a/src/univ/combobox.cpp b/src/univ/combobox.cpp index 20a06a61d4..ba970585ed 100644 --- a/src/univ/combobox.cpp +++ b/src/univ/combobox.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: univ/combobox.cpp +// Name: src/univ/combobox.cpp // Purpose: wxComboControl and wxComboBox implementation // Author: Vadim Zeitlin // Modified by: @@ -17,10 +17,6 @@ // headers // ---------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "univcombobox.h" -#endif - #include "wx/wxprec.h" #ifdef __BORLANDC__ @@ -122,13 +118,15 @@ public: virtual ~wxComboListBox(); // implement wxComboPopup methods - virtual bool SetSelection(const wxString& value); - virtual void SetSelection(int n, bool select) - { wxListBox::SetSelection( n, select); }; + virtual bool SetSelection(const wxString& s); virtual wxControl *GetControl() { return this; } virtual void OnShow(); virtual wxCoord GetBestWidth() const; + // fix virtual function hiding + virtual void SetSelection(int n) { DoSetSelection(n, true); } + void SetSelection(int n, bool select) { DoSetSelection(n, select); } + protected: // we shouldn't return height too big from here virtual wxSize DoGetBestClientSize() const; @@ -574,7 +572,7 @@ void wxComboListBox::OnSelect(wxCommandEvent& event) event2.SetId(m_combo->GetId()); m_combo->ProcessEvent(event2); } - //else: ignore the events resultign from just moving the mouse initially + //else: ignore the events resulting from just moving the mouse initially } void wxComboListBox::OnShow() @@ -612,7 +610,7 @@ void wxComboListBox::OnMouseMove(wxMouseEvent& event) // while a wxComboListBox is shown, it always has capture, so if it doesn't // we're about to go away anyhow (normally this shouldn't happen at all, // but I don't put assert here as it just might do on other platforms and - // it doesn't break anythign anyhow) + // it doesn't break anything anyhow) if ( this == wxWindow::GetCapture() ) { if ( HitTest(event.GetPosition()) == wxHT_WINDOW_INSIDE ) @@ -763,7 +761,7 @@ long wxComboBox::GetInsertionPoint() const return GetText()->GetInsertionPoint(); } -long wxComboBox::GetLastPosition() const +wxTextPos wxComboBox::GetLastPosition() const { return GetText()->GetLastPosition(); } @@ -827,12 +825,12 @@ void wxComboBox::SetString(int n, const wxString& s) GetLBox()->SetString(n, s); } -int wxComboBox::FindString(const wxString& s) const +int wxComboBox::FindString(const wxString& s, bool bCase) const { - return GetLBox()->FindString(s); + return GetLBox()->FindString(s, bCase); } -void wxComboBox::Select(int n) +void wxComboBox::SetSelection(int n) { wxCHECK_RET( (n >= 0) && (n < GetCount()), _T("invalid index in wxComboBox::Select") ); @@ -892,7 +890,7 @@ wxClientData* wxComboBox::DoGetItemClientObject(int n) const bool wxComboBox::IsEditable() const { - return GetText() != NULL && (!HasFlag(wxCB_READONLY) || GetText()->IsEditable()); + return GetText() != NULL && (!HasFlag(wxCB_READONLY) || GetText()->IsEditable()); } void wxComboBox::Undo()