X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f3845e889c7ccfe03d034a0aa79b4f4d19fbcb06..32485259c1342115488d219776dfebeb3d4d81b1:/docs/latex/wx/treedata.tex diff --git a/docs/latex/wx/treedata.tex b/docs/latex/wx/treedata.tex index 8372863d08..03d1f2c0e3 100644 --- a/docs/latex/wx/treedata.tex +++ b/docs/latex/wx/treedata.tex @@ -1,20 +1,21 @@ \section{\class{wxTreeItemData}}\label{wxtreeitemdata} wxTreeItemData is some (arbitrary) user class associated with some item. The -main advantage of having this class (compared to the old untyped interface) is -that wxTreeItemData's are destroyed automatically by the tree and, as this -class has virtual dtor, it means that the memory will be automatically -freed. We don't just use wxObject instead of wxTreeItemData because -the size of this class is critical: in any real application, each tree leaf -will have wxTreeItemData associated with it and number of leaves may be -quite big. - -Because the objects of this class are deleted by the tree, they should -always be allocated on the heap. +main advantage of having this class is that wxTreeItemData objects are +destroyed automatically by the tree and, as this class has virtual destructor, +it means that the memory and any other resources associated with a tree item +will be automatically freed when it is deleted. Note that we don't use wxObject +as the base class for wxTreeItemData because the size of this class is +critical: in many applications, each tree leaf will have wxTreeItemData +associated with it and the number of leaves may be quite big. + +Also please note that because the objects of this class are deleted by the tree +using the operator {\tt delete}, they must always be allocated on the heap +using {\tt new}. \wxheading{Derived from} -wxTreeItemId +\helpref{wxClientData}{wxclientdata} \wxheading{Include files} @@ -26,7 +27,7 @@ wxTreeItemId \latexignore{\rtfignore{\wxheading{Members}}} -\membersection{wxTreeItemData::wxTreeItemData}\label{wxtreeitemdataconstr} +\membersection{wxTreeItemData::wxTreeItemData}\label{wxtreeitemdatactor} \func{}{wxTreeItemData}{\void} @@ -49,10 +50,10 @@ wxTreeItemData} \perlnote{In wxPerl the constructor accepts as parameter an optional scalar, and stores it as client data. You may retrieve this data by calling - {\bf GetData()}, and set it by callling {\bf SetData( data ).} + {\bf GetData()}, and set it by calling {\bf SetData( data ).} } -\membersection{wxTreeItemData::\destruct{wxTreeItemData}} +\membersection{wxTreeItemData::\destruct{wxTreeItemData}}\label{wxtreeitemdatadtor} \func{void}{\destruct{wxTreeItemData}}{\void} @@ -60,7 +61,7 @@ Virtual destructor. \membersection{wxTreeItemData::GetId}\label{wxtreeitemdatagetid} -\func{const wxTreeItem\&}{GetId}{\void} +\func{const wxTreeItemId\&}{GetId}{\void} Returns the item associated with this node.