--- a/ScrollableView.st Mon Sep 28 11:27:50 1998 +0200
+++ b/ScrollableView.st Mon Sep 28 13:50:27 1998 +0200
@@ -1497,22 +1497,54 @@
lockUpdates := false.
vScrollBar notNil ifTrue:[
- vScrollBar scrollAction:[:position |
- lockUpdates := true.
- scrolledView scrollVerticalToPercent:position.
- lockUpdates := false
- ].
- vScrollBar scrollUpAction:[scrolledView scrollUp].
- vScrollBar scrollDownAction:[scrolledView scrollDown].
+ vScrollBar scrollAction:[:position |
+ lockUpdates := true.
+ scrolledView scrollVerticalToPercent:position.
+ lockUpdates := false
+ ].
+ vScrollBar
+ scrollUpAction:[|sensor|
+ ((sensor := self sensor) notNil
+ and:[sensor shiftDown or:[sensor ctrlDown]]) ifTrue:[
+ scrolledView scrollToTop
+ ] ifFalse:[
+ scrolledView scrollUp
+ ]
+ ].
+ vScrollBar
+ scrollDownAction:[|sensor|
+ ((sensor := self sensor) notNil
+ and:[sensor shiftDown or:[sensor ctrlDown]]) ifTrue:[
+ scrolledView scrollToBottom
+ ] ifFalse:[
+ scrolledView scrollDown
+ ]
+ ].
].
hScrollBar notNil ifTrue:[
- hScrollBar scrollAction:[:position |
- lockUpdates := true.
- scrolledView scrollHorizontalToPercent:position.
- lockUpdates := false
- ].
- hScrollBar scrollUpAction:[scrolledView scrollLeft].
- hScrollBar scrollDownAction:[scrolledView scrollRight].
+ hScrollBar scrollAction:[:position |
+ lockUpdates := true.
+ scrolledView scrollHorizontalToPercent:position.
+ lockUpdates := false
+ ].
+ hScrollBar
+ scrollUpAction:[|sensor|
+ ((sensor := self sensor) notNil
+ and:[sensor shiftDown or:[sensor ctrlDown]]) ifTrue:[
+ scrolledView scrollToLeft
+ ] ifFalse:[
+ scrolledView scrollLeft
+ ]
+ ].
+ hScrollBar
+ scrollDownAction:[|sensor|
+ ((sensor := self sensor) notNil
+ and:[sensor shiftDown or:[sensor ctrlDown]]) ifTrue:[
+ scrolledView scrollToRight
+ ] ifFalse:[
+ scrolledView scrollRight
+ ]
+ ].
].
scrolledView addDependent:self.
@@ -2002,5 +2034,5 @@
!ScrollableView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/ScrollableView.st,v 1.88 1998-09-28 09:27:50 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/ScrollableView.st,v 1.89 1998-09-28 11:50:27 cg Exp $'
! !