PopUpView.st
changeset 135 cf8e46015072
parent 89 ea2bf46eb669
child 141 caf4432fae8f
--- a/PopUpView.st	Wed May 03 02:04:18 1995 +0200
+++ b/PopUpView.st	Wed May 03 02:27:48 1995 +0200
@@ -10,7 +10,7 @@
  hereby transferred.
 "
 
-View subclass:#PopUpView
+TopView subclass:#PopUpView
        instanceVariableNames:'shadowView haveControl'
        classVariableNames:'DefaultShadow DefaultLevel DefaultBorderWidth
 			   DefaultBorderColor'
@@ -22,7 +22,7 @@
 COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libview/PopUpView.st,v 1.10 1995-02-06 00:37:38 claus Exp $
+$Header: /cvs/stx/stx/libview/PopUpView.st,v 1.11 1995-05-03 00:25:03 claus Exp $
 '!
 
 !PopUpView class methodsFor:'documentation'!
@@ -43,7 +43,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libview/PopUpView.st,v 1.10 1995-02-06 00:37:38 claus Exp $
+$Header: /cvs/stx/stx/libview/PopUpView.st,v 1.11 1995-05-03 00:25:03 claus Exp $
 "
 !
 
@@ -65,11 +65,15 @@
 !PopUpView class methodsFor:'defaults'!
 
 defaultExtent
-    ^ (Display width // 2) @ (Display height // 2)
+    ^ (Display width // 3) @ (Display height // 3)
 !
 
 updateStyleCache
-    DefaultShadow := StyleSheet at:'popupShadow' default:false.
+    ShadowView isNil ifTrue:[
+	DefaultShadow := false
+    ] ifFalse:[
+	DefaultShadow := StyleSheet at:'popupShadow' default:false.
+    ].
     DefaultLevel := StyleSheet at:'popupLevel'.
     DefaultBorderWidth := StyleSheet at:'popupBorderWidth'.
     DefaultBorderColor := StyleSheet colorAt:'popupBorderColor'.
@@ -78,14 +82,7 @@
 !PopUpView methodsFor:'initialize / release'!
 
 initialize
-    |center|
-
     super initialize.
-
-    center := device center.
-    left := center x - (width // 2).
-    top := center y - (height // 2).
-
     haveControl := false
 !
 
@@ -114,7 +111,7 @@
     ].
 
     DefaultShadow ifTrue:[
-	shadowView := (ShadowView on:device) for:self.
+	shadowView := (ShadowView onDevice:device) for:self.
     ].
 !
 
@@ -246,12 +243,10 @@
 
 !PopUpView methodsFor:'accessing'!
 
-heightIncludingBorder
-    ^ height
-!
+noShadow
+    "turn off the shadow"
 
-widthIncludingBorder
-    ^ width
+    shadowView := nil
 !
 
 createOnTop