WindowGroup.st
changeset 3737 52afcf068624
parent 3736 2be34b98b33a
child 3751 274feeb50190
--- a/WindowGroup.st	Tue Sep 24 15:22:58 2002 +0200
+++ b/WindowGroup.st	Wed Sep 25 17:29:17 2002 +0200
@@ -504,9 +504,17 @@
     "Modified: / 9.7.1998 / 18:18:08 / cg"
 !
 
+isInModalLoop
+    "return true, if the receiver has given up control to some other modal windowGroup
+     (i.e. if it has popped up a modal dialog or a popUpMenu)"
+
+    ^ inModalLoop ? false
+!
+
 isModal
-    "return true, if the receiver is in a modal mode
-     (i.e. for a modal box)"
+    "return true, if the receiver is for a modal view
+     (i.e. it is for a modal box, dialog or popUpMenu). 
+     The suspended windowgroup would return true to the isInModalLoop query if this is the case."
 
     ^ isModal
 
@@ -1308,6 +1316,7 @@
                     "/
                     "/ on leave, exit the event loop
                     "/
+                    self closeDownViews.    
                     ^ self
                 ].
 
@@ -1435,6 +1444,18 @@
     ^ LeaveSignal raise
 !
 
+leaveModalLoop
+    "if the receiver has a modal window open (i.e. is in a modalLoop),
+     force him to leave it and proceed as usual.
+     Be warned: this is not a regular (i.e. OK/ESCAPE) the modal box closing."
+
+    self isInModalLoop ifTrue:[
+        LeaveSignal isHandled ifTrue:[
+            self process interruptWith:[LeaveSignal raise]
+        ]
+    ].
+!
+
 processEvents
     "process events from either the damage- or user input queues.
      Abort is assumed to be handled elsewhere."
@@ -2680,7 +2701,7 @@
 !WindowGroup class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/WindowGroup.st,v 1.247 2002-09-24 13:22:58 penk Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/WindowGroup.st,v 1.248 2002-09-25 15:29:17 cg Exp $'
 ! !
 
 WindowGroup initialize!