X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/76e1c2debfe9558f79ab7c6cd2be1afc8b9d42c1..dbddf573912254bb14b4ca70c5c5db6248051294:/docs/latex/wx/treectrl.tex?ds=sidebyside

diff --git a/docs/latex/wx/treectrl.tex b/docs/latex/wx/treectrl.tex
index 67e6009640..4d78485216 100644
--- a/docs/latex/wx/treectrl.tex
+++ b/docs/latex/wx/treectrl.tex
@@ -45,6 +45,9 @@ functions that take a \helpref{wxTreeEvent}{wxtreeevent} argument.
 \twocolitem{{\bf EVT\_TREE\_DELETE\_ITEM(id, func)}}{Delete an item.}
 \twocolitem{{\bf EVT\_TREE\_GET\_INFO(id, func)}}{Request information from the application.}
 \twocolitem{{\bf EVT\_TREE\_SET\_INFO(id, func)}}{Information is being supplied.}
+\twocolitem{{\bf EVT\_TREE\_ITEM\_ACTIVATED(id, func)}}{The item has been activated, i.e. chosen by double clicking it with mouse or from keyboard}
+\twocolitem{{\bf EVT\_TREE\_ITEM\_COLLAPSED(id, func)}}{Parent has been collapsed.}
+\twocolitem{{\bf EVT\_TREE\_ITEM\_COLLAPSING(id, func)}}{Parent is being collapsed. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.}
 \twocolitem{{\bf EVT\_TREE\_ITEM\_EXPANDED(id, func)}}{Parent has been expanded.}
 \twocolitem{{\bf EVT\_TREE\_ITEM\_EXPANDING(id, func)}}{Parent is being expanded. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.}
 \twocolitem{{\bf EVT\_TREE\_SEL\_CHANGED(id, func)}}{Selection has changed.}
@@ -164,7 +167,7 @@ will be sent which can be vetoed as well.
 
 \wxheading{See also}
 
-\helpref{wxTreeCtrl::EndEditLabel}{wxtreectrlendeditlabel},
+\helpref{wxTreeCtrl::EndEditLabel}{wxtreectrlendeditlabel}, 
 \helpref{wxTreeEvent}{wxtreeevent}
 
 \membersection{wxTreeCtrl::EndEditLabel}\label{wxtreectrlendeditlabel}
@@ -204,8 +207,8 @@ if it was not (in this case {\it rect} is not changed) - for example, if the
 item is currently invisible.
 
 \pythonnote{The wxPython version of this method requires only the
-\tt{item} and \tt{textOnly} parameters.  The return value is either a
-\tt{wxRect} object or \tt{None}.}
+{\tt item} and {\tt textOnly} parameters.  The return value is either a
+{\tt wxRect} object or {\tt None}.}
 
 \membersection{wxTreeCtrl::GetChildrenCount}\label{wxtreectrlgetchildrencount}
 
@@ -255,16 +258,9 @@ Returns the first visible item.
 
 \membersection{wxTreeCtrl::GetImageList}\label{wxtreectrlgetimagelist}
 
-\constfunc{wxImageList*}{GetImageList}{\param{int }{which = wxIMAGE\_LIST\_NORMAL}}
+\constfunc{wxImageList*}{GetImageList}{\void}
 
-Returns the specified image list. {\it which} may be one of:
-
-\twocolwidtha{5cm}
-\begin{twocollist}\itemsep=0pt
-\twocolitem{\windowstyle{wxIMAGE\_LIST\_NORMAL}}{The normal (large icon) image list.}
-\twocolitem{\windowstyle{wxIMAGE\_LIST\_SMALL}}{The small icon image list.}
-\twocolitem{\windowstyle{wxIMAGE\_LIST\_STATE}}{The user-defined state image list (unimplemented).}
-\end{twocollist}
+Returns the normal image list.
 
 \membersection{wxTreeCtrl::GetIndent}\label{wxtreectrlgetindent}
 
