*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Wed, 08 May 1996 09:48:08 +0200
changeset 617 cb465ce8ea43
parent 616 f6d4c90abaec
child 618 fc7c7e0ec35d
*** empty log message ***
Scroller.st
--- a/Scroller.st	Wed May 08 08:21:14 1996 +0200
+++ b/Scroller.st	Wed May 08 09:48:08 1996 +0200
@@ -86,14 +86,14 @@
     thumbColor                  <Color>         color of thumb
     thumbFrameColor             <Color>         color of the frame around the thumb
     scrollAction                <Block>         1 arg block to be evaluated when scrolled
-                                                (arg is position in percent)
+						(arg is position in percent)
     orientation                 <Symbol>        #horizontal or #vertical
     thumbFrame                  <Rectangle>     frame of thumb in pixels (cached)
     thumbLevel                  <Number>        level of thumb if 3d
     scrolling                   <Boolean>       true during scroll
     pressOffset                 <Number>        temporary (offset into frame when move started)
     synchronousOperation        <Boolean>       true if synchronous (i.e. dont wait till release
-                                                to perform action)
+						to perform action)
     shadowForm                  <Form>          bitmap of knob if any (shadow part)
     lightForm                   <Form>          bitmap of knob if any (light part)
     inset                       <Integer>       number of pixels to inset thumb from view borders
@@ -103,10 +103,10 @@
     thumbHalfShadowColor        <Color>         used to draw smooth edges
     thumbHalfLightColor         <Color>         used to draw smooth edges
     thumbFrameSizeDifference    <Integer>       number of pixels the thumb is larger than 
-                                                it should be (can be negative for mswin-style)
+						it should be (can be negative for mswin-style)
     tallyLevel                  <Integer>       if not zero, specifies if tally-marks should
-                                                go into or out of the display (actually only <0/>0 is checked)
-                                                I dont know of a better word for these ...
+						go into or out of the display (actually only <0/>0 is checked)
+						I dont know of a better word for these ...
     tallyMarks                  <Integer>       number of tally marks
     fixThumbHeight              <Boolean>       perform 'wrong' height computation a la mswindows
     rangeStart                  <Number>        the range of the scroller
@@ -143,131 +143,131 @@
     if you dont like that (I do not :-), set scrollerThumbFixHeight to false (in the StyleSheet).
 
     [author:]
-        Claus Gittinger
+	Claus Gittinger
 
     [see also:]
-        ScrollBar
-        ScrollableView HVScrollableView
+	ScrollBar
+	ScrollableView HVScrollableView
 "
 !
 
 examples
 "
     basic scroller setup:
-                                                                        [exBegin]
-        |top s|
+									[exBegin]
+	|top s|
 
-        top := StandardSystemView new extent:200@200.
-        s := Scroller in:top.
-        s origin:(0.0@0.0) corner:(20@1.0).
-        s thumbHeight:10.  'percent'.     
-        top open
-                                                                        [exEnd]
+	top := StandardSystemView new extent:200@200.
+	s := Scroller in:top.
+	s origin:(0.0@0.0) corner:(20@1.0).
+	s thumbHeight:10.  'percent'.     
+	top open
+									[exEnd]
 
     setting its thumb-height:
-                                                                        [exBegin]
-        |top s|
+									[exBegin]
+	|top s|
 
-        top := StandardSystemView new extent:200@200.
-        s := Scroller in:top.
-        s origin:(0.0@0.0) corner:(20@1.0).
-        s thumbHeight:50.  'percent'.     
-        top open
-                                                                        [exEnd]
+	top := StandardSystemView new extent:200@200.
+	s := Scroller in:top.
+	s origin:(0.0@0.0) corner:(20@1.0).
+	s thumbHeight:50.  'percent'.     
+	top open
+									[exEnd]
 
     setting its thumb-origin:
-                                                                        [exBegin]
-        |top s|
+									[exBegin]
+	|top s|
 
-        top := StandardSystemView new extent:200@200.
-        s := Scroller in:top.
-        s origin:(0.0@0.0) corner:(20@1.0).
-        s thumbHeight:10.  'percent'.     
-        s thumbOrigin:30.  'percent'.     
-        top open
-                                                                        [exEnd]
+	top := StandardSystemView new extent:200@200.
+	s := Scroller in:top.
+	s origin:(0.0@0.0) corner:(20@1.0).
+	s thumbHeight:10.  'percent'.     
+	s thumbOrigin:30.  'percent'.     
+	top open
+									[exEnd]
 
     a scroller with action block (ST/X style):
