'From Squeak 2.4b of April 23, 1999 on 28 May 1999 at 8:40:34 pm'! "Change Set: HaloNameFix2-dew Date: 28 May 1999 Author: Doug Way Another fix to the Morphic Halo: If the halo reaches the bottom of the screen, the name of the morph will still be visible at the bottom."! !HaloMorph methodsFor: 'private' stamp: 'dew 5/28/1999 01:47'! addHandles | box s dismissHandle lab | target isWorldMorph ifTrue: [^ self addHandlesForWorldHalos]. self removeAllMorphs. "remove old handles, if any" s _ self handleSize. self bounds: target renderedMorph fullBoundsInWorld. "update my size" box _ (self bounds expandBy: s+1) intersect: (self world bounds insetBy: 8@8). self addHandleAt: box topLeft color: Color red on: #mouseDown send: #doMenu:with: to: self. self addHandleAt: (box leftCenter + (0 @ (s+2)) min: box leftCenter + box bottomLeft // 2) color: Color lightBrown on: #mouseDown send: #tearOffTile to: innerTarget. dismissHandle _ self addHandleAt: (box topLeft + ((s+2)@0) min: box topLeft + box topCenter // 2) color: Color red muchLighter on: #mouseDown send: #mouseDownInDimissHandle:with: to: self. dismissHandle on: #mouseUp send: #maybeDismiss:with: to: self. dismissHandle on: #mouseStillDown send: #setDismissColor:with: to: self. dismissHandle addMorphBack: (lab _ StringMorph contents: 'X' font: ScriptingSystem fontForScriptorButtons). lab position: dismissHandle position + (4 @ 0). lab lock. self addHandleAt: box leftCenter color: Color cyan on: #mouseDown send: #openViewerForArgument to: innerTarget. self addHandleAt: box topCenter color: Color black on: #mouseDown send: #doGrab:with: to: self. (self addHandleAt: (box topCenter + ((s+2)@0) min: box topCenter + box topRight // 2) color: Color brown on: #mouseDown send: #startDrag:with: to: self) on: #mouseStillDown send: #doDrag:with: to: self. self addHandleAt: box topRight color: Color green on: #mouseDown send: #doDup:with: to: self. Preferences showDebugHaloHandle ifTrue: [self addHandleAt: (box rightCenter + (0 @ ((s+2) negated)) min: box rightCenter + box bottomRight // 2) color: Color blue veryMuchLighter on: #mouseDown send: #doDebug:with: to: self]. target balloonText ifNotNil: [(self addHandleAt: box bottomCenter color: Color lightBlue on: #mouseDown send: #mouseDownOnHelpHandle: to: innerTarget) on: #mouseUp send: #deleteBalloon to: innerTarget]. (self addHandleAt: box bottomLeft color: Color blue on: #mouseDown send: #startRot:with: to: self) on: #mouseStillDown send: #doRot:with: to: self. target isFlexMorph ifTrue: [(self addHandleAt: box bottomRight color: Color lightOrange on: #mouseDown send: #startScale:with: to: self) on: #mouseStillDown send: #doScale:with: to: self] ifFalse: [(self addHandleAt: box bottomRight color: Color yellow on: #mouseDown send: #startGrow:with: to: self) on: #mouseStillDown send: #doGrow:with: to: self]. innerTarget addOptionalHandlesTo: self box: box. self addNameBeneath: box string: target externalName. growingOrRotating _ false. self layoutChanged. self changed. ! ! !HaloMorph methodsFor: 'private' stamp: 'dew 5/28/1999 20:40'! addNameBeneath: outerRectangle string: aString "Add a name display centered beneath the bottom of the outer rectangle. Return the handle." | nameMorph namePosition nameBackgroundMorph | nameMorph _ UpdatingStringMorph contents: aString. nameMorph useStringFormat; target: innerTarget; putSelector: #renameTo:. namePosition _ outerRectangle bottomCenter - ((nameMorph width // 2) @ (self handleSize negated // 2 - 1)). nameMorph position: (namePosition min: self world extent - nameMorph extent y + 2). nameMorph balloonTextSelector: #objectNameInHalo. nameBackgroundMorph _ RectangleMorph newBounds: (nameMorph bounds expandBy: 1). nameBackgroundMorph color: Color white; borderWidth: 0. self addMorph: nameBackgroundMorph. self addMorph: nameMorph. ^ nameMorph! !