@@ -282,9 +278,10 @@ 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
+\pythonnote{wxPython provides the following shortcut method:
+
+\indented{2cm}{\begin{twocollist}\itemsep=0pt
+\twocolitem{{\bf GetPyData(item)}}{Returns the Python Object
 associated with the wxTreeItemData for the given item Id.}
 \end{twocollist}}
 }
@@ -292,9 +289,10 @@ associated with the wxTreeItemData for the given item Id.}
 \membersection{wxTreeCtrl::GetItemImage}\label{wxtreectrlgetitemimage}
 
 \constfunc{int}{GetItemImage}{\param{const wxTreeItemId\& }{item},
-\param{wxTreeItemIcon }{which = wxTreeItemIcon\_Normal}}
+ \param{wxTreeItemIcon }{which = wxTreeItemIcon\_Normal}}
 
 Gets the specified item image. The value of {\it which} may be:
+
 \begin{itemize}\itemsep=0pt
 \item{wxTreeItemIcon\_Normal} to get the normal item image
 \item{wxTreeItemIcon\_Selected} to get the selected item image (i.e. the image
@@ -320,7 +318,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}
@@ -368,6 +366,9 @@ Returns the next visible item.
 
 Returns the item's parent.
 
+\pythonnote{This method is named {\tt GetItemParent} to avoid a name
+clash with wxWindow::GetParent.}
+
 \membersection{wxTreeCtrl::GetPrevSibling}\label{wxtreectrlgetprevsibling}
 
 \constfunc{wxTreeItemId}{GetPrevSibling}{\param{const wxTreeItemId\&}{ item}}
@@ -396,7 +397,7 @@ Returns the root item for the tree control.
 
 \constfunc{int}{GetItemSelectedImage}{\param{const wxTreeItemId\& }{item}}
 
-Gets the selected item image (this function is obsolete, use
+Gets the selected item image (this function is obsolete, use 
 {\tt GetItemImage(item, wxTreeItemIcon\_Selected} instead).
 
 \membersection{wxTreeCtrl::GetSelection}\label{wxtreectrlgetselection}
@@ -418,7 +419,13 @@ function can be called only if the control has the wxTR\_MULTIPLE style.
 Returns the number of selected items.
 
 \pythonnote{The wxPython version of this method accepts no parameters
-and returns a Python list of \tt{wxTreeItemId}'s.}
+and returns a Python list of {\tt wxTreeItemId}s.}
+
+\membersection{wxTreeCtrl::GetStateImageList}\label{wxtreectrlgetstateimagelist}
+
+\constfunc{wxImageList*}{GetStateImageList}{\void}
+
+Returns the state image list (from which application-defined state images are taken).
 
 \membersection{wxTreeCtrl::HitTest}\label{wxtreectrlhittest}
 
@@ -447,7 +454,10 @@ in {\it flags}. {\it flags} is a bitlist of the following:
 \func{wxTreeItemId}{InsertItem}{\param{const wxTreeItemId\& }{parent}, \param{const wxTreeItemId\& }{previous}, \param{const wxString\&}{ text},
  \param{int}{ image = -1}, \param{int}{ selImage = -1}, \param{wxTreeItemData*}{ data = NULL}}
 
-Inserts an item after a given one.
+\func{wxTreeItemId}{InsertItem}{\param{const wxTreeItemId\& }{parent}, \param{size\_t}{ before}, \param{const wxString\&}{ text},
+ \param{int}{ image = -1}, \param{int}{ selImage = -1}, \param{wxTreeItemData*}{ data = NULL}}
+
+Inserts an item after a given one ({\it previous}) or before one identified by its position ({\it before}).
 
 If {\it image} > -1 and {\it selImage} is -1, the same image is used for
 both selected and unselected items.
@@ -527,10 +537,15 @@ Sets the indentation for the tree control.
 
 \membersection{wxTreeCtrl::SetImageList}\label{wxtreectrlsetimagelist}
 
-\func{void}{SetImageList}{\param{wxImageList*}{ imageList}, \param{int }{which = wxIMAGE\_LIST\_NORMAL}}
+\func{void}{SetImageList}{\param{wxImageList*}{ imageList}}
+
+Sets the normal image list.
+
+\membersection{wxTreeCtrl::SetItemBackgroundColour}\label{wxtreectrlsetitembackgroundcolour}
 
-Sets the image list. {\it which} should be one of wxIMAGE\_LIST\_NORMAL, wxIMAGE\_LIST\_SMALL and
-wxIMAGE\_LIST\_STATE.
+\func{void}{SetItemBackgroundColour}{\param{const wxTreeItemId\&}{ item}, \param{const wxColour\& }{col}}
+
+Sets the colour of the items background.
 
 \membersection{wxTreeCtrl::SetItemBold}\label{wxtreectrlsetitembold}
 
@@ -548,12 +563,24 @@ 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
+\indented{2cm}{\begin{twocollist}\itemsep=0pt
+\twocolitem{{\bf SetPyData(item, obj)}}{Associate the given Python
 Object with the wxTreeItemData for the given item Id.}
 \end{twocollist}}
 }
 
+\membersection{wxTreeCtrl::SetItemFont}\label{wxtreectrlsetitemfont}
+
+\func{void}{SetItemFont}{\param{const wxTreeItemId\&}{ item}, \param{const wxFont\& }{font}}
+
+Sets the items font. All items in the tree should have the same height to avoid
+text clipping, so the fonts height should be the same for all of them,
+although font attributes may vary.
+
+\wxheading{See also}
+
+\helpref{SetItemBold}{wxtreectrlsetitembold}
+
 \membersection{wxTreeCtrl::SetItemHasChildren}\label{wxtreectrlsetitemhaschildren}
 
 \func{void}{SetItemHasChildren}{\param{const wxTreeItemId\&}{ item}, \param{bool }{hasChildren = TRUE}}
@@ -566,8 +593,7 @@ usage and loading time.
 \membersection{wxTreeCtrl::SetItemImage}\label{wxtreectrlsetitemimage}
 
 \func{void}{SetItemImage}{\param{const wxTreeItemId\&}{ item},
-\param{int }{image},
-\param{wxTreeItemIcon }{which = wxTreeItemIcon\_Normal}}
+ \param{int }{image}, \param{wxTreeItemIcon }{which = wxTreeItemIcon\_Normal}}
 
 Sets the specified item image. See \helpref{GetItemImage}{wxtreectrlgetitemimage}
 for the description of {\it which} parameter.