-                                                                        [exBegin]
-        |top s|
+									[exBegin]
+	|top s|
 
-        top := StandardSystemView new extent:200@200.
-        s := Scroller in:top.
-        s origin:(0.0@0.0) corner:(20@1.0).
-        s thumbHeight:10.  'percent'.     
-        s scrollAction:[:percent | Transcript show:'moved to: '; showCr:percent asFloat].
-        top open
-                                                                        [exEnd]
+	top := StandardSystemView new extent:200@200.
+	s := Scroller in:top.
+	s origin:(0.0@0.0) corner:(20@1.0).
+	s thumbHeight:10.  'percent'.     
+	s scrollAction:[:percent | Transcript show:'moved to: '; showCr:percent asFloat].
+	top open
+									[exEnd]
 
     setting its range:
-                                                                        [exBegin]
-        |top s|
+									[exBegin]
+	|top s|
 
-        top := StandardSystemView new extent:200@200.
-        s := Scroller in:top.
-        s origin:(0.0@0.0) corner:(20@1.0).
-        s thumbHeight:10.  'percent'.     
-        s scrollAction:[:percent | Transcript show:'moved to: '; showCr:percent asFloat].
-        s start:0 stop:1.
-        top open
-                                                                        [exEnd]
+	top := StandardSystemView new extent:200@200.
+	s := Scroller in:top.
+	s origin:(0.0@0.0) corner:(20@1.0).
+	s thumbHeight:10.  'percent'.     
+	s scrollAction:[:percent | Transcript show:'moved to: '; showCr:percent asFloat].
+	s start:0 stop:1.
+	top open
+									[exEnd]
 
     create a scroller in its default extent and have it positioned
     at the side; beside another view:
-                                                                        [exBegin]
-        |top s v|
+									[exBegin]
+	|top s v|
 
-        top := StandardSystemView new extent:200@200.
-        s := Scroller in:top.
-        s origin:(0.0@0.0) corner:(0.0@1.0).
-        s rightInset:(s preferredExtent x negated).
-        s thumbHeight:10.
-        s level:1.
+	top := StandardSystemView new extent:200@200.
+	s := Scroller in:top.
+	s origin:(0.0@0.0) corner:(0.0@1.0).
+	s rightInset:(s preferredExtent x negated).
+	s thumbHeight:10.
+	s level:1.
 
-        v := View in:top.
-        v origin:0.0@0.0 corner:1.0@1.0.
-        v leftInset:(s preferredExtent x).
-        v viewBackground:Color red.
-        v level:2.
+	v := View in:top.
+	v origin:0.0@0.0 corner:1.0@1.0.
+	v leftInset:(s preferredExtent x).
+	v viewBackground:Color red.
+	v level:2.
 
-        top open
-                                                                        [exEnd]
+	top open
+									[exEnd]
 
     using a model (ST-80 style):
-                                                                        [exBegin]
-        |top s m|
+									[exBegin]
+	|top s m|
 
-        m := 0 asValue.
-        InspectorView openOn:m monitor:'value'.  'look at value'.
+	m := 0 asValue.
+	InspectorView openOn:m monitor:'value'.  'look at value'.
 
-        top := StandardSystemView new extent:200@200.
-        s := Scroller in:top.
-        s origin:(0.0@0.0) corner:(20@1.0).
-        s thumbHeight:10.  'percent'.     
-        s model:m.
-        top open
-                                                                        [exEnd]
+	top := StandardSystemView new extent:200@200.
+	s := Scroller in:top.
+	s origin:(0.0@0.0) corner:(20@1.0).
+	s thumbHeight:10.  'percent'.     
+	s model:m.
+	top open
+									[exEnd]
 
     using a different changeSelector:
-                                                                        [exBegin]
-        |top s1 s2 m|
+									[exBegin]
+	|top s1 s2 m|
 
-        m := Plug new.
-        m respondTo:#value1: with:[:v | Transcript show:'scroller 1 moved to: '; showCr:v].
-        m respondTo:#value2: with:[:v | Transcript show:'scroller 2 moved to: '; showCr:v].
+	m := Plug new.
+	m respondTo:#value1: with:[:v | Transcript show:'scroller 1 moved to: '; showCr:v].
+	m respondTo:#value2: with:[:v | Transcript show:'scroller 2 moved to: '; showCr:v].
 
