+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Name: list.tex
+%% Purpose: wxList
+%% Author: wxWidgets Team
+%% Modified by:
+%% Created:
+%% RCS-ID: $Id$
+%% Copyright: (c) wxWidgets Team
+%% License: wxWindows license
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
See \helpref{wxHashMap}{wxhashmap}\rtfsp for a faster method of storage
when random access is required.
See \helpref{wxHashMap}{wxhashmap}\rtfsp for a faster method of storage
when random access is required.
elements of type wxObject and had essentially untyped interface (thus allowing
you to put apples in the list and read back oranges from it), the new wxList
classes family may contain elements of any type and has much more strict type
checking. Unfortunately, it also requires an additional line to be inserted in
your program for each list class you use (which is the only solution short of
elements of type wxObject and had essentially untyped interface (thus allowing
you to put apples in the list and read back oranges from it), the new wxList
classes family may contain elements of any type and has much more strict type
checking. Unfortunately, it also requires an additional line to be inserted in
your program for each list class you use (which is the only solution short of
The general idea is to have the base class wxListBase working with {\it void *}
data but make all of its dangerous (because untyped) functions protected, so
The general idea is to have the base class wxListBase working with {\it void *}
data but make all of its dangerous (because untyped) functions protected, so
For compatibility with previous versions wxList and wxStringList classes are
still defined, but their usage is deprecated and they will disappear in the
future versions completely. The use of the latter is especially discouraged as
For compatibility with previous versions wxList and wxStringList classes are
still defined, but their usage is deprecated and they will disappear in the
future versions completely. The use of the latter is especially discouraged as
\helpref{wxArrayString}{wxarraystring} class.
In the documentation of the list classes below, the template notations are
\helpref{wxArrayString}{wxarraystring} class.
In the documentation of the list classes below, the template notations are
\func{}{wxList}{\param{int}{ n}, \param{T *}{objects[]}}
\func{}{wxList}{\param{T *}{object}, ...}
\func{}{wxList}{\param{int}{ n}, \param{T *}{objects[]}}
\func{}{wxList}{\param{T *}{object}, ...}
Constructors. {\it key\_type} is one of wxKEY\_NONE, wxKEY\_INTEGER, or wxKEY\_STRING,
and indicates what sort of keying is required (if any).
Constructors. {\it key\_type} is one of wxKEY\_NONE, wxKEY\_INTEGER, or wxKEY\_STRING,
and indicates what sort of keying is required (if any).
\func{wxNode<T> *}{Append}{\param{long}{ key}, \param{T *}{object}}
\func{wxNode<T> *}{Append}{\param{const wxString\& }{key}, \param{T *}{object}}
\func{wxNode<T> *}{Append}{\param{long}{ key}, \param{T *}{object}}
\func{wxNode<T> *}{Append}{\param{const wxString\& }{key}, \param{T *}{object}}
\membersection{wxList::DeleteContents}\label{wxlistdeletecontents}
\func{void}{DeleteContents}{\param{bool}{ destroy}}
\membersection{wxList::DeleteContents}\label{wxlistdeletecontents}
\func{void}{DeleteContents}{\param{bool}{ destroy}}
-If {\it destroy} is {\tt TRUE}, instructs the list to call {\it delete} on the client contents of
-a node whenever the node is destroyed. The default is {\tt FALSE}.
+If {\it destroy} is {\tt true}, instructs the list to call {\it delete} on the client contents of
+a node whenever the node is destroyed. The default is {\tt false}.
\membersection{wxList::DeleteNode}\label{wxlistdeletenode}
\func{bool}{DeleteNode}{\param{wxNode<T> *}{node}}
\membersection{wxList::DeleteNode}\label{wxlistdeletenode}
\func{bool}{DeleteNode}{\param{wxNode<T> *}{node}}
\membersection{wxList::DeleteObject}\label{wxlistdeleteobject}
\func{bool}{DeleteObject}{\param{T *}{object}}
Finds the given client {\it object} and deletes the appropriate node from the list, returning
\membersection{wxList::DeleteObject}\label{wxlistdeleteobject}
\func{bool}{DeleteObject}{\param{T *}{object}}
Finds the given client {\it object} and deletes the appropriate node from the list, returning
-{\tt TRUE} if successful. The application must delete the actual object separately.
+{\tt true} if successful. The application must delete the actual object separately.
+
+\membersection{wxList::Erase}\label{wxlisterase}
+
+\func{void}{Erase}{\param{wxNode<T> *}{node}}
+
+Removes element at given position.
% Use different label name to avoid clashing with wxListItem label
\membersection{wxList::Item}\label{wxlistitemfunc}
% Use different label name to avoid clashing with wxListItem label
\membersection{wxList::Item}\label{wxlistitemfunc}
int listcompare(const void *arg1, const void *arg2)
{
return(compare(**(wxString **)arg1, // use the wxString 'compare'
int listcompare(const void *arg1, const void *arg2)
{
return(compare(**(wxString **)arg1, // use the wxString 'compare'