--- a/ModalBox.st Thu Jun 02 23:21:42 1994 +0200
+++ b/ModalBox.st Fri Jun 03 02:54:39 1994 +0200
@@ -18,27 +18,42 @@
!
ModalBox comment:'
-
COPYRIGHT (c) 1990 by Claus Gittinger
All Rights Reserved
-
-$Header: /cvs/stx/stx/libview/ModalBox.st,v 1.7 1993-12-20 17:28:57 claus Exp $
-
-written Jan 90 by claus
'!
!ModalBox class methodsFor:'documentation'!
+copyright
+"
+ COPYRIGHT (c) 1990 by Claus Gittinger
+ All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+"
+!
+
+version
+"
+$Header: /cvs/stx/stx/libview/ModalBox.st,v 1.8 1994-06-03 00:53:24 claus Exp $
+"
+!
+
documentation
"
-this class implements modal boxes; ModalBoxes are different from
-others, in that they take complete control over the display, until
-all processing is done (i.e. other views will not get any events
-while the box is active).
+ this class implements modal boxes; ModalBoxes are different from
+ others, in that they take complete control over the display, until
+ all processing is done (i.e. other views will not get any events
+ while the box is active).
-class variables:
+ class variables:
-PopShadow <Boolean> if true, modalBoxes will show a shadow
+ PopShadow <Boolean> if true, modalBoxes will show a shadow
"
! !
@@ -73,7 +88,7 @@
initStyle
super initStyle.
- self is3D ifTrue:[
+ ((style ~~ #normal) and:[style ~~ #mswindows]) ifTrue:[
borderWidth := 0.
self level:2
]
@@ -119,8 +134,10 @@
"take it away from any popup menu possibly still active"
- device ungrabKeyboard.
- ActiveGrab := nil.
+ ActiveGrab notNil ifTrue:[
+ device ungrabKeyboard.
+ ActiveGrab := nil.
+ ].
device grabPointerIn:drawableId.
device ungrabPointer.
@@ -168,6 +185,12 @@
^ (width // 2) @ (height // 2)
!
+open
+ "default for modalboxes is to come up modal"
+
+ ^ self openModal
+!
+
show
"make myself visible (at the last position) and take control"