'From Squeak3.7alpha of 11 September 2003 [latest update: #5707] on 15 February 2004 at 9:39:52 am'! "Change Set: GenieRemoval-nk Date: 14 February 2004 Author: Ned Konz Removes Genie so that it can be loaded later as a package. Tested with 3.7a-5707. " HandMorph allSubInstancesDo: [ :ea | ea disableGenie ]. Morph allSubInstancesDo: [ :ea | ea gestureDictionaryOrName: nil ]. FileList unregisterFileReader: CRRecognizer.! !EventHandler methodsFor: 'copying' stamp: 'nk 2/14/2004 18:24'! veryDeepInner: deepCopier "ALL fields are weakly copied!! Can't duplicate an object by duplicating a button that activates it. See DeepCopier." super veryDeepInner: deepCopier. "just keep old pointers to all fields" ! ]style[(25 108 10 78)f1b,f1,f1LDeepCopier Comment;,f1! ! !EventHandler methodsFor: 'initialization' stamp: 'nk 2/15/2004 08:59'! onGestureSend: selector to: recipient! ! !EventHandler methodsFor: 'testing' stamp: 'nk 2/15/2004 08:57'! handlesGestureStart: evt "Does the associated morph want to handle gestures?" ^false! ! !Morph methodsFor: 'event handling' stamp: 'nk 2/14/2004 18:42'! handlesMouseDown: evt "Do I want to receive mouseDown events (mouseDown:, mouseMove:, mouseUp:)?" "NOTE: The default response is false, except if you have added sensitivity to mouseDown events using the on:send:to: mechanism. Subclasses that implement these messages directly should override this one to return true." self eventHandler ifNotNil: [^ self eventHandler handlesMouseDown: evt]. ^ false! ! !Morph methodsFor: 'events-processing' stamp: 'nk 2/14/2004 18:42'! handleMouseDown: anEvent "System level event handling." anEvent wasHandled ifTrue:[^self]. "not interested" anEvent hand removePendingBalloonFor: self. anEvent hand removePendingHaloFor: self. anEvent wasHandled: true. anEvent controlKeyPressed ifTrue:[^self invokeMetaMenu: anEvent]. "Make me modal during mouse transitions" anEvent hand newMouseFocus: self event: anEvent. anEvent blueButtonChanged ifTrue:[^self blueButtonDown: anEvent]. self mouseDown: anEvent. anEvent hand removeHaloFromClick: anEvent on: self. (self handlesMouseStillDown: anEvent) ifTrue:[ self startStepping: #handleMouseStillDown: at: Time millisecondClockValue + self mouseStillDownThreshold arguments: {anEvent copy resetHandlerFields} stepTime: 1]. ! ! !Morph methodsFor: 'menu' stamp: 'nk 2/15/2004 09:08'! addGestureMenuItems: aMenu hand: aHandMorph "If the receiver wishes the Genie menu items, add a line to the menu and then those Genie items, else do nothing"! ! !Morph methodsFor: 'dispatching' stamp: 'nk 2/15/2004 09:16'! disableSubmorphFocusForHand: aHandMorph "Check whether this morph or any of its submorph has the Genie focus. If yes, disable it." ! ! !HandMorph methodsFor: 'events-processing' stamp: 'nk 2/15/2004 09:01'! isCapturingGesturePoints ^false! ! !HandMorph methodsFor: 'focus handling' stamp: 'nk 2/14/2004 18:44'! mouseFocus: aMorphOrNil mouseFocus _ aMorphOrNil! ! !HandMorph methodsFor: 'initialization' stamp: 'nk 2/14/2004 18:28'! interrupted "Something went wrong - we're about to bring up a debugger. Release some stuff that could be problematic." self releaseAllFoci. "or else debugger might not handle clicks" ! ! !PluggableTextMorph methodsFor: 'initialization' stamp: 'nk 2/14/2004 18:19'! initialize "initialize the state of the receiver" super initialize. hasUnacceptedEdits _ false. hasEditingConflicts _ false. askBeforeDiscardingEdits _ true. ! ! !TextMorph methodsFor: 'copying' stamp: 'nk 2/14/2004 21:00'! 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. textStyle _ textStyle veryDeepCopyWith: deepCopier. text _ text veryDeepCopyWith: deepCopier. wrapFlag _ wrapFlag veryDeepCopyWith: deepCopier. paragraph _ paragraph veryDeepCopyWith: deepCopier. editor _ editor veryDeepCopyWith: deepCopier. container _ container veryDeepCopyWith: deepCopier. predecessor _ predecessor. successor _ successor. backgroundColor _ backgroundColor veryDeepCopyWith: deepCopier. margins _ margins veryDeepCopyWith: deepCopier. ! ! !TheWorldMenu methodsFor: 'menu' stamp: 'nk 2/15/2004 09:38'! addGestureHelpItemsTo: aMenuMorph ! ! EventHandler removeSelector: #gesture:fromMorph:! EventHandler removeSelector: #gestureRecipient! EventHandler removeSelector: #gestureSelector! EventHandler removeSelector: #hasGestureRecipient! !EventHandler reorganize! ('access' allRecipients firstMouseSelector messageList methodRefList mouseDownSelector mouseStillDownRecipient mouseStillDownSelector mouseUpSelector) ('copying' veryDeepFixupWith: veryDeepInner:) ('events' click:fromMorph: doubleClick:fromMorph: doubleClickTimeout:fromMorph: keyStroke:fromMorph: mouseDown:fromMorph: mouseEnter:fromMorph: mouseEnterDragging:fromMorph: mouseLeave:fromMorph: mouseLeaveDragging:fromMorph: mouseMove:fromMorph: mouseStillDown:fromMorph: mouseUp:fromMorph: send:to:withEvent:fromMorph: startDrag:fromMorph:) ('fixups' fixAlansOldEventHandlers fixReversedValueMessages replaceSendsIn:with:) ('initialization' adaptToWorld: forgetDispatchesTo: on:send:to: on:send:to:withValue: onGestureSend:to:) ('objects from disk' convertToCurrentVersion:refStream:) ('printing' printOn:) ('testing' handlesClickOrDrag: handlesGestureStart: handlesKeyboard: handlesMouseDown: handlesMouseMove: handlesMouseOver: handlesMouseOverDragging: handlesMouseStillDown:) ! "Postscript: Clean up unneeded instance variables." | pkg | SystemOrganization renameCategory: 'Tests-Genie-Engine' toBe: 'Genie-Tests'. EventHandler removeInstVarName: 'gestureSelector'. EventHandler removeInstVarName: 'gestureRecipient'. EventHandler removeInstVarName: 'gestureDictionaryOrName'. TextMorph removeInstVarName: 'lastGesture'. pkg _ PackageInfo named: 'Genie'. pkg extensionMethods do: [ :mr | mr setClassAndSelectorIn: [ :cls :sel | cls removeSelector: sel ]]. pkg classes do: [ :cls | cls removeFromSystem ]. Smalltalk removeEmptyMessageCategories. Project spawnNewProcessAndTerminateOld: true.!