home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / windows / x / motif / 8848 < prev    next >
Encoding:
Text File  |  1993-01-26  |  1.7 KB  |  48 lines

  1. Newsgroups: comp.windows.x.motif
  2. Path: sparky!uunet!scifi!watson!minnie.nic.kingston.ibm.com!mag
  3. From: mag@minnie.nic.kingston.ibm.com (Michael Gray)
  4. Subject: Re: mixing motif 1.2 and other widgets
  5. Message-ID: <1993Jan26.123149.55138@watson.ibm.com>
  6. Sender: mag@porsche (Michael Gray)
  7. Date: Tue, 26 Jan 93 12:31:49 GMT
  8. Distribution: World
  9. References:  <JOERN.93Jan26114337@khym.imf.unit.no> <1993Jan26.122834.47457@watson.ibm.com>
  10. Organization: IBM Corp., Kingston NY
  11. Lines: 35
  12.  
  13. REPOST -- OOPS :-)
  14.  
  15.  
  16. This really has to do with the fact the Motif 1.2.x depends, unfortunately, on a widget having
  17. an extension class record.  This record should be of type XmBaseClassExtRec.  Fill it in with
  18. all NULL/FALSE/0, etc information...  Then supply its address to the Class record in the extension field.
  19.  
  20. You also may have to Add a Class Initialize function wherin you do some basic initialization like:
  21.  
  22. _XmRegisterConverters();
  23. _XmRegisterPixmapConverters();
  24. _XmInitializeExtensions();
  25.  
  26. Also, you'll need to set the "record_type" field of your extension record to 
  27. XmQmotif.
  28.  
  29. This certainly seems hacky, but I was unable to get any of my widgets to work without all these
  30. girations..
  31.  
  32. Also,  It seems that Motif 1.2.x wants to add translations to your widget, even if you don't want any.
  33. To override this behavior, I added a classPartInitPrehook.  In this function, I set the flags[0] field of the
  34. Extension record to 1;  This keeps motif from adding translations, because it tells motif that it already did.
  35.  
  36. P.S.  This is undoubtedly a completely unorthodox solution.  If there is anyone out there that can
  37.           provide a simpler one, I'd be happy to use it.
  38.  
  39.  
  40. Hope this helps...
  41.  
  42. Regards,
  43.  
  44. Michael Gray
  45. IBM
  46. minnie.nic.kingston.ibm.com
  47.  
  48.