viewres(XC)
viewres --
graphical class browser for Xt
Syntax
viewres [-option...]
Description
The viewres program displays a tree showing the
widget class hierarchy of the Motif Widget Set. Each node in
the tree can be expanded to show the resources that the
corresponding class adds (that is, does not inherit from its
parent) when a widget is created. This application allows
you to visually examine the structure and inherited
resources for the Motif Widget Set.
Options
viewres accepts all of the standard toolkit command line options as
well as the following:
-topname-
This option specifies the name of the highest widget in the hierarchy to
display. This is typically used to limit the display to a subset of the
tree. The default is Object.
-variable-
This option indicates that the widget variable names (as declared in
header files) should be displayed in the nodes rather than the widget
class name. This is sometimes useful to distinguish widget classes that
share the same name (such as Text).
-vertical-
This option indicates that the tree should be displayed top to bottom
rather than left to right.
View menu
The way in which the tree is displayed may be changed through the
entries in the View menu:
Show Variable Names-
This entry causes the node labels to be set to the variable names used
to declare the corresponding widget class. This operation may also be
performed with the SetLabelType (variable) translation.
Show Class Names-
This entry causes the node labels to be set to the class names used when
specifying resources. This operation may also be performed with the
SetLabelType (class) translation.
Layout Horizontal-
This entry causes the tree to be laid out from left to right. This operation
may also be performed with the SetOrientation(West) translation.
Layout Vertical-
This entry causes the tree to be laid out from top to bottom. This operation
may also be performed with the SetOrientation(North) translation.
Show Resource Boxes-
This entry expands the selected nodes (see next section) to show the
new widget and constraint resources. This operation
may also be performed with the Resources(on) translation.
Hide Resource Boxes-
This entry removes the resource displays from the selected nodes (usually to
conserve space). This operation
may also be performed with the Resources(off) translation.
Select menu
Resources for a single widget class can be displayed by clicking
Button2 on the corresponding node, or by adding the node to the
selection list with Button1 and using the Show Resource
Boxes entry in the View menu. Since Button1 actually toggles the
selection state of a node, clicking on a selected node will cause it to be
removed from the selected list.
Use the Select menu to select various combinations
of nodes:
Unselect All-
This entry removes all nodes from the selection list. This operation
may also be performed with the Select(nothing) translation.
Select All-
This entry adds all nodes to the selection list. This operation
may also be performed with the Select(all) translation.
Invert All-
This entry adds unselected nodes to and removes selected nodes from the
selection list. This operation
may also be performed with the Select(invert) translation.
Select Parent-
This entry selects the immediate parents of all selected nodes. This operation
may also be performed with the Select(parent) translation.
Select Ancestors-
This entry recursively selects all parents of all selected nodes. This
operation may also be performed with the Select(ancestors)
translation.
Select Children-
This entry selects the immediate children of all selected nodes. This
operation may also be performed with the Select(children)
translation.
Select Descendants-
This entry recursively selects all children of all selected nodes. This
operation may also be performed with the Select(descendants)
translation.
Select Has Resources-
This entry selects all nodes that add new resources (regular or constraint)
to their corresponding widget classes. This operation
may also be performed with the Select(resources) translation.
Select Shown Resource Boxes-
This entry selects all nodes whose resource boxes are currently expanded
(usually so that they can be closed with the Hide Resource
Boxes option on the View menu. This operation may
also be performed with the Select(shown) translation.
Functions
The following application functions are provided:
Quit()-
This function causes viewres to exit.
SetLabelType(type)-
This function sets the node labels to display the widget variable or
class names, according to the argument type.
SetOrientation(direction)-
This function sets the root of the tree to be one of the following areas of
the window: West, North, East, or South.
Select(what)-
This function selects the indicated nodes, as described in
the View menu
section: nothing (unselects all nodes), invert, parent, ancestors,
children, descendants, resources, shown.
Resources(op)-
This function turns on, off, or toggles the resource boxes
for the selected nodes.
If invoked from within one of the nodes (through the keyboard or pointer),
only that node is used.
Widget hierarchy
Resources may be specified for the following widgets:
Viewres viewres
XmMainWindow main
XmDrawingArea ScrolledWindowClipWindow
Tree tree
Core root
XmFrame frame
XmRowColumn [class-name]
[class] [class-name]
XmScrollBar VertScrollBar
XmScrollBar HorScrollBar
XmSeparatorGadget Separator1
XmSeparatorGadget Separator2
XmSeparatorGadget Separator3
XmRowColumn menubar
XmCascadeButton File
XmCascadeButton View
XmCascadeButton Select
XmMenuShell popup_fileMenu
XmRowColumn fileMenu
XmPushButton Exit
XmRowColumn viewMenu
XmPushButton layoutHorizontal
XmPushButton layoutVertical
XmSeparator line1
XmPushButton namesVariable
XmPushButton namesClass
XmSeparator line2
XmPushButton viewResources
XmPushButton viewNoResources
XmRowColumn selectMenu
XmPushButton unselect
XmPushButton selectAll
XmPushButton selectInvert
XmSeparator line1
XmPushButton selectParent
XmPushButton selectAncestors
XmPushButton selectChildren
XmPushButton selectDescendants
XmSeparator line2
XmPushButton selectHasResources
XmPushButton selectShownResources
where class-name is the widget class name of each node.
See also
appres(XC),
editres(XC),
listres(XC),
X(X),
xrdb(XC),
Xt_options(XC),
appropriate widget documents
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003