TopView.st
changeset 908 0fbe814e06ee
parent 907 6bc7254cdd6a
child 909 d2d624d57f61
--- a/TopView.st	Fri Jun 28 10:47:51 1996 +0200
+++ b/TopView.st	Fri Jun 28 10:54:13 1996 +0200
@@ -273,7 +273,44 @@
 
 !TopView methodsFor:'startup'!
 
-openAt:aPosition
+openAt:aPosition transientFor:anotherView
+    "force the view to be opened at some position on the screen
+     AND tell the windowManager to NOT let the user choose a position
+     (i.e. suppress any ghostframe).
+     The view is marked as being a transient (i.e. pop-up) view for
+     anotherView - it will deiconify with it and (on some windowManagers)
+     have no iconify button of its own.
+     Notice, that its up to the windowManager to care for any borders -
+     it seems not deterministic, where the view actually ends up being positioned.
+     Not all windowManagers honor this - some insist on it ..."
+
+    |otherId|
+
+    self create. 
+    anotherView isNil ifTrue:[
+        otherId := drawableId.
+    ] ifFalse:[
+        anotherView create.
+        otherId := anotherView id.
+    ].
+    device setTransient:drawableId for:otherId.
+    self origin:aPosition.
+    self open
+
+    "
+     |v1 v2|
+
+     v1 := StandardSystemView extent:300@300.
+     v2 := StandardSystemView extent:300@300.
+     v1 open.
+     v2 openAt:0@0 transientFor:v1.
+    "
+
+    "Created: 28.6.1996 / 10:51:55 / cg"
+    "Modified: 28.6.1996 / 10:53:19 / cg"
+!
+
+openTransientAt:aPosition
     "force the view to be opened at soem position on the screen
      AND tell the windowManager to NOT let the user choose a position
      (i.e. suppress any ghostframe).
@@ -281,10 +318,7 @@
      it seems not deterministic, where the view actually ends up being positioned.
      Not all windowManagers honor this - some insist on it ..."
 
-    self create.
-    device setTransient:drawableId for:drawableId.
-    self origin:aPosition.
-    self open
+    self openAt:aPosition transientFor:nil
 
     "normal open:
 
@@ -299,10 +333,11 @@
      |v|
 
      v := StandardSystemView extent:300@300.
-     v openAt:10@10
+     v openTransientAt:10@10
     "
 
     "Modified: 28.6.1996 / 10:47:16 / cg"
+    "Created: 28.6.1996 / 10:52:30 / cg"
 !
 
 openWithExtent:anExtent
@@ -407,5 +442,5 @@
 !TopView  class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/TopView.st,v 1.27 1996-06-28 08:47:51 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/TopView.st,v 1.28 1996-06-28 08:54:13 cg Exp $'
 ! !