]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/strlist.tex
added wxLocale::GetSystemEncoding
[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.
4 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{Include files}
14
15 <wx/list.h>
16
17 \wxheading{See also}
18
19 \helpref{wxString}{wxstring}, \helpref{wxList}{wxlist}
20
21 \latexignore{\rtfignore{\wxheading{Members}}}
22
23 \membersection{wxStringList::wxStringList}
24
25 \func{}{wxStringList}{\void}
26
27 Constructor.
28
29 \func{void}{wxStringList}{\param{char* }{first}, ...}
30
31 Constructor, taking NULL-terminated string argument list. wxStringList
32 allocates memory for the strings.
33
34 \membersection{wxStringList::\destruct{wxStringList}}
35
36 \func{}{\destruct{wxStringList}}{\void}
37
38 Deletes string list, deallocating strings.
39
40 \membersection{wxStringList::Add}
41
42 \func{wxNode *}{Add}{\param{const wxString\& }{s}}
43
44 Adds string to list, allocating memory.
45
46 \membersection{wxStringList::Clear}
47
48 \func{void}{Clear}{\void}
49
50 Clears all strings from the list.
51
52 \membersection{wxStringList::Delete}
53
54 \func{void}{Delete}{\param{const wxString\& }{s}}
55
56 Searches for string and deletes from list, deallocating memory.
57
58 \membersection{wxStringList::ListToArray}
59
60 \func{char*}{ListToArray}{\param{bool}{ new\_copies = FALSE}}
61
62 Converts the list to an array of strings, only allocating new memory if
63 \rtfsp{\bf new\_copies} is TRUE.
64
65 \membersection{wxStringList::Member}
66
67 \func{bool}{Member}{\param{const wxString\& }{s}}
68
69 Returns TRUE if {\bf s} is a member of the list (tested using {\bf strcmp}).
70
71 \membersection{wxStringList::Sort}
72
73 \func{void}{Sort}{\void}
74
75 Sorts the strings in ascending alphabetical order. Note that all nodes
76 (but not strings) get deallocated and new ones allocated.
77
78