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::Delete
}
44 \func{void
}{Delete
}{\param{const wxString\&
}{s
}}
46 Searches for string and deletes from list, deallocating memory.
48 \membersection{wxStringList::ListToArray
}
50 \func{char*
}{ListToArray
}{\param{bool
}{ new
\_copies = FALSE
}}
52 Converts the list to an array of strings, only allocating new memory if
53 \rtfsp{\bf new
\_copies} is TRUE.
55 \membersection{wxStringList::Member
}
57 \func{bool
}{Member
}{\param{const wxString\&
}{s
}}
59 Returns TRUE if
{\bf s
} is a member of the list (tested using
{\bf strcmp
}).
61 \membersection{wxStringList::Sort
}
63 \func{void
}{Sort
}{\void}
65 Sorts the strings in ascending alphabetical order. Note that all nodes
66 (but not strings) get deallocated and new ones allocated.