]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/strlist.tex
image sample fix from 2_4
[wxWidgets.git] / docs / latex / wx / strlist.tex
1 \section{\class{wxStringList}}\label{wxstringlist}
2
3 {\bf NB:} This class is obsolete, please don't use it any longer. You can use
4 either \helpref{wxArrayString}{wxarraystring} or a \helpref{type safe}{wxlist}
5 list class instead.
6
7 A string list is a list which is assumed to contain strings.
8 Memory is allocated when strings are added to
9 the list, and deallocated by the destructor or by the {\bf Delete}\rtfsp
10 member.
11
12 \wxheading{Derived from}
13
14 \helpref{wxList}{wxlist}\\
15 \helpref{wxObject}{wxobject}
16
17 \wxheading{Include files}
18
19 <wx/list.h>
20
21 \wxheading{See also}
22
23 \helpref{wxString}{wxstring}, \helpref{wxList}{wxlist}
24
25 \latexignore{\rtfignore{\wxheading{Members}}}
26
27 \membersection{wxStringList::wxStringList}
28
29 \func{}{wxStringList}{\void}
30
31 Constructor.
32
33 \func{void}{wxStringList}{\param{char* }{first}, ...}
34
35 Constructor, taking NULL-terminated string argument list. wxStringList
36 allocates memory for the strings.
37
38 \membersection{wxStringList::\destruct{wxStringList}}
39
40 \func{}{\destruct{wxStringList}}{\void}
41
42 Deletes string list, deallocating strings.
43
44 \membersection{wxStringList::Add}
45
46 \func{wxNode *}{Add}{\param{const wxString\& }{s}}
47
48 Adds string to list, allocating memory.
49
50 \membersection{wxStringList::Clear}
51
52 \func{void}{Clear}{\void}
53
54 Clears all strings from the list.
55
56 \membersection{wxStringList::Delete}
57
58 \func{void}{Delete}{\param{const wxString\& }{s}}
59
60 Searches for string and deletes from list, deallocating memory.
61
62 \membersection{wxStringList::ListToArray}
63
64 \func{char*}{ListToArray}{\param{bool}{ new\_copies = false}}
65
66 Converts the list to an array of strings, only allocating new memory if
67 \rtfsp{\bf new\_copies} is true.
68
69 \membersection{wxStringList::Member}
70
71 \func{bool}{Member}{\param{const wxString\& }{s}}
72
73 Returns true if {\bf s} is a member of the list (tested using {\bf strcmp}).
74
75 \membersection{wxStringList::Sort}
76
77 \func{void}{Sort}{\void}
78
79 Sorts the strings in ascending alphabetical order. Note that all nodes
80 (but not strings) get deallocated and new ones allocated.
81
82