Path: utzoo!attcan!uunet!husc6!mailrus!ncar!tank!nic.MR.NET!umn-cs!randy From: randy@umn-cs.CS.UMN.EDU (Randy Orrison) Newsgroups: comp.windows.x Subject: Where's the pointer? (was: How do I draw on a widget?) Message-ID: <10504@umn-cs.CS.UMN.EDU> Date: 20 Dec 88 03:01:43 GMT References: <10461@umn-cs.CS.UMN.EDU> <8812162154.AA02843@EXPO.LCS.MIT.EDU> Reply-To: randy@umn-cs.cs.umn.edu (Randy Orrison) Organization: Chemical Computer Thinking Battery, St. Paul, MN Lines: 31 In article <8812162154.AA02843@EXPO.LCS.MIT.EDU> rws@EXPO.LCS.MIT.EDU (Bob Scheifler) writes: > What kind of Widget should I use to draw on, and how do I do it? >In the HP widget set, you can use the WorkSpace widget. Works great! > The thing that bothers me is that this error does not occur > at the time of the XDrawRectangle call, but later. >That's because of the asynchronous nature of X. If you can >run your application with -synchronize, it would have happened >at the time of the call. When I switched over to the WorkSpace widget, I noticed a callback XtNexpose which I attached my drawing routine to, thereby solving the above mentioned problem, as well as another one I came up with - how do I get my picture re-drawn when it's exposed. So far, everything is wonderful. Now, the new question: I've attached a routine to the XtNselect callback which gets called when a button is pushed. How do I tell where the pointer is within my widget when this happens, and how do I tell what button was pushed? (I'm willing to bet that these two questions have almost the same answer, but I can't find it...) Thnaks to all who responded to my previous question! -randy -- Randy Orrison, Chemical Computer Thinking Battery -- randy@cctb.mn.org (aka randy@{ux.acss.umn.edu, umn-cs.uucp, umnacca.bitnet, halcdc.uucp}) "Stealing a rhinoceros should not be attempted lightly."