Constraining resize/creation behavior
Ned Konz
ned at squeakland.org
Thu Nov 20 00:32:22 UTC 2003
On Wednesday 19 November 2003 4:11 pm, Bijan Parsia wrote:
> > You can tell the parents not to clip when drawing if you want.
>
> This I figured out. And I want that for some things. But I also want the
> resizing to just stop when it hits one of the limits.
>
> > You could just make all your region shapes submorphs of the World.
>
> I don't get what this gets me...
I didn't know what you were trying to do, so I answered random unrelated
questions <g>.
> > Assuming you're not going to use halos to do the resizing
>
> I was aiming for that, but could dump it.
Well, you can just override #setExtentFromHalo: if you want to change how the
yellow resize halo handle works. Another example from Connectors:
-------
setExtentFromHalo: anExtent
"The user has dragged the grow box such that the receiver's extent would be
anExtent.
Ignore the user's wishes completely."
-------
Likewise for brown-handle moving, you could override
#setConstrainedPosition:hangOut:
Or you could override the methods that construct the halo handles themselves
(#addGrowHandle:, #addScaleHandle: #addDragHandle:, etc.)
More information about the Squeak-dev
mailing list
|