ModalBox.st
changeset 393 3504a0adbb2d
parent 371 cc32d8f8bc8d
child 421 7f437da61df1
equal deleted inserted replaced
392:caf4452ec3dd 393:3504a0adbb2d
   459 	Delay waitForSeconds:0.1.
   459 	Delay waitForSeconds:0.1.
   460 	p processExposeEvents   
   460 	p processExposeEvents   
   461     ].
   461     ].
   462 !
   462 !
   463 
   463 
       
   464 hideRequest
       
   465     "hide request from windowGroup (i.e. via Escape key).
       
   466      Can be redefined in subclasses which dont like this"
       
   467 
       
   468     self hide
       
   469 !
       
   470 
   464 mapped
   471 mapped
   465     "wait till visible for grabbing"
   472     "wait till visible for grabbing"
   466 
   473 
   467     super mapped.
   474     super mapped.
   468 
   475 
   506     "
   513     "
   507      show a stop-cursor in the current group
   514      show a stop-cursor in the current group
   508     "
   515     "
   509     mainGroup := WindowGroup activeGroup.
   516     mainGroup := WindowGroup activeGroup.
   510     mainGroup notNil ifTrue:[
   517     mainGroup notNil ifTrue:[
   511         mainGroup := mainGroup mainGroup.
   518 	mainGroup := mainGroup mainGroup.
   512         mainGroup notNil ifTrue:[
   519 	mainGroup notNil ifTrue:[
   513             mainGroup showCursor:(Cursor stop).
   520 	    mainGroup showCursor:(Cursor stop).
   514         ]
   521 	]
   515     ].
   522     ].
   516 
   523 
   517     mainGroup isNil ifTrue:[
   524     mainGroup isNil ifTrue:[
   518         useTransient := false
   525 	useTransient := false
   519     ].
   526     ].
   520 
   527 
   521     useTransient ifTrue:[
   528     useTransient ifTrue:[
   522         mainGroup topViews notNil ifTrue:[
   529 	mainGroup topViews notNil ifTrue:[
   523             mainView := mainGroup topViews first.
   530 	    mainView := mainGroup topViews first.
   524         ].
   531 	].
   525         mainView isNil ifTrue:[
   532 	mainView isNil ifTrue:[
   526             useTransient := false.
   533 	    useTransient := false.
   527         ]
   534 	]
   528     ].
   535     ].
   529 
   536 
   530     useTransient ifTrue:[
   537     useTransient ifTrue:[
   531         shadowView := nil.
   538 	shadowView := nil.
   532     ] ifFalse:[
   539     ] ifFalse:[
   533         shadowView notNil ifTrue:[shadowView realize].
   540 	shadowView notNil ifTrue:[shadowView realize].
   534     ].
   541     ].
   535     self raise.
   542     self raise.
   536 
   543 
   537     useTransient ifTrue:[
   544     useTransient ifTrue:[
   538         device setTransient:drawableId for:(mainView id).
   545 	device setTransient:drawableId for:(mainView id).
   539     ].
   546     ].
   540 
   547 
   541     [
   548     [
   542         super openModal:aBlock inGroup:mainGroup.
   549 	super openModal:aBlock inGroup:mainGroup.
   543     ] valueNowOrOnUnwindDo:[
   550     ] valueNowOrOnUnwindDo:[
   544         "
   551 	"
   545          restore cursors in the main group
   552 	 restore cursors in the main group
   546         "
   553 	"
   547         mainGroup notNil ifTrue:[
   554 	mainGroup notNil ifTrue:[
   548             mainGroup restoreCursors.
   555 	    mainGroup restoreCursors.
   549             mainGroup sensor flushUserEvents.
   556 	    mainGroup sensor flushUserEvents.
   550         ]
   557 	]
   551     ].
   558     ].
   552 
   559 
   553 "/    mainGroup notNil ifTrue:[
   560 "/    mainGroup notNil ifTrue:[
   554 "/        "
   561 "/        "
   555 "/         flush any key & mouse events which arrived
   562 "/         flush any key & mouse events which arrived
   738 ! !
   745 ! !
   739 
   746 
   740 !ModalBox class methodsFor:'documentation'!
   747 !ModalBox class methodsFor:'documentation'!
   741 
   748 
   742 version
   749 version
   743     ^ '$Header: /cvs/stx/stx/libview/ModalBox.st,v 1.34 1996-01-17 12:02:48 cg Exp $'
   750     ^ '$Header: /cvs/stx/stx/libview/ModalBox.st,v 1.35 1996-02-01 19:49:49 cg Exp $'
   744 ! !
   751 ! !
   745 ModalBox initialize!
   752 ModalBox initialize!