14 instanceVariableNames:'barHeight barWidth separatingLine shadowForm lightForm showHandle |
14 instanceVariableNames:'barHeight barWidth separatingLine shadowForm lightForm showHandle |
15 handlePosition handleColor handleStyle handleLevel noColor |
15 handlePosition handleColor handleStyle handleLevel noColor |
16 trackLine redrawLocked orientation handleLabels knobHeight' |
16 trackLine redrawLocked orientation handleLabels knobHeight' |
17 classVariableNames:'DefaultShowHandle DefaultHandleStyle DefaultHandlePosition |
17 classVariableNames:'DefaultShowHandle DefaultHandleStyle DefaultHandlePosition |
18 DefaultTrackingLine DefaultSeparatingLine DefaultHandleColor |
18 DefaultTrackingLine DefaultSeparatingLine DefaultHandleColor |
19 DefaultHandleLevel DefaultVCursor DefaultHCursor' |
19 DefaultHandleLevel DefaultVCursor DefaultHCursor |
|
20 DefaultHandleImage' |
20 poolDictionaries:'' |
21 poolDictionaries:'' |
21 category:'Views-Layout' |
22 category:'Views-Layout' |
22 ! |
23 ! |
23 |
24 |
24 !VariablePanel class methodsFor:'documentation'! |
25 !VariablePanel class methodsFor:'documentation'! |
606 |
607 |
607 updateStyleCache |
608 updateStyleCache |
608 "extract values from the styleSheet and cache them in class variables" |
609 "extract values from the styleSheet and cache them in class variables" |
609 |
610 |
610 <resource: #style (#'variablePanel.showHandle' |
611 <resource: #style (#'variablePanel.showHandle' |
611 #'variablePanel.handlePosition' #'variablePanel.handleLevel' |
612 #'variablePanel.handleStyle' |
612 #'variablePanel.trackingLine' #'variablePanel.trackingStyle' |
613 #'variablePanel.handleImage' |
613 #'variablePanel.separatingLine' #'variablePanel.handleColor')> |
614 #'variablePanel.handlePosition' |
|
615 #'variablePanel.handleLevel' |
|
616 #'variablePanel.trackingLine' |
|
617 #'variablePanel.trackingStyle' |
|
618 #'variablePanel.separatingLine' |
|
619 #'variablePanel.handleColor')> |
614 |
620 |
615 |lineModeBoolean| |
621 |lineModeBoolean| |
616 |
622 |
617 DefaultShowHandle := StyleSheet at:'variablePanel.showHandle' default:true. |
623 DefaultShowHandle := StyleSheet at:'variablePanel.showHandle' default:true. |
618 DefaultHandleStyle := StyleSheet at:'variablePanel.handleStyle'. |
624 DefaultHandleStyle := StyleSheet at:'variablePanel.handleStyle'. |
619 DefaultHandlePosition := StyleSheet at:'variablePanel.handlePosition' default:nil "#right". |
625 DefaultHandlePosition := StyleSheet at:'variablePanel.handlePosition' "default:#right". |
620 DefaultHandlePosition isNil ifTrue:[ |
626 DefaultHandlePosition isNil ifTrue:[ |
621 DefaultHandlePosition := ScrollableView defaultScrollBarPosition. |
627 DefaultHandlePosition := ScrollableView defaultScrollBarPosition. |
622 ]. |
628 ]. |
623 DefaultHandleLevel := StyleSheet at:'variablePanel.handleLevel' default:2. |
629 DefaultHandleLevel := StyleSheet at:'variablePanel.handleLevel' default:2. |
624 DefaultTrackingLine := StyleSheet at:'variablePanel.trackingStyle' default:nil. |
630 DefaultTrackingLine := StyleSheet at:'variablePanel.trackingStyle'. |
625 DefaultTrackingLine isNil ifTrue:[ |
631 DefaultTrackingLine isNil ifTrue:[ |
626 lineModeBoolean := StyleSheet at:'variablePanel.trackingLine' default:false. |
632 lineModeBoolean := StyleSheet at:'variablePanel.trackingLine' default:false. |
627 lineModeBoolean ifTrue:[ |
633 lineModeBoolean ifTrue:[ |
628 DefaultTrackingLine := #solidLine |
634 DefaultTrackingLine := #solidLine |
629 ] ifFalse:[ |
635 ] ifFalse:[ |
632 ]. |
638 ]. |
633 |
639 |
634 DefaultSeparatingLine := StyleSheet at:'variablePanel.separatingLine' default:false. |
640 DefaultSeparatingLine := StyleSheet at:'variablePanel.separatingLine' default:false. |
635 DefaultHandleColor := StyleSheet colorAt:'variablePanel.handleColor' default:Black. |
641 DefaultHandleColor := StyleSheet colorAt:'variablePanel.handleColor' default:Black. |
636 |
642 |
|
643 DefaultHandleImage := StyleSheet at:'variablePanel.handleImage' |
|
644 |
637 " |
645 " |
638 VariablePanel updateStyleCache |
646 VariablePanel updateStyleCache |
639 " |
647 " |
640 |
648 |
641 "Modified: / 3.11.1997 / 02:19:56 / cg" |
649 "Modified: / 19.5.1998 / 16:08:54 / cg" |
642 ! ! |
650 ! ! |
643 |
651 |
644 !VariablePanel methodsFor:'accessing'! |
652 !VariablePanel methodsFor:'accessing'! |
645 |
653 |
646 addSubView:aView |
654 addSubView:aView |
1240 showHandle := DefaultShowHandle. |
1248 showHandle := DefaultShowHandle. |
1241 handlePosition := DefaultHandlePosition. |
1249 handlePosition := DefaultHandlePosition. |
1242 trackLine := DefaultTrackingLine. |
1250 trackLine := DefaultTrackingLine. |
1243 separatingLine := DefaultSeparatingLine. |
1251 separatingLine := DefaultSeparatingLine. |
1244 |
1252 |
1245 handleStyle == #next ifTrue:[ |
1253 DefaultHandleImage notNil ifTrue:[ |
1246 shadowForm := self class shadowFormOn:device. |
1254 shadowForm := DefaultHandleImage onDevice:device. |
1247 lightForm := self class lightFormOn:device. |
|
1248 |
|
1249 barWidth := shadowForm width. |
1255 barWidth := shadowForm width. |
1250 ] ifFalse:[ |
1256 ] ifFalse:[ |
1251 shadowForm := lightForm := nil. |
1257 handleStyle == #next ifTrue:[ |
1252 |
1258 DefaultHandleImage notNil ifTrue:[ |
1253 mm := device verticalPixelPerMillimeter. |
1259 shadowForm := DefaultHandleImage onDevice:device. |
1254 barWidth := (1.5 * mm) rounded. "motif style width" |
1260 ] ifFalse:[ |
|
1261 shadowForm := self class shadowFormOn:device. |
|
1262 lightForm := self class lightFormOn:device. |
|
1263 ]. |
|
1264 barWidth := shadowForm width. |
|
1265 ] ifFalse:[ |
|
1266 shadowForm := lightForm := nil. |
|
1267 |
|
1268 mm := device verticalPixelPerMillimeter. |
|
1269 barWidth := (1.5 * mm) rounded. "motif style width" |
|
1270 ]. |
1255 ]. |
1271 ]. |
1256 self computeBarHeight. |
1272 self computeBarHeight. |
1257 |
1273 |
1258 handleStyle == #mswindows ifTrue:[ |
1274 handleStyle == #mswindows ifTrue:[ |
1259 barWidth := (ArrowButton new direction:#up) width + 1 |
1275 barWidth := (ArrowButton new direction:#up) width + 1 |
1260 ]. |
1276 ]. |
1261 |
1277 |
1262 "Modified: / 31.10.1997 / 22:15:42 / cg" |
1278 "Modified: / 19.5.1998 / 16:21:02 / cg" |
1263 ! |
1279 ! |
1264 |
1280 |
1265 initialize |
1281 initialize |
1266 orientation isNil ifTrue:[orientation := #vertical]. |
1282 orientation isNil ifTrue:[orientation := #vertical]. |
1267 super initialize. |
1283 super initialize. |