1 \section{\class{wxTreeItemData
}}\label{wxtreeitemdata
}
3 wxTreeItemData is some (arbitrary) user class associated with some item. The
4 main advantage of having this class (compared to the old untyped interface) is
5 that wxTreeItemData's are destroyed automatically by the tree and, as this
6 class has virtual dtor, it means that the memory will be automatically
7 freed. We don't just use wxObject instead of wxTreeItemData because
8 the size of this class is critical: in any real application, each tree leaf
9 will have wxTreeItemData associated with it and number of leaves may be
12 Because the objects of this class are deleted by the tree, they should
13 always be allocated on the heap.
15 \wxheading{Derived from
}
19 \wxheading{Include files
}
25 \helpref{wxTreeCtrl
}{wxtreectrl
}
27 \latexignore{\rtfignore{\wxheading{Members
}}}
29 \membersection{wxTreeItemData::wxTreeItemData
}\label{wxtreeitemdataconstr
}
31 \func{}{wxTreeItemData
}{\void}
35 \pythonnote{The wxPython version of this constructor optionally
36 accepts any Python object as a parameter. This object is then
37 associated with the tree item using the wxTreeItemData as a
40 In addition, the following methods are added in wxPython for accessing
43 \indented{2cm
}{\begin{twocollist
}\itemsep=
0pt
44 \twocolitem{{\bf GetData()
}}{Returns a reference to the Python Object
}
45 \twocolitem{{\bf SetData(obj)
}}{Associates a new Python Object with the
50 \perlnote{In wxPerl the constructor accepts as parameter an optional scalar,
51 and stores it as client data. You may retrieve this data by calling
52 {\bf GetData()
}, and set it by callling
{\bf SetData( data ).
}
55 \membersection{wxTreeItemData::
\destruct{wxTreeItemData
}}
57 \func{void
}{\destruct{wxTreeItemData
}}{\void}
61 \membersection{wxTreeItemData::GetId
}\label{wxtreeitemdatagetid
}
63 \func{const wxTreeItem\&
}{GetId
}{\void}
65 Returns the item associated with this node.
67 \membersection{wxTreeItemData::SetId
}\label{wxtreeitemdatasetid
}
69 \func{void
}{SetId
}{\param{const wxTreeItemId\&
}{ id
}}
71 Sets the item associated with this node.