[Cuis] Simple Morphic

KenD Ken.Dickey at Whidbey.com
Wed Nov 11 10:13:58 CST 2015


On Wed, 11 Nov 2015 14:13:57 +0000
Euan Mee <euanmee at gmail.com> wrote:

> What is the current state of development of Simple Morph?

I am not sure what you mean by Simple Morph.

Cuis has been taking steps toward Morphic3:

https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev/blob/master/Documentation/NotesOnMorphic.md

The MorphExtension class was removed.  (We have Morph Properties).

Morphs have float rather than integer location coordinates.

Morph location is relative to their owner, not the screen.

These are relatively small changes to get used to.

More radical are some of the other simplifications in the system.

The best example here is probably Layout.

LayoutMorphs do just that for their submorphs.  A LayoutSpec is attached to individual Morphs to tell their container how they want to be layed out.  See the class comments.

The code in LayoutMorph is much smaller (see LayoutMorph>>layoutSubmorphsHorizontallyIn:) than corresponding layout code in Squeak or Pharo.

See LayoutMorph class examples.

If you git clone the Morphic-Misc1 package and load it you can get Layout editors:

Open a shell and cd to the directory containing Cuis-Smalltalk-Dev

  git clone https://github.com/KenDickey/Cuis-Smalltalk-Morphic-Misc1.git

Go to Cuis-Smalltalk-Dev, open an image and use a Workspace to require the package:

  Feature require:  'Morphic-Misc1'.

Then use the LayoutMorph class examples, select (sub) morphs, open a LayoutMorph Editor (or a LayoutSpec Editor) and play with the settings.  

Note that these editors are "one-shot" and will close after setting or cancelling, so click on the "push pin" in the upper right corner to keep them open.

If you have several editors open, you can use the "Show Halo" button to see which Morph an editor is adjusting.

> Is there any documentation on how to use it, or is it allInTheCode ?

See the above URL and continue to ask questions.  We need to make the documentation better over time and questions are very helpful here.

-- 
-KenD




More information about the Cuis mailing list