| 1 |
/* $XConsortium: README /main/3 1996/07/15 14:11:26 drk $ */ |
| 2 |
|
| 3 |
This directory contains the sources of the Dog widget, the Square widget, |
| 4 |
and the dogs demo. |
| 5 |
|
| 6 |
DOG WIDGET |
| 7 |
---------- |
| 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. |
| 12 |
|
| 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. |
| 16 |
|
| 17 |
It has the following resources: |
| 18 |
|
| 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. |
| 22 |
|
| 23 |
It has the following translations: |
| 24 |
|
| 25 |
osfActivate/Return/Space/MB1 = Bark |
| 26 |
W/MB2 = Wag tail. |
| 27 |
S/Shift-MB2 = Stop wagging tail. |
| 28 |
osfHelp = Help |
| 29 |
|
| 30 |
SQUARE WIDGET |
| 31 |
------------- |
| 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. |
| 36 |
|
| 37 |
The Square Widget is a subclass of XmBulletinBoard. It forces its children |
| 38 |
to be square using a constraint resource. |
| 39 |
|
| 40 |
It has one resource: |
| 41 |
|
| 42 |
SquareNmajorDimension - determines which dimension will be used |
| 43 |
for the new size of the child. Values are |
| 44 |
SquareWIDTH or SquareHEIGHT. |
| 45 |
|
| 46 |
It has one constraint resource: |
| 47 |
|
| 48 |
SquareNmakeSquare - determines whether the child is forced |
| 49 |
to be square or set to its preferred size. |
| 50 |
|
| 51 |
|
| 52 |
DOGS DEMO |
| 53 |
--------- |
| 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 |
| 56 |
function. |
| 57 |
|
| 58 |
It allows you to dynamically change the DogNwagTime and SquareNmakeSquare |
| 59 |
resources. |
| 60 |
|
| 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(). |
| 63 |
|