--- a/ObjectView.st Thu May 30 17:48:41 1996 +0200
+++ b/ObjectView.st Thu May 30 17:58:57 1996 +0200
@@ -1162,104 +1162,123 @@
"is it the select or 1-button ?"
(device buttonMotionMask:buttonMask includesButton:#select) ifFalse:[
- (device buttonMotionMask:buttonMask includesButton:1) ifFalse:[
- ^ self
- ].
+ (device buttonMotionMask:buttonMask includesButton:1) ifFalse:[
+ ^ self
+ ].
].
lastButt notNil ifTrue:[
- xpos := buttX.
- ypos := buttY.
-
- "check against visible limits if move outside is not allowed"
- rootMotion ifFalse:[
- limitW := width.
- limitH := height.
- transformation notNil ifTrue:[
- limitW := transformation applyInverseToX:width.
- limitH := transformation applyInverseToY:height.
- ].
-
- (xpos < 0) ifTrue:[
- xpos := 0
- ] ifFalse: [
- (xpos > limitW) ifTrue:[xpos := limitW]
- ].
- (ypos < 0) ifTrue:[
- ypos := 0
- ] ifFalse: [
- (ypos > limitH) ifTrue:[ypos := limitH]
- ]
- ].
- movePoint := xpos @ ypos.
-
- (xpos == (lastButt x)) ifTrue:[
- (ypos == (lastButt y)) ifTrue:[
- ^ self "no move"
- ]
- ].
-
- motionAction notNil ifTrue:[
- motionAction value:movePoint
- ].
- lastButt := movePoint
- ]
+ xpos := buttX.
+ ypos := buttY.
+
+ "check against visible limits if move outside is not allowed"
+ rootMotion ifFalse:[
+ limitW := width.
+ limitH := height.
+ transformation notNil ifTrue:[
+ limitW := transformation applyInverseToX:width.
+ limitH := transformation applyInverseToY:height.
+ ].
+
+ (xpos < 0) ifTrue:[
+ xpos := 0
+ ] ifFalse: [
+ (xpos > limitW) ifTrue:[xpos := limitW]
+ ].
+ (ypos < 0) ifTrue:[
+ ypos := 0
+ ] ifFalse: [
+ (ypos > limitH) ifTrue:[ypos := limitH]
+ ]
+ ].
+ movePoint := xpos @ ypos.
+
+ (xpos == (lastButt x)) ifTrue:[
+ (ypos == (lastButt y)) ifTrue:[
+ ^ self "no move"
+ ]
+ ].
+
+ motionAction notNil ifTrue:[
+ motionAction value:movePoint.
+ lastButt := movePoint.
+ ^ self
+ ].
+ lastButt := movePoint
+ ].
+ super buttonMotion:buttonMask x:buttX y:buttY
+
+ "Modified: 30.5.1996 / 17:57:30 / cg"
!
buttonMultiPress:button x:x y:y
"user pressed left button twice (or more)"
((button == 1) or:[button == #select]) ifTrue:[
- doublePressAction notNil ifTrue:[
- doublePressAction value:(x @ y)
- ]
- ] ifFalse:[
- super buttonMultiPress:button x:x y:y
- ]
+ doublePressAction notNil ifTrue:[
+ doublePressAction value:(x @ y).
+ ^ self
+ ]
+ ].
+ super buttonMultiPress:button x:x y:y
+
+ "Modified: 30.5.1996 / 17:57:36 / cg"
!
buttonPress:button x:x y:y
"user pressed left button"
((button == 1) or:[button == #select]) ifTrue:[
- pressAction notNil ifTrue:[
- lastButt := x @ y.
- pressAction value:lastButt
- ]
- ] ifFalse:[
- super buttonPress:button x:x y:y
- ]
+ pressAction notNil ifTrue:[
+ lastButt := x @ y.
+ pressAction value:lastButt.
+ ^ self
+ ]
+ ].
+ super buttonPress:button x:x y:y
+
+ "Modified: 30.5.1996 / 17:57:03 / cg"
!
buttonRelease:button x:x y:y
((button == 1) or:[button == #select]) ifTrue:[
- releaseAction notNil ifTrue:[releaseAction value]
- ] ifFalse:[
- super buttonRelease:button x:x y:y
- ]
+ releaseAction notNil ifTrue:[
+ releaseAction value.
+ ^ self
+ ]
+ ].
+ super buttonRelease:button x:x y:y
+
+ "Modified: 30.5.1996 / 17:57:13 / cg"
!
buttonShiftPress:button x:x y:y
"user pressed left button with shift"
((button == 1) or:[button == #select]) ifTrue:[
- shiftPressAction notNil ifTrue:[
- lastButt := x @ y.
- shiftPressAction value:lastButt
- ]
- ] ifFalse:[
- super buttonShiftPress:button x:x y:y
- ]
+ shiftPressAction notNil ifTrue:[
+ lastButt := x @ y.
+ shiftPressAction value:lastButt.
+ ^ self
+ ]
+ ].
+ super buttonShiftPress:button x:x y:y
+
+ "Modified: 30.5.1996 / 17:57:20 / cg"
!
keyPress:key x:x y:y
keyPressAction notNil ifTrue:[
- selection notNil ifTrue:[
- self selectionDo: [:obj |
- obj keyInput:key
- ]
- ]
- ]
+ selection notNil ifTrue:[
+ self selectionDo: [:obj |
+ obj keyInput:key .
+ ]
+ ].
+ ^ self.
+ ].
+ super keyPress:key x:x y:y
+
+ "Modified: 30.5.1996 / 17:57:54 / cg"
!
redrawX:x y:y width:w height:h
@@ -2820,5 +2839,5 @@
!ObjectView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/ObjectView.st,v 1.41 1996-05-29 14:37:04 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/ObjectView.st,v 1.42 1996-05-30 15:58:57 cg Exp $'
! !