VIEWRES(1)

πŸ“¦
version 7.7+7build1 Β· 3 versions
, in debian trixie, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

okay bestie, this is the VIEWRES(1) page from the General Commands Manual, and it's giving graphical class browser πŸ¦‹

πŸ’– NAME πŸ’–

viewres is a graphical class browser for Xt ✨

🧚 SYNOPSIS 🧚

viewres [-option ...]

🌸 DESCRIPTION 🌸

okay so the viewres program shows you a tree of the widget class hierarchy for the Athena Widget Set 🌳 Every node can be expanded to reveal the resources that its class adds (so, the ones it doesn't inherit from its parent) when a widget gets created. It's literally the best way to visually poke around the structure and inherited resources of the Athena Widget Set πŸ’…

πŸŽ€ OPTIONS πŸŽ€

Viewres takes all the standard toolkit command line options, plus these extras πŸ’œ

  • -top name β€” this sets the name of the highest widget in the hierarchy to show. It's usually how you narrow things down to just a slice of the tree πŸ“ The default is Object.
  • -variable β€” this tells viewres to show the widget variable names (the ones declared in header files) on the nodes instead of the widget class name. It's super handy when classes share a name, like Text πŸ™ˆ
  • -vertical β€” this lays the tree out top to bottom instead of left to right 🌈

πŸ¦‹ VIEW MENU πŸ¦‹

The View menu lets you switch up how the tree looks, bestie ✨

  • Show Variable Names β€” the node labels switch to the variable names used to declare each widget class. You can also do this with the SetLabelType(variable) translation.
  • Show Class Names β€” the node labels switch to the class names you use when specifying resources. You can also do this with the SetLabelType(class) translation.
  • Layout Horizontal β€” the tree lays out from left to right. You can also do this with the SetOrientation(West) translation.
  • Layout Vertical β€” the tree lays out from top to bottom. You can also do this with the SetOrientation(North) translation.
  • Show Resource Boxes β€” expands the selected nodes (more on that in the next section) to show the new widget and constraint resources πŸ”₯ You can also do this with the Resources(on) translation.
  • Hide Resource Boxes β€” removes the resource displays from the selected nodes, usually to save space 🫢 You can also do this with the Resources(off) translation.

πŸ‘‘ SELECT MENU πŸ‘‘

Want to see resources for one widget class? Click Button2 on its node, or add the node to the selection list with Button1 and then hit Show Resource Boxes in the View menu. Heads up: Button1 actually toggles the selection state, so clicking a node that's already selected will remove it from the selected list πŸ™ˆ

You can also select whole collections of nodes through the Select menu:

  • Unselect All β€” removes every node from the selection list. You can also do this with the Select(nothing) translation.
  • Select All β€” adds every node to the selection list. You can also do this with the Select(all) translation.
  • Invert All β€” adds the unselected nodes and removes the selected ones πŸ”„ You can also do this with the Select(invert) translation.
  • Select Parent β€” selects the immediate parents of all selected nodes. You can also do this with the Select(parent) translation.
  • Select Ancestors β€” recursively selects all parents of all selected nodes. You can also do this with the Select(ancestors) translation.
  • Select Children β€” selects the immediate children of all selected nodes. You can also do this with the Select(children) translation.
  • Select Descendants β€” recursively selects all children of all selected nodes. You can also do this with the Select(descendants) translation.
  • Select Has Resources β€” selects every node that adds new resources (regular or constraint) to its widget class. You can also do this with the Select(resources) translation.
  • Select Shown Resource Boxes β€” selects every node whose resource boxes are currently expanded, which is handy if you want to close them with Hide Resource Boxes πŸ’€ You can also do this with the Select(shown) translation.

⭐ ACTIONS ⭐

These are the application actions you can use ✨

  • Quit() β€” makes viewres exit πŸ‘‹
  • SetLabelType(type) β€” sets the node labels to show either the widget variable names or the class names, depending on the type argument.
  • SetOrientation(direction) β€” sets the root of the tree to one of these areas of the window: West, North, East, or South 🧭
  • Select(what) β€” selects the nodes you name, just like the VIEW MENU section describes: nothing (unselects all nodes), invert, parent, ancestors, children, descendants, resources, or shown πŸ’…
  • Resources(op) β€” turns the resource boxes for the selected nodes on, off, or toggles them. If you invoke it from inside one of the nodes (with the keyboard or the pointer), only that node gets used 🫢

🌈 WIDGET HIERARCHY 🌈

Resources can be specified for these widgets, bestie 🧚

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.

πŸ’œ SEE ALSO πŸ’œ

X(7), xrdb(1), listres(1), editres(1), appres(1), and the appropriate widget documents πŸ“š

πŸ“ AUTHOR πŸ“

Jim Fulton, MIT X Consortium 🫢


that's a wrap, bestie! 🌈 This page is from X Version 11, viewres 1.0.7, and it's giving main character energy πŸ’–βœ¨