russes@twonky.dec.com (01/06/87)
========
Date: 6 Jan 1987 1313-EST
From: "Bob Russes" <RUSSES@TWONKY>
To: "comp.sys.mac"@DECWRL
Reply-to: Russes@TWONKY
Address: "IND-3/C10 -- 262-8365"
Subject: DragGrayRgn & Scrolling
Message-ID: <"MS11(5251)+GLXLIB5(0)" 12268800418.15.111.167051 at TWONKY>
I've been trying to implement a way of moving objects within
a window. For the moment, my application consists of windows which
contain a number of lines, where each line contains a small icon and
a TextEdit record. In order to move one of these lines, I allow the
user to drag one of these lines by using DragGrayRgn to move an
outline rectangle when the mouse is pressed and held over one of the
small icons. As I drag this region around, I want to hilite certain
lines within the window when the mouse is passing over them. I
currently hilite these lines by using the MarqueeRect routine which
came over the net sometime ago.
For the most part, the dragging and hiliting work, except for
the case when I'm hiliting a line, and I drag the mouse off of it.
In this case, I have to erase the remnants that MarqueeRect leaves
on the screen. I'm currently able to erase these remnants properly,
but for some reason, some small part of the outline I'm dragging gets
left on the screen. Can anybody suggest what I'm doing wrong?
Also, I'd like to have my application scroll when the user
drags the rectangle off of the window. I have some code which is
executed by DragGrayRgn's action procedure, but it doesn't seem to
work properly. I'm also not sure if the parameters I pass to
DragGrayRgn and my scrolling from the action procedure are going to
conflict with each other. Any suggestions on how to go about this?
[I have scrolling (by means of the scroll bars) working, I'm just not
sure how to handle this special case.]
Thanks,
Bob
[End of Message...]
--------