Documentation for hierarch.tcl

Node construction

Node construction

The figure shows a schematic for the layout of the widgets within a single node. Each node is defined by a node frame, which acts as a container. The path of the node frame is used to refer to the node as a whole within the hierarch_tcl commands, and the rest of the widgets are defined with respect to it. If the parent frame is w then the node elements for the ith node are:

Element Description Path
Node Frame This frame widget contains the remaining widgets and acts as a handle for the hierarch commands. w.fnode_$i
Node Name This displays the name of the node as a label. w.fnode_$i.name
Control Button This is a control to expand or collapse the display of the child nodes. w.fnode_$i.control
Child Frame This is a container frame that displays the "children" of the current node. w.fnode_$i.fchild
Connecting Lines This displays a set of lines inside a canvas widget, which appear to "connect" the current node to the child nodes. w.fnode_$i.fchild.connect
Sub-nodes Frame This frame groups together the sub-nodes of the current node - each sub-node is another node like the top-level node described here. w.fnode_$i.fchild.fsubnodes

The Root Node

The root node is an invisible node that holds all the others. It is essentially a frame containing the first set of visible nodes. The root node widget path is that passed to hierarch_create, and is identified by the presence of a label called w.root.