⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 treectrl.tex

📁 很牛的GUI源码wxWidgets-2.8.0.zip 可在多种平台下运行.
💻 TEX
📖 第 1 页 / 共 3 页
字号:
\func{void}{ExpandAllChildren}{\param{const wxTreeItemId\&}{ item}}Expands the given item and all its children recursively.\membersection{wxTreeCtrl::GetBoundingRect}\label{wxtreectrlgetitemrect}\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},only the rectangle around the item's label will be returned, otherwise theitem's image is also taken into account.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 theitem is currently invisible.Notice that the rectangle coordinates are logical, not physical ones. So, forexample, the x coordinate may be negative if the tree has a horizontalscrollbar and its position is not $0$.\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}.}\perlnote{In wxPerl this method only takes the parameters {\tt item} and  {\tt textOnly}, and returns a Wx::Rect ( or undef ).}\membersection{wxTreeCtrl::GetButtonsImageList}\label{wxtreectrlgetbuttonsimagelist}\constfunc{wxImageList*}{GetButtonsImageList}{\void}Returns the buttons image list (from which application-defined button images are taken).This function is only available in the generic version.\membersection{wxTreeCtrl::GetChildrenCount}\label{wxtreectrlgetchildrencount}\constfunc{unsigned int}{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 numberof descendants, otherwise only one level of children is counted.\membersection{wxTreeCtrl::GetCount}\label{wxtreectrlgetcount}\constfunc{unsigned int}{GetCount}{\void}Returns the number of items in the control.\membersection{wxTreeCtrl::GetEditControl}\label{wxtreectrlgeteditcontrol}\constfunc{wxTextCtrl *}{GetEditControl}{\void}Returns the edit control being currently used to edit a label. Returns {\tt NULL}if no label is being edited.{\bf NB:} It is currently only implemented for wxMSW.\membersection{wxTreeCtrl::GetFirstChild}\label{wxtreectrlgetfirstchild}\constfunc{wxTreeItemId}{GetFirstChild}{\param{const wxTreeItemId\&}{ item}, \param{wxTreeItemIdValue \& }{cookie}}Returns the first child; call \helpref{wxTreeCtrl::GetNextChild}{wxtreectrlgetnextchild} for the next child.For this enumeration function you must pass in a `cookie' parameterwhich is opaque for the application but is necessary for the libraryto make these functions reentrant (i.e. allow more than oneenumeration on one and the same object simultaneously). The cookie passed toGetFirstChild and GetNextChild should be the same variable.Returns an invalid tree item (i.e. IsOk() returns {\tt false}) if there are no further children.\wxheading{See also}\helpref{wxTreeCtrl::GetNextChild}{wxtreectrlgetnextchild},\helpref{wxTreeCtrl::GetNextSibling}{wxtreectrlgetnextsibling}\pythonnote{In wxPython the returned wxTreeItemId and the new cookievalue are both returned as a tuple containing the two values.}\perlnote{In wxPerl this method only takes the {\tt item} parameter, and  returns a 2-element list {\tt ( item, cookie )}.}\membersection{wxTreeCtrl::GetFirstVisibleItem}\label{wxtreectrlgetfirstvisibleitem}\constfunc{wxTreeItemId}{GetFirstVisibleItem}{\void}Returns the first visible item.\membersection{wxTreeCtrl::GetImageList}\label{wxtreectrlgetimagelist}\constfunc{wxImageList*}{GetImageList}{\void}Returns the normal image list.\membersection{wxTreeCtrl::GetIndent}\label{wxtreectrlgetindent}\constfunc{int}{GetIndent}{\void}Returns the current tree control indentation.\membersection{wxTreeCtrl::GetItemBackgroundColour}\label{wxtreectrlgetitembackgroundcolour}\constfunc{wxColour}{GetItemBackgroundColour}{\param{const wxTreeItemId\&}{ item}}Returns the background colour of the item.\membersection{wxTreeCtrl::GetItemData}\label{wxtreectrlgetitemdata}\constfunc{wxTreeItemData*}{GetItemData}{\param{const wxTreeItemId\&}{ item}}Returns the tree item data associated with the item.\wxheading{See also}\helpref{wxTreeItemData}{wxtreeitemdata}\pythonnote{wxPython provides the following shortcut method:\indented{2cm}{\begin{twocollist}\itemsep=0pt\twocolitem{{\bf GetPyData(item)}}{Returns the Python Objectassociated with the wxTreeItemData for the given item Id.}\end{twocollist}}}%\perlnote{wxPerl provides the following shortcut method:\indented{2cm}{\begin{twocollist}\itemsep=0pt\twocolitem{{\bf GetPlData( item )}}{Returns the Perl dataassociated with the Wx::TreeItemData. It is just the same astree->GetItemData(item)->GetData().}\end{twocollist}}}%\membersection{wxTreeCtrl::GetItemFont}\label{wxtreectrlgetitemfont}\constfunc{wxFont}{GetItemFont}{\param{const wxTreeItemId\&}{ item}}Returns the font of the item label.\membersection{wxTreeCtrl::GetItemImage}\label{wxtreectrlgetitemimage}\constfunc{int}{GetItemImage}{\param{const wxTreeItemId\& }{item}, \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 imagewhich is shown when the item is currently selected)\item{wxTreeItemIcon\_Expanded} to get the expanded image (this onlymakes sense for items which have children - then this image is shown when theitem is expanded and the normal image is shown when it is collapsed)\item{wxTreeItemIcon\_SelectedExpanded} to get the selected expanded image(which is shown when an expanded item is currently selected)\end{itemize}\membersection{wxTreeCtrl::GetItemText}\label{wxtreectrlgetitemtext}\constfunc{wxString}{GetItemText}{\param{const wxTreeItemId\&}{ item}}Returns the item label.\membersection{wxTreeCtrl::GetItemTextColour}\label{wxtreectrlgetitemtextcolour}\constfunc{wxColour}{GetItemTextColour}{\param{const wxTreeItemId\&}{ item}}Returns the colour of the item label.\membersection{wxTreeCtrl::GetLastChild}\label{wxtreectrlgetlastchild}\constfunc{wxTreeItemId}{GetLastChild}{\param{const wxTreeItemId\&}{ item}}Returns the last child of the item (or an invalid tree item if this item has no children).\wxheading{See also}\helpref{GetFirstChild}{wxtreectrlgetfirstchild},\helpref{wxTreeCtrl::GetNextSibling}{wxtreectrlgetnextsibling},\helpref{GetLastChild}{wxtreectrlgetlastchild}\membersection{wxTreeCtrl::GetNextChild}\label{wxtreectrlgetnextchild}\constfunc{wxTreeItemId}{GetNextChild}{\param{const wxTreeItemId\&}{ item}, \param{wxTreeItemIdValue \& }{cookie}}Returns the next child; call \helpref{wxTreeCtrl::GetFirstChild}{wxtreectrlgetfirstchild} for the first child.For this enumeration function you must pass in a `cookie' parameterwhich is opaque for the application but is necessary for the libraryto make these functions reentrant (i.e. allow more than oneenumeration on one and the same object simultaneously). The cookie passed toGetFirstChild and GetNextChild should be the same.Returns an invalid tree item if there are no further children.\wxheading{See also}\helpref{wxTreeCtrl::GetFirstChild}{wxtreectrlgetfirstchild}\pythonnote{In wxPython the returned wxTreeItemId and the new cookievalue are both returned as a tuple containing the two values.}\perlnote{In wxPerl this method returns a 2-element list  {\tt ( item, cookie )}, instead of modifying its parameters.}\membersection{wxTreeCtrl::GetNextSibling}\label{wxtreectrlgetnextsibling}\constfunc{wxTreeItemId}{GetNextSibling}{\param{const wxTreeItemId\&}{ item}}Returns the next sibling of the specified item; call \helpref{wxTreeCtrl::GetPrevSibling}{wxtreectrlgetprevsibling} for the previous sibling.Returns an invalid tree item if there are no further siblings.\wxheading{See also}\helpref{wxTreeCtrl::GetPrevSibling}{wxtreectrlgetprevsibling}\membersection{wxTreeCtrl::GetNextVisible}\label{wxtreectrlgetnextvisible}\constfunc{wxTreeItemId}{GetNextVisible}{\param{const wxTreeItemId\&}{ item}}Returns the next visible item.\membersection{wxTreeCtrl::GetItemParent}\label{wxtreectrlgetitemparent}\constfunc{wxTreeItemId}{GetItemParent}{\param{const wxTreeItemId\&}{ item}}Returns the item's parent.\membersection{wxTreeCtrl::GetPrevSibling}\label{wxtreectrlgetprevsibling}\constfunc{wxTreeItemId}{GetPrevSibling}{\param{const wxTreeItemId\&}{ item}}Returns the previous sibling of the specified item; call \helpref{wxTreeCtrl::GetNextSibling}{wxtreectrlgetnextsibling} for the next sibling.Returns an invalid tree item if there are no further children.\wxheading{See also}\helpref{wxTreeCtrl::GetNextSibling}{wxtreectrlgetnextsibling}\membersection{wxTreeCtrl::GetPrevVisible}\label{wxtreectrlgetprevvisible}\constfunc{wxTreeItemId}{GetPrevVisible}{\param{const wxTreeItemId\&}{ item}}Returns the previous visible item.\membersection{wxTreeCtrl::GetQuickBestSize}\label{wxtreectrlgetquickbestsize}\constfunc{bool}{GetQuickBestSize}{\void}Returns true if the control will use a quick calculation for the best size,looking only at the first and last items. The default is false.\wxheading{See also}\helpref{wxTreeCtrl::SetQuickBestSize}{wxtreectrlsetquickbestsize}\membersection{wxTreeCtrl::GetRootItem}\label{wxtreectrlgetrootitem}\constfunc{wxTreeItemId}{GetRootItem}{\void}Returns the root item for the tree control.\membersection{wxTreeCtrl::GetItemSelectedImage}\label{wxtreectrlgetitemselectedimage}\constfunc{int}{GetItemSelectedImage}{\param{const wxTreeItemId\& }{item}}Gets the selected item image (this function is obsolete, use{\tt GetItemImage(item, wxTreeItemIcon\_Selected}) instead).\membersection{wxTreeCtrl::GetSelection}\label{wxtreectrlgetselection}\constfunc{wxTreeItemId}{GetSelection}{\void}Returns the selection, or an invalid item if there is no selection.This function only works with the controls without wxTR\_MULTIPLE style, use\helpref{GetSelections}{wxtreectrlgetselections} for the controls which do havethis style.\membersection{wxTreeCtrl::GetSelections}\label{wxtreectrlgetselections}\constfunc{unsigned int}{GetSelections}{\param{wxArrayTreeItemIds\& }{selection}}Fills the array of tree items passed in with the currently selected items. Thisfunction 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 parametersand returns a Python list of {\tt wxTreeItemId}s.}\perlnote{In wxPerl this method takes no parameters and returns a list of {\tt Wx::TreeItemId}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}\constfunc{wxTreeItemId}{HitTest}{\param{const wxPoint\& }{point}, \param{int\& }{flags}}Calculates which (if any) item is under the given point, returning the tree itemid at this point plus extra information {\it flags}. {\it flags} is a bitlist of the following:\twocolwidtha{5cm}\begin{twocollist}\itemsep=0pt\twocolitem{wxTREE\_HITTEST\_ABOVE}{Above the client area.}\twocolitem{wxTREE\_HITTEST\_BELOW}{Below the client area.}\twocolitem{wxTREE\_HITTEST\_NOWHERE}{In the client area but below the last item.}\twocolitem{wxTREE\_HITTEST\_ONITEMBUTTON}{On the button associated with an item.}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -