equal
deleted
inserted
replaced
|
1 "{ Encoding: utf8 }" |
|
2 |
1 " |
3 " |
2 COPYRIGHT (c) 1996 by eXept Software AG / Claus Gittinger |
4 COPYRIGHT (c) 1996 by eXept Software AG / Claus Gittinger |
3 All Rights Reserved |
5 All Rights Reserved |
4 |
6 |
5 This software is furnished under a license and may be used |
7 This software is furnished under a license and may be used |
14 "{ NameSpace: Smalltalk }" |
16 "{ NameSpace: Smalltalk }" |
15 |
17 |
16 View subclass:#ThumbWheel |
18 View subclass:#ThumbWheel |
17 instanceVariableNames:'orientation synchronousOperation thumbPosition thumbColor |
19 instanceVariableNames:'orientation synchronousOperation thumbPosition thumbColor |
18 thumbShadowColor thumbLightColor thumbEnteredColor tallyLevel |
20 thumbShadowColor thumbLightColor thumbEnteredColor tallyLevel |
19 tallyAngle rangeStart rangeEnd rangeStep angleRange |
21 tallyAngle rangeStart rangeEnd rangeStep angleRange entered press |
20 unitsPerRotation entered press pressPos scrollAction |
22 pressPos scrollAction endlessRotation startMoveAction |
21 endlessRotation startMoveAction endMoveAction keyboardStep' |
23 endMoveAction keyboardStep' |
22 classVariableNames:'DefaultViewBackground DefaultThumbColor DefaultThumbShadowColor |
24 classVariableNames:'DefaultViewBackground DefaultThumbColor DefaultThumbShadowColor |
23 DefaultThumbLightColor DefaultTallyMarks DefaultTallyLevel |
25 DefaultThumbLightColor DefaultTallyMarks DefaultTallyLevel |
24 DefaultLevel DefaultBorderWidth' |
26 DefaultLevel DefaultBorderWidth' |
25 poolDictionaries:'' |
27 poolDictionaries:'' |
26 category:'Views-Interactors' |
28 category:'Views-Interactors' |
533 |
535 |
534 "Created: / 27.9.1996 / 16:04:49 / cg" |
536 "Created: / 27.9.1996 / 16:04:49 / cg" |
535 "Modified: / 6.6.1998 / 23:30:38 / cg" |
537 "Modified: / 6.6.1998 / 23:30:38 / cg" |
536 ! ! |
538 ! ! |
537 |
539 |
538 !ThumbWheel methodsFor:'events'! |
540 !ThumbWheel methodsFor:'event handling'! |
539 |
541 |
540 buttonMotion:state x:x y:y |
542 buttonMotion:state x:x y:y |
541 |deltaY deltaX d oldPos newPos| |
543 |deltaY deltaX d oldPos newPos| |
542 |
544 |
543 (state == 0 or:[press isNil]) ifTrue:[ |
545 (state == 0 or:[press isNil]) ifTrue:[ |
575 ]. |
577 ]. |
576 ]. |
578 ]. |
577 |
579 |
578 "Created: / 27.9.1996 / 17:38:57 / cg" |
580 "Created: / 27.9.1996 / 17:38:57 / cg" |
579 "Modified: / 16.6.1998 / 10:24:40 / cg" |
581 "Modified: / 16.6.1998 / 10:24:40 / cg" |
580 ! |
582 ! ! |
|
583 |
|
584 !ThumbWheel methodsFor:'events'! |
581 |
585 |
582 buttonPress:button x:x y:y |
586 buttonPress:button x:x y:y |
583 press := x@y. |
587 press := x@y. |
584 |
588 |
585 "/ fetch the current value; to avoid a jump. |
589 "/ fetch the current value; to avoid a jump. |
708 rangeEnd := 360. |
712 rangeEnd := 360. |
709 rangeStep := nil. "/ meaning: arbitrary precision |
713 rangeStep := nil. "/ meaning: arbitrary precision |
710 |
714 |
711 angleRange := 150. "/ 180 degrees are visible |
715 angleRange := 150. "/ 180 degrees are visible |
712 tallyAngle := 10. "/ tally every 10 degrees |
716 tallyAngle := 10. "/ tally every 10 degrees |
713 unitsPerRotation := 360. |
717 |
714 |
718 "Modified: / 05-02-1998 / 22:20:39 / cg" |
715 "Modified: / 5.2.1998 / 22:20:39 / cg" |
719 "Modified: / 27-05-2018 / 12:31:00 / Claus Gittinger" |
716 ! ! |
720 ! ! |
717 |
721 |
718 !ThumbWheel methodsFor:'private'! |
722 !ThumbWheel methodsFor:'private'! |
719 |
723 |
720 tellOthers |
724 tellOthers |