X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/296ec7d3ac9047b1655b789506c02b2f5f13cabf..0f3e3e0c300988a7520b39b90d28517b84882190:/docs/latex/wx/treectrl.tex diff --git a/docs/latex/wx/treectrl.tex b/docs/latex/wx/treectrl.tex index 1a5057f0d9..ceb31a10d8 100644 --- a/docs/latex/wx/treectrl.tex +++ b/docs/latex/wx/treectrl.tex @@ -237,6 +237,9 @@ Returns an invalid tree item if there are no further children. \helpref{wxTreeCtrl::GetNextChild}{wxtreectrlgetnextchild} +\pythonnote{In wxPython the returned wxTreeItemId and the new cookie +value are both returned as a tuple containing the two values.} + \membersection{wxTreeCtrl::GetFirstVisibleItem}\label{wxtreectrlgetfirstvisibleitem} \constfunc{wxTreeItemId}{GetFirstVisibleItem}{\void} @@ -272,6 +275,13 @@ Returns the tree item data associated with the item. \helpref{wxTreeItemData}{wxtreeitemdata} +\pythonnote{wxPython provides the following shortcut method:\par +\indented{2cm}{\begin{twocollist} +\twocolitem{\bf{GetPyData(item)}}{Returns the Python Object +associated with the wxTreeItemData for the given item Id.} +\end{twocollist}} +} + \membersection{wxTreeCtrl::GetItemImage}\label{wxtreectrlgetitemimage} \constfunc{int}{GetItemImage}{\param{const wxTreeItemId\& }{item}} @@ -292,7 +302,7 @@ Returns the last child of the item (or an invalid tree item if this item has no \wxheading{See also} -\helpref{GetFirstChild}{wxtreectrlgetfirstchild}, +\helpref{GetFirstChild}{wxtreectrlgetfirstchild}, \helpref{GetLastChild}{wxtreectrlgetlastchild} \membersection{wxTreeCtrl::GetNextChild}\label{wxtreectrlgetnextchild} @@ -313,6 +323,9 @@ Returns an invalid tree item if there are no further children. \helpref{wxTreeCtrl::GetFirstChild}{wxtreectrlgetfirstchild} +\pythonnote{In wxPython the returned wxTreeItemId and the new cookie +value are both returned as a tuple containing the two values.} + \membersection{wxTreeCtrl::GetNextSibling}\label{wxtreectrlgetnextsibling} \constfunc{wxTreeItemId}{GetNextSibling}{\param{const wxTreeItemId\&}{ item}} @@ -500,6 +513,13 @@ See also: \helpref{IsBold}{wxtreectrlisbold} Sets the item client data. +\pythonnote{wxPython provides the following shortcut method:\par +\indented{2cm}{\begin{twocollist} +\twocolitem{\bf{SetPyData(item, obj)}}{Associate the given Python +Object with the wxTreeItemData for the given item Id.} +\end{twocollist}} +} + \membersection{wxTreeCtrl::SetItemHasChildren}\label{wxtreectrlsetitemhaschildren} \func{void}{SetItemHasChildren}{\param{const wxTreeItemId\&}{ item}, \param{bool }{hasChildren = TRUE}} @@ -531,7 +551,7 @@ Sets the item label. \func{void}{SortChildren}{\param{const wxTreeItemId\&}{ item}} -Sorts the children of the given item using +Sorts the children of the given item using \helpref{OnCompareItems}{wxtreectrloncompareitems} method of wxTreeCtrl. You should override that method to change the sort order (default is ascending alphabetical order). @@ -586,6 +606,21 @@ wxTreeItemId Default constructor. +\pythonnote{The wxPython version of this constructor optionally +accepts any Python object as a parameter. This object is then +associated with the tree item using the wxTreeItemData as a +container. + +In addition, the following methods are added in wxPython for accessing +the object:\par +\indented{2cm}{\begin{twocollist} +\twocolitem{\bf{GetData()}}{Returns a reference to the Python Object} +\twocolitem{\bf{SetData(obj)}}{Associates a new Python Object with the +wxTreeItemData} +\end{twocollist}} +} + + \membersection{wxTreeItemData::\destruct{wxTreeItemData}} \func{void}{\destruct{wxTreeItemData}}{\void}