+void wxArrayString::Sort(CompareFunction compareFunction)
+{
+ START_SORT();
+
+ wxASSERT( !gs_compareFunction ); // must have been reset to NULL
+ gs_compareFunction = compareFunction;
+
+ DoSort();
+
+ END_SORT();
+}
+
+void wxArrayString::Sort(bool reverseOrder)
+{
+ START_SORT();
+
+ wxASSERT( !gs_compareFunction ); // must have been reset to NULL
+ gs_sortAscending = !reverseOrder;
+
+ DoSort();
+
+ END_SORT();
+}
+
+void wxArrayString::DoSort()
+{
+ // just sort the pointers using qsort() - of course it only works because
+ // wxString() *is* a pointer to its data
+ qsort(m_pItems, m_nCount, sizeof(wxChar *), wxStringCompareFunction);
+}
+
+// ============================================================================
+// MBConv
+// ============================================================================
+
+WXDLLEXPORT_DATA(wxMBConv) wxConv_libc;
+
+// ----------------------------------------------------------------------------
+// standard libc conversion
+// ----------------------------------------------------------------------------
+
+size_t wxMBConv::MB2WC(wchar_t *buf, const char *psz, size_t n) const
+{
+ return wxMB2WC(buf, psz, n);
+}
+
+size_t wxMBConv::WC2MB(char *buf, const wchar_t *psz, size_t n) const
+{
+ return wxWC2MB(buf, psz, n);
+}
+
+// ----------------------------------------------------------------------------
+// UTF-7
+// ----------------------------------------------------------------------------
+
+class wxMBConv_UTF7
+{
+public:
+ virtual size_t MB2WC(wchar_t *buf, const char *psz, size_t n) const;
+ virtual size_t WC2MB(char *buf, const wchar_t *psz, size_t n) const;
+};
+
+// WXDLLEXPORT_DATA(wxMBConv_UTF7) wxConv_UTF7;
+WXDLLEXPORT_DATA(wxMBConv) wxConv_UTF7;
+
+// TODO: write actual implementations of UTF-7 here
+size_t wxMBConv_UTF7::MB2WC(wchar_t *buf, const char *psz, size_t n) const
+{
+ return 0;
+}
+
+size_t wxMBConv_UTF7::WC2MB(char *buf, const wchar_t *psz, size_t n) const
+{
+ return 0;
+}
+
+// ----------------------------------------------------------------------------
+// UTF-8
+// ----------------------------------------------------------------------------
+
+class wxMBConv_UTF8
+{
+public:
+ virtual size_t MB2WC(wchar_t *buf, const char *psz, size_t n) const;
+ virtual size_t WC2MB(char *buf, const wchar_t *psz, size_t n) const;
+};
+
+// WXDLLEXPORT_DATA(wxMBConv_UTF8) wxConv_UTF8;
+WXDLLEXPORT_DATA(wxMBConv) wxConv_UTF8;
+
+// TODO: write actual implementations of UTF-8 here
+size_t wxMBConv_UTF8::MB2WC(wchar_t *buf, const char *psz, size_t n) const
+{
+ return wxMB2WC(buf, psz, n);
+}