... and the attachment

Joshua Channing Gargus schwa at cc.gatech.edu
Sat Dec 16 06:19:46 UTC 2000


Just in case you actually wanted the attachment (smack!)

Joshua

On Sat, Dec 16, 2000 at 12:54:37AM -0500, Joshua Channing Gargus wrote:
> >From the preamble:
> 
> Small tweak that adds images to handles before adding the handles in
> order to avoid a larger than necessary redraw.
> 
> Joshua
-------------- next part --------------
'From Squeak2.9alpha of 13 June 2000 [latest update: #3121] on 16 December 2000 at 12:52:47 am'!
"Change Set:		HaloRedrawTweak
Date:			16 December 2000
Author:			Joshua Gargus

Small tweak that adds images to handles before adding the handles in order to avoid a larger than necessary redraw."!


!HaloMorph methodsFor: 'private' stamp: 'jcg 12/15/2000 09:56'!
addHandle: handleSpec on: eventName send: selector to: recipient
	"Add a handle within the halo box as per the haloSpec, and set it up to respond to the given event by sending the given selector to the given recipient.  Return the handle."
	| handle aPoint iconName colorToUse |
	aPoint _ self positionIn: haloBox horizontalPlacement: handleSpec horizontalPlacement verticalPlacement: handleSpec verticalPlacement.
	handle _ EllipseMorph
		newBounds: (Rectangle center: aPoint extent: HandleSize asPoint)
		color: (colorToUse _ Color colorFrom: handleSpec color).
	(iconName _ handleSpec iconSymbol) ifNotNil:
		[ | form |
		form !
!
!
_ ScriptingSystem formAtKey: iconName.
		form ifNotNil:
			[handle addMorphCentered: (ImageMorph new
				image: form; 
				color: colorToUse makeForegroundColor;
				lock)]].
	self addMorph: handle.
	handle on: #mouseUp send: #endInteraction to: self.
	handle on: eventName send: selector to: recipient.
	handle setBalloonText: (target balloonHelpTextForHandle: handle).
	^ handle
! !


More information about the Squeak-dev mailing list