[Pkg] The Trunk: Morphic-pre.1556.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Oct 4 14:21:47 UTC 2019


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.!



More information about the Packages mailing list