[Cuis-dev] LayoutMorph and handling layouts

Eric Gade eric.gade at gmail.com
Sat Oct 23 13:21:13 PDT 2021


Hi All,

I'm experimenting with creating some new widgets using VectorGraphics and
friends. Coming from the Squeak/Pharo side of things, the Morphic layout
structure is completely different in Cuis. I have a couple of questions.

First, how do we handle the situation where we have a WidgetMorph whose
sole submorph is a LayoutMorph? Is it possible to simply make it match
dimensions? You might be thinking, "just use a LayoutMorph as the root,"
which leads me to my next question: are we supposed to subclass LayoutMorph
and use it by ourselves to make widgets? The reason I ask is because
sending LayoutMorph >> #new always results in an MNU about direction not
being specified. This is true even in cases where you subclass LayoutMorph
and explicitly set a direction (column or row) in the initialize method. I
am not sure what is "correct" here.

One final question about LayoutSpecs. It seems that any settings you make
to a submorph's layoutSpec (for example, getting rid of proportionality)
will be reset when you add it to a parent LayoutMorph. So for now, I am
only adjusting the layouSpecs of my submorphs after they have been added to
their parent. Is this correct, or is there some better way to do it?

Thanks!

-- 
Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20211023/03272998/attachment.htm>


More information about the Cuis-dev mailing list