'From Squeak 2.3 of January 14, 1999 on 27 February 1999 at 8:25:14 pm'! "Change Set: ShadowScrollBar Date: 27 February 1999 Author: Doug Way This adds a 'shadow' image to the Morphic scrollbar when it is being dragged, which indicates where the scrollbar was at the beginning of the drag (similar to the MVC scrollbar behavior). The code is in the superclass Slider instead of ScrollBar since there's no real reason for the slider not to use it as well. Plus, some orphaned code in ScrollBar was re-activated which causes the bar to highlight as you drag it."! MorphicModel subclass: #Slider instanceVariableNames: 'slider value setValueSelector sliderShadow ' classVariableNames: '' poolDictionaries: '' category: 'Morphic-Windows'! !Slider methodsFor: 'initialize' stamp: 'dew 2/15/1999 18:42'! initializeSlider slider := RectangleMorph newBounds: self totalSliderArea color: Color veryLightGray. sliderShadow := RectangleMorph newBounds: self totalSliderArea color: self pagingArea color. slider on: #mouseStillDown send: #scrollAbsolute: to: self. slider on: #mouseDown send: #mouseDownInSlider: to: self. slider on: #mouseUp send: #mouseUpInSlider: to: self. slider setBorderWidth: 2 borderColor: #raised. sliderShadow setBorderWidth: 2 borderColor: #inset. self addMorph: sliderShadow. sliderShadow hide. self addMorph: slider. self computeSlider. ! ! !Slider methodsFor: 'access' stamp: 'dew 2/15/1999 18:24'! pagingArea ^self! ! !Slider methodsFor: 'other events' stamp: 'dew 2/15/1999 18:12'! mouseDownInSlider: event slider color: Color veryVeryLightGray. sliderShadow bounds: slider bounds. sliderShadow show.! ! !Slider methodsFor: 'other events' stamp: 'dew 2/15/1999 18:12'! mouseUpInSlider: event slider color: Color veryLightGray. sliderShadow hide.! ! !ScrollBar methodsFor: 'access' stamp: 'dew 2/15/1999 18:25'! pagingArea ^pagingArea! ! !ScrollBar methodsFor: 'other events' stamp: 'dew 2/21/1999 02:51'! mouseDownInSlider: event "this makes sure the entire scrollable area is in fact visible if the interval is 1.0" interval = 1.0 ifTrue: [self setValue: value]. super mouseDownInSlider: event! ! ScrollBar removeSelector: #mouseDownInSlider! ScrollBar removeSelector: #mouseUpInSlider!