'From Squeak2.6 of 15 October 1999 [latest update: #1559] on 8 November 1999 at 2:25:51 am'! "Change Set: MorphicInMVC-dew Date: 8 November 1999 Author: Doug Way This changeset makes a Morphic window -- opened from MVC -- appear 'seamlessly' so that it nearly resembles a regular MVC window. The Morphic subwindow will resize with the MVC window, and the redundant titlebar will be hidden. Also, an existing bug is fixed so that resizing a MorphWorldView will not cause its inset morph world to creep inward."! !MorphWorldView methodsFor: 'as yet unclassified' stamp: 'dew 11/8/1999 02:00'! computeInsetDisplayBox "This overrides the same method in View. (It avoids using displayTransform: because it can return inaccurate results, causing a MorphWorldView's inset display box to creep inward when resized.)" ^superView insetDisplayBox insetBy: borderWidth! ! !MorphWorldView methodsFor: 'as yet unclassified' stamp: 'dew 11/8/1999 02:01'! displayView "This method is called by the system when the top view is framed or moved." | topView | model viewBox: self insetDisplayBox. self updateSubWindowExtent. topView _ self topView. (topView == ScheduledControllers scheduledControllers first view or: [topView cacheBitsAsTwoTone not]) ifTrue: [model displayWorldSafely] ifFalse: [model displayWorldAsTwoTone]. "just restoring the screen"! ! !MorphWorldView methodsFor: 'as yet unclassified' stamp: 'dew 11/8/1999 01:39'! updateSubWindowExtent "If this MorphWorldView represents a single Morphic SystemWindow, then update that window to match the size of the WorldView." | numMorphs subWindow scrollBarWidth | numMorphs _ model submorphs size. "(Allow for the existence of an extra NewHandleMorph (for resizing).)" (numMorphs = 0 or: [numMorphs > 2]) ifTrue: [^ self]. subWindow _ model submorphs detect: [:ea | ea respondsTo: #label] ifNone: [^ self]. superView label = subWindow label ifFalse: [^ self]. (Preferences valueOfFlag: #inboardScrollbars) ifTrue: [scrollBarWidth _ 0] ifFalse: [scrollBarWidth _ 14]. subWindow position: scrollBarWidth@-16. subWindow extent: model extent - (scrollBarWidth@-16). subWindow isActive ifFalse: [subWindow activate].! !