]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/treectrl.tex
don't make read-only text controls editable when enabled
[wxWidgets.git] / docs / latex / wx / treectrl.tex
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 %% Name: treectrl.tex
3 %% Purpose: wxTreeCtrl documentation
4 %% Author: wxWidgets Team
5 %% Modified by:
6 %% Created:
7 %% RCS-ID: $Id$
8 %% Copyright: (c) wxWidgets Team
9 %% License: wxWindows license
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11
12 \section{\class{wxTreeCtrl}}\label{wxtreectrl}
13
14 A tree control presents information as a hierarchy, with items that may be expanded
15 to show further items. Items in a tree control are referenced by wxTreeItemId handles,
16 which may be tested for validity by calling \helpref{wxTreeItemId::IsOk}{wxtreeitemidisok}.
17
18 To intercept events from a tree control, use the event table macros described in \helpref{wxTreeEvent}{wxtreeevent}.
19
20 \wxheading{Derived from}
21
22 \helpref{wxControl}{wxcontrol}\\
23 \helpref{wxWindow}{wxwindow}\\
24 \helpref{wxEvtHandler}{wxevthandler}\\
25 \helpref{wxObject}{wxobject}
26
27 \wxheading{Include files}
28
29 <wx/treectrl.h>
30
31 \wxheading{Window styles}
32
33 \twocolwidtha{5cm}
34 \begin{twocollist}\itemsep=0pt
35 \twocolitem{\windowstyle{wxTR\_EDIT\_LABELS}}{Use this style
36 if you wish the user to be able to edit labels in the tree control.}
37 \twocolitem{\windowstyle{wxTR\_NO\_BUTTONS}}{For convenience
38 to document that no buttons are to be drawn.}
39 \twocolitem{\windowstyle{wxTR\_HAS\_BUTTONS}}{Use this style
40 to show + and - buttons to the left of parent items.}
41 \twocolitem{\windowstyle{wxTR\_NO\_LINES}}{Use this style
42 to hide vertical level connectors.}
43 \twocolitem{\windowstyle{wxTR\_FULL\_ROW\_HIGHLIGHT}}{Use this style to have the background
44 colour and the selection highlight extend over the entire horizontal
45 row of the tree control window. (This flag is ignored under Windows unless you
46 specify wxTR\_NO\_LINES as well.) }
47 \twocolitem{\windowstyle{wxTR\_LINES\_AT\_ROOT}}{Use this style
48 to show lines between root nodes.
49 Only applicable if wxTR\_HIDE\_ROOT is set and wxTR\_NO\_LINES is not set.}
50 \twocolitem{\windowstyle{wxTR\_HIDE\_ROOT}}{Use this style
51 to suppress the display of the root node,
52 effectively causing the first-level nodes
53 to appear as a series of root nodes.}
54 \twocolitem{\windowstyle{wxTR\_ROW\_LINES}}{Use this style
55 to draw a contrasting border between displayed rows.}
56 \twocolitem{\windowstyle{wxTR\_HAS\_VARIABLE\_ROW\_HEIGHT}}{Use this style
57 to cause row heights to be just big enough to fit the content.
58 If not set, all rows use the largest row height.
59 The default is that this flag is unset.
60 Generic only.}
61 \twocolitem{\windowstyle{wxTR\_SINGLE}}{For convenience
62 to document that only one item may be selected at a time.
63 Selecting another item causes the current selection, if any,
64 to be deselected. This is the default.}
65 \twocolitem{\windowstyle{wxTR\_MULTIPLE}}{Use this style
66 to allow a range of items to be selected.
67 If a second range is selected, the current range, if any, is deselected.}
68 \twocolitem{\windowstyle{wxTR\_DEFAULT\_STYLE}}{The set of flags that are
69 closest to the defaults for the native control for a particular toolkit.}
70 \end{twocollist}
71
72 See also \helpref{window styles overview}{windowstyles}.
73
74 \wxheading{Event handling}
75
76 To process input from a tree control, use these event handler macros to direct input to member
77 functions that take a \helpref{wxTreeEvent}{wxtreeevent} argument.
78
79 \twocolwidtha{7cm}
80 \begin{twocollist}\itemsep=0pt
81 \twocolitem{{\bf EVT\_TREE\_BEGIN\_DRAG(id, func)}}{Begin dragging with the left mouse button.}
82 \twocolitem{{\bf EVT\_TREE\_BEGIN\_RDRAG(id, func)}}{Begin dragging with the right mouse button.}
83 \twocolitem{{\bf EVT\_TREE\_END\_DRAG(id, func)}}{End dragging with the left or right mouse button.}
84 \twocolitem{{\bf EVT\_TREE\_BEGIN\_LABEL\_EDIT(id, func)}}{Begin editing a label. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.}
85 \twocolitem{{\bf EVT\_TREE\_END\_LABEL\_EDIT(id, func)}}{Finish editing a label. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.}
86 \twocolitem{{\bf EVT\_TREE\_DELETE\_ITEM(id, func)}}{Delete an item.}
87 \twocolitem{{\bf EVT\_TREE\_GET\_INFO(id, func)}}{Request information from the application.}
88 \twocolitem{{\bf EVT\_TREE\_SET\_INFO(id, func)}}{Information is being supplied.}
89 \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}
90 \twocolitem{{\bf EVT\_TREE\_ITEM\_COLLAPSED(id, func)}}{The item has been collapsed.}
91 \twocolitem{{\bf EVT\_TREE\_ITEM\_COLLAPSING(id, func)}}{The item is being collapsed. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.}
92 \twocolitem{{\bf EVT\_TREE\_ITEM\_EXPANDED(id, func)}}{The item has been expanded.}
93 \twocolitem{{\bf EVT\_TREE\_ITEM\_EXPANDING(id, func)}}{The item is being expanded. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.}
94 \twocolitem{{\bf EVT\_TREE\_ITEM\_RIGHT\_CLICK(id, func)}}{The user has clicked the item with the right mouse button.}
95 \twocolitem{{\bf EVT\_TREE\_ITEM\_MIDDLE\_CLICK(id, func)}}{The user has clicked the item with the middle mouse button.}
96 \twocolitem{{\bf EVT\_TREE\_SEL\_CHANGED(id, func)}}{Selection has changed.}
97 \twocolitem{{\bf EVT\_TREE\_SEL\_CHANGING(id, func)}}{Selection is changing. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.}
98 \twocolitem{{\bf EVT\_TREE\_KEY\_DOWN(id, func)}}{A key has been pressed.}
99 \twocolitem{{\bf EVT\_TREE\_ITEM\_GETTOOLTIP(id, func)}}{The opportunity to set the item tooltip
100 is being given to the application (call wxTreeEvent::SetToolTip). Windows only.}
101 \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.}
102 \twocolitem{{\bf EVT\_TREE\_STATE\_IMAGE\_CLICK(id, func)}}{The state image has been clicked. Windows only.}
103 \end{twocollist}
104
105 \wxheading{See also}
106
107 \helpref{wxTreeItemData}{wxtreeitemdata}, \helpref{wxTreeCtrl overview}{wxtreectrloverview}, \helpref{wxListBox}{wxlistbox}, \helpref{wxListCtrl}{wxlistctrl},\rtfsp
108 \helpref{wxImageList}{wximagelist}, \helpref{wxTreeEvent}{wxtreeevent}
109
110 \wxheading{Win32 notes}
111
112 wxTreeCtrl class uses the standard common treeview control under Win32
113 implemented in the system library {\tt comctl32.dll}. Some versions of this
114 library are known to have bugs with handling the tree control colours: the
115 usual symptom is that the expanded items leave black (or otherwise incorrectly
116 coloured) background behind them, especially for the controls using non-default background colour. The recommended solution is to upgrade the {\tt comctl32.dll}
117 to a newer version: see
118 \urlref{http://www.microsoft.com/downloads/release.asp?ReleaseID=11916}{http://www.microsoft.com/downloads/release.asp?ReleaseID=11916}.
119
120 \latexignore{\rtfignore{\wxheading{Members}}}
121
122
123 \membersection{wxTreeCtrl::wxTreeCtrl}\label{wxtreectrlconstr}
124
125 \func{}{wxTreeCtrl}{\void}
126
127 Default constructor.
128
129 \func{}{wxTreeCtrl}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp
130 \param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp
131 \param{long}{ style = wxTR\_HAS\_BUTTONS}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``treeCtrl"}}
132
133 Constructor, creating and showing a tree control.
134
135 \wxheading{Parameters}
136
137 \docparam{parent}{Parent window. Must not be {\tt NULL}.}
138
139 \docparam{id}{Window identifier. A value of -1 indicates a default value.}
140
141 \docparam{pos}{Window position.}
142
143 \docparam{size}{Window size. If the default size (-1, -1) is specified then the window is sized
144 appropriately.}
145
146 \docparam{style}{Window style. See \helpref{wxTreeCtrl}{wxtreectrl}.}
147
148 \docparam{validator}{Window validator.}
149
150 \docparam{name}{Window name.}
151
152 \wxheading{See also}
153
154 \helpref{wxTreeCtrl::Create}{wxtreectrlcreate}, \helpref{wxValidator}{wxvalidator}
155
156
157 \membersection{wxTreeCtrl::\destruct{wxTreeCtrl}}\label{wxtreectrldtor}
158
159 \func{void}{\destruct{wxTreeCtrl}}{\void}
160
161 Destructor, destroying the tree control.
162
163
164 \membersection{wxTreeCtrl::AddRoot}\label{wxtreectrladdroot}
165
166 \func{wxTreeItemId}{AddRoot}{\param{const wxString\&}{ text},
167 \param{int}{ image = -1}, \param{int}{ selImage = -1}, \param{wxTreeItemData*}{ data = {\tt NULL}}}
168
169 Adds the root node to the tree, returning the new item.
170
171 The {\it image} and {\it selImage} parameters are an index within
172 the normal image list specifying the image to use for unselected and
173 selected items, respectively.
174 If {\it image} > -1 and {\it selImage} is -1, the same image is used for
175 both selected and unselected items.
176
177
178 \membersection{wxTreeCtrl::AppendItem}\label{wxtreectrlappenditem}
179
180 \func{wxTreeItemId}{AppendItem}{\param{const wxTreeItemId\& }{parent}, \param{const wxString\&}{ text},
181 \param{int}{ image = -1}, \param{int}{ selImage = -1}, \param{wxTreeItemData*}{ data = {\tt NULL}}}
182
183 Appends an item to the end of the branch identified by {\it parent}, return a new item id.
184
185 The {\it image} and {\it selImage} parameters are an index within
186 the normal image list specifying the image to use for unselected and
187 selected items, respectively.
188 If {\it image} > -1 and {\it selImage} is -1, the same image is used for
189 both selected and unselected items.
190
191
192 \membersection{wxTreeCtrl::AssignButtonsImageList}\label{wxtreectrlassignbuttonsimagelist}
193
194 \func{void}{AssignButtonsImageList}{\param{wxImageList*}{ imageList}}
195
196 Sets the buttons image list. The button images assigned with this method will
197 be automatically deleted by wxTreeCtrl as appropriate
198 (i.e. it takes ownership of the list).
199
200 Setting or assigning the button image list enables the display of image buttons.
201 Once enabled, the only way to disable the display of button images is to set
202 the button image list to {\tt NULL}.
203
204 This function is only available in the generic version.
205
206 See also \helpref{SetButtonsImageList}{wxtreectrlsetbuttonsimagelist}.
207
208
209 \membersection{wxTreeCtrl::AssignImageList}\label{wxtreectrlassignimagelist}
210
211 \func{void}{AssignImageList}{\param{wxImageList*}{ imageList}}
212
213 Sets the normal image list. Image list assigned with this method will
214 be automatically deleted by wxTreeCtrl as appropriate
215 (i.e. it takes ownership of the list).
216
217 See also \helpref{SetImageList}{wxtreectrlsetimagelist}.
218
219
220 \membersection{wxTreeCtrl::AssignStateImageList}\label{wxtreectrlassignstateimagelist}
221
222 \func{void}{AssignStateImageList}{\param{wxImageList*}{ imageList}}
223
224 Sets the state image list. Image list assigned with this method will
225 be automatically deleted by wxTreeCtrl as appropriate
226 (i.e. it takes ownership of the list).
227
228 See also \helpref{SetStateImageList}{wxtreectrlsetstateimagelist}.
229
230
231
232 \membersection{wxTreeCtrl::Collapse}\label{wxtreectrlcollapse}
233
234 \func{void}{Collapse}{\param{const wxTreeItemId\&}{ item}}
235
236 Collapses the given item.
237
238
239 \membersection{wxTreeCtrl::CollapseAll}\label{wxtreectrlcollapseall}
240
241 \func{void}{CollapseAll}{\void}
242
243 Collapses the root item.
244
245 \wxheading{See also}
246
247 \helpref{ExpandAll}{wxtreectrlexpandall}
248
249
250 \membersection{wxTreeCtrl::CollapseAllChildren}\label{wxtreectrlcollapseallchildren}
251
252 \func{void}{CollapseAllChildren}{\param{const wxTreeItemId\&}{ item}}
253
254 Collapses this item and all of its children, recursively.
255
256 \wxheading{See also}
257
258 \helpref{ExpandAllChildren}{wxtreectrlexpandallchildren}
259
260
261 \membersection{wxTreeCtrl::CollapseAndReset}\label{wxtreectrlcollapseandreset}
262
263 \func{void}{CollapseAndReset}{\param{const wxTreeItemId\&}{ item}}
264
265 Collapses the given item and removes all children.
266
267
268 \membersection{wxTreeCtrl::Create}\label{wxtreectrlcreate}
269
270 \func{bool}{wxTreeCtrl}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp
271 \param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp
272 \param{long}{ style = wxTR\_HAS\_BUTTONS}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``treeCtrl"}}
273
274 Creates the tree control. See \helpref{wxTreeCtrl::wxTreeCtrl}{wxtreectrlconstr} for further details.
275
276
277 \membersection{wxTreeCtrl::Delete}\label{wxtreectrldelete}
278
279 \func{void}{Delete}{\param{const wxTreeItemId\&}{ item}}
280
281 Deletes the specified item. A {\tt EVT\_TREE\_DELETE\_ITEM} event will be
282 generated.
283
284 This function may cause a subsequent call to GetNextChild to fail.
285
286
287 \membersection{wxTreeCtrl::DeleteAllItems}\label{wxtreectrldeleteallitems}
288
289 \func{void}{DeleteAllItems}{\void}
290
291 Deletes all items in the control. Note that this may not generate
292 {\tt EVT\_TREE\_DELETE\_ITEM} events under some Windows versions although
293 normally such event is generated for each removed item.
294
295
296 \membersection{wxTreeCtrl::DeleteChildren}\label{wxtreectrldeletechildren}
297
298 \func{void}{DeleteChildren}{\param{const wxTreeItemId\& }{item}}
299
300 Deletes all children of the given item (but not the item itself). Note that
301 this will {\bf not} generate any events unlike
302 \helpref{Delete}{wxtreectrldelete} method.
303
304 If you have called \helpref{wxTreeCtrl::SetItemHasChildren}{wxtreectrlsetitemhaschildren}, you
305 may need to call it again since {\it DeleteChildren} does not automatically
306 clear the setting.
307
308
309 \membersection{wxTreeCtrl::EditLabel}\label{wxtreectrleditlabel}
310
311 \func{void}{EditLabel}{\param{const wxTreeItemId\&}{ item}}
312
313 Starts editing the label of the given item. This function generates a
314 EVT\_TREE\_BEGIN\_LABEL\_EDIT event which can be vetoed so that no
315 text control will appear for in-place editing.
316
317 If the user changed the label (i.e. s/he does not press ESC or leave
318 the text control without changes, a EVT\_TREE\_END\_LABEL\_EDIT event
319 will be sent which can be vetoed as well.
320
321 \wxheading{See also}
322
323 \helpref{wxTreeCtrl::EndEditLabel}{wxtreectrlendeditlabel},
324 \helpref{wxTreeEvent}{wxtreeevent}
325
326
327 \membersection{wxTreeCtrl::EndEditLabel}\label{wxtreectrlendeditlabel}
328
329 \func{void}{EndEditLabel}{\param{bool }{cancelEdit}}
330
331 Ends label editing. If {\it cancelEdit} is {\tt true}, the edit will be cancelled.
332
333 This function is currently supported under Windows only.
334
335 \wxheading{See also}
336
337 \helpref{wxTreeCtrl::EditLabel}{wxtreectrleditlabel}
338
339
340 \membersection{wxTreeCtrl::EnsureVisible}\label{wxtreectrlensurevisible}
341
342 \func{void}{EnsureVisible}{\param{const wxTreeItemId\&}{ item}}
343
344 Scrolls and/or expands items to ensure that the given item is visible.
345
346
347 \membersection{wxTreeCtrl::Expand}\label{wxtreectrlexpand}
348
349 \func{void}{Expand}{\param{const wxTreeItemId\&}{ item}}
350
351 Expands the given item.
352
353
354 \membersection{wxTreeCtrl::ExpandAll}\label{wxtreectrlexpandall}
355
356 \func{void}{ExpandAll}{\void}
357
358 Expands all items in the tree.
359
360
361 \membersection{wxTreeCtrl::ExpandAllChildren}\label{wxtreectrlexpandallchildren}
362
363 \func{void}{ExpandAllChildren}{\param{const wxTreeItemId\&}{ item}}
364
365 Expands the given item and all its children recursively.
366
367
368 \membersection{wxTreeCtrl::GetBoundingRect}\label{wxtreectrlgetitemrect}
369
370 \constfunc{bool}{GetBoundingRect}{\param{const wxTreeItemId\&}{ item}, \param{wxRect\& }{rect}, \param{bool }{textOnly = {\tt false}}}
371
372 Retrieves the rectangle bounding the {\it item}. If {\it textOnly} is {\tt true},
373 only the rectangle around the item's label will be returned, otherwise the
374 item's image is also taken into account.
375
376 The return value is {\tt true} if the rectangle was successfully retrieved or {\tt false}
377 if it was not (in this case {\it rect} is not changed) -- for example, if the
378 item is currently invisible.
379
380 Notice that the rectangle coordinates are logical, not physical ones. So, for
381 example, the x coordinate may be negative if the tree has a horizontal
382 scrollbar and its position is not $0$.
383
384 \pythonnote{The wxPython version of this method requires only the
385 {\tt item} and {\tt textOnly} parameters. The return value is either a
386 {\tt wxRect} object or {\tt None}.}
387
388 \perlnote{In wxPerl this method only takes the parameters {\tt item} and
389 {\tt textOnly}, and returns a Wx::Rect ( or undef ).}
390
391
392 \membersection{wxTreeCtrl::GetButtonsImageList}\label{wxtreectrlgetbuttonsimagelist}
393
394 \constfunc{wxImageList*}{GetButtonsImageList}{\void}
395
396 Returns the buttons image list (from which application-defined button images are taken).
397
398 This function is only available in the generic version.
399
400
401 \membersection{wxTreeCtrl::GetChildrenCount}\label{wxtreectrlgetchildrencount}
402
403 \constfunc{unsigned int}{GetChildrenCount}{\param{const wxTreeItemId\&}{ item}, \param{bool}{ recursively = {\tt true}}}
404
405 Returns the number of items in the branch. If {\it recursively} is {\tt true}, returns the total number
406 of descendants, otherwise only one level of children is counted.
407
408
409 \membersection{wxTreeCtrl::GetCount}\label{wxtreectrlgetcount}
410
411 \constfunc{unsigned int}{GetCount}{\void}
412
413 Returns the number of items in the control.
414
415
416 \membersection{wxTreeCtrl::GetEditControl}\label{wxtreectrlgeteditcontrol}
417
418 \constfunc{wxTextCtrl *}{GetEditControl}{\void}
419
420 Returns the edit control being currently used to edit a label. Returns {\tt NULL}
421 if no label is being edited.
422
423 {\bf NB:} It is currently only implemented for wxMSW.
424
425
426 \membersection{wxTreeCtrl::GetFirstChild}\label{wxtreectrlgetfirstchild}
427
428 \constfunc{wxTreeItemId}{GetFirstChild}{\param{const wxTreeItemId\&}{ item}, \param{wxTreeItemIdValue \& }{cookie}}
429
430 Returns the first child; call \helpref{wxTreeCtrl::GetNextChild}{wxtreectrlgetnextchild} for the next child.
431
432 For this enumeration function you must pass in a `cookie' parameter
433 which is opaque for the application but is necessary for the library
434 to make these functions reentrant (i.e. allow more than one
435 enumeration on one and the same object simultaneously). The cookie passed to
436 GetFirstChild and GetNextChild should be the same variable.
437
438 Returns an invalid tree item (i.e. IsOk() returns {\tt false}) if there are no further children.
439
440 \wxheading{See also}
441
442 \helpref{wxTreeCtrl::GetNextChild}{wxtreectrlgetnextchild},
443 \helpref{wxTreeCtrl::GetNextSibling}{wxtreectrlgetnextsibling}
444
445 \pythonnote{In wxPython the returned wxTreeItemId and the new cookie
446 value are both returned as a tuple containing the two values.}
447
448 \perlnote{In wxPerl this method only takes the {\tt item} parameter, and
449 returns a 2-element list {\tt ( item, cookie )}.}
450
451
452 \membersection{wxTreeCtrl::GetFirstVisibleItem}\label{wxtreectrlgetfirstvisibleitem}
453
454 \constfunc{wxTreeItemId}{GetFirstVisibleItem}{\void}
455
456 Returns the first visible item.
457
458
459 \membersection{wxTreeCtrl::GetImageList}\label{wxtreectrlgetimagelist}
460
461 \constfunc{wxImageList*}{GetImageList}{\void}
462
463 Returns the normal image list.
464
465
466 \membersection{wxTreeCtrl::GetIndent}\label{wxtreectrlgetindent}
467
468 \constfunc{int}{GetIndent}{\void}
469
470 Returns the current tree control indentation.
471
472
473 \membersection{wxTreeCtrl::GetItemBackgroundColour}\label{wxtreectrlgetitembackgroundcolour}
474
475 \constfunc{wxColour}{GetItemBackgroundColour}{\param{const wxTreeItemId\&}{ item}}
476
477 Returns the background colour of the item.
478
479
480 \membersection{wxTreeCtrl::GetItemData}\label{wxtreectrlgetitemdata}
481
482 \constfunc{wxTreeItemData*}{GetItemData}{\param{const wxTreeItemId\&}{ item}}
483
484 Returns the tree item data associated with the item.
485
486 \wxheading{See also}
487
488 \helpref{wxTreeItemData}{wxtreeitemdata}
489
490 \pythonnote{wxPython provides the following shortcut method:
491
492 \indented{2cm}{\begin{twocollist}\itemsep=0pt
493 \twocolitem{{\bf GetPyData(item)}}{Returns the Python Object
494 associated with the wxTreeItemData for the given item Id.}
495 \end{twocollist}}
496 }%
497
498 \perlnote{wxPerl provides the following shortcut method:
499 \indented{2cm}{
500 \begin{twocollist}\itemsep=0pt
501 \twocolitem{{\bf GetPlData( item )}}{Returns the Perl data
502 associated with the Wx::TreeItemData. It is just the same as
503 tree->GetItemData(item)->GetData().}
504 \end{twocollist}}
505 }%
506
507 \membersection{wxTreeCtrl::GetItemFont}\label{wxtreectrlgetitemfont}
508
509 \constfunc{wxFont}{GetItemFont}{\param{const wxTreeItemId\&}{ item}}
510
511 Returns the font of the item label.
512
513
514 \membersection{wxTreeCtrl::GetItemImage}\label{wxtreectrlgetitemimage}
515
516 \constfunc{int}{GetItemImage}{\param{const wxTreeItemId\& }{item},
517 \param{wxTreeItemIcon }{which = wxTreeItemIcon\_Normal}}
518
519 Gets the specified item image. The value of {\it which} may be:
520
521 \begin{itemize}\itemsep=0pt
522 \item{wxTreeItemIcon\_Normal} to get the normal item image
523 \item{wxTreeItemIcon\_Selected} to get the selected item image (i.e. the image
524 which is shown when the item is currently selected)
525 \item{wxTreeItemIcon\_Expanded} to get the expanded image (this only
526 makes sense for items which have children - then this image is shown when the
527 item is expanded and the normal image is shown when it is collapsed)
528 \item{wxTreeItemIcon\_SelectedExpanded} to get the selected expanded image
529 (which is shown when an expanded item is currently selected)
530 \end{itemize}
531
532
533 \membersection{wxTreeCtrl::GetItemText}\label{wxtreectrlgetitemtext}
534
535 \constfunc{wxString}{GetItemText}{\param{const wxTreeItemId\&}{ item}}
536
537 Returns the item label.
538
539
540 \membersection{wxTreeCtrl::GetItemTextColour}\label{wxtreectrlgetitemtextcolour}
541
542 \constfunc{wxColour}{GetItemTextColour}{\param{const wxTreeItemId\&}{ item}}
543
544 Returns the colour of the item label.
545
546
547 \membersection{wxTreeCtrl::GetLastChild}\label{wxtreectrlgetlastchild}
548
549 \constfunc{wxTreeItemId}{GetLastChild}{\param{const wxTreeItemId\&}{ item}}
550
551 Returns the last child of the item (or an invalid tree item if this item has no children).
552
553 \wxheading{See also}
554
555 \helpref{GetFirstChild}{wxtreectrlgetfirstchild},
556 \helpref{wxTreeCtrl::GetNextSibling}{wxtreectrlgetnextsibling},
557 \helpref{GetLastChild}{wxtreectrlgetlastchild}
558
559
560 \membersection{wxTreeCtrl::GetNextChild}\label{wxtreectrlgetnextchild}
561
562 \constfunc{wxTreeItemId}{GetNextChild}{\param{const wxTreeItemId\&}{ item}, \param{wxTreeItemIdValue \& }{cookie}}
563
564 Returns the next child; call \helpref{wxTreeCtrl::GetFirstChild}{wxtreectrlgetfirstchild} for the first child.
565
566 For this enumeration function you must pass in a `cookie' parameter
567 which is opaque for the application but is necessary for the library
568 to make these functions reentrant (i.e. allow more than one
569 enumeration on one and the same object simultaneously). The cookie passed to
570 GetFirstChild and GetNextChild should be the same.
571
572 Returns an invalid tree item if there are no further children.
573
574 \wxheading{See also}
575
576 \helpref{wxTreeCtrl::GetFirstChild}{wxtreectrlgetfirstchild}
577
578 \pythonnote{In wxPython the returned wxTreeItemId and the new cookie
579 value are both returned as a tuple containing the two values.}
580
581 \perlnote{In wxPerl this method returns a 2-element list
582 {\tt ( item, cookie )}, instead of modifying its parameters.}
583
584
585 \membersection{wxTreeCtrl::GetNextSibling}\label{wxtreectrlgetnextsibling}
586
587 \constfunc{wxTreeItemId}{GetNextSibling}{\param{const wxTreeItemId\&}{ item}}
588
589 Returns the next sibling of the specified item; call \helpref{wxTreeCtrl::GetPrevSibling}{wxtreectrlgetprevsibling} for the previous sibling.
590
591 Returns an invalid tree item if there are no further siblings.
592
593 \wxheading{See also}
594
595 \helpref{wxTreeCtrl::GetPrevSibling}{wxtreectrlgetprevsibling}
596
597
598 \membersection{wxTreeCtrl::GetNextVisible}\label{wxtreectrlgetnextvisible}
599
600 \constfunc{wxTreeItemId}{GetNextVisible}{\param{const wxTreeItemId\&}{ item}}
601
602 Returns the next visible item.
603
604
605 \membersection{wxTreeCtrl::GetItemParent}\label{wxtreectrlgetitemparent}
606
607 \constfunc{wxTreeItemId}{GetItemParent}{\param{const wxTreeItemId\&}{ item}}
608
609 Returns the item's parent.
610
611
612 \membersection{wxTreeCtrl::GetPrevSibling}\label{wxtreectrlgetprevsibling}
613
614 \constfunc{wxTreeItemId}{GetPrevSibling}{\param{const wxTreeItemId\&}{ item}}
615
616 Returns the previous sibling of the specified item; call \helpref{wxTreeCtrl::GetNextSibling}{wxtreectrlgetnextsibling} for the next sibling.
617
618 Returns an invalid tree item if there are no further children.
619
620 \wxheading{See also}
621
622 \helpref{wxTreeCtrl::GetNextSibling}{wxtreectrlgetnextsibling}
623
624
625 \membersection{wxTreeCtrl::GetPrevVisible}\label{wxtreectrlgetprevvisible}
626
627 \constfunc{wxTreeItemId}{GetPrevVisible}{\param{const wxTreeItemId\&}{ item}}
628
629 Returns the previous visible item.
630
631
632 \membersection{wxTreeCtrl::GetQuickBestSize}\label{wxtreectrlgetquickbestsize}
633
634 \constfunc{bool}{GetQuickBestSize}{\void}
635
636 Returns true if the control will use a quick calculation for the best size,
637 looking only at the first and last items. The default is false.
638
639 \wxheading{See also}
640
641 \helpref{wxTreeCtrl::SetQuickBestSize}{wxtreectrlsetquickbestsize}
642
643
644 \membersection{wxTreeCtrl::GetRootItem}\label{wxtreectrlgetrootitem}
645
646 \constfunc{wxTreeItemId}{GetRootItem}{\void}
647
648 Returns the root item for the tree control.
649
650
651 \membersection{wxTreeCtrl::GetItemSelectedImage}\label{wxtreectrlgetitemselectedimage}
652
653 \constfunc{int}{GetItemSelectedImage}{\param{const wxTreeItemId\& }{item}}
654
655 Gets the selected item image (this function is obsolete, use
656 {\tt GetItemImage(item, wxTreeItemIcon\_Selected}) instead).
657
658
659 \membersection{wxTreeCtrl::GetSelection}\label{wxtreectrlgetselection}
660
661 \constfunc{wxTreeItemId}{GetSelection}{\void}
662
663 Returns the selection, or an invalid item if there is no selection.
664 This function only works with the controls without wxTR\_MULTIPLE style, use
665 \helpref{GetSelections}{wxtreectrlgetselections} for the controls which do have
666 this style.
667
668
669 \membersection{wxTreeCtrl::GetSelections}\label{wxtreectrlgetselections}
670
671 \constfunc{unsigned int}{GetSelections}{\param{wxArrayTreeItemIds\& }{selection}}
672
673 Fills the array of tree items passed in with the currently selected items. This
674 function can be called only if the control has the wxTR\_MULTIPLE style.
675
676 Returns the number of selected items.
677
678 \pythonnote{The wxPython version of this method accepts no parameters
679 and returns a Python list of {\tt wxTreeItemId}s.}
680
681 \perlnote{In wxPerl this method takes no parameters and returns a list of
682 {\tt Wx::TreeItemId}s.}
683
684
685 \membersection{wxTreeCtrl::GetStateImageList}\label{wxtreectrlgetstateimagelist}
686
687 \constfunc{wxImageList*}{GetStateImageList}{\void}
688
689 Returns the state image list (from which application-defined state images are taken).
690
691
692 \membersection{wxTreeCtrl::HitTest}\label{wxtreectrlhittest}
693
694 \constfunc{wxTreeItemId}{HitTest}{\param{const wxPoint\& }{point}, \param{int\& }{flags}}
695
696 Calculates which (if any) item is under the given point, returning the tree item
697 id at this point plus extra information {\it flags}. {\it flags} is a bitlist of the following:
698
699 \twocolwidtha{5cm}
700 \begin{twocollist}\itemsep=0pt
701 \twocolitem{wxTREE\_HITTEST\_ABOVE}{Above the client area.}
702 \twocolitem{wxTREE\_HITTEST\_BELOW}{Below the client area.}
703 \twocolitem{wxTREE\_HITTEST\_NOWHERE}{In the client area but below the last item.}
704 \twocolitem{wxTREE\_HITTEST\_ONITEMBUTTON}{On the button associated with an item.}
705 \twocolitem{wxTREE\_HITTEST\_ONITEMICON}{On the bitmap associated with an item.}
706 \twocolitem{wxTREE\_HITTEST\_ONITEMINDENT}{In the indentation associated with an item.}
707 \twocolitem{wxTREE\_HITTEST\_ONITEMLABEL}{On the label (string) associated with an item.}
708 \twocolitem{wxTREE\_HITTEST\_ONITEMRIGHT}{In the area to the right of an item.}
709 \twocolitem{wxTREE\_HITTEST\_ONITEMSTATEICON}{On the state icon for a tree view item that is in a user-defined state.}
710 \twocolitem{wxTREE\_HITTEST\_TOLEFT}{To the right of the client area.}
711 \twocolitem{wxTREE\_HITTEST\_TORIGHT}{To the left of the client area.}
712 \end{twocollist}
713
714 \pythonnote{in wxPython both the wxTreeItemId and the flags are
715 returned as a tuple.}
716
717 \perlnote{In wxPerl this method only takes the {\tt point} parameter
718 and returns a 2-element list {\tt ( item, flags )}.}
719
720
721 \membersection{wxTreeCtrl::InsertItem}\label{wxtreectrlinsertitem}
722
723 \func{wxTreeItemId}{InsertItem}{\param{const wxTreeItemId\& }{parent}, \param{const wxTreeItemId\& }{previous}, \param{const wxString\&}{ text},
724 \param{int}{ image = -1}, \param{int}{ selImage = -1}, \param{wxTreeItemData*}{ data = {\tt NULL}}}
725
726 \func{wxTreeItemId}{InsertItem}{\param{const wxTreeItemId\& }{parent}, \param{size\_t}{ before}, \param{const wxString\&}{ text},
727 \param{int}{ image = -1}, \param{int}{ selImage = -1}, \param{wxTreeItemData*}{ data = {\tt NULL}}}
728
729 Inserts an item after a given one ({\it previous}) or before one identified by its position ({\it before}).
730 {\it before} must be less than the number of children.
731
732 The {\it image} and {\it selImage} parameters are an index within
733 the normal image list specifying the image to use for unselected and
734 selected items, respectively.
735 If {\it image} > -1 and {\it selImage} is -1, the same image is used for
736 both selected and unselected items.
737
738 \pythonnote{The second form of this method is called
739 {\tt InsertItemBefore} in wxPython.}
740
741
742 \membersection{wxTreeCtrl::IsBold}\label{wxtreectrlisbold}
743
744 \constfunc{bool}{IsBold}{\param{const wxTreeItemId\& }{item}}
745
746 Returns {\tt true} if the given item is in bold state.
747
748 See also: \helpref{SetItemBold}{wxtreectrlsetitembold}
749
750
751 \membersection{wxTreeCtrl::IsEmpty}\label{wxtreectrlisempty}
752
753 \constfunc{bool}{IsEmpty}{}
754
755 Returns \true if the control is empty (i.e. has no items, even no root one).
756
757
758 \membersection{wxTreeCtrl::IsExpanded}\label{wxtreectrlisexpanded}
759
760 \constfunc{bool}{IsExpanded}{\param{const wxTreeItemId\&}{ item}}
761
762 Returns {\tt true} if the item is expanded (only makes sense if it has children).
763
764
765 \membersection{wxTreeCtrl::IsSelected}\label{wxtreectrlisselected}
766
767 \constfunc{bool}{IsSelected}{\param{const wxTreeItemId\&}{ item}}
768
769 Returns {\tt true} if the item is selected.
770
771
772 \membersection{wxTreeCtrl::IsVisible}\label{wxtreectrlisvisible}
773
774 \constfunc{bool}{IsVisible}{\param{const wxTreeItemId\&}{ item}}
775
776 Returns {\tt true} if the item is visible (it might be outside the view, or not expanded).
777
778
779 \membersection{wxTreeCtrl::ItemHasChildren}\label{wxtreectrlitemhaschildren}
780
781 \constfunc{bool}{ItemHasChildren}{\param{const wxTreeItemId\&}{ item}}
782
783 Returns {\tt true} if the item has children.
784
785
786 \membersection{wxTreeCtrl::OnCompareItems}\label{wxtreectrloncompareitems}
787
788 \func{int}{OnCompareItems}{\param{const wxTreeItemId\& }{item1}, \param{const wxTreeItemId\& }{item2}}
789
790 Override this function in the derived class to change the sort order of the
791 items in the tree control. The function should return a negative, zero or
792 positive value if the first item is less than, equal to or greater than the
793 second one.
794
795 Please note that you \textbf{must} use wxRTTI macros
796 \helpref{DECLARE\_DYNAMIC\_CLASS}{declaredynamicclass} and
797 \helpref{IMPLEMENT\_DYNAMIC\_CLASS}{implementdynamicclass} if you override this
798 function because otherwise the base class considers that it is not overridden
799 and uses the default comparison, i.e. sorts the items alphabetically, which
800 allows it optimize away the calls to the virtual function completely.
801
802 See also: \helpref{SortChildren}{wxtreectrlsortchildren}
803
804
805 \membersection{wxTreeCtrl::PrependItem}\label{wxtreectrlprependitem}
806
807 \func{wxTreeItemId}{PrependItem}{\param{const wxTreeItemId\& }{parent}, \param{const wxString\&}{ text},
808 \param{int}{ image = -1}, \param{int}{ selImage = -1}, \param{wxTreeItemData*}{ data = {\tt NULL}}}
809
810 Appends an item as the first child of {\it parent}, return a new item id.
811
812 The {\it image} and {\it selImage} parameters are an index within
813 the normal image list specifying the image to use for unselected and
814 selected items, respectively.
815 If {\it image} > -1 and {\it selImage} is -1, the same image is used for
816 both selected and unselected items.
817
818
819 \membersection{wxTreeCtrl::ScrollTo}\label{wxtreectrlscrollto}
820
821 \func{void}{ScrollTo}{\param{const wxTreeItemId\&}{ item}}
822
823 Scrolls the specified item into view.
824
825
826 \membersection{wxTreeCtrl::SelectItem}\label{wxtreectrlselectitem}
827
828 \func{void}{SelectItem}{\param{const wxTreeItemId\&}{ item}, \param{bool }{select = \true}}
829
830 Selects the given item. In multiple selection controls, can be also used to
831 deselect a currently selected item if the value of \arg{select} is false.
832
833
834 \membersection{wxTreeCtrl::SetButtonsImageList}\label{wxtreectrlsetbuttonsimagelist}
835
836 \func{void}{SetButtonsImageList}{\param{wxImageList*}{ imageList}}
837
838 Sets the buttons image list (from which application-defined button images are taken).
839 The button images assigned with this method will
840 {\bf not} be deleted by wxTreeCtrl's destructor, you must delete it yourself.
841
842 Setting or assigning the button image list enables the display of image buttons.
843 Once enabled, the only way to disable the display of button images is to set
844 the button image list to {\tt NULL}.
845
846 This function is only available in the generic version.
847
848 See also \helpref{AssignButtonsImageList}{wxtreectrlassignbuttonsimagelist}.
849
850
851 \membersection{wxTreeCtrl::SetIndent}\label{wxtreectrlsetindent}
852
853 \func{void}{SetIndent}{\param{int }{indent}}
854
855 Sets the indentation for the tree control.
856
857
858 \membersection{wxTreeCtrl::SetImageList}\label{wxtreectrlsetimagelist}
859
860 \func{void}{SetImageList}{\param{wxImageList*}{ imageList}}
861
862 Sets the normal image list. Image list assigned with this method will
863 {\bf not} be deleted by wxTreeCtrl's destructor, you must delete it yourself.
864
865 See also \helpref{AssignImageList}{wxtreectrlassignimagelist}.
866
867
868
869 \membersection{wxTreeCtrl::SetItemBackgroundColour}\label{wxtreectrlsetitembackgroundcolour}
870
871 \func{void}{SetItemBackgroundColour}{\param{const wxTreeItemId\&}{ item}, \param{const wxColour\& }{col}}
872
873 Sets the colour of the item's background.
874
875
876 \membersection{wxTreeCtrl::SetItemBold}\label{wxtreectrlsetitembold}
877
878 \func{void}{SetItemBold}{\param{const wxTreeItemId\& }{item}, \param{bool}{ bold = {\tt true}}}
879
880 Makes item appear in bold font if {\it bold} parameter is {\tt true} or resets it to
881 the normal state.
882
883 See also: \helpref{IsBold}{wxtreectrlisbold}
884
885
886 \membersection{wxTreeCtrl::SetItemData}\label{wxtreectrlsetitemdata}
887
888 \func{void}{SetItemData}{\param{const wxTreeItemId\&}{ item}, \param{wxTreeItemData* }{data}}
889
890 Sets the item client data.
891
892 \pythonnote{wxPython provides the following shortcut method:\par
893 \indented{2cm}{\begin{twocollist}\itemsep=0pt
894 \twocolitem{{\bf SetPyData(item, obj)}}{Associate the given Python
895 Object with the wxTreeItemData for the given item Id.}
896 \end{twocollist}}
897 }%
898
899 \perlnote{wxPerl provides the following shortcut method:
900 \indented{2cm}{
901 \begin{twocollist}\itemsep=0pt
902 \twocolitem{{\bf SetPlData( item, data )}}{Sets the Perl data
903 associated with the Wx::TreeItemData. It is just the same as
904 tree->GetItemData(item)->SetData(data).}
905 \end{twocollist}}
906 }%
907
908 \membersection{wxTreeCtrl::SetItemDropHighlight}\label{wxtreectrlsetitemdrophighlight}
909
910 \func{void}{SetItemDropHighlight}{\param{const wxTreeItemId\&}{ item}, \param{bool}{highlight = {\tt true}}}
911
912 Gives the item the visual feedback for Drag'n'Drop actions, which is
913 useful if something is dragged from the outside onto the tree control
914 (as opposed to a DnD operation within the tree control, which already
915 is implemented internally).
916
917 \membersection{wxTreeCtrl::SetItemFont}\label{wxtreectrlsetitemfont}
918
919 \func{void}{SetItemFont}{\param{const wxTreeItemId\&}{ item}, \param{const wxFont\& }{font}}
920
921 Sets the item's font. All items in the tree should have the same height to avoid
922 text clipping, so the fonts height should be the same for all of them,
923 although font attributes may vary.
924
925 \wxheading{See also}
926
927 \helpref{SetItemBold}{wxtreectrlsetitembold}
928
929
930 \membersection{wxTreeCtrl::SetItemHasChildren}\label{wxtreectrlsetitemhaschildren}
931
932 \func{void}{SetItemHasChildren}{\param{const wxTreeItemId\&}{ item}, \param{bool }{hasChildren = {\tt true}}}
933
934 Force appearance of the button next to the item. This is useful to
935 allow the user to expand the items which don't have any children now,
936 but instead adding them only when needed, thus minimizing memory
937 usage and loading time.
938
939
940 \membersection{wxTreeCtrl::SetItemImage}\label{wxtreectrlsetitemimage}
941
942 \func{void}{SetItemImage}{\param{const wxTreeItemId\&}{ item},
943 \param{int }{image}, \param{wxTreeItemIcon }{which = wxTreeItemIcon\_Normal}}
944
945 Sets the specified item image. See \helpref{GetItemImage}{wxtreectrlgetitemimage}
946 for the description of the {\it which} parameter.
947
948
949 \membersection{wxTreeCtrl::SetItemSelectedImage}\label{wxtreectrlsetitemselectedimage}
950
951 \func{void}{SetItemSelectedImage}{\param{const wxTreeItemId\&}{ item}, \param{int }{selImage}}
952
953 Sets the selected item image (this function is obsolete, use {\tt SetItemImage(item, wxTreeItemIcon\_Selected}) instead).
954
955
956 \membersection{wxTreeCtrl::SetItemText}\label{wxtreectrlsetitemtext}
957
958 \func{void}{SetItemText}{\param{const wxTreeItemId\&}{ item}, \param{const wxString\& }{text}}
959
960 Sets the item label.
961
962
963 \membersection{wxTreeCtrl::SetItemTextColour}\label{wxtreectrlsetitemtextcolour}
964
965 \func{void}{SetItemTextColour}{\param{const wxTreeItemId\&}{ item}, \param{const wxColour\& }{col}}
966
967 Sets the colour of the item's text.
968
969
970 \membersection{wxTreeCtrl::SetQuickBestSize}\label{wxtreectrlsetquickbestsize}
971
972 \func{void}{SetQuickBestSize}{\param{bool}{ quickBestSize}}
973
974 If true is passed, specifies that the control will use a quick calculation for the best size,
975 looking only at the first and last items. Otherwise, it will look at all items.
976 The default is false.
977
978 \wxheading{See also}
979
980 \helpref{wxTreeCtrl::GetQuickBestSize}{wxtreectrlgetquickbestsize}
981
982
983 \membersection{wxTreeCtrl::SetStateImageList}\label{wxtreectrlsetstateimagelist}
984
985 \func{void}{SetStateImageList}{\param{wxImageList*}{ imageList}}
986
987 Sets the state image list (from which application-defined state images are taken).
988 Image list assigned with this method will
989 {\bf not} be deleted by wxTreeCtrl's destructor, you must delete it yourself.
990
991 See also \helpref{AssignStateImageList}{wxtreectrlassignstateimagelist}.
992
993 \membersection{wxTreeCtrl::SetWindowStyle}\label{wxtreectrlsetwindowstyle}
994
995 \func{void}{SetWindowStyle}{\param{long}{styles}}
996
997 Sets the mode flags associated with the display of the tree control.
998 The new mode takes effect immediately.
999 (Generic only; MSW ignores changes.)
1000
1001
1002 \membersection{wxTreeCtrl::SortChildren}\label{wxtreectrlsortchildren}
1003
1004 \func{void}{SortChildren}{\param{const wxTreeItemId\&}{ item}}
1005
1006 Sorts the children of the given item using
1007 \helpref{OnCompareItems}{wxtreectrloncompareitems} method of wxTreeCtrl. You
1008 should override that method to change the sort order (the default is ascending
1009 case-sensitive alphabetical order).
1010
1011 \wxheading{See also}
1012
1013 \helpref{wxTreeItemData}{wxtreeitemdata}, \helpref{OnCompareItems}{wxtreectrloncompareitems}
1014
1015
1016 \membersection{wxTreeCtrl::Toggle}\label{wxtreectrltoggle}
1017
1018 \func{void}{Toggle}{\param{const wxTreeItemId\&}{ item}}
1019
1020 Toggles the given item between collapsed and expanded states.
1021
1022
1023 \membersection{wxTreeCtrl::ToggleItemSelection}\label{wxtreectrltoggleitemselection}
1024
1025 \func{void}{ToggleItemSelection}{\param{const wxTreeItemId\&}{ item}}
1026
1027 Toggles the given item between selected and unselected states. For
1028 multiselection controls only.
1029
1030
1031 \membersection{wxTreeCtrl::Unselect}\label{wxtreectrlunselect}
1032
1033 \func{void}{Unselect}{\void}
1034
1035 Removes the selection from the currently selected item (if any).
1036
1037
1038 \membersection{wxTreeCtrl::UnselectAll}\label{wxtreectrlunselectall}
1039
1040 \func{void}{UnselectAll}{\void}
1041
1042 This function either behaves the same as \helpref{Unselect}{wxtreectrlunselect}
1043 if the control doesn't have wxTR\_MULTIPLE style, or removes the selection from
1044 all items if it does have this style.
1045
1046
1047 \membersection{wxTreeCtrl::UnselectItem}\label{wxtreectrlunselectitem}
1048
1049 \func{void}{UnselectItem}{\param{const wxTreeItemId\& }{item}}
1050
1051 Unselects the given item. This works in multiselection controls only.
1052
1053
1054
1055
1056
1057 %% the wxTreeItemId opaque class
1058
1059
1060 \section{\class{wxTreeItemId}}\label{wxtreeitemid}
1061
1062 An opaque reference to a tree item.
1063
1064
1065 \wxheading{Derived from}
1066
1067 None
1068
1069 \wxheading{Include files}
1070
1071 <wx/treebase.h>
1072
1073 \wxheading{See also}
1074
1075 \helpref{wxTreeCtrl}{wxtreectrl}, \helpref{wxTreeItemData}{wxtreeitemdata},\\
1076 \helpref{wxTreeCtrl overview}{wxtreectrloverview}
1077
1078
1079 \latexignore{\rtfignore{\wxheading{Members}}}
1080
1081 \membersection{wxTreeItemId::wxTreeItemId}\label{wxtreeitemidconstr}
1082
1083 \func{}{wxTreeItemId}{\void}
1084
1085 Default constructor. wxTreemItemIds are not meant to be constructed explicitly by
1086 the user; they are returned by the \helpref{wxTreeCtrl}{wxtreectrl} functions instead.
1087
1088
1089 \membersection{wxTreeItemId::IsOk}\label{wxtreeitemidisok}
1090
1091 \constfunc{bool}{IsOk}{}
1092
1093 Returns \true if this instance is referencing a valid tree item.
1094
1095
1096 \membersection{Operators}\label{wxtreeitemidoperators}
1097
1098 \constfunc{void}{operator $!$}{}
1099
1100 Synonim for \helpref{IsOk}{wxtreeitemidisok}
1101
1102
1103 \constfunc{bool}{operator $==$}{\param{const wxTreeItemId\& }{item}}
1104
1105 \constfunc{bool}{operator $!=$}{\param{const wxTreeItemId\& }{item}}
1106
1107 Operators for comparison between \helpref{wxTreeItemId}{wxtreeitemid} objects.
1108