X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a660d684eda27638bca0384b2058911a31c8e845..e815120e412d91e79c98dd0afac2a1e399f10810:/docs/latex/wx/node.tex

diff --git a/docs/latex/wx/node.tex b/docs/latex/wx/node.tex
index 417329092f..80e5024653 100644
--- a/docs/latex/wx/node.tex
+++ b/docs/latex/wx/node.tex
@@ -1,10 +1,31 @@
 \section{\class{wxNode}}\label{wxnode}
 
-A node structure used in linked lists (see \helpref{wxList}{wxlist}).
+wxNodeBase is the node structure used in linked lists (see 
+\helpref{wxList}{wxlist}) and derived classes. You should never use wxNodeBase
+class directly, however, because it works with untyped ({\tt void *}) data and
+this is unsafe. Use wxNodeBase-derived classes which are automatically defined
+by WX\_DECLARE\_LIST and WX\_DEFINE\_LIST macros instead as described in
+\helpref{wxList}{wxlist} documentation (see example there). Also note that
+although there is a class called wxNode, it is defined for backwards
+compatibility only and usage of this class is strongly deprecated.
+
+In the documentation below, the type {\tt T} should be thought of as a
+``template'' parameter: this is the type of data stored in the linked list or,
+in other words, the first argument of WX\_DECLARE\_LIST macro. Also, wxNode is
+written as wxNode<T> even though it isn't really a template class -- but it
+helps to think of it as if it were.
 
 \wxheading{Derived from}
 
-\helpref{wxObject}{wxobject}
+None.
+
+\wxheading{Include files}
+
+<wx/list.h>
+
+\wxheading{Library}
+
+\helpref{wxBase}{librarieslist}
 
 \wxheading{See also}
 
@@ -12,30 +33,35 @@ A node structure used in linked lists (see \helpref{wxList}{wxlist}).
 
 \latexignore{\rtfignore{\wxheading{Members}}}
 
-\membersection{wxNode::Data}
+\membersection{wxNode<T>::GetData}\label{wxnodegetdata}
 
-\func{wxObject *}{Data}{\void}
+\constfunc{T *}{GetData}{\void}
 
-Retrieves the client data pointer associated with the node. This will
-have to be cast to the correct type.
+Retrieves the client data pointer associated with the node.
 
-\membersection{wxNode::Next}
+\membersection{wxNode<T>::GetNext}\label{wxnodegetnext}
 
-\func{wxNode *}{Next}{\void}
+\constfunc{wxNode<T> *}{GetNext}{\void}
 
-Retrieves the next node (NULL if at end of list).
+Retrieves the next node or NULL if this node is the last one.
 
-\membersection{wxNode::Previous}
+\membersection{wxNode<T>::GetPrevious}\label{wxnodegetprevious}
 
-\func{wxNode *}{Previous}{\void}
+\func{wxNode<T> *}{GetPrevious}{\void}
 
-Retrieves the previous node (NULL if at start of list).
+Retrieves the previous node or NULL if this node is the first one in the list.
 
-\membersection{wxNode::SetData}
+\membersection{wxNode<T>::SetData}\label{wxnodesetdata}
 
-\func{void}{SetData}{\param{wxObject *}{data}}
+\func{void}{SetData}{\param{T *}{data}}
 
 Sets the data associated with the node (usually the pointer will have been
 set when the node was created).
 
+\membersection{wxNode<T>::IndexOf}\label{wxnodeindexof}
+
+\func{int}{IndexOf}{\void}
+
+Returns the zero-based index of this node within the list. The return value
+will be {\tt wxNOT\_FOUND} if the node has not been added to a list yet.
 
