webb@applicon.COM (Peter Webb) (12/22/88)
Return-Path: <applicon!bambi!root> Reply-To: bambi!root@applicon.COM Date: Wed, 21 Dec 88 14:16:27 EST From: root@bambi.uucp (Operator) To: applico!uucp Mail failed (400). Letter returned to sender. >From mit-eddie!athena.mit.edu!xpert-request Mon Dec 19 08:38:10 1988 remote from applicon Received: by applicon.COM (4.12/smail2.2/07-31-87) id AA19540; Mon, 19 Dec 88 08:37:52 est Reply-To: mit-eddie!athena.mit.edu!xpert-request@applicon.COM Received: by EDDIE.MIT.EDU with sendmail-5.45/4.7 id <AA07545@EDDIE.MIT.EDU>; Tue, 20 Dec 88 04:44:52 EST Received: by expo.lcs.mit.edu; Tue, 20 Dec 88 01:21:59 EST Received: by ATHENA.MIT.EDU (5.45/4.7) id AA04922; Tue, 20 Dec 88 01:21:50 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id <AA13041@BLOOM-BEACON.MIT.EDU>; Mon, 19 Dec 88 23:30:04 EST Received: from USENET by bloom-beacon.mit.edu with netnews for xpert@athena.mit.edu (xpert@athena.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 20 Dec 88 03:01:43 GMT From: randy@umn-cs.arpa (Randy Orrison) Organization: Chemical Computer Thinking Battery, St. Paul, MN Subject: Where's the pointer? (was: How do I draw on a widget?) Message-Id: <10504@umn-cs.CS.UMN.EDU> References: <10461@umn-cs.CS.UMN.EDU>, <8812162154.AA02843@EXPO.LCS.MIT.EDU> Sender: xpert-request@athena.mit.edu To: xpert@athena.mit.edu 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."