1/* $XConsortium: README /main/3 1996/07/15 14:11:26 drk $ */ 2 3This directory contains the sources of the Dog widget, the Square widget, 4and the dogs demo. 5 6DOG WIDGET 7---------- 8The Dog widget demonstrates how to subclass a primitive widget which 9will remain binary compatible with future versions of Motif. It uses 10XmResolvePartOffsets(), and associated macros, and implements all 11the recommendations in the XmResolvePartOffsets manpage. 12 13The Dog widget is a subclass of XmPrimitive. It can bark and wag its 14tail. If you want more exotic tricks - feel free to subclass it, or 15replace up.bm, down.bm and bark.bm with more interesting bitmaps. 16 17It 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 23It 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 30SQUARE WIDGET 31------------- 32The Square widget demonstrates how to subclass a constraint widget which 33will remain binary compatible with future versions of Motif. It uses 34XmResolveAllPartOffsets(), and associated macros, and implements all 35the recommendations in the XmResolveAllPartOffsets manpage. 36 37The Square Widget is a subclass of XmBulletinBoard. It forces its children 38to be square using a constraint resource. 39 40It 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 46It 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 52DOGS DEMO 53--------- 54The dogs demo uses the Dog and Square widgets. It illustrates how 55to incorporate new widgets into UIL source, using the user_defined 56function. 57 58It allows you to dynamically change the DogNwagTime and SquareNmakeSquare 59resources. 60 61If you have a machine with any sound generation features at all, you may 62want to change the bark callback to something better than XBell(). 63 64