'From Squeak2.8 of 13 June 2000 [latest update: #2359] on 31 October 2000 at 1:31:42 am'! !ScrollPane commentStamp: 'dew 10/31/2000 01:02' prior: 0! The scroller (a transform) of a scrollPane is driven by the scrollBar. The scroll values vary from 0.0, meaning zero offset to 1.0 meaning sufficient offset such that the bottom of the scrollable material appears 3/4 of the way down the pane. The total distance to achieve this range is called the totalScrollRange.! !ScrollPane methodsFor: 'initialization' stamp: 'dew 10/31/2000 01:28'! setScrollDeltas "Set the ScrollBar deltas, values and interval based on the current scroll pane size, offset and range." | range delta | self hideOrShowScrollBar. scroller hasSubmorphs ifFalse: [scrollBar interval: 1.0. ^ self]. range _ self leftoverScrollRange. delta _ self scrollDeltaHeight. range = 0 ifTrue: [^ scrollBar scrollDelta: 0.02 pageDelta: 0.2; interval: 1.0]. "Set up for one line (for arrow scrolling), or a full pane less one line (for paging)." scrollBar scrollDelta: (delta / range) asFloat pageDelta: ((self innerBounds height - delta) / range) asFloat. scrollBar interval: ((self innerBounds height - delta) / self totalScrollRange) asFloat. self updateScrollBarValueFromTransform. ! ! !ScrollPane methodsFor: 'geometry' stamp: 'dew 10/31/2000 01:13'! updateScrollBarValueFromTransform "Update the ScrollBar value (0.0 to 1.0) based on the (possibly changed) scroller/transform offset relative to the scroll range. (This is the inverse of the scrollBarValue: method.)" scrollBar value: scroller offset y / self leftoverScrollRange.! !