[squeak-dev] How to Drag the Scenery

K. K. Subramaniam subbukk at gmail.com
Tue Dec 9 09:07:48 UTC 2008

On Tuesday 09 Dec 2008 1:29:59 am Jim Rosenberg wrote:
> I would like to implement a kind of portal class where the portal is a
> viewer into a PasteUpMorph which is possibly much larger than the portal.
> The PasteUpMorph is a submorph of the portal (and the portal itself is
> likely a subclass of PasteUpMorph). The portal will have "active borders" a
> few pixels wide. The behavior I want to implement will work like this:
> If a drag is started from inside the border, it drags the underlying
> PasteUpMorph with it.
> I need some suggestions of code to read as an example of how to do this.
This is same as "brown dragging" (as in using the move handle) the pasteup 
within the portal. You can study the implementers and senders of 
startDrag:with:, doDrag:with: and attachMorph:. Attach the morph to the hand 
on startDrag and detach it on mouseUp.

HTH .. Subbu

More information about the Squeak-dev mailing list