DeviceGraphicsContext.st
changeset 6234 404d91662d49
parent 6225 b953824e744c
child 6235 7cdc094296b2
equal deleted inserted replaced
6233:b746fb9ba0e3 6234:404d91662d49
  3525     Lobby registerChange:self.
  3525     Lobby registerChange:self.
  3526 
  3526 
  3527     "Modified: 19.3.1997 / 11:07:52 / cg"
  3527     "Modified: 19.3.1997 / 11:07:52 / cg"
  3528 !
  3528 !
  3529 
  3529 
       
  3530 createGCForBitmap
       
  3531     "physically create a device GC.
       
  3532      Since we do not need a gc-object for the drawable until something is
       
  3533      really drawn, none is created up to the first draw.
       
  3534      This method is sent, when the first drawing happens.
       
  3535      Redefined here to create a bitmap GC (some devices (i.e. windows) require
       
  3536      different GC's for different canvases."
       
  3537 
       
  3538     gcId := device gcForBitmap:drawableId.
       
  3539     Lobby registerChange:self.
       
  3540 !
       
  3541 
  3530 destroy
  3542 destroy
  3531     "I am abstract"
  3543     "I am abstract"
  3532 
  3544 
  3533     self subclassResponsibility.
  3545     self subclassResponsibility.
  3534 
  3546 
  3673      initColors and initFont, which are usually redefined."
  3685      initColors and initFont, which are usually redefined."
  3674 
  3686 
  3675     super initialize.
  3687     super initialize.
  3676 
  3688 
  3677     "/ just in case, someone redefined new without setting device
  3689     "/ just in case, someone redefined new without setting device
  3678     device isNil ifTrue:[device := Screen current].
  3690     (device isNil and:[Screen notNil]) ifTrue:[device := Screen current].
  3679 
  3691 
  3680     foreground isNil ifTrue:[foreground := Black].
  3692     foreground isNil ifTrue:[foreground := Black].
  3681     background isNil ifTrue:[background := White].
  3693     background isNil ifTrue:[background := White].
  3682 
  3694 
  3683     "Modified: 10.1.1997 / 17:46:51 / cg"
  3695     "Modified: 10.1.1997 / 17:46:51 / cg"
  3904     "create a pixmap and set the drawableId"
  3916     "create a pixmap and set the drawableId"
  3905     
  3917     
  3906     drawableId := device createPixmapWidth:w height:h depth:d.
  3918     drawableId := device createPixmapWidth:w height:h depth:d.
  3907 !
  3919 !
  3908 
  3920 
       
  3921 createRootWindow
       
  3922     drawableId := self rootWindowFor:self.
       
  3923 !
       
  3924 
  3909 createWindowFor:aView type:typeSymbol origin:org extent:ext minExtent:minE maxExtent:maxE borderWidth:bw subViewOf:sv style:styleSymbol inputOnly:inp label:label owner:owner icon:icn iconMask:icnM iconView:icnV 
  3925 createWindowFor:aView type:typeSymbol origin:org extent:ext minExtent:minE maxExtent:maxE borderWidth:bw subViewOf:sv style:styleSymbol inputOnly:inp label:label owner:owner icon:icn iconMask:icnM iconView:icnV 
  3910     "create a window and set the drawableId"
  3926     "create a window and set the drawableId"
  3911     
  3927     
  3912     drawableId := device 
  3928     drawableId := device 
  3913             createWindowFor:aView
  3929             createWindowFor:aView
  4020 ! !
  4036 ! !
  4021 
  4037 
  4022 !DeviceGraphicsContext class methodsFor:'documentation'!
  4038 !DeviceGraphicsContext class methodsFor:'documentation'!
  4023 
  4039 
  4024 version
  4040 version
  4025     ^ '$Header: /cvs/stx/stx/libview/DeviceGraphicsContext.st,v 1.130 2014-02-04 13:26:24 stefan Exp $'
  4041     ^ '$Header: /cvs/stx/stx/libview/DeviceGraphicsContext.st,v 1.131 2014-02-04 15:50:16 stefan Exp $'
  4026 !
  4042 !
  4027 
  4043 
  4028 version_CVS
  4044 version_CVS
  4029     ^ '$Header: /cvs/stx/stx/libview/DeviceGraphicsContext.st,v 1.130 2014-02-04 13:26:24 stefan Exp $'
  4045     ^ '$Header: /cvs/stx/stx/libview/DeviceGraphicsContext.st,v 1.131 2014-02-04 15:50:16 stefan Exp $'
  4030 ! !
  4046 ! !
  4031 
  4047 
  4032 
  4048 
  4033 DeviceGraphicsContext initialize!
  4049 DeviceGraphicsContext initialize!