VariablePanel.st
changeset 1362 f2a9bc6ad68d
parent 1350 a25b2a5f3c7c
child 1381 d69604d4bbb8
equal deleted inserted replaced
1361:139f8063319c 1362:f2a9bc6ad68d
     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 14-oct-1997 at 11:25:13 pm'                 !
       
    14 
    12 
    15 SimpleView subclass:#VariablePanel
    13 SimpleView subclass:#VariablePanel
    16 	instanceVariableNames:'barHeight barWidth separatingLine shadowForm lightForm showHandle
    14 	instanceVariableNames:'barHeight barWidth separatingLine shadowForm lightForm showHandle
    17 		handlePosition handleColor handleStyle handleLevel noColor
    15 		handlePosition handleColor handleStyle handleLevel noColor
    18 		trackLine redrawLocked orientation handleLabels knobHeight'
    16 		trackLine redrawLocked orientation handleLabels knobHeight'
  1157 
  1155 
  1158 computeBarHeight
  1156 computeBarHeight
  1159     "compute the height if the separating bar from either the
  1157     "compute the height if the separating bar from either the
  1160      form or an explicit height given in the styleSheet"
  1158      form or an explicit height given in the styleSheet"
  1161 
  1159 
  1162     <resource: #style (#variablePanelBarHeight)>
  1160     <resource: #style (#'variablePanel.barHeight')>
  1163 
  1161 
  1164     |bH h|
  1162     |bH h|
  1165 
  1163 
  1166     shadowForm notNil ifTrue:[
  1164     shadowForm notNil ifTrue:[
  1167         bH := shadowForm height + 2.
  1165         bH := shadowForm height + 2.
  1169         self is3D ifTrue:[
  1167         self is3D ifTrue:[
  1170             h := 3
  1168             h := 3
  1171         ] ifFalse:[
  1169         ] ifFalse:[
  1172             h := 2
  1170             h := 2
  1173         ].
  1171         ].
  1174         bH := styleSheet at:#variablePanelBarHeight.
  1172         bH := styleSheet at:'variablePanel.barHeight'.
  1175         bH isNil ifTrue:[
  1173         bH isNil ifTrue:[
  1176             bH := (h * device verticalPixelPerMillimeter) rounded.
  1174             bH := (h * device verticalPixelPerMillimeter) rounded.
  1177         ].
  1175         ].
  1178     ].
  1176     ].
  1179     self barHeight:bH.
  1177     self barHeight:bH.
  1191         bH := bH + font descent - 1
  1189         bH := bH + font descent - 1
  1192     ].
  1190     ].
  1193 
  1191 
  1194     self barHeight:bH.
  1192     self barHeight:bH.
  1195 
  1193 
  1196     "Modified: 17.1.1997 / 23:20:40 / cg"
  1194     "Modified: / 26.10.1997 / 17:06:30 / cg"
  1197 !
  1195 !
  1198 
  1196 
  1199 defaultControllerClass
  1197 defaultControllerClass
  1200     ^ VariablePanelController
  1198     ^ VariablePanelController
  1201 !
  1199 !
  1498 ! !
  1496 ! !
  1499 
  1497 
  1500 !VariablePanel class methodsFor:'documentation'!
  1498 !VariablePanel class methodsFor:'documentation'!
  1501 
  1499 
  1502 version
  1500 version
  1503     ^ '$Header: /cvs/stx/stx/libwidg/VariablePanel.st,v 1.34 1997-10-15 11:28:25 cg Exp $'
  1501     ^ '$Header: /cvs/stx/stx/libwidg/VariablePanel.st,v 1.35 1997-10-28 19:25:29 cg Exp $'
  1504 ! !
  1502 ! !