1 \section{\class{wxStringList
}}\label{wxstringlist
}
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
8 \wxheading{Derived from
}
10 \helpref{wxList
}{wxlist
}\\
11 \helpref{wxObject
}{wxobject
}
15 \helpref{wxString
}{wxstring
},
\helpref{wxList
}{wxlist
}
17 \latexignore{\rtfignore{\wxheading{Members
}}}
19 \membersection{wxStringList::wxStringList
}
21 \func{}{wxStringList
}{\void}
25 \func{void
}{wxStringList
}{\param{char*
}{first
}, ...
}
27 Constructor, taking NULL-terminated string argument list. wxStringList
28 allocates memory for the strings.
30 \membersection{wxStringList::
\destruct{wxStringList
}}
32 \func{}{\destruct{wxStringList
}}{\void}
34 Deletes string list, deallocating strings.
36 \membersection{wxStringList::Add
}
38 \func{wxNode *
}{Add
}{\param{const wxString\&
}{s
}}
40 Adds string to list, allocating memory.
42 \membersection{wxStringList::Clear
}
44 \func{void
}{Clear
}{\void}
46 Clears all strings from the list.
48 \membersection{wxStringList::Delete
}
50 \func{void
}{Delete
}{\param{const wxString\&
}{s
}}
52 Searches for string and deletes from list, deallocating memory.
54 \membersection{wxStringList::ListToArray
}
56 \func{char*
}{ListToArray
}{\param{bool
}{ new
\_copies = FALSE
}}
58 Converts the list to an array of strings, only allocating new memory if
59 \rtfsp{\bf new
\_copies} is TRUE.
61 \membersection{wxStringList::Member
}
63 \func{bool
}{Member
}{\param{const wxString\&
}{s
}}
65 Returns TRUE if
{\bf s
} is a member of the list (tested using
{\bf strcmp
}).
67 \membersection{wxStringList::Sort
}
69 \func{void
}{Sort
}{\void}
71 Sorts the strings in ascending alphabetical order. Note that all nodes
72 (but not strings) get deallocated and new ones allocated.