viewres(1X) viewres(1X)NAME viewres - displays the widget class hierarchy of the Athena Widget Set SYNOPSIS viewres [-top widget] [-variable] [-vertical] [toolkit- option]... DESCRIPTION viewres displays a tree showing the widget class hierarchy of the Athena Widget Set. Each node in the tree can be ex- panded 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 the user to visually examine the structure and inherited resources for the Athena Widget Set. Options The viewres program accepts all of the standard X Toolkit command-line options, as described in X(1X), as well as these options: -top widget 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 de- fault is Object. -variable Indicates that the widget variable names (as de- clared 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 Indicates that the tree should be displayed top to bottom rather left to right. View menu You can change the way the tree is displayed by using the menu items in the View menu. Layout Horizontal Causes the tree to be laid out from left to right. This operation may also be performed with the SetOrientation(West) translation. Layout Vertical Causes the tree to be laid out from top to bottom. This operation may also be performed with the SetOrientation(North) translation. November, 1990 1
viewres(1X) viewres(1X)Show Variable Names 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 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. Show Resource Boxes Expands the selected nodes to show the new widget and constraint resources. See the next section, ``Select Menu.'' This operation may also be per- formed with the Resources(on) translation. Hide Resource Boxes Removes the resource displays from the selected nodes (usually to conserve space). This operation may also be performed with the Resources(off) trans- lation. Select menu Resources for a single widget class can be displayed by pressing the LEFT ARROW key (the middle button on a three- button mouse) while the pointer is on the corresponding node, or by adding the node to the selection list by using the mouse button (the left button on a three-button mouse) and the Show Resource Boxes item in the View menu. Because the mouse button actually toggles the selection state of a node, clicking a selected node causes it to be removed from the selected list. You can select collections of nodes by using the various items in the Select menu: Unselect All Removes all nodes from the selection list. This operation may also be performed with the Select(nothing) translation. Select All Adds all nodes to the selection list. This opera- tion may also be performed with the Select(all) translation. Invert All Adds unselected nodes to, and removes selected nodes from, the selection list. This operation may also be performed with the Select(invert) translation. 2 November, 1990
viewres(1X) viewres(1X)Select Parent Selects the immediate parents of all selected nodes. This operation may also be performed with the Select(parent) translation. Select Ancestors Recursively selects all parents of all selected nodes. This operation may also be performed with the Select(ancestors) translation. Select Children Selects the immediate children of all selected nodes. This operation may also be performed with the Select(children) translation. Select Descendants Recursively selects all children of all selected nodes. This operation may also be performed with the Select(descendants) translation. Select Has Resources 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 Selects all nodes whose resource boxes are currently expanded (usually so that they can be closed with Hide Resource Boxes item in the View menu). This operation may also be performed with the Select(shown) translation. Actions The following application actions are provided: Quit() Causes viewres to exit. Resources(op) Turns on or 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. Select(what) Selects the indicated nodes, as described in ``View Menu'': nothing (unselects all nodes), invert, parent, ancestors, children, descendants, resources, shown. SetLabelType(type) Sets the node labels to display the widget variable November, 1990 3
viewres(1X) viewres(1X)or class names, according to the argument type. SetOrientation(direction) Sets the root of the tree to be one of the following areas of the window: West, North, East, or South. Widget hierarhcy To specify resources, you should know the hierarchy of the widgets that compose viewres. In the notation below, inden- tation indicates hierarchical structure. The widget class name is given first, followed by the widget instance name. Viewres viewres Paned pane Box buttonbox Command quit MenuButton view SimpleMenu viewMenu SmeBSB layoutHorizontal SmeBSB layoutVertical SmeLine line1 SmeBSB namesVariable SmeBSB namesClass SmeLine line2 SmeBSB viewResources SmeBSB viewNoResources 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 Form treeform Porthole porthole Tree tree Box variable-name Toggle variable-name List variable-name Panner panner In the above hierarchy, variable-name is the widget variable name of each node. 4 November, 1990
viewres(1X) viewres(1X)NOTES Copyright 1990, Massachusetts Institute of Technology. See X(1X) for a full statement of rights and permissions. Author: Jim Fulton, MIT X Consortium SEE ALSO appres(1X) editres(1X), listres(1X), X(1X), xrdb(1X) Athena Widget Set -C Language Interface X Toolkit Intrinsics - C Language Interface November, 1990 5