[ENH] MorphGeometryTweaks-efc

tblanchard at mac.com tblanchard at mac.com
Fri Feb 14 00:31:29 UTC 2003


On Friday, February 14, 2003, at 12:59  AM, Eddie Cottongim wrote:

> In any case, the new comments should make the semantics clear. I'm not 
> sure
> whether stretch or move is the more useful, but at least there should 
> be no
> confusion if the methods have some documentation.

I actually think it should be a switchable behavior.

Ever use Interface Builder?  Geometry management is generally dead 
simple.  You place one component onto another component.  The component 
has internal and external struts and/or springs.  Pick a strut and that 
dimension stays constant.  Pick a spring and it grows when its parent 
grows.


--------------------------
|            |            |
|            |            |
|      -------------      |
|      |     C     |      |
| ---- |  ---C---- |CCCCCC|
|      |     C     |      |
|      -------------      |
|            C            |
|            C            |
--------------------------


This configuration means the inner component will keep its top left 
corner fixed regardless of whether the parent is stretched, it will 
grow vertically proportionally, but not horizontally.

--------------------------
|            |            |
|            |            |
|      -------------      |
|      |     C     |      |
| ---- |  ---C---- |CCCCCC|
|      |     C     |      |
|      -------------      |
|            |            |
|            |            |
--------------------------

This will maintain top, left and bottom borders(because the thing can 
stretch vertically), but stretching right just enlarges the area to the 
right.

I can figure this out at a glance.  I've been picking layout options 
for 20 minutes and I still can't figure out what they do.

The struts and springs model is good for general layout and handles 
pretty much everything but grids - for that you want a grid component.  
Can I get these setting with the current layout scheme?  I'd be happy 
to write a layout control morph and add a halo button for it if I could 
figure out how to use the existing machinery to do this.



>
> ----- Original Message -----
> From: <tblanchard at mac.com>
> To: "The general-purpose Squeak developers list"
> <squeak-dev at lists.squeakfoundation.org>
> Sent: Thursday, February 13, 2003 6:51 PM
> Subject: Re: [ENH] MorphGeometryTweaks-efc
>
>
>> Oh see now hang on here a second - I'm convinced that they already do
>> the wrong thing.
>> You making it do the wrong thing more efficiently doesn't help my case
>> any. ;-)
>>
>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 2646 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20030214/01ac9ca8/attachment.bin


More information about the Squeak-dev mailing list