'From Squeak3.1alpha [latest update: #''Squeak3.1alpha'' of 5 February 2001 update 3923] on 22 April 2001 at 6:36:07 pm'! "Change Set: FasterScrolling Date: 22 April 2001 Author: Dan Ingalls Scrolling was not achieving the specified times due to a fixed step rate, but variable scroll rate. These changes use a variable step rate to simplify the code and improve consistency in this regard. The default parameters have also been tweaked for slightly faster scrolling."! !ScrollBar methodsFor: 'scrolling' stamp: 'di 4/22/2001 18:28'! doScrollDown "Scroll automatically while mouse is down" (self waitForDelay1: 200 delay2: 40) ifFalse: [^ self]. self setValue: (value + scrollDelta + 0.000001 min: 1.0)! ! !ScrollBar methodsFor: 'scrolling' stamp: 'di 4/22/2001 18:28'! doScrollUp "Scroll automatically while mouse is down" (self waitForDelay1: 200 delay2: 40) ifFalse: [^ self]. self setValue: (value - scrollDelta - 0.000001 max: 0.0)! ! !ScrollBar methodsFor: 'scroll timing' stamp: 'di 4/22/2001 18:29'! waitForDelay1: delay1 delay2: delay2 "Return true if an appropriate delay has passed since the last scroll operation. The delay decreases exponentially from delay1 to delay2." | now scrollDelay | timeOfLastScroll == nil ifTrue: [self resetTimer]. "Only needed for old instances" now _ Time millisecondClockValue. (scrollDelay _ currentScrollDelay) == nil ifTrue: [scrollDelay _ delay1 "initial delay"]. currentScrollDelay _ scrollDelay*9//10 max: delay2. "decrease the delay" timeOfLastScroll _ now. ^ true! ! !ScrollBar methodsFor: 'stepping' stamp: 'di 4/22/2001 18:30'! stepTime ^ currentScrollDelay ifNil: [300]! ! ScrollBar removeSelector: #scrollByPage:!