'From Squeak3.3alpha of 25 January 2002 [latest update: #4743] on 5 February 2002 at 9:09:19 pm'! "Change Set: designations-sw Date: 5 February 2002 Author: Scott Wallace ¥ The bright 'designations explainer' you can get from the stack menu is now properly shrink-wrapped. ¥ The field labels shown in the momentary show-designations mode are now shown in blue rather than black."! !Morph methodsFor: 'card in a stack' stamp: 'sw 2/5/2002 13:31'! showDesignationsOfObjects "Momentarily show the designations of objects on the receiver" | colorToUse aLabel | self isStackBackground ifFalse: [^ self]. self submorphsDo: [:aMorph | aMorph renderedMorph holdsSeparateDataForEachInstance ifTrue: [colorToUse _ Color orange. aLabel _ aMorph externalName] ifFalse: [colorToUse _ aMorph isShared ifFalse: [Color red] ifTrue: [Color green]. aLabel _ nil]. Display border: (aMorph fullBoundsInWorld insetBy: -6) width: 6 rule: Form over fillColor: colorToUse. aLabel ifNotNil: [aLabel asString displayOn: Display at: (aMorph fullBoundsInWorld bottomLeft + (0 @ 5)) textColor: Color blue]]. Sensor anyButtonPressed ifTrue: [Sensor waitNoButton] ifFalse: [Sensor waitButton]. World fullRepaintNeeded.! ! !StackMorph class methodsFor: 'authoring prototype' stamp: 'sw 2/5/2002 13:33'! designationsExplainer "Answer a morph that contains designation explanation" | aMorph aSwatch aTextMorph | aMorph _ AlignmentMorph newColumn color: Color black; layoutInset: 1. #((green 'Shared items on Background. Exact same item shared by every card') (orange 'Data items on Background Each card has its own data') (red 'Instance-specific items unique to this card')) do: [:aPair | aSwatch _ AlignmentMorph new extent: 132 @80; color: (Color perform: aPair first); lock. aSwatch hResizing: #rigid; vResizing: #rigid; layoutInset: 0. aSwatch borderColor: Color black. aTextMorph _ TextMorph new string: aPair second fontName: 'ComicBold' size: 18. aTextMorph width: 130. aTextMorph centered. aSwatch addMorphBack: aTextMorph. aMorph addMorphBack: aSwatch]. aMorph hResizing: #shrinkWrap; vResizing: #shrinkWrap. ^ aMorph "StackMorph designationsExplainer openInHand" ! ! !String methodsFor: 'displaying' stamp: 'sw 2/5/2002 20:33'! displayOn: aDisplayMedium at: aPoint "Show a representation of the receiver as a DisplayText at location aPoint on aDisplayMedium, using black-colored text." self displayOn: aDisplayMedium at: aPoint textColor: Color black! ! !String methodsFor: 'displaying' stamp: 'sw 2/5/2002 20:33'! displayOn: aDisplayMedium at: aPoint textColor: aColor "Show a representation of the receiver as a DisplayText at location aPoint on aDisplayMedium, rendering the text in the designated color" (self asDisplayText foregroundColor: (aColor ifNil: [Color black]) backgroundColor: Color white) displayOn: aDisplayMedium at: aPoint! !