X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/22a5055f1f173fb140b222de69baba5022a63ed3..61f3e0f5c172147d5ba76fc7f099472c1e05aba4:/include/wx/arrstr.h diff --git a/include/wx/arrstr.h b/include/wx/arrstr.h index 4e559f0fd6..34011d8df7 100644 --- a/include/wx/arrstr.h +++ b/include/wx/arrstr.h @@ -15,16 +15,18 @@ #include "wx/defs.h" #include "wx/string.h" -WXDLLIMPEXP_BASE int wxStringSortAscending(wxString*, wxString*); -WXDLLIMPEXP_BASE int wxStringSortDescending(wxString*, wxString*); +WXDLLIMPEXP_BASE int wxCMPFUNC_CONV wxStringSortAscending(wxString*, wxString*); +WXDLLIMPEXP_BASE int wxCMPFUNC_CONV wxStringSortDescending(wxString*, wxString*); #if wxUSE_STL #include "wx/dynarray.h" -typedef int (*CMPFUNCwxString)(wxString*, wxString*); -WX_DECLARE_USER_EXPORTED_BASEARRAY(wxString, wxBaseArrayStringBase, - WXDLLIMPEXP_BASE); +typedef int (wxCMPFUNC_CONV *CMPFUNCwxString)(wxString*, wxString*); +typedef wxString _wxArraywxBaseArrayStringBase; +_WX_DECLARE_BASEARRAY_2(_wxArraywxBaseArrayStringBase, wxBaseArrayStringBase, + wxArray_SortFunction, + class WXDLLIMPEXP_BASE); WX_DEFINE_USER_EXPORTED_TYPEARRAY(wxString, wxArrayStringBase, wxBaseArrayStringBase, WXDLLIMPEXP_BASE); _WX_DEFINE_SORTED_TYPEARRAY_2(wxString, wxSortedArrayStringBase, @@ -36,6 +38,8 @@ class WXDLLIMPEXP_BASE wxArrayString : public wxArrayStringBase public: wxArrayString() { } wxArrayString(const wxArrayString& a) : wxArrayStringBase(a) { } + + int Index(const wxChar* sz, bool bCase = true, bool bFromEnd = false) const; }; class WXDLLIMPEXP_BASE wxSortedArrayString : public wxSortedArrayStringBase @@ -54,6 +58,8 @@ public: for ( size_t n = 0; n < src.size(); n++ ) Add(src[n]); } + + int Index(const wxChar* sz, bool bCase = true, bool bFromEnd = false) const; }; #else // if !wxUSE_STL @@ -77,11 +83,11 @@ class WXDLLIMPEXP_BASE wxArrayString { public: // type of function used by wxArrayString::Sort() - typedef int (*CompareFunction)(const wxString& first, + typedef int (wxCMPFUNC_CONV *CompareFunction)(const wxString& first, const wxString& second); // type of function used by wxArrayString::Sort(), for compatibility with // wxArray - typedef int (*CompareFunction2)(wxString* first, + typedef int (wxCMPFUNC_CONV *CompareFunction2)(wxString* first, wxString* second); // constructors and destructor