1998-05-20 10:25:30 -04:00
|
|
|
\section{\class{wxStringList}}\label{wxstringlist}
|
|
|
|
|
2002-02-24 18:22:46 -05:00
|
|
|
{\bf NB:} This class is obsolete, please don't use it any longer. You can use
|
|
|
|
either \helpref{wxArrayString}{wxarraystring} or a \helpref{type safe}{wxlist}
|
|
|
|
list class instead.
|
|
|
|
|
1999-01-07 10:22:05 -05:00
|
|
|
A string list is a list which is assumed to contain strings.
|
|
|
|
Memory is allocated when strings are added to
|
1998-05-20 10:25:30 -04:00
|
|
|
the list, and deallocated by the destructor or by the {\bf Delete}\rtfsp
|
|
|
|
member.
|
|
|
|
|
|
|
|
\wxheading{Derived from}
|
|
|
|
|
|
|
|
\helpref{wxList}{wxlist}\\
|
|
|
|
\helpref{wxObject}{wxobject}
|
|
|
|
|
1999-02-15 15:41:29 -05:00
|
|
|
\wxheading{Include files}
|
|
|
|
|
|
|
|
<wx/list.h>
|
|
|
|
|
1998-05-20 10:25:30 -04:00
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxString}{wxstring}, \helpref{wxList}{wxlist}
|
|
|
|
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
|
2004-09-23 11:41:43 -04:00
|
|
|
\membersection{wxStringList::wxStringList}\label{wxstringlistctor}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\func{}{wxStringList}{\void}
|
|
|
|
|
|
|
|
Constructor.
|
|
|
|
|
|
|
|
\func{void}{wxStringList}{\param{char* }{first}, ...}
|
|
|
|
|
|
|
|
Constructor, taking NULL-terminated string argument list. wxStringList
|
|
|
|
allocates memory for the strings.
|
|
|
|
|
2004-09-23 11:41:43 -04:00
|
|
|
\membersection{wxStringList::\destruct{wxStringList}}\label{wxstringlistdtor}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\func{}{\destruct{wxStringList}}{\void}
|
|
|
|
|
|
|
|
Deletes string list, deallocating strings.
|
|
|
|
|
2004-09-23 11:41:43 -04:00
|
|
|
\membersection{wxStringList::Add}\label{wxstringlistadd}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\func{wxNode *}{Add}{\param{const wxString\& }{s}}
|
|
|
|
|
|
|
|
Adds string to list, allocating memory.
|
|
|
|
|
2004-09-23 11:41:43 -04:00
|
|
|
\membersection{wxStringList::Clear}\label{wxstringlistclear}
|
1998-09-16 17:52:23 -04:00
|
|
|
|
|
|
|
\func{void}{Clear}{\void}
|
|
|
|
|
|
|
|
Clears all strings from the list.
|
|
|
|
|
2004-09-23 11:41:43 -04:00
|
|
|
\membersection{wxStringList::Delete}\label{wxstringlistdelete}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\func{void}{Delete}{\param{const wxString\& }{s}}
|
|
|
|
|
|
|
|
Searches for string and deletes from list, deallocating memory.
|
|
|
|
|
2004-09-23 11:41:43 -04:00
|
|
|
\membersection{wxStringList::ListToArray}\label{wxstringlistlisttoarray}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
2003-01-17 19:16:34 -05:00
|
|
|
\func{char*}{ListToArray}{\param{bool}{ new\_copies = false}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
Converts the list to an array of strings, only allocating new memory if
|
2003-01-17 19:16:34 -05:00
|
|
|
\rtfsp{\bf new\_copies} is true.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
2004-09-23 11:41:43 -04:00
|
|
|
\membersection{wxStringList::Member}\label{wxstringlistmember}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\func{bool}{Member}{\param{const wxString\& }{s}}
|
|
|
|
|
2003-01-17 19:16:34 -05:00
|
|
|
Returns true if {\bf s} is a member of the list (tested using {\bf strcmp}).
|
1998-05-20 10:25:30 -04:00
|
|
|
|
2004-09-23 11:41:43 -04:00
|
|
|
\membersection{wxStringList::Sort}\label{wxstringlistsort}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\func{void}{Sort}{\void}
|
|
|
|
|
|
|
|
Sorts the strings in ascending alphabetical order. Note that all nodes
|
|
|
|
(but not strings) get deallocated and new ones allocated.
|
|
|
|
|
|
|
|
|