📄 motifhierarchy.html
字号:
</pre>(The <b>-</b> flags indicate that the node is considered "expandable", because it contains children. This is usually marked in a displayedhierarchy as an "open folder" icon.)<p>There is a subtlety in the syntax of a hierarchy structure string:nodes that have two list elements represent nodes with children,while nodes with one or more than two elements represent singleterminal nodes. Hence, the structure string <p><pre> A {hi there} C </pre>represents the hierarchy<p><pre> A - hi there C</pre>If "hi there" is meant to be a simple node parallel with A and C, it mustbe written with either one or more than two elements, e.g.:<p><pre> A {hi-there} C</pre></blockquote><h4>HIERARCHY VALUES </h4><blockquote><p>At any time hierarchySetValues can be called,which fills in the value strings of the terminal nodes withstrings from the supplied value list. If the first hierarchy givenabove had hierarchySetValues invoked with the following string<p><pre> 1 {2 3} 4 5 {{6 7 8} 9} 10</pre>The values would be assigned as follows:<p><pre> A = 1 - B b1 = 2 b2 = 3 C = 4 D = 5 - E - e1 e11 = 6 e12 = 7 e13 = 8 e2 = 9 F = 10</pre>Note that only terminal nodes can receive values, and that the liststructure of the value string mirrors that of the structure string.<p></blockquote><h4>ARRAY NODES</h4><blockquote><p>It is possible for a node to be marked as an "array node". In this case,the second element of the structure for the node uses the special name "+".If the subnode is simply named "+", the array is a simple array of terminalvalues. When values are assigned to array nodes, the number of items inthe value list becomes the number of children of the array node. Thisnumber can grow or shrink. Given the structure string<p><pre> A {B +}</pre>and the value string<p><pre> v {w x y z}</pre>the resulting hierarchy is:<p><pre> A = v - B 0 = w 1 = x 2 = y 3 = z</pre>Child nodes of B are automatically created and given names starting with "0".Supplying another value string "v {a b}" would reduce the number of elementssubordinate to B to 2.<p>The array constructor "+" can be nested: the structure/value pair<p><pre> {A {+ {+}}} {{1 2} {3 4} {5 6}}</pre>results in the "two dimensional array" hierarchy<p><pre> - A - 0 0 = 1 1 = 2 - 1 0 = 3 1 = 4 - 2 0 = 5 1 = 6</pre></blockquote><h4>STRUCTURED ARRAY NODES</h4><blockquote><p>Arrays can also have substructure. This is indicated by replacing "+" witha two-element list, where the first element is "+" and the second is a structure string representing the array substructure. For an array of structures, each having a member "n" and a substructure member "coord",with members "x" and "y", one could write for structure and value:<p><pre> {Point {+ {n {coord {x y}}}}} {{1 {2 3}} {4 {5 6}}}</pre>Yielding:<p><pre> - Point - 0 n = 1 - coord x = 2 y = 3 - 1 n = 4 - coord x = 5 y = 6</pre></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./motifHierarchy.html#top">motifHierarchy</a></b>, hierarchySetValues, hierarchyCreate<hr><a name="hierarchySetValues"></a><p align=right><a href="rtnIndex.html"><i>GUI Tcl Library (UNIX) : Tcl Procedures</i></a></p></blockquote><h1>hierarchySetValues</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>hierarchySetValues</strong> - set the values of terminal nodes in a hierarchy</p><p></blockquote><h4>LOCALE</h4><blockquote><p>UNIX GUI<p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>hierarchySetValues <i>name</i> <i>value</i></pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>The named hierarchy has its terminal node values set according to the structured list <i>value</i>. See the documentation for hierarchySetStructurefor a discussion of hierarchy values.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./motifHierarchy.html#top">motifHierarchy</a></b>, hierarchySetStructure, hierarchyCreate<hr><a name="hierarchyHighlight"></a><p align=right><a href="rtnIndex.html"><i>GUI Tcl Library (UNIX) : Tcl Procedures</i></a></p></blockquote><h1>hierarchyHighlight</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>hierarchyHighlight</strong> - highlight a given node in a hierarchy</p><p></blockquote><h4>LOCALE</h4><blockquote><p>UNIX GUI<p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>hierarchyHighlight <i>name</i> <i>path</i></pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>Within the named hierarchy, the terminal node described by <i>path</i> is highlighted.<i>Path</i> is a list of node names that describes the chain of nodes startingwith the root node of the hierarchy. More than one node in a hierarchycan be highlighted. Nonterminal nodes cannot be highlighted.<p></blockquote><h4>EXAMPLE</h4><blockquote><p>Suppose the structure string of the hierarchy named <b>c</b> is:<p><pre>{fruit {apple cherry}} {vegetable {carrot onion}}</pre>To highlight the <b>carrot</b> node one would issue the command:<p><pre>hierarchyHighlight c {vegetable carrot}</pre></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./motifHierarchy.html#top">motifHierarchy</a></b>, hierarchyUnhighlight, hierarchyCreate, hierarchySetStructure<hr><a name="hierarchyUnhighlight"></a><p align=right><a href="rtnIndex.html"><i>GUI Tcl Library (UNIX) : Tcl Procedures</i></a></p></blockquote><h1>hierarchyUnhighlight</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>hierarchyUnhighlight</strong> - highlight a given node in a hierarchy</p><p></blockquote><h4>LOCALE</h4><blockquote><p>UNIX GUI<p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>hierarchyUnhighlight <i>name</i> <i>path</i></pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This command undoes the work of hierarchyHighlight. See that commandfor a description of the arguments to this one.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./motifHierarchy.html#top">motifHierarchy</a></b>, hierarchyHighlight, hierarchyCreate, hierarchySetStructure</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -