X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3e9af289ed81a98bbbf9bb183d0ed03ac627ba32..c266eff98c5e44012647f54f38a1e29ecabd8759:/docs/latex/wx/treectrl.tex?ds=sidebyside diff --git a/docs/latex/wx/treectrl.tex b/docs/latex/wx/treectrl.tex index fb72fb3618..e43750d483 100644 --- a/docs/latex/wx/treectrl.tex +++ b/docs/latex/wx/treectrl.tex @@ -1,8 +1,19 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Name: treectrl.tex +%% Purpose: wxTreeCtrl documentation +%% Author: wxWidgets Team +%% Modified by: +%% Created: +%% RCS-ID: $Id$ +%% Copyright: (c) wxWidgets Team +%% License: wxWindows license +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + \section{\class{wxTreeCtrl}}\label{wxtreectrl} A tree control presents information as a hierarchy, with items that may be expanded to show further items. Items in a tree control are referenced by wxTreeItemId handles, -which may be tested for validity by calling wxTreeItemId::IsOk. +which may be tested for validity by calling \helpref{wxTreeItemId::IsOk}{wxtreeitemidisok}. To intercept events from a tree control, use the event table macros described in \helpref{wxTreeEvent}{wxtreeevent}. @@ -17,6 +28,10 @@ To intercept events from a tree control, use the event table macros described in +\wxheading{Library} + +\helpref{wxCore}{librarieslist} + \wxheading{Window styles} \twocolwidtha{5cm} @@ -27,15 +42,11 @@ if you wish the user to be able to edit labels in the tree control.} to document that no buttons are to be drawn.} \twocolitem{\windowstyle{wxTR\_HAS\_BUTTONS}}{Use this style to show + and - buttons to the left of parent items.} -\twocolitem{\windowstyle{wxTR\_TWIST\_BUTTONS}}{Use this style -to show Mac-style twister buttons to the left of parent items. -If both wxTR\_HAS\_BUTTONS and wxTR\_TWIST\_BUTTONS are given, -twister buttons are generated. Generic only.} \twocolitem{\windowstyle{wxTR\_NO\_LINES}}{Use this style to hide vertical level connectors.} \twocolitem{\windowstyle{wxTR\_FULL\_ROW\_HIGHLIGHT}}{Use this style to have the background colour and the selection highlight extend over the entire horizontal -row of the tree control window. (This flag is ignored under Windows unless you +row of the tree control window. (This flag is ignored under Windows unless you specify wxTR\_NO\_LINES as well.) } \twocolitem{\windowstyle{wxTR\_LINES\_AT\_ROOT}}{Use this style to show lines between root nodes. @@ -58,8 +69,6 @@ to be deselected. This is the default.} \twocolitem{\windowstyle{wxTR\_MULTIPLE}}{Use this style to allow a range of items to be selected. If a second range is selected, the current range, if any, is deselected.} -\twocolitem{\windowstyle{wxTR\_EXTENDED}}{Use this style -to allow disjoint items to be selected. (Only partially implemented; may not work in all cases.)} \twocolitem{\windowstyle{wxTR\_DEFAULT\_STYLE}}{The set of flags that are closest to the defaults for the native control for a particular toolkit.} \end{twocollist} @@ -75,6 +84,7 @@ functions that take a \helpref{wxTreeEvent}{wxtreeevent} argument. \begin{twocollist}\itemsep=0pt \twocolitem{{\bf EVT\_TREE\_BEGIN\_DRAG(id, func)}}{Begin dragging with the left mouse button.} \twocolitem{{\bf EVT\_TREE\_BEGIN\_RDRAG(id, func)}}{Begin dragging with the right mouse button.} +\twocolitem{{\bf EVT\_TREE\_END\_DRAG(id, func)}}{End dragging with the left or right mouse button.} \twocolitem{{\bf EVT\_TREE\_BEGIN\_LABEL\_EDIT(id, func)}}{Begin editing a label. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.} \twocolitem{{\bf EVT\_TREE\_END\_LABEL\_EDIT(id, func)}}{Finish editing a label. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.} \twocolitem{{\bf EVT\_TREE\_DELETE\_ITEM(id, func)}}{Delete an item.} @@ -85,11 +95,15 @@ functions that take a \helpref{wxTreeEvent}{wxtreeevent} argument. \twocolitem{{\bf EVT\_TREE\_ITEM\_COLLAPSING(id, func)}}{The item is being collapsed. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.} \twocolitem{{\bf EVT\_TREE\_ITEM\_EXPANDED(id, func)}}{The item has been expanded.} \twocolitem{{\bf EVT\_TREE\_ITEM\_EXPANDING(id, func)}}{The item is being expanded. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.} +\twocolitem{{\bf EVT\_TREE\_ITEM\_RIGHT\_CLICK(id, func)}}{The user has clicked the item with the right mouse button.} +\twocolitem{{\bf EVT\_TREE\_ITEM\_MIDDLE\_CLICK(id, func)}}{The user has clicked the item with the middle mouse button.} \twocolitem{{\bf EVT\_TREE\_SEL\_CHANGED(id, func)}}{Selection has changed.} \twocolitem{{\bf EVT\_TREE\_SEL\_CHANGING(id, func)}}{Selection is changing. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.} \twocolitem{{\bf EVT\_TREE\_KEY\_DOWN(id, func)}}{A key has been pressed.} \twocolitem{{\bf EVT\_TREE\_ITEM\_GETTOOLTIP(id, func)}}{The opportunity to set the item tooltip is being given to the application (call wxTreeEvent::SetToolTip). Windows only.} +\twocolitem{{\bf EVT\_TREE\_ITEM\_MENU(id, func)}}{The context menu for the selected item has been requested, either by a right click or by using the menu key.} +\twocolitem{{\bf EVT\_TREE\_STATE\_IMAGE\_CLICK(id, func)}}{The state image has been clicked. Windows only.} \end{twocollist} \wxheading{See also} @@ -103,10 +117,9 @@ wxTreeCtrl class uses the standard common treeview control under Win32 implemented in the system library {\tt comctl32.dll}. Some versions of this library are known to have bugs with handling the tree control colours: the usual symptom is that the expanded items leave black (or otherwise incorrectly -coloured) background behind them, especially for the controls using non -default background colour. The recommended solution is to upgrade the {\tt comctl32.dll} +coloured) background behind them, especially for the controls using non-default background colour. The recommended solution is to upgrade the {\tt comctl32.dll} to a newer version: see -\urlref{http://www.microsoft.com/msdownload/ieplatform/ie/comctrlx86.asp}{http://www.microsoft.com/msdownload/ieplatform/ie/comctrlx86.asp}. +\urlref{http://www.microsoft.com/downloads/release.asp?ReleaseID=11916}{http://www.microsoft.com/downloads/release.asp?ReleaseID=11916}. \latexignore{\rtfignore{\wxheading{Members}}} @@ -119,7 +132,7 @@ Default constructor. \func{}{wxTreeCtrl}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp \param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp -\param{long}{ style = wxTR\_HAS\_BUTTONS}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``listCtrl"}} +\param{long}{ style = wxTR\_HAS\_BUTTONS}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``treeCtrl"}} Constructor, creating and showing a tree control. @@ -145,11 +158,11 @@ appropriately.} \helpref{wxTreeCtrl::Create}{wxtreectrlcreate}, \helpref{wxValidator}{wxvalidator} -\membersection{wxTreeCtrl::\destruct{wxTreeCtrl}} +\membersection{wxTreeCtrl::\destruct{wxTreeCtrl}}\label{wxtreectrldtor} \func{void}{\destruct{wxTreeCtrl}}{\void} -Destructor, destroying the list control. +Destructor, destroying the tree control. \membersection{wxTreeCtrl::AddRoot}\label{wxtreectrladdroot} @@ -227,6 +240,28 @@ See also \helpref{SetStateImageList}{wxtreectrlsetstateimagelist}. Collapses the given item. +\membersection{wxTreeCtrl::CollapseAll}\label{wxtreectrlcollapseall} + +\func{void}{CollapseAll}{\void} + +Collapses the root item. + +\wxheading{See also} + +\helpref{ExpandAll}{wxtreectrlexpandall} + + +\membersection{wxTreeCtrl::CollapseAllChildren}\label{wxtreectrlcollapseallchildren} + +\func{void}{CollapseAllChildren}{\param{const wxTreeItemId\&}{ item}} + +Collapses this item and all of its children, recursively. + +\wxheading{See also} + +\helpref{ExpandAllChildren}{wxtreectrlexpandallchildren} + + \membersection{wxTreeCtrl::CollapseAndReset}\label{wxtreectrlcollapseandreset} \func{void}{CollapseAndReset}{\param{const wxTreeItemId\&}{ item}} @@ -238,7 +273,7 @@ Collapses the given item and removes all children. \func{bool}{wxTreeCtrl}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp \param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp -\param{long}{ style = wxTR\_HAS\_BUTTONS}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``listCtrl"}} +\param{long}{ style = wxTR\_HAS\_BUTTONS}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``treeCtrl"}} Creates the tree control. See \helpref{wxTreeCtrl::wxTreeCtrl}{wxtreectrlconstr} for further details. @@ -257,7 +292,7 @@ This function may cause a subsequent call to GetNextChild to fail. \func{void}{DeleteAllItems}{\void} -Deletes all the items in the control. Note that this may not generate +Deletes all items in the control. Note that this may not generate {\tt EVT\_TREE\_DELETE\_ITEM} events under some Windows versions although normally such event is generated for each removed item. @@ -267,7 +302,7 @@ normally such event is generated for each removed item. \func{void}{DeleteChildren}{\param{const wxTreeItemId\& }{item}} Deletes all children of the given item (but not the item itself). Note that -this will {\bf not} generate any events unlike +this will {\bf not} generate any events unlike \helpref{Delete}{wxtreectrldelete} method. If you have called \helpref{wxTreeCtrl::SetItemHasChildren}{wxtreectrlsetitemhaschildren}, you @@ -297,7 +332,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 \true, the edit will be cancelled. This function is currently supported under Windows only. @@ -320,23 +355,41 @@ Scrolls and/or expands items to ensure that the given item is visible. Expands the given item. +\membersection{wxTreeCtrl::ExpandAll}\label{wxtreectrlexpandall} + +\func{void}{ExpandAll}{\void} + +Expands all items in the tree. + + +\membersection{wxTreeCtrl::ExpandAllChildren}\label{wxtreectrlexpandallchildren} + +\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}}} +\constfunc{bool}{GetBoundingRect}{\param{const wxTreeItemId\&}{ item}, \param{wxRect\& }{rect}, \param{bool }{textOnly = \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 \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} -if it was not (in this case {\it rect} is not changed) - for example, if the +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. +Notice that the rectangle coordinates are logical, not physical ones. So, for +example, the x coordinate may be negative if the tree has a horizontal +scrollbar 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 +\perlnote{In wxPerl this method only takes the parameters {\tt item} and {\tt textOnly}, and returns a Wx::Rect ( or undef ).} @@ -351,15 +404,15 @@ 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{unsigned int}{GetChildrenCount}{\param{const wxTreeItemId\&}{ item}, \param{bool}{ recursively = \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 \true, returns the total number of descendants, otherwise only one level of children is counted. \membersection{wxTreeCtrl::GetCount}\label{wxtreectrlgetcount} -\constfunc{int}{GetCount}{\void} +\constfunc{unsigned int}{GetCount}{\void} Returns the number of items in the control. @@ -386,7 +439,7 @@ to make these functions reentrant (i.e. allow more than one enumeration on one and the same object simultaneously). The cookie passed to GetFirstChild and GetNextChild should be the same variable. -Returns an invalid tree item if there are no further children. +Returns an invalid tree item (i.e. IsOk() returns \false) if there are no further children. \wxheading{See also} @@ -444,17 +497,16 @@ Returns the tree item data associated with the item. \twocolitem{{\bf GetPyData(item)}}{Returns the Python Object associated 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 data -associated with the Wx::TreeItemData ( it is just the same as -tree->GetItemData( item )->GetData(); ).} +associated with the Wx::TreeItemData. It is just the same as +tree->GetItemData(item)->GetData().} \end{twocollist}} -} - +}% \membersection{wxTreeCtrl::GetItemFont}\label{wxtreectrlgetitemfont} @@ -551,7 +603,10 @@ Returns an invalid tree item if there are no further siblings. \constfunc{wxTreeItemId}{GetNextVisible}{\param{const wxTreeItemId\&}{ item}} -Returns the next visible item. +Returns the next visible item or an invalid item if this item is the last +visible one. + +Notice that the \arg{item} itself must be visible. \membersection{wxTreeCtrl::GetItemParent}\label{wxtreectrlgetitemparent} @@ -561,19 +616,6 @@ Returns the next visible item. Returns the item's parent. -\membersection{wxTreeCtrl::GetParent}\label{wxtreectrlgetparent} - -\constfunc{wxTreeItemId}{GetParent}{\param{const wxTreeItemId\&}{ item}} - -{\bf NOTE:} This function is deprecated and will only work if {\tt WXWIN\_COMPATIBILITY\_2\_2} -is defined. Use \helpref{wxTreeCtrl::GetItemParent}{wxtreectrlgetitemparent} instead. - -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}} @@ -591,7 +633,22 @@ Returns an invalid tree item if there are no further children. \constfunc{wxTreeItemId}{GetPrevVisible}{\param{const wxTreeItemId\&}{ item}} -Returns the previous visible item. +Returns the previous visible item or an invalid item if this item is the first +visible one. + +Notice that the \arg{item} itself must be visible. + + +\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} @@ -605,8 +662,8 @@ 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 -{\tt GetItemImage(item, wxTreeItemIcon\_Selected}) instead). +Gets the selected item image (this function is obsolete, use +{\tt GetItemImage(item, wxTreeItemIcon\_Selected)} instead). \membersection{wxTreeCtrl::GetSelection}\label{wxtreectrlgetselection} @@ -621,7 +678,7 @@ this style. \membersection{wxTreeCtrl::GetSelections}\label{wxtreectrlgetselections} -\constfunc{size\_t}{GetSelections}{\param{wxArrayTreeItemIds\& }{selection}} +\constfunc{unsigned int}{GetSelections}{\param{wxArrayTreeItemIds\& }{selection}} Fills the array of tree items passed in with the currently selected items. This function can be called only if the control has the wxTR\_MULTIPLE style. @@ -644,7 +701,7 @@ Returns the state image list (from which application-defined state images are ta \membersection{wxTreeCtrl::HitTest}\label{wxtreectrlhittest} -\func{wxTreeItemId}{HitTest}{\param{const wxPoint\& }{point}, \param{int\& }{flags}} +\constfunc{wxTreeItemId}{HitTest}{\param{const wxPoint\& }{point}, \param{int\& }{flags}} Calculates which (if any) item is under the given point, returning the tree item id at this point plus extra information {\it flags}. {\it flags} is a bitlist of the following: @@ -696,37 +753,44 @@ both selected and unselected items. \constfunc{bool}{IsBold}{\param{const wxTreeItemId\& }{item}} -Returns {\tt true} if the given item is in bold state. +Returns \true if the given item is in bold state. See also: \helpref{SetItemBold}{wxtreectrlsetitembold} +\membersection{wxTreeCtrl::IsEmpty}\label{wxtreectrlisempty} + +\constfunc{bool}{IsEmpty}{} + +Returns \true if the control is empty (i.e. has no items, even no root one). + + \membersection{wxTreeCtrl::IsExpanded}\label{wxtreectrlisexpanded} \constfunc{bool}{IsExpanded}{\param{const wxTreeItemId\&}{ item}} -Returns {\tt true} if the item is expanded (only makes sense if it has children). +Returns \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 \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 \true if the item is visible on the screen. \membersection{wxTreeCtrl::ItemHasChildren}\label{wxtreectrlitemhaschildren} \constfunc{bool}{ItemHasChildren}{\param{const wxTreeItemId\&}{ item}} -Returns {\tt true} if the item has children. +Returns \true if the item has children. \membersection{wxTreeCtrl::OnCompareItems}\label{wxtreectrloncompareitems} @@ -738,7 +802,12 @@ items in the tree control. The function should return a negative, zero or positive value if the first item is less than, equal to or greater than the second one. -The base class version compares items alphabetically. +Please note that you \textbf{must} use wxRTTI macros +\helpref{DECLARE\_DYNAMIC\_CLASS}{declaredynamicclass} and +\helpref{IMPLEMENT\_DYNAMIC\_CLASS}{implementdynamicclass} if you override this +function because otherwise the base class considers that it is not overridden +and uses the default comparison, i.e. sorts the items alphabetically, which +allows it optimize away the calls to the virtual function completely. See also: \helpref{SortChildren}{wxtreectrlsortchildren} @@ -766,7 +835,7 @@ Scrolls the specified item into view. \membersection{wxTreeCtrl::SelectItem}\label{wxtreectrlselectitem} -\func{bool}{SelectItem}{\param{const wxTreeItemId\&}{ item}, \param{bool }{select = \true}} +\func{void}{SelectItem}{\param{const wxTreeItemId\&}{ item}, \param{bool }{select = \true}} Selects the given item. In multiple selection controls, can be also used to deselect a currently selected item if the value of \arg{select} is false. @@ -816,9 +885,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 = \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 \true or resets it to the normal state. See also: \helpref{IsBold}{wxtreectrlisbold} @@ -835,17 +904,25 @@ Sets the item client data. \twocolitem{{\bf SetPyData(item, obj)}}{Associate the given Python Object 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 SetPlData( item, data )}}{Sets the Perl data -associated with the Wx::TreeItemData ( it is just the same as -tree->GetItemData( item )->SetData( data ); ).} +associated with the Wx::TreeItemData. It is just the same as +tree->GetItemData(item)->SetData(data).} \end{twocollist}} -} +}% +\membersection{wxTreeCtrl::SetItemDropHighlight}\label{wxtreectrlsetitemdrophighlight} + +\func{void}{SetItemDropHighlight}{\param{const wxTreeItemId\&}{ item}, \param{bool}{highlight = \true}} + +Gives the item the visual feedback for Drag'n'Drop actions, which is +useful if something is dragged from the outside onto the tree control +(as opposed to a DnD operation within the tree control, which already +is implemented internally). \membersection{wxTreeCtrl::SetItemFont}\label{wxtreectrlsetitemfont} @@ -862,7 +939,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 = \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, @@ -883,7 +960,8 @@ for the description of the {\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} @@ -900,6 +978,19 @@ Sets the item label. Sets the colour of the item's text. +\membersection{wxTreeCtrl::SetQuickBestSize}\label{wxtreectrlsetquickbestsize} + +\func{void}{SetQuickBestSize}{\param{bool}{ quickBestSize}} + +If true is passed, specifies that the control will use a quick calculation for the best size, +looking only at the first and last items. Otherwise, it will look at all items. +The default is false. + +\wxheading{See also} + +\helpref{wxTreeCtrl::GetQuickBestSize}{wxtreectrlgetquickbestsize} + + \membersection{wxTreeCtrl::SetStateImageList}\label{wxtreectrlsetstateimagelist} \func{void}{SetStateImageList}{\param{wxImageList*}{ imageList}} @@ -910,6 +1001,8 @@ Image list assigned with this method will See also \helpref{AssignStateImageList}{wxtreectrlassignstateimagelist}. +\membersection{wxTreeCtrl::SetWindowStyle}\label{wxtreectrlsetwindowstyle} + \func{void}{SetWindowStyle}{\param{long}{styles}} Sets the mode flags associated with the display of the tree control. @@ -969,3 +1062,62 @@ all items if it does have this style. Unselects the given item. This works in multiselection controls only. + + + +%% the wxTreeItemId opaque class + + +\section{\class{wxTreeItemId}}\label{wxtreeitemid} + +An opaque reference to a tree item. + + +\wxheading{Derived from} + +None + +\wxheading{Include files} + + + +\wxheading{Library} + +\helpref{wxCore}{librarieslist} + +\wxheading{See also} + +\helpref{wxTreeCtrl}{wxtreectrl}, \helpref{wxTreeItemData}{wxtreeitemdata},\\ +\helpref{wxTreeCtrl overview}{wxtreectrloverview} + + +\latexignore{\rtfignore{\wxheading{Members}}} + +\membersection{wxTreeItemId::wxTreeItemId}\label{wxtreeitemidconstr} + +\func{}{wxTreeItemId}{\void} + +Default constructor. wxTreemItemIds are not meant to be constructed explicitly by +the user; they are returned by the \helpref{wxTreeCtrl}{wxtreectrl} functions instead. + + +\membersection{wxTreeItemId::IsOk}\label{wxtreeitemidisok} + +\constfunc{bool}{IsOk}{} + +Returns \true if this instance is referencing a valid tree item. + + +\membersection{Operators}\label{wxtreeitemidoperators} + +\constfunc{void}{operator $!$}{} + +Synonim for \helpref{IsOk}{wxtreeitemidisok} + + +\constfunc{bool}{operator $==$}{\param{const wxTreeItemId\& }{item}} + +\constfunc{bool}{operator $!=$}{\param{const wxTreeItemId\& }{item}} + +Operators for comparison between \helpref{wxTreeItemId}{wxtreeitemid} objects. +