--- a/ModalBox.st Wed Oct 13 01:30:35 1993 +0100
+++ b/ModalBox.st Wed Oct 13 01:32:53 1993 +0100
@@ -22,17 +22,33 @@
COPYRIGHT (c) 1990-93 by Claus Gittinger
All Rights Reserved
-this class implements modal boxes; those that take control until all
-processing is done.
+%W% %E%
+
+written Jan 90 by claus
+'!
+
+!ModalBox class methodsFor:'documentation'!
+
+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).
class variables:
PopShadow <Boolean> if true, modalBoxes will show a shadow
-%W% %E%
+"
+! !
+
+!ModalBox class methodsFor:'initialization'!
-written Jan 90 by claus
-'!
+initialize
+ super initialize.
+ PopShadow := self classResources name:'POPUP_SHADOW' default:false
+! !
!ModalBox class methodsFor:'instance creation'!
@@ -40,27 +56,17 @@
^ super on:ModalDisplay
! !
-!ModalBox class methodsFor:'initialization'!
-
-initialize
- super initialize.
- PopShadow := Resource name:'POPUP_SHADOW'
- default:View3D
- fromFile:'Smalltalk.rs'
-! !
-
!ModalBox methodsFor:'initialize / release'!
initialize
super initialize.
- resources := ResourcePack fromFile:'Boxes.rs'.
-
haveControl := false.
self is3D ifTrue:[
borderWidth := 0.
self level:2
].
+
PopShadow ifTrue:[
shadowView := (ShadowView on:device) for:self
]
@@ -84,7 +90,9 @@
create
super create.
- self saveUnder:true
+ PopShadow ifFalse:[
+ self saveUnder:true
+ ]
!
createOnTop
@@ -147,10 +155,10 @@
hide
"make myself invisible and leave control"
- shadowView notNil ifTrue:[shadowView unrealize].
self unrealize.
device synchronizeOutput.
- self leaveControl
+ shadowView notNil ifTrue:[shadowView unrealize].
+ self leaveControl.
! !
!ModalBox methodsFor:'private'!