@@ -576,8 +602,7 @@ for the description of {\it which} parameter.
 
 \func{void}{SetItemSelectedImage}{\param{const wxTreeItemId\&}{ item}, \param{int }{selImage}}
 
-Sets the selected item image (this function is obsolete, use
-{\tt SetItemImage(item, wxTreeItemIcon\_Selected} instead).
+Sets the selected item image (this function is obsolete, use {\tt SetItemImage(item, wxTreeItemIcon\_Selected} instead).
 
 \membersection{wxTreeCtrl::SetItemText}\label{wxtreectrlsetitemtext}
 
@@ -585,6 +610,18 @@ Sets the selected item image (this function is obsolete, use
 
 Sets the item label.
 
+\membersection{wxTreeCtrl::SetItemTextColour}\label{wxtreectrlsetitemtextcolour}
+
+\func{void}{SetItemTextColour}{\param{const wxTreeItemId\&}{ item}, \param{const wxColour\& }{col}}
+
+Sets the colour of the items text.
+
+\membersection{wxTreeCtrl::SetStateImageList}\label{wxtreectrlsetstateimagelist}
+
+\func{void}{SetStateImageList}{\param{wxImageList*}{ imageList}}
+
+Sets the state image list (from which application-defined state images are taken).
+
 \membersection{wxTreeCtrl::SortChildren}\label{wxtreectrlsortchildren}
 
 \func{void}{SortChildren}{\param{const wxTreeItemId\&}{ item}}
@@ -658,10 +695,11 @@ 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
+the object:
+
+\indented{2cm}{\begin{twocollist}\itemsep=0pt
+\twocolitem{{\bf GetData()}}{Returns a reference to the Python Object}
+\twocolitem{{\bf SetData(obj)}}{Associates a new Python Object with the
 wxTreeItemData}
 \end{twocollist}}
 }
