'From Smalltalk/X, Version:5.2.2 on 07-04-2004 at 04:07:23 PM' !
"{ Package: 'stx:libview2' }"
View subclass:#TransparentBox
instanceVariableNames:''
classVariableNames:''
poolDictionaries:''
category:'Views-Basic'
!
!TransparentBox methodsFor:'events'!
sizeChanged:how
self computeShape.
"/ self clear;redraw.
^super sizeChanged: how.
! !
!TransparentBox methodsFor:'initialization'!
initialize
super initialize.
self computeShape.
self viewBackground: Color green.
"
| tv |
tv := TopView new.
gbox := GBOX origin:0.0@0.0 corner: 1.0@1.0 in: tv.
gbox viewBackground: Color green.
tv open
"
! !
!TransparentBox methodsFor:'queries'!
isTransparentBox
^true
!
specClass
^ TransparentBoxSpec
! !
!TransparentBox methodsFor:'shape computation'!
computeShape
| borderForm subViews w h |
device supportsArbitraryShapedViews ifFalse:[^self].
w := self extent x.
h := self extent y.
borderForm := Form width:w height:h.
borderForm fill:(Color colorId:0).
borderForm foreground:(Color colorId:1).
subViews := self subViews.
subViews isEmptyOrNil ifTrue:[
self fillFormWithBorderShape:borderForm.
] ifFalse:[
subViews do:[:aSubView|
aSubView fillFormWithBorderShape:borderForm.
]
].
self borderShape:borderForm.
! !
!TransparentBox class methodsFor:'documentation'!
version
^ '$Header: /cvs/stx/stx/libview2/TransparentBox.st,v 1.1 2004-04-07 14:07:50 cg Exp $'
! !