Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!stanford.edu!csli!bratt From: bratt@csli.Stanford.EDU (Harry Bratt) Newsgroups: comp.sys.amiga.programmer Subject: Re: How to do a "MovePointer()"? Message-ID: <20052@csli.Stanford.EDU> Date: 20 Jun 91 00:34:23 GMT References: <19997@csli.Stanford.EDU> <1382@cbmger.UUCP> <91170.181652GUTEST8@cc1.kuleuven.ac.be> Organization: Center for the Study of Language and Information, Stanford U. Lines: 47 In <91170.181652GUTEST8@cc1.kuleuven.ac.be> GUTEST8@cc1.kuleuven.ac.be (Ives Aerts) writes: >In article <1382@cbmger.UUCP>, peterk@cbmger.UUCP (Peter Kittel GERMANY): >> >>In article <19997@csli.Stanford.EDU> bratt@csli.Stanford.EDU (Harry Bratt): >>>I need to change the position of Intuition's mouse pointer. >> >>Look into the RKMs with the Input device. You can create Input events >>of the Pointerpos kind. This will do exactly what you want. >That's the way to do it. But are you really *SURE* you have to do it ? >I don't like other programs to mess around with the mouse pointer. >And if you do, set it back to it's original position afterwards. Actually, I've been wondering about that problem for a while. The program I'm writing is using a RMB-pop-up-menu. The need to move the pointer comes when 2 things conflict: 1) I want the menu to pop up under the mouse on a specific item 2) Doing #1 would place some of the menu off-screen Now I've used other systems which use pop-up menus as standard, but I don't have access to them now and I didn't notice well enough what they did in this case. Possibly they just don't care about #1. I know Iff2Pcs on an early fish disk uses pop-up menus (which it got from somewhere else - I don't remember where), but the way it handles the problem is by leaving the pointer alone and moving the menu within screen bounds - this means if the mouse pointer is high or low on the screen, you may get the menu popping up on an undesired default. I've ended up inadvertantly selecting "quit" a few times because of this. :-( What I'm doing now is moving both the pointer and the menu by the amount needed to put the menu within screen bounds. So I'd be interested in knowing what people think the solution to this should be. I guess many people dislike pop-up menus partially for just this reason - but I think I need them (I'm using title bar menus as well - if the mouse pointer is on the title bar, like in DPaint). And more specifically, if I do move the pointer like I am now, should I attempt to move it back after they release the RMB? I see 3 possibilities: 1) don't move it back 2) move it back exactly to where it was when the RMB was pressed (or, since they'll be moving the pointer to do menu selection,) 3) move it the same distance I had to move it when the RMB was pressed, but in the opposite direction -Harry bratt@csli.stanford.edu