Blame doc/man/man3/XmTree.3

Packit b099d7
.DT
Packit b099d7
.TH XmForm 3X "15 July 1992"
Packit b099d7
.SH NAME
Packit b099d7
XmTree - The Tree widget class
Packit b099d7
.SH SYNOPSIS
Packit b099d7
#include <Xm/XTree.h>
Packit b099d7
.SH DESCRIPTION
Packit b099d7
.PP
Packit b099d7
.TS
Packit b099d7
tab (%);
Packit b099d7
l l.
Packit b099d7
.TE
Packit b099d7
.PP
Packit b099d7
The Tree widget is a container that shows the relationship of its children in a graphical 
Packit b099d7
tree-like format. Each child of the Tree widget is a node in the Tree. The parent-child 
Packit b099d7
relationships between these nodes are completely distinct from the widget hierarch.. 
Packit b099d7
The hierarchy of nodes is created by specifying the tree "parent" of each node as a 
Packit b099d7
constraint resource. If a node's parent is NULL then it is assumed to be a root of the 
Packit b099d7
tree. Although each widget can only have one parent, the Tree widget supports adding 
Packit b099d7
more than one "root" node to a single Tree.
Packit b099d7
.PP
Packit b099d7
Note: the Tree widget assumes that is will be totally responsible for mapping and 
Packit b099d7
unmapping its children. Therefore no child of this widget should ever modify its 
Packit b099d7
mappedWhenManaged resource. If a child does modify this resource the behavior is 
Packit b099d7
undefined.
Packit b099d7
.PP
Packit b099d7
.SH User Interaction
Packit b099d7
.PP
Packit b099d7
Each node in the tree can be in four states: open, closed, always open, and hidden. The 
Packit b099d7
state of a node changes how it appears to the user and what actions are available to the 
Packit b099d7
user.
Packit b099d7
.ta 15
Packit b099d7
.HP 15
Packit b099d7
Open	This node will have an open folder shown to its left that 
Packit b099d7
may be selected by the user to close this node. When a 
Packit b099d7
node is open all of its children will be visible to the user.
Packit b099d7
Packit b099d7
.ta 15
Packit b099d7
.HP 15
Packit b099d7
Closed	This node will have a closed folder shown to its left that 
Packit b099d7
may be selected by the user to open this node. When a 
Packit b099d7
node is closed none of its children will be visible to the 
Packit b099d7
user.
Packit b099d7
Packit b099d7
.ta 15
Packit b099d7
.HP 15
Packit b099d7
Always Open	This node will have no folder button associated with it. 
Packit b099d7
All of its children will be visible to the user.
Packit b099d7
Packit b099d7
.ta 15
Packit b099d7
.HP 15
Packit b099d7
Hidden	This node will not be shown to the user and all of its 
Packit b099d7
children will appear and act exactly as if they were 
Packit b099d7
children of this node's parent. It will appear to the user 
Packit b099d7
as if this node does not exist.
Packit b099d7
.PP
Packit b099d7
To maintain consistency of the user interface we have found that it is bestto use the 
Packit b099d7
node state "Always Open" for nodes with no children. This way the user will only see 
Packit b099d7
a folder button next to a node that has children to display. A folder button associated 
Packit b099d7
with a node that has no children has no defined semantics.
Packit b099d7
.PP
Packit b099d7
.SH Normal Resources
Packit b099d7
.PP
Packit b099d7
.TS
Packit b099d7
tab (%);
Packit b099d7
l l l l.
Packit b099d7
Name%Class%Type%Initial Value
Packit b099d7
connectStyle%ConnectStyle%unsigned char%XmTreeDirect
Packit b099d7
horizontalNodeSpace%Dimension%HorizontalDimension%20
Packit b099d7
verticalNodeSpace%Dimension%VerticalDimension%2
Packit b099d7
.TE
Packit b099d7
.PP
Packit b099d7
All resource names begin with XmN and all resource class names begin with XmC.
Packit b099d7
.PP
Packit b099d7
.SH connectStyle
Packit b099d7
.PP
Packit b099d7
The style of the lines visually connecting parent nodes to children nodes. The valid styles are XmTreeDirect or XmTreeLadder.
Packit b099d7
.SH horizontalNodeSpace
Packit b099d7
.PP
Packit b099d7
.SH verticalNodeSpace
Packit b099d7
.PP
Packit b099d7
The amount of space between each node in the tree and it nearest neighbor.
Packit b099d7
Packit b099d7
The following resources are inherited from the XmHierarchy widget:
Packit b099d7
Packit b099d7
.TS
Packit b099d7
tab (%);
Packit b099d7
l l l l.
Packit b099d7
Name%Class%Type%Initial Value
Packit b099d7
autoClose%AutoClose%Boolean%True
Packit b099d7
closeFolderPixmap%Pixmap%Pixmap%XmUNSPECIFIED_PIXMAP
Packit b099d7
horizontalMargin%Dimension%HorizontalDimension%2
Packit b099d7
openFolderPixmap%Pixmap%Pixmap%XmUNSPECIFIED_PIXMAP
Packit b099d7
refigureMode%Boolean%Boolean%True
Packit b099d7
verticalMargin%Dimension%VerticalDimension%2
Packit b099d7
.TE
Packit b099d7
.PP
Packit b099d7
All resource names begin with XmN and all resource class names begin with XmC.
Packit b099d7
.PP
Packit b099d7
.SH Constraint Resources
Packit b099d7
.PP 
Packit b099d7
.TS
Packit b099d7
tab (%);
Packit b099d7
l l l l.
Packit b099d7
Name%Class%Type%Initial Value
Packit b099d7
openClosePadding%OpenClosePadding%Int%0
Packit b099d7
lineColor%Foreground%Pixel%<dynamic>
Packit b099d7
lineWidth%LineWidth%Dimension%0
Packit b099d7
.TE
Packit b099d7
.PP
Packit b099d7
All resource names begin with XmN and all resource class names begin with XmC.
Packit b099d7
openClosePadding
Packit b099d7
.PP
Packit b099d7
The number of pixels between the folder button and the node it is associated with.
Packit b099d7
.PP
Packit b099d7
.SH lineColor
Packit b099d7
.PP 
Packit b099d7
The color of the line connecting a node to its parent. The default value for this 
Packit b099d7
resource is the foreground color of the Tree widget.
Packit b099d7
.PP
Packit b099d7
.SH lineWidth
Packit b099d7
.PP
Packit b099d7
The width of a connection line between a node and its parent
Packit b099d7
.PP 
Packit b099d7
The following constraint resources are inherited from the XmHierarchy widget:
Packit b099d7
.PP
Packit b099d7
.TS
Packit b099d7
tab (%);
Packit b099d7
l l l l.
Packit b099d7
Name%Class%Type%Initial Value
Packit b099d7
insertBefore%InsertBefore%Widget%NULL
Packit b099d7
nodeState%NodeState%XmHierarchyNodeState%Open
Packit b099d7
parentNode%ParentNode%Widget%NULL
Packit b099d7
.TE
Packit b099d7
.PP
Packit b099d7
All resource names begin with XmN and all resource class names begin with XmC.
Packit b099d7
Geometry Management:
Packit b099d7
.PP
Packit b099d7
The layout is performed by assigning each node a box that is just large enough to con-
Packit b099d7
tain itself and all of its children. A recursive layout is then performed that centers each 
Packit b099d7
node vertically in its box and at the extreme left horizontally. The children's boxes are 
Packit b099d7
then placed to the right of the node separated by the horizontalNodeSpace from their 
Packit b099d7
parent, stacked above each other and separated by verticalNodeSpace. This process is 
Packit b099d7
repeated recursively for each child in the tree.
Packit b099d7
.PP
Packit b099d7
The preferred size of the entire tree will be just large enough to contain all nodes in 
Packit b099d7
the hierarchy. As the state of nodes change the tree will attempt to resize itself to con-
Packit b099d7
tain its current configuration. If the tree is forced larger than the desired size the nodes 
Packit b099d7
will be centered vertically and flush to the left edge of the tree widget. If the tree is 
Packit b099d7
forced smaller, some nodes may be moved or drawn outside the end of the tree. For 
Packit b099d7
this reason it is usually desirable to put the tree into a Scrolled Window  
Packit b099d7
widget.
Packit b099d7
.PP
Packit b099d7
.SH SEE ALSO
Packit b099d7
.PP
Packit b099d7
XmColumn(3X)
Packit b099d7
.PP
Packit b099d7
.SH COPYRIGHT
Packit b099d7
.PP
Packit b099d7
Copyright (c) 1992 by Integrated Computer Solutions, Inc.