'From Squeak3.3alpha of 11 January 2002 [latest update: #4664] on 6 August 2002 at 8:30:54 pm'! "Change Set: PaintBoxToFront-tk Date: 6 August 2002 Author: Ted Kaehler Gives the SketchEditor a Morphic layer number of 28, putting it behind the Flaps, including the PaintBox tools. Note: Perhaps PasteUpMorph>>addMorphInLayer: should be removed from the system? It redundanty brings the flaps to the front. It is there because addMorphFront: can add a normal morph in front of the flaps. We could remove it and watch for layer violations."! !SketchEditorMorph methodsFor: 'initialization' stamp: 'tk 8/6/2002 20:24'! initializeFor: aSketchMorph inBounds: boundsToUse pasteUpMorph: aPasteUpMorph paintBoxPosition: aPosition "NB: if aPosition is nil, then it's assumed that the paintbox is obtained from a flap or some such, so do nothing special regarding a palette in this case. The palette needs already to be in the world for this to work." | w | (w _ aPasteUpMorph world) addMorphInLayer: self. "in back of palette" enclosingPasteUpMorph _ aPasteUpMorph. hostView _ aSketchMorph. "may be ownerless" self bounds: boundsToUse. palette _ w paintBox focusMorph: self. palette beStatic. "give Nebraska whatever help we can" palette fixupButtons. palette addWeakDependent: self. aPosition ifNotNil: [w addMorphFront: palette. "bring to front" palette position: aPosition]. paintingForm _ Form extent: bounds extent depth: w assuredCanvas depth. self dimTheWindow. self addRotationScaleHandles. aSketchMorph ifNotNil: [ aSketchMorph form displayOn: paintingForm at: (hostView boundsInWorld origin - bounds origin - hostView form offset) clippingBox: (0@0 extent: paintingForm extent) rule: Form over fillColor: nil. "assume they are the same depth" rotationCenter _ aSketchMorph rotationCenter]. ! ! !SketchEditorMorph methodsFor: 'morphic' stamp: 'tk 8/6/2002 20:19'! morphicLayerNumber "Place the painting behind the paint palette" ^ 28! !