'From Cuis 5.0 [latest update: #4204] on 3 June 2020 at 6:20:45 pm'!

!TerseGuideHelp class methodsFor: 'pages' stamp: 'KenD 6/2/2020 20:59:34'!
layoutMorph
	"Layout Morph"
	^
'| myLayout |
myLayout _ LayoutMorph new.		"this illustrates a mistake"

"A LayoutMorph places its submorphs in a horizontal Row or a vertical Column"
myLayout _ LayoutMorph newColumn.
myLayout _ LayoutMorph newRow color: Color cyan.
myLayout openInWorld.
myLayout morphExtent: (6 * myLayout morphExtent). "Make larger to hold submorphs"

myLayout addAllMorphs: { EllipseMorph initializedInstance. ImageMorph initializedInstance. BorderedRectMorph initializedInstance. }.

"When there is space left over, the submorphs can be shifted
 along the layout axis.  This is the axisEdgeWeight, a number from
 0 to 1, which can also be specified by a symbol."

myLayout axisEdgeWeight: #rowRight.
myLayout axisEdgeWeight: #center.
myLayout axisEdgeWeight: #rowLeft.

myLayout beColumn.
myLayout direction." #vertical "
myLayout axisEdgeWeight: #columnBottom.
myLayout axisEdgeWeight: #center.
myLayout axisEdgeWeight: #columnTop.

myLayout beRow.
myLayout direction. " #horizontal "

myLayout separation: 10@20. "set the amount of separation for submorphs"	
myLayout xSeparation.			"answer the x component of the specified separation"
myLayout ySeparation.			"answer the y component of the specified separation"
myLayout beColumn.

"Submorphs may also have a LayoutSpec to specify proportion and offAxis placement"
'! !
