pjs@basalt.pa.dec.com (Philip Schneider) (10/23/90)
Hi -- I've got a Motif application that uses a drawing area widget. I'd like to have a callback routine called when the window associated with that widget is mapped. Unfortunately, I seem unable to accomplish this -- the attempt to specify a map callback routine is met with an error message : "Warning: Cannot find callback list in XtAddCallbacks" which, of course, one would expect, given that there is no reference to a map callback in anything but Xm.h. Is there any way to get a callback when a widget's window is mapped? Any help would be appreciated. . . :-) - Philip -- Philip J. Schneider | pjs@atd.dec.com DEC Advanced Technology Development | decwrl!pjs 100 Hamilton Avenue | (415)853-6538 Palo Alto, CA 94301 |
argv@turnpike.Eng.Sun.COM (Dan Heller) (10/23/90)
In article <1990Oct22.183455.27968@wrl.dec.com> pjs@basalt.pa.dec.com (Philip Schneider) writes: > I've got a Motif application that uses a drawing area widget. I'd like > to have a callback routine called when the window associated with that > widget is mapped. Unfortunately, I seem unable to accomplish this -- the > attempt to specify a map callback routine is met with an error message : Not all widgets support this. I am guessing you are trying it on a primitive widget rather than a manager widget of some sort. It works fine for me with dialogs, rowcolumns, etc... -- dan ---------------------------------------------------- O'Reilly && Associates argv@sun.com / argv@ora.com Opinions expressed reflect those of the author only.
mikey@eukanuba.wpd.sgi.com (Mike Yang) (10/24/90)
In article <1990Oct22.183455.27968@wrl.dec.com>, pjs@basalt.pa.dec.com (Philip Schneider) writes: |> I've got a Motif application that uses a drawing area widget. I'd like |> to have a callback routine called when the window associated with that |> widget is mapped. Unfortunately, I seem unable to accomplish this -- the |> attempt to specify a map callback routine is met with an error message : |> |> "Warning: Cannot find callback list in XtAddCallbacks" |> |> Is there any way to get a callback when a widget's window is mapped? |> Any help would be appreciated. . . :-) XmNmapCallback is only supported in some of the widgets, like XmBulletinBoard. But you can always use XtAppAddEventHandler with StructureNotifyMask and check if the event which triggered the handler is MapNotify. ----------------------------------------------------------------------- Mike Yang Silicon Graphics, Inc. mikey@sgi.com 415/335-1786
pd@ixi.uucp (Paul Davey) (10/24/90)
In article <1990Oct22.183455.27968@wrl.dec.com> pjs@basalt.pa.dec.com (Philip Schneider) writes:
I've got a Motif application that uses a drawing area widget. I'd like
to have a callback routine called when the window associated with that
widget is mapped. ...
Is there any way to get a callback when a widget's window is mapped?
The exposeCallback will be called when the window is mapped the first
time. (It will also be called on every expose event.)
--
Regards, pd@x.co.uk IXI Limited
Paul Davey pd@ixi.uucp 62-74 Burleigh St.
...!uunet!ixi!pd Cambridge U.K.
"These are interesting times" +44 223 462 131 CB1 1OJ