Don't Worry, There Are Shortcuts - HP 68000 Series User Manual

Debugger/simulator
Table of Contents

Advertisement

Chapter 8: X Resources and the Graphical Interface
widgets in the application. The name of the top-level widget is usually the
same as that of the application. This top-level widget may have a number of
widgets "beneath" it that are called children of the top-level widget. The
names for these widgets are most often chosen for their mnemonic value.
These children can also in turn have child widgets. A resource name, then, is
simply a name of a piece of data for the lowest-level widget coupled with a
string of widget names picked up from each of the widgets along the path
starting with the top-level widget and going down to the lowest-level widget.
The data name and widget names within a resource name are separated from
each other by dots. The resource name itself is terminated by a colon. A
resource value is simply the data value itself. Ignoring the widget names and
data name for the moment, a common resource for most widgets is color. A
data value for color might be "blue."
To put this all together, a resource string for the foreground color for the
"quit" pushbutton displayed on an application called "tracker" might look like
the following:
tracker.panel.control.quit.foreground: white

Don't worry, there are shortcuts

As you might guess, specifying resources for applications with many levels of
widgets can be difficult and error-prone. For that reason, you can use a
shortened notation. To fully understand how the notation works, however,
you must first understand about instance names and class names.
An instance name is a name given to a particular widget by an application
developer. You have already seen instance names used. The name "quit" is an
instance name for a pushbutton widget used by the developer of the "tracker"
application from the last example. An instance name makes the pushbutton
widget named "quit" unique from other pushbutton widgets in the "tracker"
application.
A class name is a general name for all widgets of a particular type. For
example, the class name for the OSF/Motif pushbutton widget is
XmPushButton. When you refer to a widget in an application by its class
name, you are referring to all widgets of that class in the application, and not
to just a particular widget.
249

Advertisement

Table of Contents
loading

This manual is also suitable for:

B1466

Table of Contents