BookMorph size and printing

Ned Konz ned at bike-nomad.com
Sun Sep 23 16:41:19 UTC 2001


On Saturday 22 September 2001 01:40 pm, Gary McGovern wrote:

> From: "Alan Kay" <Alan.Kay at squeakland.org>
>
> > And also look at Balloon3D and the Alice environment to see how an
> > environment of unlimited size can be set up. (It's pretty >easy)
>
> I'm really interested to make some progress on this. I've spent a couple of
> hours with those packages and haven't come up with anything that comes
> close Can you give a bit more away ? (I've not found it easy but it makes
> some other things seem easy :-) ).

Hi Gary,

I'm no Morphic expert, and don't know about Balloon3D or Alice, but it's 
pretty easy to make a Morph that can produce the behavior you want.

You need to properly handle reporting transformFrom: and drawing (and 
clipping).

If you look at TransformMorph, all the positioning behavior you want 
is right there. Try this in a workspace:

t _ TransformMorph new position: 200 at 200; extent: 200 at 200; openInWorld.
t addMorph: (RectangleMorph new position: 0 at 0; color: Color red).
t addMorph: (RectangleMorph new position: 200 at 200).
t offset: 100 at 100.
t offset: 0 at 0.
t extent: 300 at 300
t delete

However, TransformMorph probably doesn't do what you want in terms of user 
interaction. You could subclass it and make it react properly to mouse clicks 
(i.e. like PasteUpMorph does).

Or maybe better, you could subclass PasteUpMorph to do translation. Look at 
(for instance) GeeBookPageMorph.

-- 
Ned Konz
currently: Stanwood, WA
email:     ned at bike-nomad.com
homepage:  http://bike-nomad.com




More information about the Squeak-dev mailing list