167 ! ! |
167 ! ! |
168 |
168 |
169 !ArrowButton class methodsFor:'instance creation'! |
169 !ArrowButton class methodsFor:'instance creation'! |
170 |
170 |
171 downIn:aView |
171 downIn:aView |
|
172 "create and return a new down-button in aView" |
|
173 |
172 ^ (super in:aView) direction:#down |
174 ^ (super in:aView) direction:#down |
|
175 |
|
176 "Modified: 22.1.1997 / 11:59:08 / cg" |
173 ! |
177 ! |
174 |
178 |
175 leftIn:aView |
179 leftIn:aView |
|
180 "create and return a new left-button in aView" |
|
181 |
176 ^ (super in:aView) direction:#left |
182 ^ (super in:aView) direction:#left |
|
183 |
|
184 "Modified: 22.1.1997 / 11:59:14 / cg" |
177 ! |
185 ! |
178 |
186 |
179 rightIn:aView |
187 rightIn:aView |
|
188 "create and return a new right-button in aView" |
|
189 |
180 ^ (super in:aView) direction:#right |
190 ^ (super in:aView) direction:#right |
|
191 |
|
192 "Modified: 22.1.1997 / 11:59:21 / cg" |
181 ! |
193 ! |
182 |
194 |
183 upIn:aView |
195 upIn:aView |
|
196 "create and return a new up-button in aView" |
|
197 |
184 ^ (super in:aView) direction:#up |
198 ^ (super in:aView) direction:#up |
|
199 |
|
200 "Modified: 22.1.1997 / 11:59:27 / cg" |
185 ! ! |
201 ! ! |
186 |
202 |
187 !ArrowButton class methodsFor:'defaults'! |
203 !ArrowButton class methodsFor:'defaults'! |
188 |
204 |
189 downArrowButtonForm:style on:aDevice |
205 downArrowButtonForm:style on:aDevice |
610 ! ! |
626 ! ! |
611 |
627 |
612 !ArrowButton methodsFor:'accessing'! |
628 !ArrowButton methodsFor:'accessing'! |
613 |
629 |
614 direction:aDirectionSymbol |
630 direction:aDirectionSymbol |
|
631 "create and return a new arrow button in aView" |
|
632 |
615 |form| |
633 |form| |
616 |
634 |
617 aDirectionSymbol == #up ifTrue:[ |
635 aDirectionSymbol == #up ifTrue:[ |
618 form := (self class upArrowButtonForm:arrowStyle on:device). |
636 form := (self class upArrowButtonForm:arrowStyle on:device). |
619 name := 'upButton'. |
637 name := 'upButton'. |
620 ]. |
638 ]. |
621 aDirectionSymbol == #down ifTrue:[ |
639 aDirectionSymbol == #down ifTrue:[ |
622 form := (self class downArrowButtonForm:arrowStyle on:device). |
640 form := (self class downArrowButtonForm:arrowStyle on:device). |
623 name := 'downButton'. |
641 name := 'downButton'. |
624 ]. |
642 ]. |
625 aDirectionSymbol == #left ifTrue:[ |
643 aDirectionSymbol == #left ifTrue:[ |
626 form := (self class leftArrowButtonForm:arrowStyle on:device). |
644 form := (self class leftArrowButtonForm:arrowStyle on:device). |
627 name := 'leftButton'. |
645 name := 'leftButton'. |
628 ]. |
646 ]. |
629 aDirectionSymbol == #right ifTrue:[ |
647 aDirectionSymbol == #right ifTrue:[ |
630 form := (self class rightArrowButtonForm:arrowStyle on:device). |
648 form := (self class rightArrowButtonForm:arrowStyle on:device). |
631 name := 'rightButton'. |
649 name := 'rightButton'. |
632 ]. |
650 ]. |
633 self form:form |
651 self form:form |
|
652 |
|
653 "Modified: 22.1.1997 / 11:59:38 / cg" |
634 ! ! |
654 ! ! |
635 |
655 |
636 !ArrowButton methodsFor:'initialization'! |
656 !ArrowButton methodsFor:'initialization'! |
637 |
657 |
638 initStyle |
658 initStyle |
|
659 "setup viewStyle specifics" |
|
660 |
639 super initStyle. |
661 super initStyle. |
640 |
662 |
641 DefaultBackgroundColor notNil ifTrue:[ |
663 DefaultBackgroundColor notNil ifTrue:[ |
642 bgColor := DefaultBackgroundColor on:device |
664 bgColor := DefaultBackgroundColor on:device |
643 ]. |
665 ]. |
644 DefaultForegroundColor notNil ifTrue:[ |
666 DefaultForegroundColor notNil ifTrue:[ |
645 fgColor := DefaultForegroundColor on:device |
667 fgColor := DefaultForegroundColor on:device |
646 ]. |
668 ]. |
647 DefaultActiveForegroundColor notNil ifTrue:[ |
669 DefaultActiveForegroundColor notNil ifTrue:[ |
648 activeFgColor := DefaultActiveForegroundColor on:device |
670 activeFgColor := DefaultActiveForegroundColor on:device |
649 ]. |
671 ]. |
650 DefaultActiveBackgroundColor notNil ifTrue:[ |
672 DefaultActiveBackgroundColor notNil ifTrue:[ |
651 activeBgColor := DefaultActiveBackgroundColor on:device |
673 activeBgColor := DefaultActiveBackgroundColor on:device |
652 ]. |
674 ]. |
653 DefaultEnteredForegroundColor notNil ifTrue:[ |
675 DefaultEnteredForegroundColor notNil ifTrue:[ |
654 enteredFgColor := DefaultEnteredForegroundColor on:device |
676 enteredFgColor := DefaultEnteredForegroundColor on:device |
655 ]. |
677 ]. |
656 DefaultEnteredBackgroundColor notNil ifTrue:[ |
678 DefaultEnteredBackgroundColor notNil ifTrue:[ |
657 enteredBgColor := DefaultEnteredBackgroundColor on:device |
679 enteredBgColor := DefaultEnteredBackgroundColor on:device |
658 ]. |
680 ]. |
659 DefaultDisabledForegroundColor notNil ifTrue:[ |
681 DefaultDisabledForegroundColor notNil ifTrue:[ |
660 disabledFgColor := DefaultDisabledForegroundColor on:device |
682 disabledFgColor := DefaultDisabledForegroundColor on:device |
661 ]. |
683 ]. |
662 |
684 |
663 arrowStyle := DefaultArrowStyle. |
685 arrowStyle := DefaultArrowStyle. |
664 |
686 |
665 DefaultArrowButtonActiveLevel notNil ifTrue:[onLevel := DefaultArrowButtonActiveLevel]. |
687 DefaultArrowButtonActiveLevel notNil ifTrue:[onLevel := DefaultArrowButtonActiveLevel]. |