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