[ANN] Bricks v2 now on the swiki
tblanchard at mac.com
tblanchard at mac.com
Sat Jun 28 03:28:15 UTC 2003
Hi Andreas,
Presently all layout is from morph to owner - siblings are not
considered.
That's not to say that they couldn't be, but I just cloned the behavior
of IB
(which is the NextStep InterfaceBuilder - now available on MacOS X).
There is practically nothing that can't be done with this model.
I'd be interested in what you consider to be weird behavior.
Its possible to set the constraints programmatically with a string ie
brick leftToRightLayout: 's-s'. puts springs on either side of the
brick and says it should be internally rigid.
The model is pretty basic and its probably the same as proportional
layout with a simpler visualization.
Some examples:
--s is the default - leave the thing the same size and keep it the same
distance from the left edge - IOW no layout really
s-- - similar but adhere to right edge
-s- - keep both edges the same distance from the edges of the owner -
IOW spacefill - this would be good for text areas that grow/shrink with
the window.
s-s - keep the brick the same size and keep it centered at the same
proportional ratio from the left and right edges - good for titles in
title bars as the brick will stay centered horizontally regardless of
size if it was centered in the first place.
sss - keep the edges at the same proportional distance from the edges.
--- - I don't currently enforce this but it should prevent resizing of
the owner - I think It defaults to the same as --s.
If you're getting weird results, maybe you could save the oddities in
a .morph file and send it to me along with what you expect to happen.
The only other interesting layout behavior is embodied in ToolbarBrick
- it has the idea of cells that are the same size and can layout either
horizonatally or vertically - but the only layout behavior it has on
its own is the positioning on initial adding of bricks. Then it sets
the strut spring contraints and that just does what it does.
HTH,
Todd Blanchard
On Friday, June 27, 2003, at 06:22 PM, Andreas Raab wrote:
> Hi Todd,
>
> I was playing around with it and it looks pretty cool. What I'm
> particularly
> interested in is your "springs and struts" model - I agree that
> Morphic's
> layout management is too complicated so I've been really interested in
> seeing what you're doing here. Is there any concise description about
> the
> model you're using? (you have been mentioning something called "IB" on
> the
> Mac which I have no idea what it means)
>
> I've been trying to play with your layout model a bit and it seems to
> model
> something pretty similar to what we have in proportional layouts
> (though the
> UI is much nicer). But the thing I couldn't really get to work is when
> I
> tried to put two bricks into the layout container and have them behave
> (what
> I thought to be) correctly. Is there any dependency between objects
> within
> the same brick? I have had some effects which almost looked like the
> layout
> control switches randomly between what brick it's controlling (it's
> hard to
> explain but I've got really weird effects).
>
> Also, is this layout model capable of modelling constraints between
> bricks
> at the same level? (something like lists where - for example - the
> right
> edge of one brick should align with the left edge of some other).
>
> Thanks for any info you can provide.
>
> Cheers,
> - Andreas
>
>> -----Original Message-----
>> From: squeak-dev-bounces at lists.squeakfoundation.org
>> [mailto:squeak-dev-bounces at lists.squeakfoundation.org] On
>> Behalf Of tblanchard at mac.com
>> Sent: Friday, June 27, 2003 1:14 PM
>> To: The general-purpose Squeak developers list
>> Subject: [ANN] Bricks v2 now on the swiki
>>
>>
>> http://minnow.cc.gatech.edu/squeak/3186
>>
>> I've made some progress and there's a screen shot there now. You can
>> download a sar file and try it out.
>>
>> I'm interested in getting some volunteers to work on this.
>> I'd like to
>> make it so UI creation is all about putting painters and scripts
>> together. I think I'm at a decent point where other people
>> could start
>> to help make widgets and painter tools. Email me if you want to help.
>>
>> Todd Blanchard
>>
>>
>
>
More information about the Squeak-dev
mailing list
|