X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ed93168bf9d23bdc83184039c84d263ed6f87945..42e69d6b435a4dd5415caf3750db62cf45b6f373:/docs/latex/wx/treectrl.tex diff --git a/docs/latex/wx/treectrl.tex b/docs/latex/wx/treectrl.tex index 4390b721f6..ceb31a10d8 100644 --- a/docs/latex/wx/treectrl.tex +++ b/docs/latex/wx/treectrl.tex @@ -190,9 +190,15 @@ Expands the given item. \membersection{wxTreeCtrl::GetBoundingRect}\label{wxtreectrlgetitemrect} -\constfunc{void}{GetBoundingRect}{\param{const wxTreeItemId\&}{ item}, \param{wxRect\& }{rect}, \param{bool }{textOnly = FALSE}} +\constfunc{bool}{GetBoundingRect}{\param{const wxTreeItemId\&}{ item}, \param{wxRect\& }{rect}, \param{bool }{textOnly = FALSE}} -Returns the position and size of the rectangle bounding the item. +Retrieves the rectangle bounding the {\it item}. If {\it textOnly} is TRUE, +only the rectangle around the items label will be returned, otherwise the +items image is also taken into account. + +The return value is TRUE if the rectangle was successfully retrieved or FALSE +if it was not (in this case {\it rect} is not changed) - for example, if the +item is currently invisible. \membersection{wxTreeCtrl::GetChildrenCount}\label{wxtreectrlgetchildrencount} @@ -231,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} @@ -266,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}} @@ -286,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} @@ -307,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}} @@ -494,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}} @@ -525,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). @@ -580,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}