X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/64f590eaa145e5f8c7e56b6862e4d96a96c921b6..933b675ed41f626e6573a0c9c402acbc0283d2da:/docs/latex/wx/treectrl.tex diff --git a/docs/latex/wx/treectrl.tex b/docs/latex/wx/treectrl.tex index 4b69c939ba..c5d51fdeb0 100644 --- a/docs/latex/wx/treectrl.tex +++ b/docs/latex/wx/treectrl.tex @@ -237,6 +237,8 @@ Creates the tree control. See \helpref{wxTreeCtrl::wxTreeCtrl}{wxtreectrlconstr} Deletes the specified item. A {\tt EVT\_TREE\_DELETE\_ITEM} event will be generated. +This function may cause a subsequent call to GetNextChild to fail. + \membersection{wxTreeCtrl::DeleteAllItems}\label{wxtreectrldeleteallitems} \func{void}{DeleteAllItems}{\void} @@ -253,6 +255,10 @@ Deletes all children of the given item (but not the item itself). Note that this will {\bf not} generate any events unlike \helpref{Delete}{wxtreectrldelete} method. +If you have called \helpref{wxTreeCtrl::SetItemHasChildren}{wxtreectrlsetitemhaschildren}, you +may need to call it again since {\it DeleteChildren} does not automatically +clear the setting. + \membersection{wxTreeCtrl::EditLabel}\label{wxtreectrleditlabel} \func{void}{EditLabel}{\param{const wxTreeItemId\&}{ item}} @@ -274,7 +280,7 @@ will be sent which can be vetoed as well. \func{void}{EndEditLabel}{\param{bool }{cancelEdit}} -Ends label editing. If {\it cancelEdit} is {\tt TRUE}, the edit will be cancelled. +Ends label editing. If {\it cancelEdit} is {\tt true}, the edit will be cancelled. This function is currently supported under Windows only. @@ -296,13 +302,13 @@ Expands the given item. \membersection{wxTreeCtrl::GetBoundingRect}\label{wxtreectrlgetitemrect} -\constfunc{bool}{GetBoundingRect}{\param{const wxTreeItemId\&}{ item}, \param{wxRect\& }{rect}, \param{bool }{textOnly = {\tt FALSE}}} +\constfunc{bool}{GetBoundingRect}{\param{const wxTreeItemId\&}{ item}, \param{wxRect\& }{rect}, \param{bool }{textOnly = {\tt false}}} -Retrieves the rectangle bounding the {\it item}. If {\it textOnly} is {\tt TRUE}, +Retrieves the rectangle bounding the {\it item}. If {\it textOnly} is {\tt true}, only the rectangle around the item's label will be returned, otherwise the item's image is also taken into account. -The return value is {\tt TRUE} if the rectangle was successfully retrieved or {\tt FALSE} +The return value is {\tt true} if the rectangle was successfully retrieved or {\tt false} if it was not (in this case {\it rect} is not changed) - for example, if the item is currently invisible. @@ -323,9 +329,9 @@ This function is only available in the generic version. \membersection{wxTreeCtrl::GetChildrenCount}\label{wxtreectrlgetchildrencount} -\constfunc{size\_t}{GetChildrenCount}{\param{const wxTreeItemId\&}{ item}, \param{bool}{ recursively = {\tt TRUE}}} +\constfunc{size\_t}{GetChildrenCount}{\param{const wxTreeItemId\&}{ item}, \param{bool}{ recursively = {\tt true}}} -Returns the number of items in the branch. If {\it recursively} is {\tt TRUE}, returns the total number +Returns the number of items in the branch. If {\it recursively} is {\tt true}, returns the total number of descendants, otherwise only one level of children is counted. \membersection{wxTreeCtrl::GetCount}\label{wxtreectrlgetcount} @@ -345,7 +351,7 @@ if no label is being edited. \membersection{wxTreeCtrl::GetFirstChild}\label{wxtreectrlgetfirstchild} -\constfunc{wxTreeItemId}{GetFirstChild}{\param{const wxTreeItemId\&}{ item}, \param{long\& }{cookie}} +\constfunc{wxTreeItemId}{GetFirstChild}{\param{const wxTreeItemId\&}{ item}, \param{wxTreeItemIdValue \& }{cookie}} Returns the first child; call \helpref{wxTreeCtrl::GetNextChild}{wxtreectrlgetnextchild} for the next child. @@ -469,7 +475,7 @@ Returns the last child of the item (or an invalid tree item if this item has no \membersection{wxTreeCtrl::GetNextChild}\label{wxtreectrlgetnextchild} -\constfunc{wxTreeItemId}{GetNextChild}{\param{const wxTreeItemId\&}{ item}, \param{long\& }{cookie}} +\constfunc{wxTreeItemId}{GetNextChild}{\param{const wxTreeItemId\&}{ item}, \param{wxTreeItemIdValue \& }{cookie}} Returns the next child; call \helpref{wxTreeCtrl::GetFirstChild}{wxtreectrlgetfirstchild} for the first child. @@ -625,6 +631,7 @@ returned as a tuple.} \param{int}{ image = -1}, \param{int}{ selImage = -1}, \param{wxTreeItemData*}{ data = {\tt NULL}}} Inserts an item after a given one ({\it previous}) or before one identified by its position ({\it before}). +{\it before} must be less than the number of children. The {\it image} and {\it selImage} parameters are an index within the normal image list specifying the image to use for unselected and @@ -639,7 +646,7 @@ both selected and unselected items. \constfunc{bool}{IsBold}{\param{const wxTreeItemId\& }{item}} -Returns {\tt TRUE} if the given item is in bold state. +Returns {\tt true} if the given item is in bold state. See also: \helpref{SetItemBold}{wxtreectrlsetitembold} @@ -647,25 +654,25 @@ See also: \helpref{SetItemBold}{wxtreectrlsetitembold} \constfunc{bool}{IsExpanded}{\param{const wxTreeItemId\&}{ item}} -Returns {\tt TRUE} if the item is expanded (only makes sense if it has children). +Returns {\tt true} if the item is expanded (only makes sense if it has children). \membersection{wxTreeCtrl::IsSelected}\label{wxtreectrlisselected} \constfunc{bool}{IsSelected}{\param{const wxTreeItemId\&}{ item}} -Returns {\tt TRUE} if the item is selected. +Returns {\tt true} if the item is selected. \membersection{wxTreeCtrl::IsVisible}\label{wxtreectrlisvisible} \constfunc{bool}{IsVisible}{\param{const wxTreeItemId\&}{ item}} -Returns {\tt TRUE} if the item is visible (it might be outside the view, or not expanded). +Returns {\tt true} if the item is visible (it might be outside the view, or not expanded). \membersection{wxTreeCtrl::ItemHasChildren}\label{wxtreectrlitemhaschildren} \constfunc{bool}{ItemHasChildren}{\param{const wxTreeItemId\&}{ item}} -Returns {\tt TRUE} if the item has children. +Returns {\tt true} if the item has children. \membersection{wxTreeCtrl::OnCompareItems}\label{wxtreectrloncompareitems} @@ -745,9 +752,9 @@ Sets the colour of the item's background. \membersection{wxTreeCtrl::SetItemBold}\label{wxtreectrlsetitembold} -\func{void}{SetItemBold}{\param{const wxTreeItemId\& }{item}, \param{bool}{ bold = {\tt TRUE}}} +\func{void}{SetItemBold}{\param{const wxTreeItemId\& }{item}, \param{bool}{ bold = {\tt true}}} -Makes item appear in bold font if {\it bold} parameter is {\tt TRUE} or resets it to +Makes item appear in bold font if {\it bold} parameter is {\tt true} or resets it to the normal state. See also: \helpref{IsBold}{wxtreectrlisbold} @@ -788,7 +795,7 @@ although font attributes may vary. \membersection{wxTreeCtrl::SetItemHasChildren}\label{wxtreectrlsetitemhaschildren} -\func{void}{SetItemHasChildren}{\param{const wxTreeItemId\&}{ item}, \param{bool }{hasChildren = {\tt TRUE}}} +\func{void}{SetItemHasChildren}{\param{const wxTreeItemId\&}{ item}, \param{bool }{hasChildren = {\tt true}}} Force appearance of the button next to the item. This is useful to allow the user to expand the items which don't have any children now, @@ -844,7 +851,7 @@ The new mode takes effect immediately. Sorts the children of the given item using \helpref{OnCompareItems}{wxtreectrloncompareitems} method of wxTreeCtrl. You should override that method to change the sort order (the default is ascending -alphabetical order). +case-sensitive alphabetical order). \wxheading{See also}