]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/treedata.tex
added the possibility to hide the tip window automatically when the mouse leave the...
[wxWidgets.git] / docs / latex / wx / treedata.tex
CommitLineData
f3845e88
VZ
1\section{\class{wxTreeItemData}}\label{wxtreeitemdata}
2
3wxTreeItemData is some (arbitrary) user class associated with some item. The
4main advantage of having this class (compared to the old untyped interface) is
5that wxTreeItemData's are destroyed automatically by the tree and, as this
6class has virtual dtor, it means that the memory will be automatically
7freed. We don't just use wxObject instead of wxTreeItemData because
8the size of this class is critical: in any real application, each tree leaf
9will have wxTreeItemData associated with it and number of leaves may be
10quite big.
11
12Because the objects of this class are deleted by the tree, they should
13always be allocated on the heap.
14
15\wxheading{Derived from}
16
17wxTreeItemId
18
19\wxheading{Include files}
20
21<wx/treectrl.h>
22
23\wxheading{See also}
24
25\helpref{wxTreeCtrl}{wxtreectrl}
26
27\latexignore{\rtfignore{\wxheading{Members}}}
28
29\membersection{wxTreeItemData::wxTreeItemData}\label{wxtreeitemdataconstr}
30
31\func{}{wxTreeItemData}{\void}
32
33Default constructor.
34
35\pythonnote{The wxPython version of this constructor optionally
36accepts any Python object as a parameter. This object is then
37associated with the tree item using the wxTreeItemData as a
38container.
39
40In addition, the following methods are added in wxPython for accessing
41the object:
42
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
46wxTreeItemData}
47\end{twocollist}}
48}
49
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 ).}
53}
54
55\membersection{wxTreeItemData::\destruct{wxTreeItemData}}
56
57\func{void}{\destruct{wxTreeItemData}}{\void}
58
59Virtual destructor.
60
61\membersection{wxTreeItemData::GetId}\label{wxtreeitemdatagetid}
62
63\func{const wxTreeItem\&}{GetId}{\void}
64
65Returns the item associated with this node.
66
67\membersection{wxTreeItemData::SetId}\label{wxtreeitemdatasetid}
68
69\func{void}{SetId}{\param{const wxTreeItemId\&}{ id}}
70
71Sets the item associated with this node.
72
73