]>
Commit | Line | Data |
---|---|---|
a660d684 KB |
1 | \section{\class{wxStringList}}\label{wxstringlist} |
2 | ||
9c9aeada VZ |
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 | ||
8a2c6ef8 JS |
7 | A string list is a list which is assumed to contain strings. |
8 | Memory is allocated when strings are added to | |
a660d684 KB |
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 | ||
954b8ae6 JS |
17 | \wxheading{Include files} |
18 | ||
19 | <wx/list.h> | |
20 | ||
a660d684 KB |
21 | \wxheading{See also} |
22 | ||
23 | \helpref{wxString}{wxstring}, \helpref{wxList}{wxlist} | |
24 | ||
25 | \latexignore{\rtfignore{\wxheading{Members}}} | |
26 | ||
08f1d438 | 27 | \membersection{wxStringList::wxStringList}\label{wxstringlistctor} |
a660d684 KB |
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 | ||
08f1d438 | 38 | \membersection{wxStringList::\destruct{wxStringList}}\label{wxstringlistdtor} |
a660d684 KB |
39 | |
40 | \func{}{\destruct{wxStringList}}{\void} | |
41 | ||
42 | Deletes string list, deallocating strings. | |
43 | ||
08f1d438 | 44 | \membersection{wxStringList::Add}\label{wxstringlistadd} |
a660d684 KB |
45 | |
46 | \func{wxNode *}{Add}{\param{const wxString\& }{s}} | |
47 | ||
48 | Adds string to list, allocating memory. | |
49 | ||
08f1d438 | 50 | \membersection{wxStringList::Clear}\label{wxstringlistclear} |
7f555861 JS |
51 | |
52 | \func{void}{Clear}{\void} | |
53 | ||
54 | Clears all strings from the list. | |
55 | ||
08f1d438 | 56 | \membersection{wxStringList::Delete}\label{wxstringlistdelete} |
a660d684 KB |
57 | |
58 | \func{void}{Delete}{\param{const wxString\& }{s}} | |
59 | ||
60 | Searches for string and deletes from list, deallocating memory. | |
61 | ||
08f1d438 | 62 | \membersection{wxStringList::ListToArray}\label{wxstringlistlisttoarray} |
a660d684 | 63 | |
cc81d32f | 64 | \func{char*}{ListToArray}{\param{bool}{ new\_copies = false}} |
a660d684 KB |
65 | |
66 | Converts the list to an array of strings, only allocating new memory if | |
cc81d32f | 67 | \rtfsp{\bf new\_copies} is true. |
a660d684 | 68 | |
08f1d438 | 69 | \membersection{wxStringList::Member}\label{wxstringlistmember} |
a660d684 KB |
70 | |
71 | \func{bool}{Member}{\param{const wxString\& }{s}} | |
72 | ||
cc81d32f | 73 | Returns true if {\bf s} is a member of the list (tested using {\bf strcmp}). |
a660d684 | 74 | |
08f1d438 | 75 | \membersection{wxStringList::Sort}\label{wxstringlistsort} |
a660d684 KB |
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 |