🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #25237

Dragging Icons

#25237
From: Frank A. Lonigro
Date: Thu, 18 Feb 1988 19:03
92 lines
1718 bytes
[[[[[ Line eaters unite ]]]]]

To all LSC users:
	I'm new to programming the MAC and have a request.  Could some
of you send me your favorite piece of code for choosing and dragging
ICONs with the mouse(not the whole program, just that section of code).

	I have this great book on programming the MAC in "C", "Using the
Macintosh ToolBox with C".  It's a good book and I'm learning alot, but
it doesn't explain how to code the most used aspect of the Mac desktop,
namely, choosing an ICON and have it become its mask and then dragging it
to another spot on the desktop(be it in a window or the desktop itself).
I have this idea that I need to define a rectangle, stick the image of the
ICON in it and then detect a mouseDown event and determine if the Event.where
point is enclosed by that rectangle.  This is all well and good except
how do you have it change to its mask?  I also could use OffsetRect() to
move it, but there must be an easier way to find out the "dh, dv" parameters.
Is there such a function called DragRect() synonymous to DragWindow()??

	Any and all help you can give would be greatly appreciated.

Thanks in advance,
-franco

franco@bbn.com
franco%bbn.com@relay.cs.net
...!harvard!bbn!franco































































hen dragging it
to a new place on the desktop(be it in a window or the desktop itself).
Technical Details
Message-ID: <20958@bbn.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!rutgers!gatech!bbn!bbn.com!franco

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!rutgers!gatech!bbn!bbn.com!franco
From: franco@bbn.com (Frank A. Lonigro)
Newsgroups: comp.sys.mac
Subject: Dragging Icons
Message-ID: <20958@bbn.COM>
Date: 18 Feb 88 19:03:56 GMT
Sender: news@bbn.COM
Lines: 92