'From etoys3.0 of 24 February 2008 [latest update: #2050] on 9 July 2008 at 3:09:22 pm'! ImageMorph subclass: #ProjectViewMorph instanceVariableNames: 'project lastProjectThumbnail mouseDownTime string ' classVariableNames: '' poolDictionaries: '' category: 'Morphic-Windows'! !ProjectViewMorph methodsFor: 'accessing' stamp: 'yo 7/9/2008 14:54'! clearStringMorph string := nil ! ! !ProjectViewMorph methodsFor: 'copying' stamp: 'yo 7/9/2008 14:54'! veryDeepInner: deepCopier "Copy all of my instance variables. Some need to be not copied at all, but shared. See DeepCopier class comment." super veryDeepInner: deepCopier. project _ project. "Weakly copied" lastProjectThumbnail _ lastProjectThumbnail veryDeepCopyWith: deepCopier. mouseDownTime _ nil. string := nil. ! ! !ProjectViewMorph methodsFor: 'drawing' stamp: 'yo 7/9/2008 15:08'! drawOn: aCanvas | font projectName rectForName measure | self ensureImageReady. super drawOn: aCanvas. self isEditingName ifTrue: [^self]. font _ self fontForName. projectName _ self safeProjectName. (projectName endsWith: '.pr') ifTrue: [ projectName _ projectName copyFrom: 1 to: projectName size - 3]. (string isNil or: [string contents ~= projectName]) ifTrue: [ string := StringMorph contents: projectName font: font. ]. measure := string measureContents. rectForName _ self bottomLeft + (self width - measure x // 2 @ (measure y + 2) negated) extent: measure. aCanvas clipBy: self bounds during: [:cc | cc fillRectangle: (rectForName outsetBy: (1@1)) color: self colorAroundName. string position: rectForName topLeft. string drawOn: cc ]. ! ! !ProjectViewMorph methodsFor: 'objects from disk' stamp: 'yo 7/9/2008 14:54'! objectForDataStream: refStrm | copy | 1 = 1 ifTrue: [^self]. "this didn't really work" copy _ self copy lastProjectThumbnail: nil. copy clearStringMorph. "refStrm replace: self with: copy." ^copy ! ! ImageMorph subclass: #ProjectViewMorph instanceVariableNames: 'project lastProjectThumbnail mouseDownTime string' classVariableNames: '' poolDictionaries: '' category: 'Morphic-Windows'!