.TH viewres "" "" "X Utility"
.PC "Graphical class browser for Xt"
\fBviewres [\-\fIoption ...\^\fB]\fR
.PP
.HS
.SH Options:
.IC "\fB\-bd \fIcolor\fR"
Set the color of the border to \fIcolor\fR
.IC "\fB\-bg \fIcolor\fR"
Set the color of the background to \fIcolor\fR
.IC "\fB\-bw \fIpixels\fR"
Set the width of the border to \fIpixels\fR
.IC "\fB\-display \fIhost\^\fB[:\fIserver\^\fB][.\fIscreen\^\fB]\fR"
Display the client's window on screen number \fIscreen\fR
of \fIserver\fR on host system \fIhost\fR
.IC "\fB\-fg \fIcolor\fR"
Set the color of the foreground to \fIcolor\fR
.IC "\fB\-fn \fIfont\fR"
Use \fIfont\fR in the display
.IC "\fB\-geometry \fIgeometry\fR"
Set the geometry of the program's window to \fIgeometry\fR
.IC \fB\-rv\fR
Simulate reverse video by exchanging the foreground and background colors
.IC "\fB\-top \fIname\fR"
Display widget \fIname\fR as the highest widget in the hierarchy
.IC "\fB\-variable\fR"
Display in each node the widget's variable name (as declared in header files)
instead of its class name
.IC \fB\-vertical\fR
Display the tree from top to bottom on your screen,
instead of from left to right (the default)
.IC "\fB\-xrm \fIresourcestring\fR"
Use \fIresourcestring\fR to define a resource
.HE
.B viewres
displays a tree that show the hierarchy of widget classes of
the Athena Widget Set.
It can expand each node in the tree to show the resources that the
corresponding class adds (i.e., does not inherit from its parent)
when a widget is created.
.PP
.B viewres
recognizes the following command-line options:
.IP "\fB\-bd \fIcolor\fR" 0.75i
Set the color of the border to
.IR color .
.IP "\fB\-bg \fIcolor\fR"
Set the color of the background to
.IR color .
.IP "\fB\-bw \fIpixels\fR"
Set the width of the border to
.IR pixels .
.IP "\fB\-display \fIhost\^\fB[:\fIserver\^\fB][.\fIscreen\^\fB]\fR"
Display the client's window on screen number
.I screen
of
.I server
on host system
.IR host .
.IP "\fB\-fg \fIcolor\fR"
Set the color of the foreground to
.IR color .
.IP "\fB\-fn \fIfont\fR"
Use
.I font
in the display.
.IP "\fB\-geometry \fIgeometry\fR"
Set the geometry of the program's window to
.IR geometry .
The term ``geometry'' means the dimensions of the window and its location
on the screen.
.I geometry
has the form \fIwidth\(muheight\(+-xoffset\(+-yoffset\fR.
.IP \fB\-rv\fR
Simulate reverse video by exchanging the foreground and background colors.
.IP "\fB\-top \fIname\fR"
Display widget
.I name
as the highest widget in the hierarchy.
You can use this option to limit the display to a subset of the tree.
The default is
.BR Object .
.IP "\fB\-variable\fR"
Display in each node the widget's variable name (as declared in its header file)
instead of its class name.
This can help you distinguish widget classes that have the same name
(e.g., \fBText\fR).
.IP \fB\-vertical\fR
Display the tree from top to bottom on your screen,
instead of from left to right (the default).
.IP "\fB\-xrm \fIresourcestring\fR"
Use
.I resourcestring
to define a resource.
.SH "View Menu"
You can invoke the following commands from
.BR viewres 's
menu
.B View
to change the way it displays the widget tree:
.IP "\fK(Show_Variable_Names)\fR"
Set the label on each node to the variable name used
to declare the corresponding widget class.
You can also perform this operation via the translation
\fBSetLabelType(\fRvariable\fB)\fR.
.IP "\fK(Show_Class_Names)\fR"
Set the label on each node to the class name used when specifying a resource.
You can also perform this operation via the translation
\fBSetLabelType(\fRclass\fB)\fR.
.IP "\fK(Layout_Horizontal)\fR"
Display the tree from left to right on your screen.
You can also perform this operation via the translation
.BR SetOrientation(West) .
.IP "\fK(Layout_Vertical)\fR"
Display the tree from top to bottom on your screen.
You can also perform this operation via the translation
.BR SetOrientation(North) .
.IP "\fK(Show_Resource_Boxes)\fR"
Expand the selected nodes (see next section) to show the
new widget and constraint resources.
You can also perform this operation via the translation
.BR Resources(on) .
.IP "\fK(Hide_Resource_Boxes)\fR"
Remove the resource displays from the selected nodes (usually to
conserve space).
You can also perform this operation via the translation
.BR Resources(off) .
.SH "Select Menu"
To display the resources for one widget class,
either move the mouse cursor to the corresponding node and click the
middle mouse button,
or use the right mouse button to add the node to the selection list and then
invoke entry
.K "Show_Resource_Boxes"
from menu
.BR View .
Because the left mouse button toggles the selection state of a node,
clicking on a selected node removes it from the selected list.
.PP
You can also use the following commands on the menu
.B Select
to collect nodes:
.IP "\fK(Unselect_All)\fR"
Remove all nodes from the selection list.
You can also perform this operation via the translation
.BR Select(nothing) .
.IP "\fK(Select_All)\fR"
Add all nodes to the selection list.
You can also perform this operation via the translation
.BR Select(all) .
.IP "\fK(Invert_All)\fR"
Invert the select status of all nodes:
nodes that are unselected become selected, and selected nodes that are
selected become unselected.
You can also perform this operation via the translation
.BR Select(invert) .
.IP "\fK(Select_Parent)\fR"
Select the immediate parents of all selected nodes.
You can also perform this operation via the translation
.BR Select(parent) .
.IP "\fK(Select_Ancestors)\fR"
Recursively select all parents of all selected nodes.
You can also perform this operation via the translation
.BR Select(ancestors) .
.IP "\fK(Select_Children)\fR"
Select the immediate children of all selected nodes.
You can also perform this operation via the translation
.BR Select(children) .
.IP "\fK(Select_Descendants)\fR"
Recursively select all children of all selected nodes.
You can also perform this operation via the translation
.BR Select(descendants) .
.IP "\fK(Select_Has_Resources)\fR"
Select all nodes that add new resources (regular or constraint)
to their corresponding widget classes.
You can also perform this operation via the translation
.BR Select(resources) .
.IP "\fK(Select_Shown_Resource_Boxes)\fR"
Select all nodes whose resource boxes are currently expanded
(usually so that they can be closed by \fBHide Resource Boxes\fR).
You can also perform this operation via the translation
.BR Select(shown) .
.SH "Actions"
.B viewres
lets you perform the following actions:
.IP "\fBQuit()\fR"
Exit from
.BR viewres .
.IP "\fBSetLabelType(\fItype\^\fB)\fR"
Set what the node labels display.
.I type
can be either
.B class
or
.BR variable .
.IP "\fBSetOrientation(\fIdirection\^\fB)\fR"
Plant the root of the tree onto the
.I direction
edge of your screen.
.B viewres
then grows the tree toward the opposite edge of the screen.
.I direction
can be one of the following:
.BR West ,
.BR North ,
.BR East ,
or
.BR South .
.IP "\fBSelect(\fIwhat\^\fB)\fR"
Select the indicated nodes.
.I what
indicates the nodes to select, as follows:
.BR nothing ,
.BR invert ,
.BR parent ,
.BR ancestors,
.BR children ,
.BR descendants ,
.BR resources ,
or
.BR shown .
Each is describe in the section on the
.BR View
menu, above.
.IP "\fBResources(\fIop\^\fB)\fR"
Change the state of the resource boxes in the selected nodes.
.I op
can be
.BR on ,
.BR off ,
or
.BR toggle .
If invoked from within one of the nodes (through the keyboard or pointer),
only that node is affected.
.SH "Widget Hierarchy"
Resources may be specified for the following widgets.
.I variable-name
is the widget variable name of each node:
.DM
Viewres viewres
	Paned pane
		Box buttonbox
			Command quit
.DE
.DM
			MenuButton view
				SimpleMenu viewMenu
					SmeBSB layoutHorizontal
					SmeBSB layoutVertical
					SmeLine line1
					SmeBSB namesVariable
					SmeBSB namesClass
					SmeLine line2
					SmeBSB viewResources
					SmeBSB viewNoResources
.DE
.DM
			MenuButton select
				SimpleMenu selectMenu
					SmeBSB unselect
					SmeBSB selectAll
					SmeBSB selectInvert
					SmeLine line1
					SmeBSB selectParent
					SmeBSB selectAncestors
					SmeBSB selectChildren
					SmeBSB selectDescendants
					SmeLine line2
					SmeBSB selectHasResources
					SmeBSB selectShownResources
.DE
.DM
		Form treeform
			Porthole porthole
				Tree tree
					Box \fIvariable-name\fP
						Toggle \fIvariable-name\fP
						List \fIvariable-name\fP
			Panner panner
.DE
.SH "See Also"
appres,
editres,
listres,
X utilities
.R
.SH Notes
Copyright \(co 1990, Massachusetts Institute of Technology.
.PP
.II "Fulton, Jim"
.B viewres
was written by Jim Fulton of the MIT X Consortium.
