[squeak-dev] The Trunk: MorphicExtras-kfr.149.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Jul 5 15:59:44 UTC 2014


Karl Ramberg uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/MorphicExtras-kfr.149.mcz

==================== Summary ====================

Name: MorphicExtras-kfr.149
Author: kfr
Time: 5 July 2014, 5:59:02.203 pm
UUID: a404a1e6-b874-0d47-af8f-6b7485cd6511
Ancestors: MorphicExtras-cmm.148

Add convenience menu option to graphis library tool

=============== Diff against MorphicExtras-cmm.148 ===============

Item was added:
+ ----- Method: GraphicalDictionaryMenu>>encodeToWorkspace (in category 'menu commands') -----
+ encodeToWorkspace
+ | stream encodedStream pict text |
+ pict := formChoices at: currentIndex.
+ stream := RWBinaryOrTextStream on: (String new).
+ PNGReadWriter putForm: pict onStream: stream.
+ encodedStream := stream contents asByteArray base64Encoded.
+ text := (Workspace open) model.
+ text contents: 'Form fromBinaryStream: (Base64MimeConverter mimeDecodeToBytes: ''', encodedStream,''' readStream)'!

Item was changed:
  ----- Method: GraphicalDictionaryMenu>>showMenu (in category 'menu commands') -----
  showMenu
  	"Show the receiver's menu"
  
  	| aMenu |
  	aMenu := MenuMorph new defaultTarget: self.
  	aMenu title: 'Graphics Library'.
  	aMenu addStayUpItem.
  	aMenu addList: #(
  		('remove'			removeEntry			'Remove this entry from the dictionary')
  		('rename'			renameEntry			'Rename this entry')
  		('repaint'			repaintEntry			'Edit the actual graphic for this entry' )
  		-
  		('hand me one'		handMeOne				'Hand me a morph with this picture as its form')
+ 		('encode to Workspace'	encodeToWorkspace		'Open a Workspace with the grapics encoded to be added to code')
  		('browse symbol references'
  							browseIconReferences	'Browse methods that refer to this icon''s name')
  		('browse string references'
  							browseStringIconReferences 'Browse methods that refer to string constants that contain this icon''s name')
  		('copy name'		copyName				'Copy the name of this graphic to the clipboard')
  		-
  		('find...'			findEntry				'Find an entry by name')
  		('find again'		findAgain				'Find the next match for the keyword previously searched for')).
  	aMenu popUpInWorld
  !



More information about the Squeak-dev mailing list