Constraining resize/creation behavior
Bert Freudenberg
bert at isg.cs.uni-magdeburg.de
Thu Nov 20 17:47:50 UTC 2003
Bijan Parsia wrote:
> On Wed, 19 Nov 2003, Ned Konz wrote:
> [snip]
>
>>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.)
>
>
> Ok, interesting, thanks.. It does mean I have to either add this behavior
> to all morphs or subclass every shape I want to use. I can live with that,
> I guess. I confess to hoping that this behavior was a bit more
> parameterizable.
Why don't you change the sender of setExtentFromHalo:? It's HaloMorph,
and it could be easily changed to restrict the extent.
--
Bert
More information about the Squeak-dev
mailing list
|