Specifications

Athena Widget Set libXaw 1.0.7
Forinformation about this function, see the XToolkit Intrinsics — C Language Interface.
9. Link your application with libXaw (the Athena widgets), libXmu (miscellaneous utili-
ties), libXt (the X Toolkit Intrinsics), libSM (Session Management), libICE (Inter-Client
Exchange), libXext (the extension library needed for the shape extension code which
allows rounded Command buttons), and libX11 (the core X library). The following pro-
vides a sample command line:
cc -o application application.c −lXaw−lXmu −lXt −lSM −lICE −lXext −lX11
2.10.2. Changing Resource Values
The Intrinsics support twomethods of changing the default resource values; the resource man-
ager,and an argument list passed into XtCreateWidget. While resources values will get updated
no matter which method you use, the twomethods provide slightly different functionality.
Resource Manager This method picks up resource definitions described in Xlib — C Lan-
guage X Interface from manydifferent locations at run time. The loca-
tions most important to the application programmer are the fallback
resources and the app-defaults file, (see XToolkit Intrinsics — C Lan-
guage Interface for the complete list). Since these resource are loaded at
run time, theycan be overridden by the user,allowing an application to
be customized to fit the particular needs of each individual user.These
values can also be modified without the need to rebuild the application,
allowing rapid prototyping of user interfaces. Application programmers
should use resources in preference to hard-coded values wheneverpossi-
ble.
Argument Lists The values passed into the widget at creation time via an argument list
cannot be modified by the user,and allownoopportunity for customiza-
tion. It is used to set resources that cannot be specified as strings (e.g.
callback lists) or resources that should not be overridden (e.g. window
depth) by the user.
2.10.2.1. Specifying Resources
It is important for all X Toolkit application programmers to understand howtouse the X
Resource Manager to specify resources for widgets in an X application. This section will
describe the most common methods used to specify these resources, and howtouse the X
Resource manager.
Xrdb The xrdb utility may be used to load a file containing resources into the
Xserver.Once the resources are loaded, the resources will affect any
newapplications started on the display that theywere loaded onto.
Application Defaults The application defaults (app-defaults) file (normally in /usr/lib/X11/app-
defaults/classname)for an application is loaded wheneverthe application
is started.
The resource specification has twocolon-separated parts, a name, and a value. The value is a
string whose format is dependent on the resource specified by name. Name is constructed by
appending a resource name to a full widget name.
The full widget name is a list of the name of every ancestor of the desired widget separated by
periods (.). Each widget also has a class associated with it. Aclass is a type of widget (e.g. Label
or Scrollbar or Box). Notice that class names, by convention, begin with capital letters and
instance names begin with lower case letters. The class of anywidget may be used in place of its
name in a resource specification. Here are a fewexamples:
xman.form.button1 This is a fully specified resource name, and will affect only widgets
called button1 that are children of widgets called form that are children
14