Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!mucs!p4.cs.man.ac.uk!gilbertd From: gilbertd@p4.cs.man.ac.uk (Dave Gilbert) Newsgroups: comp.sys.acorn Subject: Re: Dragging a Draw object Message-ID: Date: 18 Jun 91 08:39:20 GMT References: <779@.econ.vu.nl> Sender: news@cs.man.ac.uk Lines: 23 In <779@.econ.vu.nl> walther@econ.vu.nl (Walther Schoonenberg/10000) writes: >I'm writing a commercial application in C in which a draw file is rendered in >a window. Something essential is still missing. What I want to do is select an >object with the mouse and dragging it to a new position. How do I program this, >especially if I do not want to hog the whole machine before I release the >mouse button. Can someone who already programmed this, send me an example >source (or give me some useful hints)? Thanks in advance. I think the way to do it is :- When the mouse button is pressed look through your objects to find which object you have selected - then find its bounding box, and start a user drag. RISCOS will inform you when it has finished - then just fiddle with the coordinates of the bounding box in your draw file. Dave -- ------------------------------------------------------------------------------- - Dave Gilbert - gilbertd@p4.cs.man.ac.uk - The MTBF of a piece of equipment - - G7FHJ@GB7NWP - is inversly proportional to its - ------------------------------------------- importance -