[squeak-dev] The Trunk: Morphic-pre.1556.mcz

H. Hirzel hannes.hirzel at gmail.com
Fri Oct 4 16:44:46 UTC 2019


Hello Patrick

Yes, I think it is a typical use case to have a morph (e.g. picture)
centered without text in front or at the back of it.

However this might be achieved by having a
    Character lf
after the preceding text and also after the morph (first attachment).

I wonder why the text does not reflow after a change in size of the
morph by means of a resize halo.

Best
Hannes




On 10/4/19, Rein, Patrick <Patrick.Rein at hpi.de> wrote:
> Having embedded Morphs on their own line is not supported anymore.
> #paragraph/#document were not really distinguished before. Do you think it
> would be worth having it again? It would not be too much work to add it.
>
> Bests
> Patrick
> ________________________________________
> From: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> on behalf
> of commits at source.squeak.org <commits at source.squeak.org>
> Sent: Friday, October 4, 2019 4:21:47 PM
> To: squeak-dev at lists.squeakfoundation.org;
> packages at lists.squeakfoundation.org
> Subject: [squeak-dev] The Trunk: Morphic-pre.1556.mcz
>
> Patrick Rein uploaded a new version of Morphic to project The Trunk:
> http://source.squeak.org/trunk/Morphic-pre.1556.mcz
>
> ==================== Summary ====================
>
> Name: Morphic-pre.1556
> Author: pre
> Time: 4 October 2019, 4:21:37.806303 pm
> UUID: 47327636-d19c-cf45-a282-baf3d5edf2c4
> Ancestors: Morphic-pre.1555
>
> Updates the examples and code references in the comment for TextAnchor to
> correspond to the new infrastructure.
>
> =============== Diff against Morphic-pre.1555 ===============
>
> Item was changed:
>   TextAttribute subclass: #TextAnchor
>         instanceVariableNames: 'anchoredMorph'
>         classVariableNames: ''
>         poolDictionaries: ''
>         category: 'Morphic-Text Support'!
>
> + !TextAnchor commentStamp: 'pre 10/4/2019 16:11' prior: 0!
> + TextAnchors support anchoring of images in text. A TextAnchor exists as an
> attribute of text emphasis. Depending on whether its anchoredMorph is a
> Morph or a Form, it repositions the morph, or displays the form
> respectively.  The coordination between composition, display, and selection
> can best be understood by browsing the various implementations of
> placeEmbeddedObjectFrom:.
> - !TextAnchor commentStamp: 'md 8/10/2006 11:52' prior: 0!
> - TextAnchors support anchoring of images in text.  A TextAnchor exists as
> an attribute of text emphasis, and it gets control like a FontReference,
> through the emphasizeScanner: message.  Depending on whether its
> anchoredMorph is a Morph or a Form, it repositions the morph, or displays
> the form respectively.  The coordination between composition, display and
> selection can best be understood by browsing the various implementations of
> placeEmbeddedObject:.
>
> + In the morphic world, you can embed any form or morph in text by adding a
> startOfHeader character and adding the TextAnchor attribute to it.
> - In the morphic world, simply embed any form or morph in text.
>
>         Workspace new
> +               contents: (Text withAll: 'foo') , (Text string: Character
> startOfHeader asString attribute: (TextAnchor new anchoredMorph: MenuIcons
> confirmIcon)) , (Text withAll: 'bar');
> -               contents: (Text withAll: 'foo') , (Text string: '*'
> attribute: (TextAnchor new anchoredMorph: MenuIcons confirmIcon)) , (Text
> withAll: 'bar');
>                 openLabel: 'Text with Form'.
>
>         Workspace new
> +               contents: (Text withAll: 'foo') , (Text string: Character
> startOfHeader asString attribute: (TextAnchor new anchoredMorph:
> EllipseMorph new)) , (Text withAll: 'bar');
> +               openLabel: 'Text with Morph'.!
> -               contents: (Text withAll: 'foo') , (Text string: '*'
> attribute: (TextAnchor new anchoredMorph: EllipseMorph new)) , (Text
> withAll: 'bar');
> -               openLabel: 'Text with Morph'.
> -
> - In this case you select a piece of the screen, and it gets anchored to a
> one-character text in the editor's past buffer.  If you then paste into some
> other text, you will see the image as an embedded image.!
>
>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Text_with_Morph.png
Type: image/png
Size: 16757 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20191004/4b10b811/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Text_with_Morph_resized.png
Type: image/png
Size: 16788 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20191004/4b10b811/attachment-0001.png>


More information about the Squeak-dev mailing list