[squeak-dev] The Trunk: Morphic-mt.2071.mcz
commits at source.squeak.org
commits at source.squeak.org
Mon Jan 23 16:16:40 UTC 2023
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.2071.mcz
==================== Summary ====================
Name: Morphic-mt.2071
Author: mt
Time: 23 January 2023, 5:16:38.044818 pm
UUID: 0369b0e1-d46a-ee4e-aa19-bb86a3584bad
Ancestors: Morphic-mt.2070
Some clean-up in input-event protocol.
=============== Diff against Morphic-mt.2070 ===============
Item was removed:
- ----- Method: DropEvent>>transformedBy: (in category 'transforming') -----
- transformedBy: aMorphicTransform
- "Return the receiver transformed by the given transform into a local coordinate system."
- ^self shallowCopy transformBy: aMorphicTransform!
Item was added:
+ ----- Method: DropEvent>>translateBy: (in category 'transforming') -----
+ translateBy: delta
+ "add delta to cursorPoint, and return the new event"
+ position := position + delta.!
Item was added:
+ ----- Method: KeyboardEvent>>setKeyValue: (in category 'private') -----
+ setKeyValue: aValue
+
+ keyValue := aValue.!
Item was changed:
----- Method: LegacyShortcutsFilter class>>filterEvent:for: (in category 'event filter') -----
filterEvent: aKeyboardEvent for: textMorph
aKeyboardEvent isKeystroke ifFalse: [^ aKeyboardEvent].
aKeyboardEvent commandKeyPressed ifFalse: [^ aKeyboardEvent].
Preferences cmdKeysInText ifFalse: [^ aKeyboardEvent].
(Smalltalk platformName = 'Mac OS' and: [aKeyboardEvent shiftPressed])
ifTrue: ["Work around an issue in the VM where SHIFT is not honored
in the KeyChar event's character. This should only be the case for
KeyDown events to encode virtual-key presses. The VM should not
do this for KeyChar events. Works for U.S. keyboard layout only."
+ aKeyboardEvent setKeyValue: (
- aKeyboardEvent keyValue: (
aKeyboardEvent keyCharacter caseOf: {
[$9] -> [$(]. [$0] -> [$)].
[$,] -> [$<]. [$.] -> [$>].
[$[] -> [${]. [$]] -> [$}].
[$'] -> [$"] }
otherwise: [aKeyboardEvent keyCharacter]) asInteger].
('()[]{}|''"<>' includes: aKeyboardEvent keyCharacter)
ifTrue: [textMorph
handleInteraction: [(textMorph editor enclose: aKeyboardEvent toggleOnly: true)
ifTrue: [aKeyboardEvent ignore]]
fromEvent: aKeyboardEvent].
^ aKeyboardEvent
"
Preferences cmdKeysInText
Preferences cmdGesturesEnabled
Preferences honorDesktopCmdKeys
PasteUpMorph globalCommandKeysEnabled.
"!
Item was added:
+ ----- Method: MorphicEvent>>transformBy: (in category 'transforming') -----
+ transformBy: aMorphicTransform
+ !
Item was changed:
----- Method: MorphicEvent>>transformedBy: (in category 'transforming') -----
transformedBy: aMorphicTransform
"Return the receiver transformed by the given transform into a local coordinate system."
+
+ ^self shallowCopy transformBy: aMorphicTransform!
- !
Item was added:
+ ----- Method: MorphicEvent>>translateBy: (in category 'transforming') -----
+ translateBy: delta
+ "Reposition the receiver by delta. For non-UI events, this is meaningless"!
Item was added:
+ ----- Method: MorphicEvent>>translatedBy: (in category 'transforming') -----
+ translatedBy: delta
+ "Add delta to cursorPoint, and return the new event."
+
+ ^ self shallowCopy translateBy: delta!
Item was added:
+ ----- Method: MorphicEvent>>translatedTo: (in category 'transforming') -----
+ translatedTo: aPoint
+ "Answer the receiver translated to aPoint."
+
+ ^ self shallowCopy translateTo: aPoint!
Item was changed:
----- Method: MouseEvent>>asMouseEnter (in category 'converting') -----
asMouseEnter
+ ^ MouseEvent new setType: #mouseEnter position: position buttons: buttons hand: source!
- ^self shallowCopy setType: #mouseEnter!
Item was changed:
----- Method: MouseEvent>>asMouseLeave (in category 'converting') -----
asMouseLeave
+ ^ MouseEvent new setType: #mouseLeave position: position buttons: buttons hand: source!
- ^self shallowCopy setType: #mouseLeave!
Item was added:
+ ----- Method: MouseMoveEvent>>translateTo: (in category 'transforming') -----
+ translateTo: newEndPoint
+
+ startPoint := newEndPoint - (position - startPoint) "delta".
+ position := newEndPoint.
+ !
Item was removed:
- ----- Method: UserInputEvent>>transformedBy: (in category 'transforming') -----
- transformedBy: aMorphicTransform
- "Return the receiver transformed by the given transform into a local coordinate system."
- ^self shallowCopy transformBy: aMorphicTransform!
Item was changed:
----- Method: UserInputEvent>>translateTo: (in category 'transforming') -----
+ translateTo: aPoint
+ "Translate the receiver to aPoint."
+
+ position := aPoint.!
- translateTo: point
-
- position := point.!
Item was removed:
- ----- Method: UserInputEvent>>translatedBy: (in category 'transforming') -----
- translatedBy: delta
- "add delta to cursorPoint, and return the new event"
- ^self shallowCopy translateBy: delta!
More information about the Squeak-dev
mailing list
|