'From OLPC2.0 of ''24 October 2006'' [latest update: #1452] on 17 July 2007 at 3:42:37 pm'! "Change Set: fixEmbedInWindow-yo Date: 17 July 2007 Author: Yoshiki Ohshima We decided to take out 'put in a window' feature, but it is nice to make it work anyway."! !Morph methodsFor: 'e-toy support' stamp: 'yo 7/17/2007 15:33'! embedInWindow | window worldToUse pasteUp m | worldToUse _ self world. "I'm assuming we are already in a world" m _ self topRendererOrSelf. window _ (SystemWindow labelled: self defaultLabelForInspector) model: nil. window extent: m extent + (window borderWidth * 4) + (0@(window labelHeight)). pasteUp _ PasteUpMorph new. pasteUp extent: m extent. pasteUp position: m position - (window borderWidth@(window borderWidth)). pasteUp addMorph: m. window addMorph: pasteUp frame: (0@0 extent: 1@1). window position: m position - ((window borderWidth*2)@((window labelHeight) + (window borderWidth*2))). window setWindowColor: Color blue muchLighter. window updatePaneColors. worldToUse addMorph: window. window activate. window setProperty: #morphEmbeddedWindow toValue: true. ^ window.! ! !Morph methodsFor: 'e-toy support' stamp: 'yo 7/17/2007 15:40'! unembedSubmorphsInWindow | p | self submorphs do: [:each | (each hasProperty: #morphEmbeddedWindow) ifTrue: [ p _ each findA: PasteUpMorph. p ifNotNil: [ p submorphs do: [:s | self addMorph: s behind: each]. each delete. ] ] ]. ! !