This directory contains the source code for the examples in the book:

 "The X Window System: Programming and Applications with Xt, OPEN LOOK Edition" 
   by Douglas Young & John Pew

publisher: Prentice Hall, 1992
ISBN  0-13-982992-X
Prentice Hall order line: 201-767-5937

These examples are similar to those in the previous version of the
book, "X Window Systems Programming and Applications with Xt, OSF/Motif
Edition".  These examples, however, use the OPEN LOOK Intrinsics
Toolkit (OLIT) widget set entirely.  In some cases, you can probably
follow along from the old book. However, we've not made any attempt to
keep the examples exactly as in the previous book. In some cases the
examples are identical, except for the use of OLIT. In other cases, the
examples were altered significantly. Some examples are new for this
edition. Specifically, all examples in ch4 are new since they
demonstrate the OLIT widgets.

Note that these programs are examples used to illustrate various
aspects of X, Xt, and OLIT for the book. They don't necessarily
represent the best way to write certain tools, nor are the programs
necessarily useful in their own right (although we hope some are). Each
program was intended to illustrate some point, and therefore the
programs are often somewhat contrived to do just that and also
to fit into the space allotment within a chapter.  


BUILDING THE PROGRAMS

1. If you have lots of disc space, just do a make in this directory.

2. Otherwise, go to the lib directory and do a make.  Then go to a 
   directory of interest and make the directory or an individual program.


SETTING RESOURCES

Each directory contains one or more "Resources*" files.  Some
directories contain the files "Resources1" and "Resources2".  Other
directories contain just "Resources".  Each of these files contains a
set of resources that specify the layout and features of the
applications in the given directory.  The purpose of having multiple
resource files in one directory is to show how the same application can
use resources to achieve various results, such as different layouts,
fonts, and labels.  Running these programs without the appropriate
resource settings may make the applications "unrunnable".

Setting the XENVIRONMENT variable to "Resources" is one method of setting
the resources.

	setenv XENVIRONMENT Resources

In the directories where there are multiple "Resources" file,  do something
like the following:

	cp Resources1 Resources

Then when you want to run the with resources in "Resources2" do:

	cp Resources2 Resources

Using this method will eliminate the need to change the XENVIRONMENT variable.


SETTING A BACKGROUND COLOR

None of the "Resource*" files set a background color. OLIT defines the
default background color as white. The 3-dimensional effects of the
toolkit are not well displayed on a white background.  The solution is
to set a default background color.  This can be done in a variety of
ways.  Perhaps the simpliest is to set a background color in the
.Xdefaults file such as:

    *Background: gray

The consequence of this setting is that all X applications will inherit
this background color.  An alternative method is to set the background
color of all OLIT manager widgets to the desired color:

    *Control*Background: 		gray
    *DrawArea*Background: 		gray
    *Form*Background: 			gray
    *RubberTile*Background: 		gray
    *FooterPanel*Background: 		gray
    *Bulletin*Background: 		gray

These resources will affect only OLIT based programs which contain a
ControlArea, DrawArea, Form, RubberTile, FooterPanel, or BulletinBoard
widget.  Since one of these widgets is usually used as the child of the
toplevel shell, this will affect almost all OLIT programs, but not
other X programs.
