| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
<HTML> |
| 6 |
<HEAD> |
| 7 |
<TITLE>Blt_TreeGetNode(3) manual page</TITLE> |
| 8 |
</HEAD> |
| 9 |
<BODY bgcolor=white> |
| 10 |
<A HREF="#toc">Table of Contents</A><P> |
| 11 |
|
| 12 |
<H2><A NAME="sect0" HREF="#toc0">Name</A></H2> |
| 13 |
Blt_TreeGetNode - Finds the node |
| 14 |
from the ID. |
| 15 |
<H2><A NAME="sect1" HREF="#toc1">Synopsis</A></H2> |
| 16 |
<BR> |
| 17 |
<PRE>#include <bltTree.h> |
| 18 |
|
| 19 |
Blt_TreeNode |
| 20 |
Blt_TreeGetNode(tree, number) |
| 21 |
</PRE> |
| 22 |
<H2><A NAME="sect2" HREF="#toc2">Arguments</A></H2> |
| 23 |
<P> |
| 24 |
Blt_Tree <I>tree</I><tt> </tt> <tt> </tt> (in)<BR> |
| 25 |
<tt> </tt> <tt> </tt> Tree containing the requested node. <P> |
| 26 |
unsigned int <I>number</I><tt> </tt> <tt> </tt> (in)<BR> |
| 27 |
<tt> </tt> <tt> </tt> Serial number of the requested node. |
| 28 |
<H2><A NAME="sect3" HREF="#toc3">Description</A></H2> |
| 29 |
This procedure returns |
| 30 |
a node in a tree object based upon a give serial number. The node is |
| 31 |
searched using the serial number. <P> |
| 32 |
The arguments are as follows: |
| 33 |
<DL> |
| 34 |
|
| 35 |
<DT><I>tree</I> </DT> |
| 36 |
<DD>The |
| 37 |
tree containing the requested node. </DD> |
| 38 |
|
| 39 |
<DT><I>number</I> </DT> |
| 40 |
<DD>The serial number of the requested |
| 41 |
node. </DD> |
| 42 |
</DL> |
| 43 |
|
| 44 |
<H2><A NAME="sect4" HREF="#toc4">Returns</A></H2> |
| 45 |
The node represented by the given serial number is returned. |
| 46 |
If no node with that ID exists in <I>tree</I> then NULL is returned. |
| 47 |
<H2><A NAME="sect5" HREF="#toc5">Example</A></H2> |
| 48 |
The |
| 49 |
following example gets the node from a serial number. <BR> |
| 50 |
<CODE>unsigned int number;<BR> |
| 51 |
Blt_TreeNode node;<BR> |
| 52 |
Blt_TreeToken token;<BR> |
| 53 |
node = Blt_TreeGetNode(token, number);<BR> |
| 54 |
if (node == NULL) {<BR> |
| 55 |
printf("no node with ID %d exists\n", number);<BR> |
| 56 |
} else {<BR> |
| 57 |
printf("node found: label is %s\n", <A HREF="Blt_TreeNodeLabel.node">Blt_TreeNodeLabel(node)</A> |
| 58 |
);<BR> |
| 59 |
}<BR> |
| 60 |
|
| 61 |
<H2><A NAME="sect6" HREF="#toc6"></CODE>Keywords</A></H2> |
| 62 |
Tcl_TreeCreateNode, Tcl_TreeDeleteNode <P> |
| 63 |
|
| 64 |
<HR><P> |
| 65 |
<A NAME="toc"><B>Table of Contents</B></A><P> |
| 66 |
<UL> |
| 67 |
<LI><A NAME="toc0" HREF="#sect0">Name</A></LI> |
| 68 |
<LI><A NAME="toc1" HREF="#sect1">Synopsis</A></LI> |
| 69 |
<LI><A NAME="toc2" HREF="#sect2">Arguments</A></LI> |
| 70 |
<LI><A NAME="toc3" HREF="#sect3">Description</A></LI> |
| 71 |
<LI><A NAME="toc4" HREF="#sect4">Returns</A></LI> |
| 72 |
<LI><A NAME="toc5" HREF="#sect5">Example</A></LI> |
| 73 |
<LI><A NAME="toc6" HREF="#sect6">Keywords</A></LI> |
| 74 |
</UL> |
| 75 |
</BODY></HTML> |