home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.x.motif
- Path: sparky!uunet!scifi!watson!minnie.nic.kingston.ibm.com!mag
- From: mag@minnie.nic.kingston.ibm.com (Michael Gray)
- Subject: Re: mixing motif 1.2 and other widgets
- Message-ID: <1993Jan26.122834.47457@watson.ibm.com>
- Sender: mag@porsche (Michael Gray)
- Date: Tue, 26 Jan 93 12:28:34 GMT
- Distribution: comp
- References: <JOERN.93Jan26114337@khym.imf.unit.no>
- Organization: IBM Corp., Kingston NY
- Lines: 32
-
- This really has to do with the fact the Motif 1.2.x depends, unfortunately, on a widget having
- an extension class record. This record should be of type XmBaseClassExtRec. Fill it in with
- all NULL/FALSE/0, etc information... Then supply its address to the Class record in the extension field.
-
- You also may have to Add a Class Initialize function wherin you do some basic initialization like:
-
- _XmRegisterConverters();
- _XmRegisterPixmapConverters();
- _XmInitializeExtensions();
-
- Also, you'll need to set the "record_type" field of your extension record to
- XmQmotif.
-
- This certainly seems hacky, but I was unable to get any of my widgets to work without all these
- girations..
-
- Also, It seems that Motif 1.2.x wants to add translations to your widget, even if you don't want any.
- To override this behavior, I added a classPartInitPrehook. In this function, I set the flags[0] field of the
- Extension record to 1; This keeps motif from adding translations, because it tells motif that it already did.
-
- P.S. This is undoubtedly a completely unorthodox solution. If there is anyone out there that can
- provide a simpler one, I'd be happy to use it.
-
-
- Hope this helps...
-
- Regards,
-
- Michael Gray
- IBM
- minnie.nic.kingston.ibm.com
-
-