🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.objective-c
1 messages
1 total messages Started by Stuart Crawford Fri, 14 Dec 1990 01:19
moveFromUser: in the Layer class
#211
Author: Stuart Crawford
Date: Fri, 14 Dec 1990 01:19
29 lines
1659 bytes
In the Layer class of StepStone's ICPak201 collection, there is a method called
moveFromUser: that is used to move an object (or composite object) from one
place to another on the screen.  There is also a Boolean class variable named
interactiveMove.  

When interactiveMove is NO, an empty box (an "EchoBox") is dragged around the
screen until the mouse button is released, at which time the object is erased
at the original position and redrawn at the new position.  When interactiveMove
is YES, the object is continually redrawn as the mouse is dragged around.

For all but the simplest objects, the latter approach is too ugly to use.  What
I would like is an intermediate approach:  

1.  When the user selects the object, cache a bitmap of the contents of the
object's bounding box onto an offscreen buffer 

2. erase the original object 

3.  repeatedly bitblt (Xor rule) the bitmap (instead of an EchoBox) onto the
screenrather than drag around an EchoBox

4. redraw the object when the mouse is released.

I'd rather not reinvent the wheel.  If someone has already written code to do
this, and is willing to share, I'd appreciate it.  Thanks,

Stuart
--
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads