#DOCUMENTATION by cg
class: ThumbWheel
comment/format in:
#endMoveAction
#start
#start:
#start:stop:
#step
#step:
#stop
#stop:
#thumbPosition
#thumbPosition:
--- a/ThumbWheel.st Sun May 27 13:11:05 2018 +0200
+++ b/ThumbWheel.st Sun May 27 15:01:17 2018 +0200
@@ -232,67 +232,68 @@
!
start
- "return the wheels range minimum."
+ "return the wheel's range minimum."
^ rangeStart
- "Created: 1.4.1997 / 12:30:04 / cg"
- "Modified: 1.4.1997 / 12:52:31 / cg"
+ "Created: / 01-04-1997 / 12:30:04 / cg"
+ "Modified (comment): / 27-05-2018 / 13:14:17 / Claus Gittinger"
!
start:aNumber
- "set the wheels range minimum."
+ "set the wheel's range minimum."
rangeStart := aNumber
- "Created: 1.4.1997 / 12:30:54 / cg"
- "Modified: 1.4.1997 / 12:52:36 / cg"
+ "Created: / 01-04-1997 / 12:30:54 / cg"
+ "Modified (comment): / 27-05-2018 / 13:14:13 / Claus Gittinger"
!
start:start stop:stop
- "set the wheels range minimum."
+ "set the wheel's range."
rangeStart := start.
rangeEnd := stop.
- "Modified: / 1.4.1997 / 12:52:36 / cg"
- "Created: / 23.1.1998 / 15:06:04 / cg"
+ "Modified: / 01-04-1997 / 12:52:36 / cg"
+ "Created: / 23-01-1998 / 15:06:04 / cg"
+ "Modified (comment): / 27-05-2018 / 13:14:08 / Claus Gittinger"
!
step
- "return the wheels range step."
+ "return the wheel's range step."
^ rangeStep
- "Created: 1.4.1997 / 12:30:15 / cg"
- "Modified: 1.4.1997 / 12:53:05 / cg"
+ "Created: / 01-04-1997 / 12:30:15 / cg"
+ "Modified (comment): / 27-05-2018 / 13:13:04 / Claus Gittinger"
!
step:aNumber
- "set the wheels range step."
+ "set the wheel's range step."
rangeStep := aNumber
- "Created: 1.4.1997 / 12:30:32 / cg"
- "Modified: 1.4.1997 / 12:52:49 / cg"
+ "Created: / 01-04-1997 / 12:30:32 / cg"
+ "Modified (comment): / 27-05-2018 / 13:13:00 / Claus Gittinger"
!
stop
- "return the wheels range end."
+ "return the wheel's range end."
^ rangeEnd
- "Created: 1.4.1997 / 12:30:09 / cg"
- "Modified: 1.4.1997 / 12:52:59 / cg"
+ "Created: / 01-04-1997 / 12:30:09 / cg"
+ "Modified (comment): / 27-05-2018 / 13:12:57 / Claus Gittinger"
!
stop:aNumber
- "set the wheels range end."
+ "set the wheel's range end."
rangeEnd := aNumber
- "Created: 1.4.1997 / 12:30:47 / cg"
- "Modified: 1.4.1997 / 12:52:54 / cg"
+ "Created: / 01-04-1997 / 12:30:47 / cg"
+ "Modified (comment): / 27-05-2018 / 13:12:53 / Claus Gittinger"
!
thumbOrigin:pos
@@ -305,16 +306,17 @@
!
thumbPosition
- "sreturn the position"
+ "return the position"
^ thumbPosition
- "Created: / 21.4.1998 / 20:58:15 / cg"
+ "Created: / 21-04-1998 / 20:58:15 / cg"
+ "Modified (comment): / 27-05-2018 / 13:13:56 / Claus Gittinger"
!
thumbPosition:pos
- "set the wheels position; the argument should be in the start..stop
- interval."
+ "set the wheel's position;
+ the argument should be in the start..stop interval."
|newPos delta|
@@ -322,44 +324,45 @@
newPos := pos.
endlessRotation ifTrue:[
- [newPos < rangeStart] whileTrue:[
- newPos := newPos + delta
- ].
- [newPos > rangeEnd] whileTrue:[
- newPos := newPos - delta
- ].
+ [newPos < rangeStart] whileTrue:[
+ newPos := newPos + delta
+ ].
+ [newPos > rangeEnd] whileTrue:[
+ newPos := newPos - delta
+ ].
].
newPos := (newPos max:rangeStart) min:rangeEnd.
rangeStep notNil ifTrue:[
- newPos := newPos roundTo:rangeStep.
- rangeStep isInteger ifTrue:[
- newPos := newPos asInteger
- ]
+ newPos := newPos roundTo:rangeStep.
+ rangeStep isInteger ifTrue:[
+ newPos := newPos asInteger
+ ]
].
newPos ~= thumbPosition ifTrue:[
- thumbPosition := newPos.
- shown ifTrue:[
- self invalidate.
- ]
+ thumbPosition := newPos.
+ shown ifTrue:[
+ self invalidate.
+ ]
].
- "Created: / 27.9.1996 / 18:10:57 / cg"
- "Modified: / 6.6.1998 / 23:29:28 / cg"
+ "Created: / 27-09-1996 / 18:10:57 / cg"
+ "Modified: / 06-06-1998 / 23:29:28 / cg"
+ "Modified (comment): / 27-05-2018 / 13:13:51 / Claus Gittinger"
! !
!ThumbWheel methodsFor:'accessing-behavior'!
endMoveAction
- "set the endMoveAction, a block which is evaluated when the wheel
+ "return the endMoveAction, a block which is evaluated when the wheel
stops to move (i.e. the user releases the mouse).
The default is nil (i.e. no action)"
^ endMoveAction
- "Created: / 18.8.1998 / 16:29:40 / cg"
- "Modified: / 18.8.1998 / 16:31:41 / cg"
+ "Created: / 18-08-1998 / 16:29:40 / cg"
+ "Modified (comment): / 27-05-2018 / 13:12:31 / Claus Gittinger"
!
endMoveAction:aBlock
@@ -772,5 +775,9 @@
version
^ '$Header$'
+!
+
+version_CVS
+ ^ '$Header$'
! !