Move common channels to View.
--- a/Scroller.st Wed Mar 31 07:48:58 1999 +0200
+++ b/Scroller.st Wed Mar 31 07:50:41 1999 +0200
@@ -18,9 +18,8 @@
thumbHalfLightColor thumbEnteredColor thumbFrameSizeDifference
tallyLevel tallyMarks fixThumbHeight frameBeforeMove ghostColor
ghostFrameColor ghostLevel rangeStart rangeEnd rangeStep entered
- thumbActiveLevel originBeforeMove thumbImage enabled
- enableChannel keyboardStep autoRepeat repeatBlock
- initialRepeatDelay repeatDelay'
+ thumbActiveLevel originBeforeMove thumbImage enabled keyboardStep
+ autoRepeat repeatBlock initialRepeatDelay repeatDelay'
classVariableNames:'HandleShadowForm HandleLightForm DefaultViewBackground
DefaultShadowColor DefaultLightColor DefaultThumbColor
DefaultThumbShadowColor DefaultThumbLightColor
@@ -857,24 +856,26 @@
synchronousOperation := false
!
-disable
- "disable the scoller"
+enabled
+ "return enable/disable state of the scoller"
- enabled ifTrue:[
- enabled := false.
- self updateBackground.
- self cursor: Cursor normal
- ]
+ ^ enabled
+
+ "Created: / 30.3.1999 / 15:24:50 / stefan"
!
-enable
- "enable the scroller"
+enabled:aBoolean
+ "enable/disable the scoller"
- enabled ifFalse:[
- enabled := true.
- self updateBackground.
+ enabled ~~ aBoolean ifTrue:[
+ enabled := aBoolean.
+ self updateBackground.
+ aBoolean ifFalse:[
+ self cursor: Cursor normal
+ ]
]
+ "Created: / 30.3.1999 / 15:23:14 / stefan"
!
scrollAction
@@ -912,25 +913,6 @@
"ignore here"
! !
-!Scroller methodsFor:'accessing-channels'!
-
-enableChannel
- "return a valueHolder for enable/disable"
-
- ^ enableChannel
-
-!
-
-enableChannel:aValueHolder
- "set the valueHolder, which holds the enable boolean value"
-
- |prev|
-
- prev := enableChannel.
- enableChannel := aValueHolder.
- self setupChannel:aValueHolder for:nil withOld:prev
-! !
-
!Scroller methodsFor:'accessing-look'!
is3D
@@ -1509,14 +1491,6 @@
"Modified: / 7.5.1998 / 02:06:10 / cg"
!
-enableStateChange
- enableChannel value ifTrue:[
- self enable
- ] ifFalse:[
- self disable
- ].
-!
-
highlightThumbForPointerX:x y:y
"if x/y is within the thumb frame, highlight it"
@@ -1653,14 +1627,12 @@
(changedObject == model
"and:[something == aspectMsg]") ifTrue:[
- self thumbOrigin:(model value).
- ^ self
- ].
- changedObject == enableChannel ifTrue:[
- self enableStateChange.
- ^ self
+ self thumbOrigin:(model value).
+ ^ self
].
super update:something with:aParameter from:changedObject
+
+ "Modified: / 30.3.1999 / 14:26:28 / stefan"
! !
!Scroller methodsFor:'focus handling'!
@@ -2335,5 +2307,5 @@
!Scroller class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/Scroller.st,v 1.121 1999-03-25 14:56:07 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/Scroller.st,v 1.122 1999-03-31 05:50:41 stefan Exp $'
! !