Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ viewres(1) — DeltaWindows 1.3.3 Release 4 Version 4.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

 

NAME

viewres − Athena widget class browser. 

SYNTAX

viewres [option]

DESCRIPTION

The viewres program (available as of Release 5) displays a tree showing the widget class hierarchy of the Athena Widget Set.  Each node in the tree can be expanded to show the resources that the corresponding class adds (i.e., does not inherit from its parent) when a widget is created.  This application allows the user to view the structure and inherited resources for the Athena Widget Set. 

OPTIONS

viewres accepts all of the standard X Toolkit command-line options, as well as the following additional options:

-top name
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
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
Indicates that the tree should be displayed top to bottom rather than left to right.  See also the Layout Vertical item in the "View Menu" section following. 

VIEW MENU

The way in which the tree is displayed may be changed through the entries 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.  (To specify a vertical layout:  on the command line, run viewres with the -vertical option; or in a resource file, use ∗Tree.Gravity: north.) 

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 (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
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 the second pointer button 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. 

Collections of nodes may also be selected through the various entries 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 operation 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. 

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 the Hide Resource Boxes) menu option.  This operation may also be performed with the Select(shown) translation. 

RESOURCES

viewres defines the following application-specific resources:

showVariable (class showVariable)
If true, indicates that the widget variable names (as declared in header files) should be displayed in the nodes rather than the widget class names.  This is sometimes useful to distinguish widget classes that share the same name (such as Text).  The default is false. 

topObject (class TopObject)
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. 

Note that you can specify the direction the tree goes using the Tree widget and Gravity resource.  For a vertical (top to bottom) orientation, use: ∗Tree.Gravity: north The default orientation is west (horizontal, read left to right).  You can also specify south for a bottom to top tree, or east for right to left, but neither of these orientations is particularly intuitive in English. 

ACTIONS

The following application actions are provided:

Quit()
Causes viewres to exit. 

Resources(op)
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. 

SetLabelType(type)
Sets the node labels to display the widget variable 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. 

Select(what)
Selects the indicated nodes, as described in the View Menu section:  nothing (unselects all nodes), invert, parent, ancestors, children, descendants, resources, shown. 

WIDGETS

Resources may be specified for the following widgets: 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 where variable_name is the widget variable name of each node. 

FILES

/usr/lib/X11/app-defaults/Viewres
Specifies required resources.

SEE ALSO

X, appres, editres, listres, xrdb; Chapter 11, Setting Resources; Volume Four, X Toolkit Intrinsics Programming Manual; Volume Five, X Toolkit Intrinsics Reference Manual. 

AUTHOR

Jim Fulton, MIT X Consortium. 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026