[Pharo-project] About SimpleMorphic

Denis Kudriashov dionisiydk at gmail.com
Mon Nov 8 23:16:21 CET 2010

2010/11/8 Igor Stasenko <siguctua at gmail.com>

> On 7 November 2010 22:38, Schwab,Wilhelm K <bschwab at anest.ufl.edu> wrote:
> > Sig,
> >
> > I disagree; the layout policy should arrange the morphs it controls.  To
> do otherwise demands that the morphs be able to cope with any type of layout
> one might want.  The various algorithms have to go somewhere; they might as
> well go in the layouts.
> >
> Some layouts, like table, indeed requiring a cooperation between
> container morph and its submorphs.
> But still, i think that it should be based on a simple things:
>  - morph should have a single layout command: lay within certain
> bounds. It doesn't matters where these bounds came from or how they
> are calculated.
> Then child morph could decide for itself how to lay within given
> bounds (like fill whole area or align to botton or top etc etc), and
> avoid querying parent morph or layout policy/whatever to determine own
> bounds, unless, of course it also having submorphs and own layout
> policy.
> So, if parent morph having no layout policy, it will simply pass its
> own bounds to submoprhs.
> And if parent having , say table layout policy, then it will calculate
> table cells and pass each cell bounds to each submorph for given cell.

and yes, implementing this stuff is always harder than just talking about it
> :)

I remember interesting design for layout logic in newspeak Brazil framefork.


See part about "area" concept
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gforge.inria.fr/pipermail/pharo-project/attachments/20101109/78e32a0a/attachment.htm>

More information about the Pharo-project mailing list