-        top := StandardSystemView new extent:200@200.
-        s1 := Scroller in:top.
-        s1 origin:(0.0@0.0) corner:(20@1.0).
-        s1 thumbHeight:10.  'percent'.     
-        s1 model:m; change:#value1:.
+	top := StandardSystemView new extent:200@200.
+	s1 := Scroller in:top.
+	s1 origin:(0.0@0.0) corner:(20@1.0).
+	s1 thumbHeight:10.  'percent'.     
+	s1 model:m; change:#value1:.
 
-        s2 := Scroller in:top.
-        s2 origin:(30@0.0) corner:(50@1.0).
-        s2 thumbHeight:10.  'percent'.     
-        s2 model:m; change:#value2:.
-        top open
-                                                                        [exEnd]
+	s2 := Scroller in:top.
+	s2 origin:(30@0.0) corner:(50@1.0).
+	s2 thumbHeight:10.  'percent'.     
+	s2 model:m; change:#value2:.
+	top open
+									[exEnd]
 "
 ! !
 
@@ -331,17 +331,17 @@
     "extract values from the styleSheet and cache them in class variables"
 
     <resource: #style (#scrollerViewBackground #scrollerFullViewBackground
-                       #scrollerThumbColor 
-                       #scrollerShadowColor #scrollerLightColor
-                       #scrollerThumbShadowColor #scrollerThumbLightColor
-                       #scrollerThumbHalfShadowColor #scrollerThumbHalfLightColor
-                       #scrollerThumbFrameColor #scrollerGhostColor
-                       #scrollerGhostLevel #scrollerGhostFrameColor
-                       #scrollerNTallyMarks #scrollerTallyLevel
-                       #scrollerLevel #scrollerBorderWidth
-                       #scrollerThumbLevel #scrollerThumbInset
-                       #scrollerThumbFixHeight #scrollerThumbEdgeStyle
-                       #scrollerThumbEnteredColor #scrollerThumbActiveLevel )>
+		       #scrollerThumbColor 
+		       #scrollerShadowColor #scrollerLightColor
+		       #scrollerThumbShadowColor #scrollerThumbLightColor
+		       #scrollerThumbHalfShadowColor #scrollerThumbHalfLightColor
+		       #scrollerThumbFrameColor #scrollerGhostColor
+		       #scrollerGhostLevel #scrollerGhostFrameColor
+		       #scrollerNTallyMarks #scrollerTallyLevel
+		       #scrollerLevel #scrollerBorderWidth
+		       #scrollerThumbLevel #scrollerThumbInset
+		       #scrollerThumbFixHeight #scrollerThumbEdgeStyle
+		       #scrollerThumbEnteredColor #scrollerThumbActiveLevel )>
 
     DefaultViewBackground := StyleSheet colorAt:'scrollerViewBackground'.
     DefaultFullViewBackground := StyleSheet colorAt:'scrollerFullViewBackground'.
@@ -360,7 +360,7 @@
     DefaultTallyMarks := StyleSheet at:'scrollerNTallyMarks' default:0.
     DefaultTallyLevel := 0.
     DefaultTallyMarks ~~ 0 ifTrue:[
-        DefaultTallyLevel := StyleSheet at:'scrollerTallyLevel' default:1.
+	DefaultTallyLevel := StyleSheet at:'scrollerTallyLevel' default:1.
     ].
     DefaultLevel := StyleSheet at:'scrollerLevel' default:0.
     DefaultBorderWidth := StyleSheet at:'scrollerBorderWidth' default:(StyleSheet at:'borderWidth').
@@ -371,10 +371,10 @@
     DefaultEdgeStyle := StyleSheet at:'scrollerThumbEdgeStyle'.
 
     StyleSheet fileReadFailed ifTrue:[
-        DefaultViewBackground := Grey.
-        DefaultThumbColor := White.
-        DefaultThumbFrameColor := Black.
-        DefaultInset := 1.
+	DefaultViewBackground := Grey.
+	DefaultThumbColor := White.
+	DefaultThumbFrameColor := Black.
+	DefaultInset := 1.
     ]
 
     "Modified: 20.3.1996 / 16:26:44 / cg"
