X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bd0a76e228b5ce47c648c2e52857e77cf79e6ae5..4791fafb6d69dda73abc0a92c6a9ab19ce13801a:/src/common/radiocmn.cpp?ds=sidebyside diff --git a/src/common/radiocmn.cpp b/src/common/radiocmn.cpp index 1c95257632..47f15e5b2c 100644 --- a/src/common/radiocmn.cpp +++ b/src/common/radiocmn.cpp @@ -38,6 +38,18 @@ // implementation // ============================================================================ +int wxRadioBoxBase::FindString(const wxString& s) const +{ + int count = GetCount(); + for ( int n = 0; n < count; n++ ) + { + if ( GetString(n) == s ) + return n; + } + + return wxNOT_FOUND; +} + int wxRadioBoxBase::GetNextItem(int item, wxDirection dir, long style) const { int count = GetCount(), @@ -134,6 +146,8 @@ int wxRadioBoxBase::GetNextItem(int item, wxDirection dir, long style) const return item; } +#if WXWIN_COMPATIBILITY_2_4 + // these functions are deprecated and don't do anything int wxRadioBoxBase::GetNumberOfRowsOrCols() const { @@ -144,5 +158,26 @@ void wxRadioBoxBase::SetNumberOfRowsOrCols(int WXUNUSED(n)) { } +#endif // WXWIN_COMPATIBILITY_2_4 + +#if WXWIN_COMPATIBILITY_2_2 + +int wxRadioBoxBase::Number() const +{ + return GetCount(); +} + +wxString wxRadioBoxBase::GetLabel(int n) const +{ + return GetString(n); +} + +void wxRadioBoxBase::SetLabel(int n, const wxString& label) +{ + SetString(n, label); +} + +#endif // WXWIN_COMPATIBILITY_2_2 + #endif // wxUSE_RADIOBOX