*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Wed, 07 Apr 2004 16:07:50 +0200
changeset 1975 3901166c295e
parent 1974 025c3119062b
child 1976 0cddfee39a5a
*** empty log message ***
TransparentBox.st
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TransparentBox.st	Wed Apr 07 16:07:50 2004 +0200
@@ -0,0 +1,93 @@
+'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 $'
+! !