Form.st
changeset 951 ebedf8da0e89
parent 935 e71b1be3eb6c
child 1058 103860173cb2
equal deleted inserted replaced
950:d4d907fc7d78 951:ebedf8da0e89
  1232 
  1232 
  1233 initGC
  1233 initGC
  1234     "stop server from sending exposure events for Forms -
  1234     "stop server from sending exposure events for Forms -
  1235      (will fill up stream-queue on some stupid (i.e. sco) systems"
  1235      (will fill up stream-queue on some stupid (i.e. sco) systems"
  1236 
  1236 
       
  1237     "/ depth-1 forms draw differently ...
       
  1238 
       
  1239     depth == 1 ifTrue:[
       
  1240         foreground isNil ifTrue:[
       
  1241             foreground := paint := Color colorId:1.
       
  1242         ].
       
  1243         background isNil ifTrue:[
       
  1244             background := bgPaint := Color colorId:0
       
  1245         ]
       
  1246     ].
  1237     super initGC.
  1247     super initGC.
  1238     self setGraphicsExposures:false
  1248     self setGraphicsExposures:false
  1239 
  1249 
  1240     "Modified: 11.6.1996 / 21:21:34 / cg"
  1250     "Modified: 17.7.1996 / 13:21:24 / cg"
  1241 !
  1251 !
  1242 
  1252 
  1243 initialize
  1253 initialize
       
  1254     foreground := paint := Color colorId:1.
       
  1255     background := bgPaint := Color colorId:0.
       
  1256 
  1244     super initialize.
  1257     super initialize.
  1245     depth := 1.
  1258     depth := 1.
  1246     foreground isNil ifTrue:[
  1259 
  1247         foreground := paint := Color colorId:1.
  1260 "/    foreground isNil ifTrue:[
  1248     ].
  1261 "/        foreground := Color colorId:1.
  1249     background isNil ifTrue:[
  1262 "/    ].
  1250         background := bgPaint := Color colorId:0
  1263 "/    paint isNil ifTrue:[
  1251     ]
  1264 "/        paint := foreground.
  1252 
  1265 "/    ].
  1253     "Modified: 11.6.1996 / 21:17:05 / cg"
  1266 "/    background isNil ifTrue:[
       
  1267 "/        background := Color colorId:0
       
  1268 "/    ].
       
  1269 "/    bgPaint isNil ifTrue:[
       
  1270 "/        bgPaint := background
       
  1271 "/    ]
       
  1272 
       
  1273     "Modified: 17.7.1996 / 13:02:01 / cg"
  1254 !
  1274 !
  1255 
  1275 
  1256 recreate
  1276 recreate
  1257     "reconstruct the form after a snapin"
  1277     "reconstruct the form after a snapin"
  1258 
  1278 
  1561 colorFromValue:pixel
  1581 colorFromValue:pixel
  1562     localColorMap notNil ifTrue:[
  1582     localColorMap notNil ifTrue:[
  1563         ^ localColorMap at:(pixel + 1)
  1583         ^ localColorMap at:(pixel + 1)
  1564     ].
  1584     ].
  1565     depth == 1 ifTrue:[
  1585     depth == 1 ifTrue:[
  1566         pixel == 0 ifTrue:[^ Color white].
  1586         pixel == 0 ifTrue:[^ White].
  1567         ^ Color black
  1587         ^ Black
  1568     ].
  1588     ].
  1569     ^ Color black
  1589     ^ Black
  1570 
  1590 
  1571     "Created: 28.6.1996 / 16:10:13 / cg"
  1591     "Created: 28.6.1996 / 16:10:13 / cg"
  1572     "Modified: 28.6.1996 / 16:10:23 / cg"
  1592     "Modified: 17.7.1996 / 13:05:59 / cg"
  1573 !
  1593 !
  1574 
  1594 
  1575 hasBits
  1595 hasBits
  1576     "return true, if the receiver has its pixel data available.
  1596     "return true, if the receiver has its pixel data available.
  1577      For forms, which were created from data, this is always true.
  1597      For forms, which were created from data, this is always true.
  1620 ! !
  1640 ! !
  1621 
  1641 
  1622 !Form  class methodsFor:'documentation'!
  1642 !Form  class methodsFor:'documentation'!
  1623 
  1643 
  1624 version
  1644 version
  1625     ^ '$Header: /cvs/stx/stx/libview/Form.st,v 1.61 1996-07-11 09:53:52 cg Exp $'
  1645     ^ '$Header: /cvs/stx/stx/libview/Form.st,v 1.62 1996-07-17 12:19:00 cg Exp $'
  1626 ! !
  1646 ! !
  1627 Form initialize!
  1647 Form initialize!