'From Squeak3.1alpha of 28 February 2001 [latest update: #4166] on 24 June 2001 at 2:51:01 pm'! "Change Set: GenieDictRelocation-ar Date: 24 June 2001 Author: Andreas Raab Relocate the gesture dictionary from the event handler to the other properties. The gesture dictionary is in no way involved in event handling and heavily complicates various future reformulations."! !EventHandler methodsFor: 'testing' stamp: 'ar 6/24/2001 14:45'! handlesGesture: evt "Does the associated morph want to handle gestures?" ^ gestureRecipient notNil! ! !Morph methodsFor: 'genie-processing' stamp: 'ar 6/24/2001 14:35'! gestureDictionaryOrName "If there is an GestureHandler or an EventHandler assigned to the object, return the gesture dictionary or name definied there. If not, return the default dictionary or name." (self gestureHandler ~~ self) ifTrue: [^ self gestureHandler gestureDictionaryOrName]. ^self valueOfProperty: #gestureDictionaryOrName ifAbsent:[self defaultGestureDictionaryOrName]! ! !Morph methodsFor: 'genie-processing' stamp: 'ar 6/24/2001 14:45'! gestureDictionaryOrName: aSymbolOrCRDictionary "Assign the gesture dictionary or name to the object by using an EventHandler" (self gestureHandler ~~ self) ifTrue: [^ self gestureHandler gestureDictionaryOrName: aSymbolOrCRDictionary]. self setProperty: #gestureDictionaryOrName toValue: aSymbolOrCRDictionary. (self eventHandler notNil and:[aSymbolOrCRDictionary isNil]) ifTrue:[^self on: #gesture send: nil to: nil]. (self eventHandler isNil or: [(self eventHandler handlesGesture: nil) not]) ifTrue:[self on: #gesture send: #handleGesture: to: self].! ! !Morph methodsFor: 'genie-processing' stamp: 'ar 6/24/2001 14:41'! onGestureSend: selector to: recipient "Tell a certain instance to use a particular gesture dictionary to lookup gestures. Also the selector and the recipient can be specified" (self gestureHandler ~~ self) ifTrue: [^ self gestureHandler onGestureSend: selector to: recipient]. self on: #gesture send: selector to: recipient.! ! !PluggableTextMorph methodsFor: 'initialization' stamp: 'ar 6/24/2001 14:42'! initialize super initialize. hasUnacceptedEdits _ false. hasEditingConflicts _ false. askBeforeDiscardingEdits _ true. "Use the dictionary #Text for gestures" self gestureDictionaryOrName: #Text.! ! Morph removeSelector: #onGestureUse:send:to:! EventHandler removeSelector: #gestureDictionaryOrName! EventHandler removeSelector: #gestureDictionaryOrName:! EventHandler removeSelector: #onGestureUse:send:to:!