[Cuis-dev] Talking about Layouts

Dan Norton dnorton at mindspring.com
Sun Apr 26 18:46:10 PDT 2020


+1

On Sun, 26 Apr 2020 21:46:03 +0000
"ken.dickey--- via Cuis-dev" <cuis-dev at lists.cuis.st> wrote:

> I think we have a user interface problem with 
> LayoutSpec>>minorDirectionPadding:  
> 
> One is easily confused, so perhaps our descriptions are wrong -- we
> are talking badly.
> 
> In particular, I would like to use "attraction" rather than
> "padding", but see below.
> 
> ===============================================
> 
> I also propose a brief discussion in the Terse Guide.
> 
> Perhaps something like:
> =========================
> 
> LayoutMorph's arrange subMorphs as either a horizontal Row or a
> vertical Column.
> 
> Along this Major or Layout Axis, subMorphs may be attracted toward
> one side (0.0) or the other (1.0) or anywhere in between.
> 
> If a Row, one can specify the placement attraction symbolically as
>    { #rowLeft (0.0), #center (0.5), #rowRight (1.0) }
> 
> If a Column, one can specify the placement attraction symbolically as:
>    { #colTop (0.0), #center (0.5), #colBottom (1.0) }
> 
> A LayoutMorph may also have a Morph Separation specified as x at y
> 
> ======
> 
> Each subMorph of a LayoutMorph may have an optional LayoutSpec which
> the subMorph uses to indicate how that Morph  wants to be arranged by
> its containing LayoutMorph.
> 
> Options include treating the Morph's width and height as fixed or 
> proportional to the LayoutMorph's extent.
> 
> A LayoutSpec may also indicate an attraction along the Minor or
> Contrary Axis.
> 
> Again, symbols may be used.
> 
> If in a LayoutMorph Row: { #rowTop (0.0), #center (0.5), #rowBottom 
> (1.0)}
> 
> If in a LayoutMorph Column: { #colLeft (0.0), #center (0.5),
> #colRight (1.0) }
> 
> =============================================================
> 
> I propose we change the access methods
>    LayoutMorph>>padding: --> LayoutMorph>>attraction:
>    LayoutSpec>>minorDirectionPadding: --> LayoutSpec>>attraction:  
> 
> And use the symbols as above in place of {#right, #top, #left,
> #bottom}.
> 
> 
> Does this seem sensible?  Is there a better way to describe this?
> 
> Up for discussion..
> 
> Thanks!
> -KenD



More information about the Cuis-dev mailing list