--- a/Scroller.st Wed Aug 13 15:40:07 1997 +0200
+++ b/Scroller.st Wed Aug 13 17:26:07 1997 +0200
@@ -28,7 +28,8 @@
DefaultThumbLevel DefaultInset DefaultThumbFrameColor
DefaultGhostColor DefaultGhostFrameColor DefaultGhostLevel
DefaultFixThumbHeight DefaultEdgeStyle DefaultFullViewBackground
- DefaultThumbEnteredColor DefaultThumbActiveLevel SnapBackDistance'
+ DefaultThumbEnteredColor DefaultThumbActiveLevel SnapBackDistance
+ DefaultMiddleButtonJump'
poolDictionaries:''
category:'Views-Interactors'
!
@@ -345,7 +346,8 @@
#scrollerLevel #scrollerBorderWidth
#scrollerThumbLevel #scrollerThumbInset
#scrollerThumbFixHeight #scrollerThumbEdgeStyle
- #scrollerThumbEnteredColor #scrollerThumbActiveLevel )>
+ #scrollerThumbEnteredColor #scrollerThumbActiveLevel
+ #scrollerMiddleButtonJump )>
DefaultViewBackground := StyleSheet colorAt:'scrollerViewBackground'.
DefaultFullViewBackground := StyleSheet colorAt:'scrollerFullViewBackground'.
@@ -373,6 +375,7 @@
DefaultInset := StyleSheet at:'scrollerThumbInset' default:0.
DefaultFixThumbHeight := StyleSheet at:'scrollerThumbFixHeight' default:false.
DefaultEdgeStyle := StyleSheet at:'scrollerThumbEdgeStyle'.
+ DefaultMiddleButtonJump := StyleSheet at:'scrollerMiddleButtonJump' default:false.
StyleSheet fileReadFailed ifTrue:[
DefaultViewBackground := Grey.
@@ -387,7 +390,7 @@
self updateStyleCache
"
- "Modified: 26.4.1997 / 13:16:22 / cg"
+ "Modified: 13.8.1997 / 17:15:12 / cg"
! !
!Scroller methodsFor:'accessing'!
@@ -1151,13 +1154,16 @@
buttonPress:button x:x y:y
"button was pressed - if above thumb, page up; if below thumb, page down;
- otherwise start scrolling"
+ otherwise start scrolling.
+ If either shift is pressed, or the 'scrollerMiddleButtonJump' styleSheet
+ value is true and its the middle button, do a jump to the clicked position."
|curr limit1 limit2|
shown ifFalse:[^ self].
- self sensor shiftDown ifTrue:[
+ ((self sensor shiftDown)
+ or:[DefaultMiddleButtonJump and:[button == 2]]) ifTrue:[
^ self buttonShiftPress:button x:x y:y
].
@@ -1190,7 +1196,7 @@
].
self highlightThumbForPointerX:x y:y
- "Modified: 6.8.1997 / 16:12:30 / cg"
+ "Modified: 13.8.1997 / 17:17:44 / cg"
!
buttonRelease:button x:x y:y
@@ -1962,5 +1968,5 @@
!Scroller class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/Scroller.st,v 1.87 1997-08-07 10:54:08 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/Scroller.st,v 1.88 1997-08-13 15:26:07 cg Exp $'
! !