// Created: 07/07/03
// RCS-ID: $Id$
// Copyright: (c) 2003 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
-// Licence: wxWidgets licence
+// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_ARRSTR_H
_WX_DECLARE_BASEARRAY_2(_wxArraywxBaseArrayStringBase, wxBaseArrayStringBase,
wxArray_SortFunction<wxString>,
class WXDLLIMPEXP_BASE);
-WX_DEFINE_USER_EXPORTED_TYPEARRAY(wxString, wxArrayStringBase,
+WX_DEFINE_USER_EXPORTED_TYPEARRAY(wxString, wxArrayStringBase,
wxBaseArrayStringBase, WXDLLIMPEXP_BASE);
-_WX_DEFINE_SORTED_TYPEARRAY_2(wxString, wxSortedArrayStringBase,
+_WX_DEFINE_SORTED_TYPEARRAY_2(wxString, wxSortedArrayStringBase,
wxBaseArrayStringBase, = wxStringSortAscending,
class WXDLLIMPEXP_BASE, CMPFUNCwxString);
class WXDLLIMPEXP_BASE wxArrayString : public wxArrayStringBase
{
public:
+ // type of function used by wxArrayString::Sort()
+ typedef int (wxCMPFUNC_CONV *CompareFunction)(const wxString& first,
+ const wxString& second);
+
wxArrayString() { }
wxArrayString(const wxArrayString& a) : wxArrayStringBase(a) { }
int Index(const wxChar* sz, bool bCase = true, bool bFromEnd = false) const;
+
+ void Sort(bool reverseOrder = false);
+ void Sort(CompareFunction function);
+ void Sort(CMPFUNCwxString function) { wxArrayStringBase::Sort(function); }
};
class WXDLLIMPEXP_BASE wxSortedArrayString : public wxSortedArrayStringBase
// once you are done with it. Will return NULL if the
// ArrayString was empty.
#if WXWIN_COMPATIBILITY_2_4
- wxString* GetStringArray() const;
+ wxDEPRECATED( wxString* GetStringArray() const );
#endif
// item management
void Remove(const wxChar *sz);
// remove item by index
#if WXWIN_COMPATIBILITY_2_4
- void Remove(size_t nIndex, size_t nRemove = 1) { RemoveAt(nIndex, nRemove); }
+ wxDEPRECATED( void Remove(size_t nIndex, size_t nRemove = 1) );
#endif
void RemoveAt(size_t nIndex, size_t nRemove = 1);
typedef int difference_type;
typedef size_t size_type;
- // FIXME: same in dynarray.h
+ // TODO: this code duplicates the one in dynarray.h
class reverse_iterator
{
typedef wxString value_type;