Patrick Rein uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-pre.137.mcz ==================== Summary ==================== Name: EToys-pre.137 Author: pre Time: 20 May 2016, 10:17:16.147592 am UUID: f4fdcfc9-f4e7-431b-84bc-41ba3fec9f27 Ancestors: EToys-mt.136 Moves UpdatingRectangleMorph to MorphicExtras =============== Diff against EToys-mt.136 =============== Item was removed: - RectangleMorph subclass: #UpdatingRectangleMorph - instanceVariableNames: 'target lastValue getSelector putSelector contents' - classVariableNames: '' - poolDictionaries: '' - category: 'Etoys-Scripting Support'! - - !UpdatingRectangleMorph commentStamp: '<historical>' prior: 0! - Intended for use as a color swatch coupled to a color obtained from the target, but made just slightly more general than that.! Item was removed: - ----- Method: UpdatingRectangleMorph>>contents (in category 'accessing') ----- - contents - ^ contents! Item was removed: - ----- Method: UpdatingRectangleMorph>>contents: (in category 'accessing') ----- - contents: c - contents := c! Item was removed: - ----- Method: UpdatingRectangleMorph>>defaultBorderColor (in category 'initialization') ----- - defaultBorderColor - "answer the default border color/fill style for the receiver" - ^ Color lightGray lighter! Item was removed: - ----- Method: UpdatingRectangleMorph>>getSelector (in category 'accessing') ----- - getSelector - "Answer the getSelector" - - ^ getSelector! Item was removed: - ----- Method: UpdatingRectangleMorph>>getSelector: (in category 'accessing') ----- - getSelector: aSymbol - - getSelector := aSymbol. - ! Item was removed: - ----- Method: UpdatingRectangleMorph>>handlesMouseDown: (in category 'event handling') ----- - handlesMouseDown: evt - ^putSelector notNil! Item was removed: - ----- Method: UpdatingRectangleMorph>>isEtoyReadout (in category 'accessing') ----- - isEtoyReadout - "Answer whether the receiver can serve as an etoy readout" - - ^ true! Item was removed: - ----- Method: UpdatingRectangleMorph>>mouseUp: (in category 'event handling') ----- - mouseUp: evt - - self changeColorTarget: self selector: #setTargetColor: originalColor: color hand: evt hand.! Item was removed: - ----- Method: UpdatingRectangleMorph>>putSelector (in category 'accessing') ----- - putSelector - ^ putSelector! Item was removed: - ----- Method: UpdatingRectangleMorph>>putSelector: (in category 'accessing') ----- - putSelector: aSymbol - putSelector := aSymbol! Item was removed: - ----- Method: UpdatingRectangleMorph>>readFromTarget (in category 'target access') ----- - readFromTarget - "Read the color value from my target" - - | v | - (target isNil or: [getSelector isNil]) ifTrue: [^contents]. - target isMorph ifTrue: [target isInWorld ifFalse: [^contents]]. - v := self valueProvider perform: getSelector. - lastValue := v. - ^v! Item was removed: - ----- Method: UpdatingRectangleMorph>>setTargetColor: (in category 'setting') ----- - setTargetColor: aColor - "Set my target's color as indicated" - - putSelector ifNotNil: - [self color: aColor. - contents := aColor. - self valueProvider perform: self putSelector withArguments: (Array with: aColor)] - ! Item was removed: - ----- Method: UpdatingRectangleMorph>>step (in category 'stepping and presenter') ----- - step - | s | - super step. - s := self readFromTarget. - s = contents ifFalse: - [self contents: s. - self color: s] - ! Item was removed: - ----- Method: UpdatingRectangleMorph>>stepTime (in category 'testing') ----- - stepTime - - ^ 50! Item was removed: - ----- Method: UpdatingRectangleMorph>>target (in category 'accessing') ----- - target - - ^ target - ! Item was removed: - ----- Method: UpdatingRectangleMorph>>target: (in category 'accessing') ----- - target: anObject - - target := anObject. - ! Item was removed: - ----- Method: UpdatingRectangleMorph>>userEditsAllowed (in category 'accessing') ----- - userEditsAllowed - "Answer whether it is suitable for a user to change the value represented by this readout" - - ^ putSelector notNil! Item was removed: - ----- Method: UpdatingRectangleMorph>>valueProvider (in category 'setting') ----- - valueProvider - "Answer the object to which my get/set messages should be sent. This is inefficient and contorted in order to support grandfathered content for an earlier design" - - ^ target isMorph - ifTrue: - [target topRendererOrSelf player ifNil: [target]] - ifFalse: - [target]! Item was removed: - ----- Method: UpdatingRectangleMorph>>veryDeepFixupWith: (in category 'copying') ----- - veryDeepFixupWith: deepCopier - "If target and arguments fields were weakly copied, fix them here. If they were in the tree being copied, fix them up, otherwise point to the originals!!!!" - - super veryDeepFixupWith: deepCopier. - target := deepCopier references at: target ifAbsent: [target].! Item was removed: - ----- Method: UpdatingRectangleMorph>>veryDeepInner: (in category 'copying') ----- - veryDeepInner: deepCopier - "Copy all of my instance variables. Some need to be not copied at all, but shared. Warning!!!! Every instance variable defined in this class must be handled. We must also implement veryDeepFixupWith:. See DeepCopier class comment." - - super veryDeepInner: deepCopier. - "target := target. Weakly copied" - lastValue := lastValue veryDeepCopyWith: deepCopier. - "getSelector := getSelector. a Symbol" - "putSelector := putSelector. a Symbol" - contents := contents veryDeepCopyWith: deepCopier.! |
Free forum by Nabble | Edit this page |