]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/strlist.tex
Changed files to work with wxDataFormat
[wxWidgets.git] / docs / latex / wx / strlist.tex
1 \section{\class{wxStringList}}\label{wxstringlist}
2
3 A string list is a list which is assumed to contain strings, with a
4 specific member functions. Memory is allocated when strings are added to
5 the list, and deallocated by the destructor or by the {\bf Delete}\rtfsp
6 member.
7
8 \wxheading{Derived from}
9
10 \helpref{wxList}{wxlist}\\
11 \helpref{wxObject}{wxobject}
12
13 \wxheading{See also}
14
15 \helpref{wxString}{wxstring}, \helpref{wxList}{wxlist}
16
17 \latexignore{\rtfignore{\wxheading{Members}}}
18
19 \membersection{wxStringList::wxStringList}
20
21 \func{}{wxStringList}{\void}
22
23 Constructor.
24
25 \func{void}{wxStringList}{\param{char* }{first}, ...}
26
27 Constructor, taking NULL-terminated string argument list. wxStringList
28 allocates memory for the strings.
29
30 \membersection{wxStringList::\destruct{wxStringList}}
31
32 \func{}{\destruct{wxStringList}}{\void}
33
34 Deletes string list, deallocating strings.
35
36 \membersection{wxStringList::Add}
37
38 \func{wxNode *}{Add}{\param{const wxString\& }{s}}
39
40 Adds string to list, allocating memory.
41
42 \membersection{wxStringList::Delete}
43
44 \func{void}{Delete}{\param{const wxString\& }{s}}
45
46 Searches for string and deletes from list, deallocating memory.
47
48 \membersection{wxStringList::ListToArray}
49
50 \func{char*}{ListToArray}{\param{bool}{ new\_copies = FALSE}}
51
52 Converts the list to an array of strings, only allocating new memory if
53 \rtfsp{\bf new\_copies} is TRUE.
54
55 \membersection{wxStringList::Member}
56
57 \func{bool}{Member}{\param{const wxString\& }{s}}
58
59 Returns TRUE if {\bf s} is a member of the list (tested using {\bf strcmp}).
60
61 \membersection{wxStringList::Sort}
62
63 \func{void}{Sort}{\void}
64
65 Sorts the strings in ascending alphabetical order. Note that all nodes
66 (but not strings) get deallocated and new ones allocated.
67
68