[Pharo-project] About SimpleMorphic
juan at jvuletich.org
Tue Nov 9 16:58:34 CET 2010
Fernando Olivero wrote:
> Hi Juan, i have a couple of questions regarding the new Cuis layout,
> which by the way , is a much cleaner implementation!.
Good! Did you play a bit with the examples in LayoutMorph class methods?
They are kinda cool. For instance, do LayoutMorph example3, enlarge the
morph and remove some of the submorphs, and see how the layout adjust
> "LayoutSpecs are the basis for a new layout mechanism, alternative to
> LayoutFrame. Any Morph can be given a LayoutSpec, but in order to
> honor it, the morph must be submorph of a LayoutMorph."
> In my opinion, we dont need to enforce the LayoutMorph subclasification.
Well, I guess you misread. I didn't say 'subclass of LayoutMorph'. I
said 'submorph of a LayoutMorph' :)
> Because Morph>>doLayoutIfNeeded could use its "layoutMorphSpec"
> collaborator, if present.
> [self layoutSpec layoutSubmorphsIn: self layoutBounds] on: Error do: [ :ex |
> What do you think?
> pd: Similar to decoupling the "visual layout properties" that Brazil is doing.
Well, LayoutSpec is quite like what Brazil does. For example, from the
Brazil description: "When the same visual is a child of a Row, the area
is an instance of a different class whose attributes and behavior are
meaningful for a row cell." Looks like the main difference is that I
merged the Row object and the Area object in the LayoutMorph object.
Ps. Do you happen to be in Buenos Aires these days? We'd meet!
> On Mon, Nov 8, 2010 at 3:05 PM, Juan Vuletich <juan at jvuletich.org> wrote:
>> Hi Folks,
>> WRT Layout APIs, SimpleMorphic includes the same simplified version of
>> LayoutFrame as Cuis.
>> Cuis also includes a new approach, implemented in LayoutSpec and
>> LayoutMorph. I did this for an application that requies adding new
>> widgets without specifying a new layout for all of them. It is also
>> nicer than LayoutFrame, and will replace it at some moment. But it is
>> not used at all by SimpleMorphic or Cuis, and that's why I did not
>> include it in SimpleMorphic for Pharo. But you might open Cuis and take
>> a look it, and load it in Pharo if you like. Try the example class
>> methods in LayoutMorph, and resize the morph to see what it can do.
>> Juan Vuletich
>> No virus found in this incoming message.
>> Checked by AVG - www.avg.com
>> Version: 9.0.864 / Virus Database: 271.1.1/3246 - Release Date: 11/09/10 04:34:00
More information about the Pharo-project