'From Squeak3.8beta of ''22 October 2004'' [latest update: #6327] on 22 October 2004 at 6:55:38 pm'! "Change Set: undoBrokenStuff-bf Date: 22 October 2004 Author: Bert Freudenberg Undo a few broken things by reverting to previous version: - opening world menu - opening viewer"! !Morph methodsFor: 'scripting-override' stamp: 'nk 8/21/2004 13:28'! filterViewerCategoryDictionary: dict "dict has keys of categories and values of priority. You can re-order or remove categories here." Preferences eToyFriendly ifTrue: [dict removeKey: #layout].! ! !PasteUpMorph methodsFor: 'event handling' stamp: 'ar 10/10/2000 14:12'! keyStroke: anEvent "A keystroke has been made. Service event handlers and, if it's a keystroke presented to the world, dispatch it to #unfocusedKeystroke:" super keyStroke: anEvent. "Give event handlers a chance" (anEvent keyCharacter == Character tab) ifTrue: [(self hasProperty: #tabAmongFields) ifTrue:[^ self tabHitWithEvent: anEvent]]. self isWorldMorph ifTrue: [self keystrokeInWorld: anEvent]! ! !Presenter methodsFor: 'viewer' stamp: 'nk 9/21/2003 12:53'! viewMorph: aMorph | aPlayer openViewers aViewer aPalette aRect aPoint nominalHeight aFlapTab topItem flapLoc | Sensor leftShiftDown ifFalse: [((aPalette := aMorph standardPalette) notNil and: [aPalette isInWorld]) ifTrue: [^aPalette viewMorph: aMorph]]. aPlayer := (topItem := aMorph topRendererOrSelf) assuredPlayer. openViewers _ aPlayer allOpenViewers. aViewer := openViewers isEmpty ifFalse: [ openViewers first ] ifTrue: [ self nascentPartsViewer ]. self cacheSpecs: topItem. "redo the spec cache once in a while" "19 sept 2000 - allow flaps in any paste up" flapLoc := associatedMorph. "world" Preferences viewersInFlaps ifTrue: [ aViewer owner ifNotNilDo: [ :f | ^f flapTab showFlap; yourself ]. aViewer setProperty: #noInteriorThumbnail toValue: true. aViewer initializeFor: aPlayer barHeight: 0. aViewer enforceTileColorPolicy. aViewer fullBounds. "force layout" "associatedMorph addMorph: aViewer." "why???" flapLoc hideViewerFlapsOtherThanFor: aPlayer. aFlapTab := flapLoc viewerFlapTabFor: topItem. aFlapTab referent submorphs do: [:m | (m isKindOf: Viewer) ifTrue: [m delete]]. aViewer visible: true. aFlapTab applyThickness: aViewer width + 25. aFlapTab spanWorld. aFlapTab showFlap. aViewer position: aFlapTab referent position. aFlapTab referent addMorph: aViewer beSticky. "moved" flapLoc startSteppingSubmorphsOf: aFlapTab. flapLoc startSteppingSubmorphsOf: aViewer. ^aFlapTab]. aViewer initializeFor: aPlayer barHeight: 6. aViewer enforceTileColorPolicy. aViewer fullBounds. "force layout" Preferences automaticViewerPlacement ifTrue: [aPoint := aMorph bounds right @ (aMorph center y - ((nominalHeight := aViewer initialHeightToAllow) // 2)). aRect := (aPoint extent: aViewer width @ nominalHeight) translatedToBeWithin: flapLoc bounds. aViewer position: aRect topLeft. aViewer visible: true. associatedMorph addMorph: aViewer. flapLoc startSteppingSubmorphsOf: aViewer. "it's already in the world, somewhat coincidentally" ^aViewer]. aMorph primaryHand attachMorph: (aViewer visible: true). ^aViewer! !