/* $XConsortium: README /main/3 1996/07/15 14:11:26 drk $ */

This directory contains the sources of the Dog widget, the Square widget,
and the dogs demo.

DOG WIDGET
----------
The Dog widget demonstrates how to subclass a primitive widget which
will remain binary compatible with future versions of Motif. It uses
XmResolvePartOffsets(), and associated macros, and implements all
the recommendations in the XmResolvePartOffsets manpage.

The Dog widget is a subclass of XmPrimitive. It can bark and wag its
tail. If you want more exotic tricks - feel free to subclass it, or
replace up.bm, down.bm and bark.bm with more interesting bitmaps.

It has the following resources:

	DogNwagTime - time in milliseconds between each wag.
	DogNbarkTime - time in milliseconds the bark graphic is displayed.
	DogNbarkCallback - callback called by the bark action.

It has the following translations:

	osfActivate/Return/Space/MB1 = Bark
	W/MB2 = Wag tail.
	S/Shift-MB2 = Stop wagging tail.
	osfHelp = Help

SQUARE WIDGET
-------------
The Square widget demonstrates how to subclass a constraint widget which
will remain binary compatible with future versions of Motif. It uses
XmResolveAllPartOffsets(), and associated macros, and implements all
the recommendations in the XmResolveAllPartOffsets manpage.

The Square Widget is a subclass of XmBulletinBoard. It forces its children
to be square using a constraint resource.

It has one resource:

	SquareNmajorDimension - determines which dimension will be used
				for the new size of the child. Values are
				SquareWIDTH or SquareHEIGHT.
	
It has one constraint resource:

	SquareNmakeSquare -	determines whether the child is forced
				to be square or set to its preferred size.


DOGS DEMO
---------
The dogs demo uses the Dog and Square widgets. It illustrates how
to incorporate new widgets into UIL source, using the user_defined
function.

It allows you to dynamically change the DogNwagTime and SquareNmakeSquare
resources.

If you have a machine with any sound generation features at all, you may
want to change the bark callback to something better than XBell().

