module documentation
Graphically display a Tree.
Class |
|
A canvas widget that displays a single segment of a hierarchical tree. Each TreeSegmentWidget connects a single "node widget" to a sequence of zero or more "subtree widgets". By default, the bottom of the node is connected to the top of each subtree by a single line... |
Class |
|
No class docstring; 0/6 instance variable, 1/6 method documented |
Class |
|
A canvas widget that displays a single Tree. TreeWidget manages a group of TreeSegmentWidgets that are used to display a Tree. |
Function | demo |
Undocumented |
Function | draw |
Open a new window containing a graphical diagram of the given trees. |
Function | tree |
Convert a Tree into a TreeSegmentWidget. |
Function | _tree |
Undocumented |
def tree_to_treesegment(canvas, t, make_node=TextWidget, make_leaf=TextWidget, **attribs):
(source)
¶
Convert a Tree into a TreeSegmentWidget.
Parameters | |
canvas | Undocumented |
t | Undocumented |
make | A CanvasWidget constructor or a function that creates CanvasWidgets. make_node is used to convert the Tree's nodes into CanvasWidgets. If no constructor is specified, then TextWidget will be used. |
make | A CanvasWidget constructor or a function that creates CanvasWidgets. make_leaf is used to convert the Tree's leafs into CanvasWidgets. If no constructor is specified, then TextWidget will be used. |
**attribs | Attributes for the canvas widgets that make up the returned TreeSegmentWidget. Any attribute beginning with 'tree_' will be passed to all TreeSegmentWidgets (with the 'tree_' prefix removed. Any attribute beginning with 'node_' will be passed to all nodes. Any attribute beginning with 'leaf_' will be passed to all leaves. And any attribute beginning with 'loc_' will be passed to all text locations (for Trees). |