stuart@cs.rochester.edu (Stuart Friedberg) (05/02/88)
In article <8805020052.AA09205@s3snorkel>, warner%s3snorkel@SCUBED.ARPA (Ken Warner) writes: > Has anyone tried to make the menu widgets in .../contrib/menu ? If so and you > succeded, howdjadoit? I'm on a Sun 3/50 3.4. > Ken Warner Funny you should ask that! I just did it the other night, using the same configuration you've got. You have to make some significant, but not radical, changes to make things work, both to the widget code, and to the demo programs. Just looking at the rcsdiff output, you have to do *at least* the following to the menu widgets (all three types): 1) Add SimpleClassPart and SimplePart to class and instance structures 2) Separate the initialize and initialize_hook functions 3) Change the initialization of the core_class field 4) Change default translations tables from arrays of strings to just strings 5) Assign default trans tables to tm_table field, not tm.translation field 6) Use XtVersion for version number 7) Atoms.h => StringDefs.h in #include lists 8) Add #include Convert.h to Menu.c 9) Convert XrmRxxx's to XtRxxx's in resource initializations 14) XtRPointer => XtRCallback, where appropriate 10) XrmAtomToQuark => XrmStringToQuark 11) XrmRegisterTypeConverter => XtAddConverter 12) CvtStringToOrientation takes different args 13) XtSetValuesGeometry => XtMakeResizeRequest 15) Fix typo in "hightlightThickness" [sic], several places This should definitely be enough to get you started on the conversion. Check the arguments to the functions that changed. Some of them are quite different. Similar, but less extensive, changes have to be made to the demo programs. I *highly* recommend running things through lint using the lint libraries for the R2 toolkit, because I am sure I did not mention everything that changed. There are also some changes you need to make to demo2 to make it work properly. (MenuPopup apparently didn't work under the R1 toolkit.) I won't try to summarize them here, but it can be made to work now. I have only converted the first four demo programs, and this is a *low* priority item for me. However, the menu widgets *do* work. If you need them, can't get them to work, and no one else can provide them (I have in mind the people at DEC who wrote them in the first place, frankly), e-mail me and work something out. I do *NOT* intend to support these mods, so if you really want them from me, I will probably make it conditional on YOU getting the mods into the next distribution and all the headaches that entails. Stu Friedberg {ames,cmcl2,rutgers}!rochester!stuart stuart@cs.rochester.edu