StandardSystemView.st
changeset 6071 536027b2080b
parent 6049 9e2da07eefa9
child 6073 2983eb433ed6
equal deleted inserted replaced
6070:b59176996f5e 6071:536027b2080b
  1005      - for example, if one view is controlling another. These get a chance to redefine this
  1005      - for example, if one view is controlling another. These get a chance to redefine this
  1006      method"
  1006      method"
  1007 
  1007 
  1008     |app|
  1008     |app|
  1009 
  1009 
  1010     "/ if I have an application, let it decide
  1010     "/ not, if my windowGroup is in a modal or popup action
  1011     (app := self application) notNil ifTrue:[
  1011     (self windowGroup notNil
  1012         app autoRaise:self
  1012     and:[ self windowGroup mainGroup isInModalLoop not
  1013     ] ifFalse:[
  1013     and:[ self isModal not ]]) ifTrue:[
  1014         self raise.
  1014         "/ if I have an application, let it decide
  1015     ].
  1015         (app := self application) notNil ifTrue:[
       
  1016             app autoRaise:self
       
  1017         ] ifFalse:[
       
  1018             self raise.
       
  1019         ].
       
  1020     ]
  1016 !
  1021 !
  1017 
  1022 
  1018 focusIn
  1023 focusIn
  1019     "the view got the keyboard focus (via the window manager).
  1024     "the view got the keyboard focus (via the window manager).
  1020      I.e. the mouse was moved out into the topView area - restore the
  1025      I.e. the mouse was moved out into the topView area - restore the
  1052             windowGroup setFocusView:nil.
  1057             windowGroup setFocusView:nil.
  1053             windowGroup focusView:v byTab:nil.
  1058             windowGroup focusView:v byTab:nil.
  1054         ].
  1059         ].
  1055 
  1060 
  1056         "/ optionally bring the window to the front after some delay.
  1061         "/ optionally bring the window to the front after some delay.
       
  1062         "/ but not, if my windowGroup is in a modal or popup action
  1057         (ms := UserPreferences current autoRaiseOnFocusInDelay) notNil ifTrue:[
  1063         (ms := UserPreferences current autoRaiseOnFocusInDelay) notNil ifTrue:[
  1058             TimedRaiseAction notNil ifTrue:[
  1064             (self windowGroup notNil
  1059                 Processor removeTimeoutWithID:TimedRaiseAction.
  1065             and:[ self windowGroup mainGroup isInModalLoop not
  1060             ].
  1066             and:[ self isModal not ]]) ifTrue:[
  1061             TimedRaiseAction := Processor 
  1067                 TimedRaiseAction notNil ifTrue:[
  1062                                     addTimedBlock:
  1068                     Processor removeTimeoutWithID:TimedRaiseAction.
  1063                                         [   TimedRaiseAction := nil.
  1069                 ].
  1064                                             self sensor 
  1070                 TimedRaiseAction := Processor 
  1065                                                 pushUserEvent: #autoRaise 
  1071                                         addTimedBlock:
  1066                                                 for: self 
  1072                                             [   TimedRaiseAction := nil.
  1067                                         ]
  1073                                                 self sensor 
  1068                                     afterMilliseconds:ms.
  1074                                                     pushUserEvent: #autoRaise 
       
  1075                                                     for: self 
       
  1076                                             ]
       
  1077                                         afterMilliseconds:ms.
       
  1078             ]                         
  1069         ].
  1079         ].
  1070     ].
  1080     ].
  1071     super focusIn
  1081     super focusIn
  1072 
  1082 
  1073     "Modified: / 20-01-2011 / 20:51:20 / cg"
  1083     "Modified: / 20-01-2011 / 20:51:20 / cg"
  1628 ! !
  1638 ! !
  1629 
  1639 
  1630 !StandardSystemView class methodsFor:'documentation'!
  1640 !StandardSystemView class methodsFor:'documentation'!
  1631 
  1641 
  1632 version
  1642 version
  1633     ^ '$Header: /cvs/stx/stx/libview/StandardSystemView.st,v 1.205 2013-04-24 14:57:26 cg Exp $'
  1643     ^ '$Header: /cvs/stx/stx/libview/StandardSystemView.st,v 1.206 2013-05-29 17:25:46 cg Exp $'
  1634 !
  1644 !
  1635 
  1645 
  1636 version_CVS
  1646 version_CVS
  1637     ^ '$Header: /cvs/stx/stx/libview/StandardSystemView.st,v 1.205 2013-04-24 14:57:26 cg Exp $'
  1647     ^ '$Header: /cvs/stx/stx/libview/StandardSystemView.st,v 1.206 2013-05-29 17:25:46 cg Exp $'
  1638 ! !
  1648 ! !
  1639 
  1649 
  1640 
  1650 
  1641 StandardSystemView initialize!
  1651 StandardSystemView initialize!