1
/* $XConsortium: README /main/3 1996/07/15 14:11:26 drk $ */
3
This directory contains the sources of the Dog widget, the Square widget,
8
The Dog widget demonstrates how to subclass a primitive widget which
9
will remain binary compatible with future versions of Motif. It uses
10
XmResolvePartOffsets(), and associated macros, and implements all
11
the recommendations in the XmResolvePartOffsets manpage.
13
The Dog widget is a subclass of XmPrimitive. It can bark and wag its
14
tail. If you want more exotic tricks - feel free to subclass it, or
15
replace up.bm, down.bm and bark.bm with more interesting bitmaps.
17
It has the following resources:
19
DogNwagTime - time in milliseconds between each wag.
20
DogNbarkTime - time in milliseconds the bark graphic is displayed.
21
DogNbarkCallback - callback called by the bark action.
23
It has the following translations:
25
osfActivate/Return/Space/MB1 = Bark
27
S/Shift-MB2 = Stop wagging tail.
32
The Square widget demonstrates how to subclass a constraint widget which
33
will remain binary compatible with future versions of Motif. It uses
34
XmResolveAllPartOffsets(), and associated macros, and implements all
35
the recommendations in the XmResolveAllPartOffsets manpage.
37
The Square Widget is a subclass of XmBulletinBoard. It forces its children
38
to be square using a constraint resource.
42
SquareNmajorDimension - determines which dimension will be used
43
for the new size of the child. Values are
44
SquareWIDTH or SquareHEIGHT.
46
It has one constraint resource:
48
SquareNmakeSquare - determines whether the child is forced
49
to be square or set to its preferred size.
54
The dogs demo uses the Dog and Square widgets. It illustrates how
55
to incorporate new widgets into UIL source, using the user_defined
58
It allows you to dynamically change the DogNwagTime and SquareNmakeSquare
61
If you have a machine with any sound generation features at all, you may
62
want to change the bark callback to something better than XBell().