StandardSystemView.st
changeset 8288 3ea310460fdd
parent 8149 cda2dc8052e7
child 8394 44c396105bcc
equal deleted inserted replaced
8287:d6e2901d99f9 8288:3ea310460fdd
   486 !StandardSystemView class methodsFor:'startup'!
   486 !StandardSystemView class methodsFor:'startup'!
   487 
   487 
   488 cancelAutoRaise
   488 cancelAutoRaise
   489     "cancel any schedule autoraise action"
   489     "cancel any schedule autoraise action"
   490 
   490 
   491     |b|
   491     |raiseBlock|
   492 
   492 
   493     (b := TimedRaiseAction) notNil ifTrue:[
   493     (raiseBlock := TimedRaiseAction) notNil ifTrue:[
   494 	TimedRaiseAction := nil.
   494         TimedRaiseAction := nil.
   495 	Processor removeTimeoutWithID:b.
   495         Processor removeTimedBlock:raiseBlock.
   496     ].
   496     ].
       
   497 
       
   498     "Modified: / 08-02-2018 / 16:31:38 / stefan"
   497 !
   499 !
   498 
   500 
   499 start
   501 start
   500     "create, realize the view - this topview and all its subviews will
   502     "create, realize the view - this topview and all its subviews will
   501      run as a separate process with its own windowGroup.
   503      run as a separate process with its own windowGroup.
  1099 
  1101 
  1100 scheduleAutoRaiseAfter:ms
  1102 scheduleAutoRaiseAfter:ms
  1101     "bring the window to the front after some delay.
  1103     "bring the window to the front after some delay.
  1102      but not, if my windowGroup is in a modal or popup action"
  1104      but not, if my windowGroup is in a modal or popup action"
  1103 
  1105 
  1104     |wg actionID|
  1106     |wg raiseBlock|
  1105 
  1107 
  1106     (wg := self windowGroup) isNil ifTrue:[^ self].
  1108     (wg := self windowGroup) isNil ifTrue:[^ self].
  1107     wg isInModalLoop ifTrue:[^ self].
  1109     wg isInModalLoop ifTrue:[^ self].
  1108     wg mainGroup isInModalLoop ifTrue:[^ self].
  1110     wg mainGroup isInModalLoop ifTrue:[^ self].
  1109     "/ self isModal ifTrue:[^ self].
  1111     "/ self isModal ifTrue:[^ self].
  1110 
  1112 
  1111     TimedRaiseAction notNil ifTrue:[
  1113     TimedRaiseAction notNil ifTrue:[
  1112 	Processor removeTimeoutWithID:TimedRaiseAction.
  1114         Processor removeTimedBlock:TimedRaiseAction.
  1113     ].
  1115     ].
  1114     TimedRaiseAction := actionID := Processor
  1116     TimedRaiseAction := raiseBlock := [
  1115 			    addTimedBlock:
  1117                     TimedRaiseAction == raiseBlock ifTrue:[
  1116 				[
  1118                         TimedRaiseAction := nil.
  1117 				    TimedRaiseAction == actionID ifTrue:[
  1119                         self sensor pushUserEvent: #delayedAutoRaiseEvent for: self
  1118 					TimedRaiseAction := nil.
  1120                     ].
  1119 					self sensor pushUserEvent: #delayedAutoRaiseEvent for: self
  1121                 ].
  1120 				    ].
  1122 
  1121 				]
  1123     Processor
  1122 			    afterMilliseconds:ms.
  1124         addTimedBlock:raiseBlock
       
  1125         afterMilliseconds:ms.
       
  1126 
       
  1127     "Modified: / 08-02-2018 / 17:48:22 / stefan"
  1123 !
  1128 !
  1124 
  1129 
  1125 showActivity:someMessage
  1130 showActivity:someMessage
  1126     "some activityNotification shalt be communicated to
  1131     "some activityNotification shalt be communicated to
  1127      the user. Forward it to my application (if any).
  1132      the user. Forward it to my application (if any).