- Fixed wxDateTime::SetToWeekDayInSameWeek(Sun, Monday_First).
- Added WXK_SPECIAL keycodes for special hardware buttons.
- Fixed bug with wxFile::Seek(-1, wxFromCurrent)
+- Added wxString/C array constructors to wxArrayString
All (GUI):
\func{}{wxArrayString}{\void}
-\func{}{wxArrayString}{\param{const wxArrayString\&}{ array}}
+Default constructor.
-Default and copy constructors.
+\func{}{wxArrayString}{\param{const wxArrayString\&}{ array}}
-Note that when an array is assigned to a sorted array, its contents is
+Copy constructor. Note that when an array is assigned to a sorted array, its contents is
automatically sorted during construction.
+\func{}{wxArrayString}{\param{size\_t}{ sz}, \param{const wxChar**}{ arr}}
+
+Constructor from a C string array. Pass a size {\it sz} and array {\it arr}.
+
+\func{}{wxArrayString}{\param{size\_t}{ sz}, \param{const wxString*}{ arr}}
+
+Constructor from a wxString array. Pass a size {\it sz} and array {\it arr}.
+
\membersection{wxArrayString::\destruct{wxArrayString}}\label{wxarraystringdtor}
\func{}{\destruct{wxArrayString}}{}
wxArrayString() { }
wxArrayString(const wxArrayString& a) : wxArrayStringBase(a) { }
+ wxArrayString(size_t sz, const wxChar** a);
+ wxArrayString(size_t sz, const wxString* a);
int Index(const wxChar* sz, bool bCase = true, bool bFromEnd = false) const;
// of course, using explicit would be even better - if all compilers
// supported it...
wxArrayString(int autoSort) { Init(autoSort != 0); }
+ // C string array ctor
+ wxArrayString(size_t sz, const wxChar** a);
+ // wxString string array ctor
+ wxArrayString(size_t sz, const wxString* a);
// copy ctor
wxArrayString(const wxArrayString& array);
// assignment operator
#include "wx/arrstr.h"
+wxArrayString::wxArrayString(size_t sz, const wxChar** a)
+{
+#if !wxUSE_STL
+ Init(false);
+#endif
+ for (size_t i=0; i < sz; i++)
+ Add(a[i]);
+}
+
+wxArrayString::wxArrayString(size_t sz, const wxString* a)
+{
+#if !wxUSE_STL
+ Init(false);
+#endif
+ for (size_t i=0; i < sz; i++)
+ Add(a[i]);
+}
+
#if !wxUSE_STL
// size increment = min(50% of current size, ARRAY_MAXSIZE_INCREMENT)