removed multiple duplicate copies (with subtly different behaviour) of SetStringSelection(); left only one of them in wxItemContainer (and another one in wxRadioBoxBase, to be removed)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32000 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-02-13 16:29:31 +00:00
parent 7f461f8a05
commit 64fa6f167e
17 changed files with 23 additions and 87 deletions

View File

@@ -80,10 +80,6 @@ wxString wxComboBox::GetStringSelection()
return wxEmptyString;
}
void wxComboBox::SetStringSelection(const wxString& selection)
{
}
void wxComboBox::Clear()
{
}
@@ -108,7 +104,7 @@ void wxComboBox::SetString(int, const wxString&)
int wxComboBox::FindString(const wxString&) const
{
return 0;
return wxNOT_FOUND;
}
int wxComboBox::GetSelection() const

View File

@@ -43,21 +43,6 @@ wxChoiceBase::~wxChoiceBase()
// this destructor is required for Darwin
}
// ----------------------------------------------------------------------------
// selection
// ----------------------------------------------------------------------------
bool wxChoiceBase::SetStringSelection(const wxString& s)
{
int sel = FindString(s);
wxCHECK_MSG( sel != -1, false,
wxT("invalid string in wxChoice::SetStringSelection") );
Select(sel);
return true;
}
// ----------------------------------------------------------------------------
// misc
// ----------------------------------------------------------------------------

View File

@@ -58,6 +58,17 @@ wxString wxItemContainer::GetStringSelection() const
return s;
}
bool wxItemContainer::SetStringSelection(const wxString& s)
{
const int sel = FindString(s);
if ( sel == wxNOT_FOUND )
return false;
Select(sel);
return true;
}
wxArrayString wxItemContainer::GetStrings() const
{
wxArrayString result ;

View File

@@ -644,16 +644,6 @@ void wxComboBox::SetSelection( int n )
EnableEvents();
}
bool wxComboBox::SetStringSelection( const wxString &string )
{
wxCHECK_MSG( m_widget != NULL, false, wxT("invalid combobox") );
int res = FindString( string );
if (res == -1) return false;
SetSelection( res );
return true;
}
wxString wxComboBox::GetValue() const
{
GtkEntry *entry = GTK_ENTRY( GTK_COMBO(m_widget)->entry );

View File

@@ -644,16 +644,6 @@ void wxComboBox::SetSelection( int n )
EnableEvents();
}
bool wxComboBox::SetStringSelection( const wxString &string )
{
wxCHECK_MSG( m_widget != NULL, false, wxT("invalid combobox") );
int res = FindString( string );
if (res == -1) return false;
SetSelection( res );
return true;
}
wxString wxComboBox::GetValue() const
{
GtkEntry *entry = GTK_ENTRY( GTK_COMBO(m_widget)->entry );

View File

@@ -565,18 +565,6 @@ wxString wxComboBox::GetStringSelection() const
return wxEmptyString;
}
bool wxComboBox::SetStringSelection(const wxString& sel)
{
int s = FindString (sel);
if (s > -1)
{
SetSelection (s);
return true;
}
else
return false;
}
void wxComboBox::SetString(int n, const wxString& s)
{
m_choice->SetString( n , s ) ;

View File

@@ -721,18 +721,6 @@ wxString wxComboBox::GetStringSelection() const
#endif
}
bool wxComboBox::SetStringSelection(const wxString& sel)
{
int s = FindString (sel);
if (s > -1)
{
SetSelection (s);
return true;
}
else
return false;
}
void wxComboBox::SetString(int n, const wxString& s)
{
#if USE_HICOMBOBOX

View File

@@ -511,18 +511,6 @@ wxString wxComboBox::GetStringSelection() const
return wxEmptyString;
}
bool wxComboBox::SetStringSelection(const wxString& sel)
{
int s = FindString (sel);
if (s > -1)
{
SetSelection (s);
return true;
}
else
return false;
}
void wxComboBox::SetString(int n, const wxString& s)
{
m_choice->SetString( n , s ) ;