VisualPart.st
changeset 4208 5c2ffd6cd55b
parent 4025 6dec06844424
child 4351 bd8abc04c675
--- a/VisualPart.st	Mon Oct 29 13:00:49 2018 +0100
+++ b/VisualPart.st	Wed Oct 31 12:39:07 2018 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 2002 by eXept Software AG
               All Rights Reserved
@@ -65,6 +67,18 @@
 
 !VisualPart methodsFor:'accessing'!
 
+beInvisible
+    self visibilityHolder value:false
+
+    "Created: / 31-10-2018 / 12:37:46 / Claus Gittinger"
+!
+
+beVisible
+    self visibilityHolder value:true
+
+    "Created: / 31-10-2018 / 12:37:39 / Claus Gittinger"
+!
+
 container
     "return my container"
 
@@ -82,6 +96,14 @@
     "Created: 9.5.1996 / 00:31:41 / cg"
 !
 
+drawableId
+    "return the drawableId of where I am in"
+
+    ^ container drawableId
+
+    "Created: / 31-10-2018 / 12:36:40 / Claus Gittinger"
+!
+
 extentHolder
     ^ extentHolder
 !
@@ -93,12 +115,13 @@
 !
 
 graphicsContext
-    "return the graphicsContext"
+    "return the graphicsContext of where I am in"
 
     ^ container graphicsContext
 
-    "Created: 9.5.1996 / 00:32:12 / cg"
-    "Modified: 9.5.1996 / 01:37:10 / cg"
+    "Created: / 09-05-1996 / 00:32:12 / cg"
+    "Modified: / 09-05-1996 / 01:37:10 / cg"
+    "Modified (comment): / 31-10-2018 / 12:36:48 / Claus Gittinger"
 !
 
 graphicsDevice
@@ -148,13 +171,21 @@
 !
 
 visibilityHolder
+    visibilityHolder isNil ifTrue:[
+        visibilityHolder := true asValue.
+        visibilityHolder addDependent:self.
+    ].        
     ^ visibilityHolder
+
+    "Modified: / 31-10-2018 / 12:38:51 / Claus Gittinger"
 !
 
-visibilityHolder:something
-    visibilityHolder removeDependent:self.
-    visibilityHolder := something.
+visibilityHolder:newHolder
+    visibilityHolder notNil ifTrue:[visibilityHolder removeDependent:self].
+    visibilityHolder := newHolder.
     visibilityHolder notNil ifTrue:[ visibilityHolder addDependent:self].
+
+    "Modified: / 31-10-2018 / 12:38:17 / Claus Gittinger"
 ! !
 
 !VisualPart methodsFor:'accessing-channels'!