| 1 |
'\" |
| 2 |
'\" Copyright 1991-1998 by Bell Labs Innovations for Lucent Technologies. |
| 3 |
'\" |
| 4 |
'\" Permission to use, copy, modify, and distribute this software and its |
| 5 |
'\" documentation for any purpose and without fee is hereby granted, provided |
| 6 |
'\" that the above copyright notice appear in all copies and that both that the |
| 7 |
'\" copyright notice and warranty disclaimer appear in supporting documentation, |
| 8 |
'\" and that the names of Lucent Technologies any of their entities not be used |
| 9 |
'\" in advertising or publicity pertaining to distribution of the software |
| 10 |
'\" without specific, written prior permission. |
| 11 |
'\" |
| 12 |
'\" Lucent Technologies disclaims all warranties with regard to this software, |
| 13 |
'\" including all implied warranties of merchantability and fitness. In no event |
| 14 |
'\" shall Lucent Technologies be liable for any special, indirect or |
| 15 |
'\" consequential damages or any damages whatsoever resulting from loss of use, |
| 16 |
'\" data or profits, whether in an action of contract, negligence or other |
| 17 |
'\" tortuous action, arising out of or in connection with the use or performance |
| 18 |
'\" of this software. |
| 19 |
'\" |
| 20 |
'\" |
| 21 |
.so man.macros |
| 22 |
.TH Blt_TreeGetNode 3 BLT_VERSION BLT "BLT Library Procedures" |
| 23 |
.BS |
| 24 |
.SH NAME |
| 25 |
Blt_TreeGetNode \- Finds the node from the ID. |
| 26 |
.SH SYNOPSIS |
| 27 |
.nf |
| 28 |
\fB#include <bltTree.h>\fR |
| 29 |
.sp |
| 30 |
Blt_TreeNode |
| 31 |
\fBBlt_TreeGetNode\fR(\fItree\fR, \fInumber\fR) |
| 32 |
.fi |
| 33 |
.SH ARGUMENTS |
| 34 |
.AS "unsigned int" number |
| 35 |
.AP Blt_Tree tree in |
| 36 |
Tree containing the requested node. |
| 37 |
.AP "unsigned int" number in |
| 38 |
Serial number of the requested node. |
| 39 |
.BE |
| 40 |
.SH DESCRIPTION |
| 41 |
This procedure returns a node in a tree object |
| 42 |
based upon a give serial number. |
| 43 |
The node is searched using the serial number. |
| 44 |
.PP |
| 45 |
The arguments are as follows: |
| 46 |
.TP 1i |
| 47 |
\fItree\fR |
| 48 |
The tree containing the requested node. |
| 49 |
.TP 1i |
| 50 |
\fInumber\fR |
| 51 |
The serial number of the requested node. |
| 52 |
.SH RETURNS |
| 53 |
The node represented by the given serial number is returned. If no |
| 54 |
node with that ID exists in \fItree\fR then NULL is returned. |
| 55 |
.SH EXAMPLE |
| 56 |
The following example gets the node from a serial number. |
| 57 |
.CS |
| 58 |
unsigned int number; |
| 59 |
Blt_TreeNode node; |
| 60 |
Blt_TreeToken token; |
| •61 |
\&... |
| 62 |
node = Blt_TreeGetNode(token, number); |
| 63 |
if (node == NULL) { |
| 64 |
printf("no node with ID %d exists\\n", number); |
| 65 |
} else { |
| 66 |
printf("node found: label is %s\\n", Blt_TreeNodeLabel(node)); |
| 67 |
} |
| 68 |
.CE |
| 69 |
.SH KEYWORDS |
| 70 |
Tcl_TreeCreateNode, Tcl_TreeDeleteNode |