[Pharo-project] just for fun... extensibility of Morphic

Schwab,Wilhelm K bschwab at anest.ufl.edu
Thu Mar 19 10:19:27 EDT 2009


Stef,

I was having a fairly nice day, until I saw this ;)

Bill 




-----Original Message-----
From: pharo-project-bounces at lists.gforge.inria.fr [mailto:pharo-project-bounces at lists.gforge.inria.fr] On Behalf Of Stéphane Ducasse
Sent: Thursday, March 19, 2009 8:50 AM
To: Pharo Development
Subject: [Pharo-project] just for fun... extensibility of Morphic

awesome if you want to add a new handle .... guess what you have to edit this method :)

Morph>>balloonHelpTextForHandle: aHandle
	"Answer a string providing balloon help for the
	given halo handle"
	| itsSelector |
	itsSelector := aHandle eventHandler firstMouseSelector.
	itsSelector == #doRecolor:with: ifTrue: [^ 'Change color'].
	itsSelector == #mouseDownInDimissHandle:with:
		ifTrue: [^ Preferences preserveTrash
				ifTrue: ['Move to trash']
				ifFalse: ['Remove from screen']].
	#(#(#addFullHandles 'More halo handles') #(#addSimpleHandles 'Fewer halo handles') #(#chooseEmphasisOrAlignment 'Emphasis & alignment') #(#chooseFont 'Change font') #(#chooseNewGraphicFromHalo 'Choose a new
graphic') #(#chooseStyle 'Change style') #(#dismiss 'Remove')
#(#doDebug:with: 'Debug') #(#doDirection:with: 'Choose forward
direction') #(#doDup:with: 'Duplicate')  #(#doMenu:with: 'Menu')  
#(#doGrab:with: 'Pick up')  #(#editDrawing 'Repaint')   
#(#makeNewDrawingWithin 'Paint new object')
#(#mouseDownInCollapseHandle:with: 'Collapse')  
#(#mouseDownOnHelpHandle: 'Help')   
#(#prepareToTrackCenterOfRotation:with: 'Move object or set center of
rotation') #(#presentViewMenu 'Present the Viewing menu')
#(#startDrag:with: 'Move') #(#startGrow:with: 'Change size')
#(#startRot:with: 'Rotate') #(#startScale:with: 'Change
scale')#(#trackCenterOfRotation:with: 'Set center of rotation') )
		do: [:pair | itsSelector == pair first
				ifTrue: [^ pair last]].
	^ 'unknown halo handle'translated

_______________________________________________
Pharo-project mailing list
Pharo-project at lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project




More information about the Pharo-dev mailing list