Parent document is top of "Motif FAQ (Part 8 of 9)"
Previous document is "292) How can I disable the color scheme mechanism in CDE or HP VUE?"
Next document is "294) Where is the editres protocol documented?"

293) Can I use editres with Motif? Is there an editres tutorial?

[Last modified: Mar 96]

Answer:  Editres, part of the MIT delivery, is a powerful widget tree analysis
tool and is highly recommended.  There's negligible overhead in making editres
available to an application and many projects keep the editres "hook" active
even for operational programs.

It isn't built in to Motif (at 1.2.*), but you can do this in your
application:

    #include <X11/Xmu/Editres.h>
    ...
    XtAddEventHandler(shell_widget, (EventMask) 0, True,
                      (XtEventHandler) _XEditResCheckMessages, NULL);

once for each shell widget that you want to react to the "click to select
client" protocol.  Then link your client with the R5 libXmu.

Thanks to David Brooks, OSF, for the original answer.  Jan Sandquist
(ehsjasa@ehs.ericsson.se) supplied the current code snipet above. Joachim
Fabini (jo@vmars.tuwien.ac.at) suggested that I remove the older use of
"extern void _XEditResCheckMessages()" which resulted in core dumps on some
platforms.

NOTE: Ken Lee has placed his November, 1994 editres tutorial on the Web:

        http://www.rahul.net/kenton/editres.html.

Parent document is top of "Motif FAQ (Part 8 of 9)"
Previous document is "292) How can I disable the color scheme mechanism in CDE or HP VUE?"
Next document is "294) Where is the editres protocol documented?"