@@ -815,9 +815,9 @@
 
     (thumbHeight >= 100) ifTrue:[^ self].
     orientation == #vertical ifTrue:[
-        thumbFrame height >= height ifTrue:[^ self].
+	thumbFrame height >= height ifTrue:[^ self].
     ] ifFalse:[
-        thumbFrame width >= width ifTrue:[^ self].
+	thumbFrame width >= width ifTrue:[^ self].
     ].
 
     l := thumbFrame left.
@@ -830,113 +830,113 @@
 
     lvl := thumbLevel.
     scrolling ifTrue:[
-        lvl := thumbActiveLevel
+	lvl := thumbActiveLevel
     ].
 
     lvl == 0 ifTrue:[
-        thumbFrameColor notNil ifTrue:[
-            self paint:thumbFrameColor.
-            self displayRectangle:thumbFrame.
-        ].
-        ^ self
+	thumbFrameColor notNil ifTrue:[
+	    self paint:thumbFrameColor.
+	    self displayRectangle:thumbFrame.
+	].
+	^ self
     ].
 
     "what a kludge - must be a parameter to drawEdge..."
     self drawEdgesForX:l y:t width:w height:h level:lvl
-                shadow:thumbShadowColor light:thumbLightColor
-                halfShadow:thumbHalfShadowColor halfLight:thumbHalfLightColor
-                style:thumbEdgeStyle.
+		shadow:thumbShadowColor light:thumbLightColor
+		halfShadow:thumbHalfShadowColor halfLight:thumbHalfLightColor
+		style:thumbEdgeStyle.
 
     thumbFrameColor notNil ifTrue:[
-        self paint:thumbFrameColor.
-        orientation == #vertical ifTrue:[
-            self displayRectangleX:l y:t width:w"-1" height:h.
-        ] ifFalse:[
-            self displayRectangleX:l y:t width:w height:h"-1".
-        ]
+	self paint:thumbFrameColor.
+	orientation == #vertical ifTrue:[
+	    self displayRectangleX:l y:t width:w"-1" height:h.
+	] ifFalse:[
+	    self displayRectangleX:l y:t width:w height:h"-1".
+	]
     ].
 
     (tallyLevel == 0 or:[tallyMarks == 0]) ifTrue:[
-        shadowForm notNil ifTrue:[
-            handleX := l + ((w - 8) // 2).
-            handleY := t + ((h - 8) // 2).
-            self drawHandleFormAtX:handleX y:handleY
-        ].
-        ^ self
+	shadowForm notNil ifTrue:[
+	    handleX := l + ((w - 8) // 2).
+	    handleY := t + ((h - 8) // 2).
+	    self drawHandleFormAtX:handleX y:handleY
+	].
+	^ self
     ].
 
     "iris style - draw tallys"
 
     tallyLevel > 0 ifTrue:[
-        color1 := thumbLightColor.
-        color2 := thumbShadowColor.
+	color1 := thumbLightColor.
+	color2 := thumbShadowColor.
     ] ifFalse:[
-        color1 := thumbShadowColor.
-        color2 := thumbLightColor.
+	color1 := thumbShadowColor.
+	color2 := thumbLightColor.
     ].
 
     "draw tally marks"
 
     (orientation == #vertical) ifTrue:[
-        self paint:color1.
-        y := t + (h // 2) - 1.
-        xL := l + lvl - 1.
-        xR := l + w - lvl "+ 1".
-        self displayLineFromX:xL y:y toX:xR y:y.
-        y := y + 1.
-        self paint:color2.
-        self displayLineFromX:xL y:y toX:xR y:y.
+	self paint:color1.
+	y := t + (h // 2) - 1.
+	xL := l + lvl - 1.
+	xR := l + w - lvl "+ 1".
+	self displayLineFromX:xL y:y toX:xR y:y.
+	y := y + 1.
+	self paint:color2.
+	self displayLineFromX:xL y:y toX:xR y:y.
 
-        tallyMarks > 1 ifTrue:[
-            "dont draw other marks if there is not enough space"
+	tallyMarks > 1 ifTrue:[
+	    "dont draw other marks if there is not enough space"
 
-            mm := device verticalPixelPerMillimeter rounded.
-            h > (mm * (tallyMarks * 2)) ifTrue:[
-                y := y - 1 - mm.
-                self paint:color1.
-                self displayLineFromX:xL y:y toX:xR y:y.
-                y := y + 1.
-                self paint:color2.
-                self displayLineFromX:xL y:y toX:xR y:y.
+	    mm := device verticalPixelPerMillimeter rounded.
+	    h > (mm * (tallyMarks * 2)) ifTrue:[
+		y := y - 1 - mm.
+		self paint:color1.
+		self displayLineFromX:xL y:y toX:xR y:y.
+		y := y + 1.
+		self paint:color2.
+		self displayLineFromX:xL y:y toX:xR y:y.
 
-                y := y - 1 + mm + mm.
-                self paint:color1.
-                self displayLineFromX:xL y:y toX:xR y:y.
-                y := y + 1.
-                self paint:color2.
-                self displayLineFromX:xL y:y toX:xR y:y
-            ]
-        ]
+		y := y - 1 + mm + mm.
+		self paint:color1.
+		self displayLineFromX:xL y:y toX:xR y:y.
+		y := y + 1.
+		self paint:color2.
+		self displayLineFromX:xL y:y toX:xR y:y
+	    ]
+	]
     ] ifFalse:[
-        x := l + (w // 2) - 1.
-        yT := t + lvl - 1.
-        yB := t + h - lvl "+ 1".
-        self paint:color1.
-        self displayLineFromX:x y:yT toX:x y:yB.
-        self paint:color2.
-        x := x + 1.
-        self displayLineFromX:x y:yT toX:x y:yB.
+	x := l + (w // 2) - 1.
+	yT := t + lvl - 1.
+	yB := t + h - lvl "+ 1".
+	self paint:color1.
+	self displayLineFromX:x y:yT toX:x y:yB.
+	self paint:color2.
+	x := x + 1.
+	self displayLineFromX:x y:yT toX:x y:yB.
 
-        tallyMarks > 1 ifTrue:[
-            "dont draw other marks if there is not enough space"
+	tallyMarks > 1 ifTrue:[
+	    "dont draw other marks if there is not enough space"
 
-            mm := device horizontalPixelPerMillimeter rounded.
-            w > (mm * (tallyMarks * 2)) ifTrue:[
-                x := x - 1 - mm.
-                self paint:color1.
-                self displayLineFromX:x y:yT toX:x y:yB.
-                x := x + 1.
-                self paint:color2.
-                self displayLineFromX:x y:yT toX:x y:yB.
+	    mm := device horizontalPixelPerMillimeter rounded.
+	    w > (mm * (tallyMarks * 2)) ifTrue:[
+		x := x - 1 - mm.
+		self paint:color1.
+		self displayLineFromX:x y:yT toX:x y:yB.
+		x := x + 1.
+		self paint:color2.
+		self displayLineFromX:x y:yT toX:x y:yB.
 
-                x := x - 1 + mm + mm.
-                self paint:color1.
-                self displayLineFromX:x y:yT toX:x y:yB.
-                x := x + 1.
-                self paint:color2.
-                self displayLineFromX:x y:yT toX:x y:yB
-            ]
-        ]
+		x := x - 1 + mm + mm.
+		self paint:color1.
+		self displayLineFromX:x y:yT toX:x y:yB.
+		x := x + 1.
+		self paint:color2.
+		self displayLineFromX:x y:yT toX:x y:yB
+	    ]
+	]
     ]
 
     "Modified: 20.3.1996 / 10:55:29 / cg"
@@ -983,45 +983,45 @@
     |pos curr limit prevOrigin newOrigin in|
 
     scrolling ifFalse: [
-        self highlightThumbForPointerX:x y:y.
-        ^ self              
+	self highlightThumbForPointerX:x y:y.
+	^ self              
     ].              
 
     entered := true.
     frameBeforeMove isNil ifTrue:[
-        (ghostColor notNil 
-        or:[ghostFrameColor notNil
-        or:[ghostLevel ~~ 0]]) ifTrue:[
-            frameBeforeMove := thumbFrame insetBy:1@1
-        ]
+	(ghostColor notNil 
+	or:[ghostFrameColor notNil
+	or:[ghostLevel ~~ 0]]) ifTrue:[
+	    frameBeforeMove := thumbFrame insetBy:1@1
+	]
     ].
 
     (orientation == #vertical) ifTrue:[
-        curr := y.
-        limit := height
+	curr := y.
+	limit := height
     ] ifFalse:[
-        curr := x.
-        limit := width
+	curr := x.
+	limit := width
     ].
 
     (curr < 0) ifTrue:[                        "check against limits"
-        pos := 0
+	pos := 0
     ] ifFalse:[
-        (curr > limit) ifTrue:[
-            pos := limit
-        ] ifFalse:[
-            pos := curr
-        ]
+	(curr > limit) ifTrue:[
+	    pos := limit
+	] ifFalse:[
+	    pos := curr
+	]
     ].
 
     prevOrigin := self thumbOrigin.
     newOrigin := self percentFromAbs:(pos - pressOffset).
     prevOrigin ~= newOrigin ifTrue:[
-        self thumbOrigin:newOrigin.
+	self thumbOrigin:newOrigin.
 
-        synchronousOperation ifTrue: [
-            self tellOthers.
-        ]
+	synchronousOperation ifTrue: [
+	    self tellOthers.
+	]
     ]
 
     "Modified: 6.3.1996 / 17:35:26 / cg"
@@ -1040,26 +1040,26 @@
     shown ifFalse:[^ self].
 
     (orientation == #vertical) ifTrue:[
-        curr := y.
-        limit1 := thumbFrame top.
-        limit2 := thumbFrame bottom
+	curr := y.
+	limit1 := thumbFrame top.
+	limit2 := thumbFrame bottom
     ] ifFalse:[
-        curr := x.
-        limit1 := thumbFrame left.
-        limit2 := thumbFrame right
+	curr := x.
+	limit1 := thumbFrame left.
+	limit2 := thumbFrame right
     ].
 
     (curr < limit1) ifTrue:[
-        "page up/left"
-        self pageUp
+	"page up/left"
+	self pageUp
     ] ifFalse:[
-        (curr > limit2) ifTrue:[
-            "page down/right"
-            self pageDown
-        ] ifFalse:[
-            pressOffset := curr - limit1.
-            scrolling := true
-        ]
+	(curr > limit2) ifTrue:[
+	    "page down/right"
+	    self pageDown
+	] ifFalse:[
+	    pressOffset := curr - limit1.
+	    scrolling := true
+	]
     ].
     self highlightThumbForPointerX:x y:y
 
@@ -1073,34 +1073,34 @@
     |rect mustDrawThumb|
 
     scrolling ifTrue:[
-        thumbFrame notNil ifTrue:[
-            mustDrawThumb := false.
-            scrolling := false.
+	thumbFrame notNil ifTrue:[
+	    mustDrawThumb := false.
+	    scrolling := false.
 
-            frameBeforeMove notNil ifTrue:[
-                rect := frameBeforeMove.
-                frameBeforeMove := nil.
-                self drawThumbBackgroundInX:rect left
-                                          y:rect top
-                                      width:rect width 
-                                     height:rect height.
+	    frameBeforeMove notNil ifTrue:[
+		rect := frameBeforeMove.
+		frameBeforeMove := nil.
+		self drawThumbBackgroundInX:rect left
+					  y:rect top
+				      width:rect width 
+				     height:rect height.
 
-                (rect intersects:thumbFrame) ifTrue:[
-                    mustDrawThumb := true.
-                ]
-            ].
-            thumbLevel ~~ thumbActiveLevel ifTrue:[
-                mustDrawThumb := true
-            ].
-            mustDrawThumb ifTrue:[
-                self drawThumb
-            ].    
+		(rect intersects:thumbFrame) ifTrue:[
+		    mustDrawThumb := true.
+		]
+	    ].
+	    thumbLevel ~~ thumbActiveLevel ifTrue:[
+		mustDrawThumb := true
+	    ].
+	    mustDrawThumb ifTrue:[
+		self drawThumb
+	    ].    
 
 "/            scrolling := false.
-            synchronousOperation ifFalse: [
-                self tellOthers.
-            ]
-        ]
+	    synchronousOperation ifFalse: [
+		self tellOthers.
+	    ]
+	]
     ]
 
     "Modified: 20.3.1996 / 10:58:25 / cg"
@@ -1152,14 +1152,14 @@
 
     |in|
 
-    in := thumbFrame containsPoint:(x@y).
+    in := self thumbFrame containsPoint:(x@y).
     (in ~~ entered 
     or:[thumbLevel ~~ thumbActiveLevel]) ifTrue:[
-        entered := in.
-        (thumbColor ~~ thumbEnteredColor 
-        or:[thumbLevel ~~ thumbActiveLevel]) ifTrue: [
-            self drawThumb
-        ].
+	entered := in.
+	(thumbColor ~~ thumbEnteredColor 
+	or:[thumbLevel ~~ thumbActiveLevel]) ifTrue: [
+	    self drawThumb
+	].
     ].
 
     "Created: 6.3.1996 / 17:35:07 / cg"
@@ -1171,8 +1171,8 @@
      redraw thumb if enteredColor ~~ thumbColor"
 
     (entered and:[state == 0]) ifTrue: [
-        entered := false.
-        self drawThumb
+	entered := false.
+	self drawThumb
     ].
 
     "Modified: 6.3.1996 / 17:27:12 / cg"
@@ -1300,22 +1300,22 @@
     super initStyle.
 
     DefaultViewBackground notNil ifTrue:[
-        viewBackground := DefaultViewBackground on:device.
+	viewBackground := DefaultViewBackground on:device.
     ].
     DefaultShadowColor notNil ifTrue:[
-        shadowColor := DefaultShadowColor on:device.
+	shadowColor := DefaultShadowColor on:device.
     ].
     DefaultLightColor notNil ifTrue:[
-        lightColor := DefaultLightColor on:device.
+	lightColor := DefaultLightColor on:device.
     ].
 
     tallyMarks := DefaultTallyMarks.
     tallyLevel := DefaultTallyLevel.
     DefaultLevel ~~ level ifTrue:[
-        self level:DefaultLevel.
+	self level:DefaultLevel.
     ].
     DefaultBorderWidth ~~ borderWidth ifTrue:[
-        self borderWidth:DefaultBorderWidth.
+	self borderWidth:DefaultBorderWidth.
     ].
     thumbLevel := DefaultThumbLevel.
     thumbActiveLevel := DefaultThumbActiveLevel.
@@ -1324,99 +1324,99 @@
     thumbEdgeStyle := DefaultEdgeStyle.
 
     DefaultGhostColor notNil ifTrue:[
-        ghostColor := DefaultGhostColor on:device.
+	ghostColor := DefaultGhostColor on:device.
     ].
     DefaultGhostFrameColor notNil ifTrue:[
-        ghostFrameColor := DefaultGhostFrameColor on:device.
+	ghostFrameColor := DefaultGhostFrameColor on:device.
     ].
     ghostLevel := DefaultGhostLevel.
 
     DefaultThumbFrameColor notNil ifTrue:[
-        thumbFrameColor := DefaultThumbFrameColor on:device.
+	thumbFrameColor := DefaultThumbFrameColor on:device.
     ].
     DefaultThumbShadowColor notNil ifTrue:[
-        thumbShadowColor := DefaultThumbShadowColor
+	thumbShadowColor := DefaultThumbShadowColor
     ] ifFalse:[
-        thumbShadowColor := shadowColor.
+	thumbShadowColor := shadowColor.
     ].
     DefaultThumbLightColor notNil ifTrue:[
-        thumbLightColor := DefaultThumbLightColor
+	thumbLightColor := DefaultThumbLightColor
     ] ifFalse:[
-        thumbLightColor := lightColor.
+	thumbLightColor := lightColor.
     ].
 
     thumbEdgeStyle notNil ifTrue:[
-        DefaultThumbHalfShadowColor notNil ifTrue:[
-            thumbHalfShadowColor := DefaultThumbHalfShadowColor
-        ].
-        DefaultThumbHalfLightColor notNil ifTrue:[
-            thumbHalfLightColor := DefaultThumbHalfLightColor
-        ].
+	DefaultThumbHalfShadowColor notNil ifTrue:[
+	    thumbHalfShadowColor := DefaultThumbHalfShadowColor
+	].
+	DefaultThumbHalfLightColor notNil ifTrue:[
+	    thumbHalfLightColor := DefaultThumbHalfLightColor
+	].
     ].
 
     device hasGreyscales ifFalse:[
-        thumbEdgeStyle notNil ifTrue:[
-            thumbHalfShadowColor := Color darkGrey.
-            thumbHalfLightColor := White
-        ].
+	thumbEdgeStyle notNil ifTrue:[
+	    thumbHalfShadowColor := Color darkGrey.
+	    thumbHalfLightColor := White
+	].
 
-        thumbShadowColor := Black.
+	thumbShadowColor := Black.
 "/        thumbLightColor := White.
 
-        styleSheet name = #motif ifTrue:[
-            DefaultThumbColor isNil ifTrue:[
-                thumbColor := White .
-            ].
-        ]
+	styleSheet name = #motif ifTrue:[
+	    DefaultThumbColor isNil ifTrue:[
+		thumbColor := White .
+	    ].
+	]
     ].
 
     DefaultThumbColor notNil ifTrue:[
-        thumbColor := DefaultThumbColor on:device
+	thumbColor := DefaultThumbColor on:device
     ] ifFalse:[
-        thumbColor := White.
-        styleSheet name ~= #normal ifTrue:[
-            device hasGreyscales ifFalse:[
-                thumbColor := Color grey
-            ].
-        ].
+	thumbColor := White.
+	styleSheet name ~= #normal ifTrue:[
+	    device hasGreyscales ifFalse:[
+		thumbColor := Color grey
+	    ].
+	].
     ].
 
     thumbColor := thumbColor on:device.
     thumbShadowColor notNil ifTrue:[
-        thumbShadowColor := thumbShadowColor on:device.
+	thumbShadowColor := thumbShadowColor on:device.
     ].
     thumbLightColor notNil ifTrue:[
-        thumbLightColor := thumbLightColor on:device.
+	thumbLightColor := thumbLightColor on:device.
     ].
     thumbHalfShadowColor notNil ifTrue:[
-        thumbHalfShadowColor := thumbHalfShadowColor on:device.
+	thumbHalfShadowColor := thumbHalfShadowColor on:device.
     ].
     thumbHalfLightColor notNil ifTrue:[
-        thumbHalfLightColor := thumbHalfLightColor on:device.
+	thumbHalfLightColor := thumbHalfLightColor on:device.
     ].
     thumbEdgeStyle notNil ifTrue:[
-        thumbHalfShadowColor isNil ifTrue:[
-            thumbHalfShadowColor := thumbShadowColor lightened on:device
-        ]
+	thumbHalfShadowColor isNil ifTrue:[
+	    thumbHalfShadowColor := thumbShadowColor lightened on:device
+	]
     ].
 
     DefaultThumbEnteredColor notNil ifTrue:[
-        thumbEnteredColor := DefaultThumbEnteredColor on:device.
-        self enableMotionEvents.
-        self enableEnterLeaveEvents.
+	thumbEnteredColor := DefaultThumbEnteredColor on:device.
+	self enableMotionEvents.
+	self enableEnterLeaveEvents.
     ] ifFalse:[
-        thumbEnteredColor := thumbColor.
+	thumbEnteredColor := thumbColor.
     ].
 
     styleSheet name = #next ifTrue:[
-        shadowForm := self class handleShadowFormOn:device.
-        lightForm := self class handleLightFormOn:device
+	shadowForm := self class handleShadowFormOn:device.
+	lightForm := self class handleLightFormOn:device
     ] ifFalse:[
-        shadowForm := lightForm := nil
+	shadowForm := lightForm := nil
     ].
 
     drawableId notNil ifTrue:[
-        self computeThumbFrame
+	self computeThumbFrame
     ]
 
     "Modified: 20.3.1996 / 10:48:54 / cg"
@@ -1714,11 +1714,11 @@
     defExt := self class defaultExtent.
 
     orientation == #vertical ifTrue:[
-        h := defExt y.
-        w := (device horizontalPixelPerMillimeter asFloat * 6) rounded.
+	h := defExt y.
+	w := (device horizontalPixelPerMillimeter asFloat * 6) rounded.
     ] ifFalse:[
-        w := defExt x.
-        h := (device verticalPixelPerMillimeter asFloat * 6) rounded.
+	w := defExt x.
+	h := (device verticalPixelPerMillimeter asFloat * 6) rounded.
     ].
 
     ^ w @ h.
@@ -1729,5 +1729,5 @@
 !Scroller class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/Scroller.st,v 1.49 1996-04-27 18:17:26 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/Scroller.st,v 1.50 1996-05-08 07:48:08 cg Exp $'
 ! !