// declare our list class: this macro declares and partly implements MyList
// class (which derives from wxListBase)
- WX_DECLARE_LIST(MyListElement, MyList)
+ WX_DECLARE_LIST(MyListElement, MyList);
...
// usually it will be found in the source file and not in the header
#include <wx/listimpl.cpp>
- WX_DEFINE_LIST(MyList)
+ WX_DEFINE_LIST(MyList);
// now MyList class may be used as a usual wxList, but all of its methods
// will take/return the objects of the right (i.e. MyListElement) type. You
\helpref{wxObject}{wxobject}
-{\bf WARNING: } the rest of documentation may be out-of-date.
+\wxheading{Include files}
+
+<wx/list.h>
\wxheading{Example}
\begin{verbatim}
...
- wxPoint *point1 = new wxPoint(100, 100);
- wxPoint *point2 = new wxPoint(200, 200);
+ wxWindow *win1 = new wxWindow(...);
+ wxWindow *win2 = new wxWindow(...);
wxList SomeList;
- SomeList.Append(point1);
- SomeList.Append(point2);
+ SomeList.Append(win1);
+ SomeList.Append(win2);
...
wxNode *node = SomeList.GetFirst();
while (node)
{
- wxPoint *point = (wxPoint *)node->Data();
+ wxWindow *win = (wxWindow *)node->Data();
...
node = node->Next();
}
\begin{verbatim}
...
- delete point;
+ delete win;
delete node;
node = SomeList.GetFirst();
...
\func{int}{IndexOf}{\param{wxObject*}{ obj }}
-Returns the index of {\it obj} within the list or NOT\_FOUND if {\it obj}
+Returns the index of {\it obj} within the list or NOT\_FOUND if {\it obj}
is not found in the list.
\membersection{wxList::Insert}