![]() |
![]()
| ![]() |
![]()
NAMEBlt_TreeCreateNode - Creates a node in a tree data object. SYNOPSIS#include <bltTree.h> Blt_TreeNode Blt_TreeCreateNode(tree, parent, name, position) ARGUMENTS
DESCRIPTIONThis procedure creates a new node is a tree data object. The node is initially empty, but data values can be added with Blt_TreeSetValue. Each node has a serial number that identifies it within the tree. No two nodes in the same tree will ever have the same ID. You can find a node's ID with Blt_TreeNodeId. The arguments are as follows:
RETURNSThe new node returned is of type Blt_TreeNode. It's a token that can be used with other routines to add/delete data values or children nodes. EXAMPLEThe following example creates a new node from the root node. Blt_Tree token; Blt_TreeNode root, node; if (Blt_TreeGetToken(interp, "myTree", &token) != TCL_OK) { NOTIFICATIONSBlt_TreeCreateNode can trigger tree notify events. You can be notified whenever a node is created by using the Blt_TreeCreateNotifyHandler. A callback routine is registered that will be automatically invoked whenever a new node is added via Blt_TreeCreateNode to the tree. KEYWORDStree, token
|