7 inclusion of the above copyright notice. This software may not |
7 inclusion of the above copyright notice. This software may not |
8 be provided or otherwise made available to, or used by, any |
8 be provided or otherwise made available to, or used by, any |
9 other person. No title to or ownership of the software is |
9 other person. No title to or ownership of the software is |
10 hereby transferred. |
10 hereby transferred. |
11 " |
11 " |
|
12 |
|
13 'From Smalltalk/X, Version:3.2.1 on 20-oct-1997 at 2:08:27 pm' ! |
12 |
14 |
13 Button subclass:#ArrowButton |
15 Button subclass:#ArrowButton |
14 instanceVariableNames:'arrowStyle direction' |
16 instanceVariableNames:'arrowStyle direction' |
15 classVariableNames:'DownArrowForm UpArrowForm LeftArrowForm RightArrowForm |
17 classVariableNames:'DownArrowForm UpArrowForm LeftArrowForm RightArrowForm |
16 CachedStyle DefaultArrowStyle DefaultBackgroundColor |
18 CachedStyle DefaultArrowStyle DefaultBackgroundColor |
613 ! |
615 ! |
614 |
616 |
615 updateStyleCache |
617 updateStyleCache |
616 "extract values from the styleSheet and cache them in class variables" |
618 "extract values from the styleSheet and cache them in class variables" |
617 |
619 |
618 <resource: #style (#arrowButtonStyle |
620 <resource: #style (#'arrowButton.style' |
619 #arrowButtonActiveLevel #arrowButtonPassiveLevel |
621 #'arrowButton.activeLevel' #'arrowButton.passiveLevel' |
620 #arrowButtonBackgroundColor #arrowButtonForegroundColor |
622 #'arrowButton.backgroundColor' #'arrowButton.foregroundColor' |
621 #arrowButtonActiveBackgroundColor #arrowButtonActiveForegroundColor |
623 #'arrowButton.activeBackgroundColor' #'arrowButton.activeForegroundColor' |
622 #arrowButtonEnteredBackgroundColor #arrowButtonEnteredForegroundColor |
624 #'arrowButton.enteredBackgroundColor' #'arrowButton.enteredForegroundColor' |
623 #arrowButtonDisabledForegroundColor |
625 #'arrowButton.disabledForegroundColor' |
624 #arrowButtonDownForm #arrowButtonUpForm |
626 #'arrowButton.downForm' #'arrowButton.upForm' |
625 #arrowButtonLeftForm #arrowButtonRightForm |
627 #'arrowButton.leftForm' #'arrowButton.rightForm' |
626 #arrowButtonDownFormFile #arrowButtonUpFormFile |
628 #'arrowButton.downFormFile' #'arrowButton.upFormFile' |
627 #arrowButtonLeftFormFile #arrowButtonRightFormFile)> |
629 #'arrowButton.leftFormFile' #'arrowButton.rightFormFile')> |
628 |
630 |
629 DefaultArrowStyle := StyleSheet at:'arrowButtonStyle' default:StyleSheet name. |
631 DefaultArrowStyle := StyleSheet at:'arrowButton.style' default:StyleSheet name. |
630 DefaultArrowStyle := DefaultArrowStyle asSymbol. |
632 DefaultArrowStyle := DefaultArrowStyle asSymbol. |
631 |
633 |
632 DefaultArrowButtonActiveLevel := StyleSheet at:'arrowButtonActiveLevel' default:nil. |
634 DefaultArrowButtonActiveLevel := StyleSheet at:'arrowButton.activeLevel' default:nil. |
633 DefaultArrowButtonPassiveLevel := StyleSheet at:'arrowButtonPassiveLevel' default:nil. |
635 DefaultArrowButtonPassiveLevel := StyleSheet at:'arrowButton.passiveLevel' default:nil. |
634 |
636 |
635 DefaultBackgroundColor := StyleSheet colorAt:'arrowButtonBackgroundColor'. |
637 DefaultBackgroundColor := StyleSheet colorAt:'arrowButton.backgroundColor'. |
636 DefaultForegroundColor := StyleSheet colorAt:'arrowButtonForegroundColor'. |
638 DefaultForegroundColor := StyleSheet colorAt:'arrowButton.foregroundColor'. |
637 DefaultActiveBackgroundColor := StyleSheet colorAt:'arrowButtonActiveBackgroundColor'. |
639 DefaultActiveBackgroundColor := StyleSheet colorAt:'arrowButton.activeBackgroundColor'. |
638 DefaultActiveForegroundColor := StyleSheet colorAt:'arrowButtonActiveForegroundColor'. |
640 DefaultActiveForegroundColor := StyleSheet colorAt:'arrowButton.activeForegroundColor'. |
639 DefaultEnteredBackgroundColor := StyleSheet colorAt:'arrowButtonEnteredBackgroundColor'. |
641 DefaultEnteredBackgroundColor := StyleSheet colorAt:'arrowButton.enteredBackgroundColor'. |
640 DefaultEnteredForegroundColor := StyleSheet colorAt:'arrowButtonEnteredForegroundColor'. |
642 DefaultEnteredForegroundColor := StyleSheet colorAt:'arrowButton.enteredForegroundColor'. |
641 DefaultDisabledForegroundColor := StyleSheet colorAt:'arrowButtonDisabledForegroundColor'. |
643 DefaultDisabledForegroundColor := StyleSheet colorAt:'arrowButton.disabledForegroundColor'. |
642 |
644 |
643 DownArrowForm := StyleSheet at:'arrowButtonDownForm' default:nil. |
645 DownArrowForm := StyleSheet at:'arrowButton.downForm' default:nil. |
644 UpArrowForm := StyleSheet at:'arrowButtonUpForm' default:nil. |
646 UpArrowForm := StyleSheet at:'arrowButton.upForm' default:nil. |
645 LeftArrowForm := StyleSheet at:'arrowButtonLeftForm' default:nil. |
647 LeftArrowForm := StyleSheet at:'arrowButton.leftForm' default:nil. |
646 RightArrowForm := StyleSheet at:'arrowButtonRightForm' default:nil. |
648 RightArrowForm := StyleSheet at:'arrowButton.rightForm' default:nil. |
647 |
649 |
648 UpArrowFormFile := DownArrowFormFile := LeftArrowFormFile := RightArrowFormFile := nil. |
650 UpArrowFormFile := DownArrowFormFile := LeftArrowFormFile := RightArrowFormFile := nil. |
649 UpArrowForm isNil ifTrue:[ |
651 UpArrowForm isNil ifTrue:[ |
650 UpArrowFormFile := StyleSheet at:'arrowButtonUpFormFile' default:'ScrollUp.xbm'. |
652 UpArrowFormFile := StyleSheet at:'arrowButton.upFormFile' default:'ScrollUp.xbm'. |
651 ]. |
653 ]. |
652 DownArrowForm isNil ifTrue:[ |
654 DownArrowForm isNil ifTrue:[ |
653 DownArrowFormFile := StyleSheet at:'arrowButtonDownFormFile' default:'ScrollDn.xbm'. |
655 DownArrowFormFile := StyleSheet at:'arrowButton.downFormFile' default:'ScrollDn.xbm'. |
654 ]. |
656 ]. |
655 LeftArrowForm isNil ifTrue:[ |
657 LeftArrowForm isNil ifTrue:[ |
656 LeftArrowFormFile := StyleSheet at:'arrowButtonLeftFormFile' default:'ScrollLt.xbm'. |
658 LeftArrowFormFile := StyleSheet at:'arrowButton.leftFormFile' default:'ScrollLt.xbm'. |
657 ]. |
659 ]. |
658 RightArrowForm isNil ifTrue:[ |
660 RightArrowForm isNil ifTrue:[ |
659 RightArrowFormFile := StyleSheet at:'arrowButtonRightFormFile' default:'ScrollRt.xbm'. |
661 RightArrowFormFile := StyleSheet at:'arrowButton.rightFormFile' default:'ScrollRt.xbm'. |
660 ]. |
662 ]. |
661 |
663 |
662 " |
664 " |
663 self updateStyleCache |
665 self updateStyleCache |
664 " |
666 " |
665 |
667 |
666 "Modified: 31.8.1995 / 03:01:14 / claus" |
668 "Modified: 31.8.1995 / 03:01:14 / claus" |
667 "Modified: 1.3.1996 / 13:45:57 / cg" |
669 "Modified: 20.10.1997 / 13:50:57 / cg" |
668 ! ! |
670 ! ! |
669 |
671 |
670 !ArrowButton methodsFor:'accessing'! |
672 !ArrowButton methodsFor:'accessing'! |
671 |
673 |
672 direction |
674 direction |