Parent document is top of "Motif FAQ (Part 9 of 9)"
Previous document is "334) How can I display a gif/jpeg/tiff picture in a widget?"
Next document is "336) Can I set the foreground and background colors of gadgets?"

335) How do I get the events for gadgets? Or the name of the gadget?

[Last modified: July 96]

Answer:  Get events from the gadget's parent.  Ken Lee,
http://www.rahul.net/kenton/

A related question is "How the name of a gadget an event is directed to?"
Daniel Dardailler (daniel@x.org) writes:

Motif 2.0 provides a XmObjectAtPoint public function that support this
functionality.  For earlier version, something like the undocumented
_XmInputInGadget( wid, x, y ) should do it.

    _XmInputInGadget
        Given a composite widget and an (x, y) coordinate, see if the
        (x, y) lies within one of the gadgets contained within the
        composite.  Return the gadget if found, otherwise return NULL.

Parent document is top of "Motif FAQ (Part 9 of 9)"
Previous document is "334) How can I display a gif/jpeg/tiff picture in a widget?"
Next document is "336) Can I set the foreground and background colors of gadgets?"