Tools__ViewTreeApplication.st
changeset 3168 894c517d8696
parent 3167 95025cd0fbce
child 3169 54d9e27b384d
equal deleted inserted replaced
3167:95025cd0fbce 3168:894c517d8696
  2049     model rootView notNil ifTrue:[
  2049     model rootView notNil ifTrue:[
  2050         model rootView withAllSubViewsDo:[:v | v "redraw; "invalidate].
  2050         model rootView withAllSubViewsDo:[:v | v "redraw; "invalidate].
  2051     ]
  2051     ]
  2052 !
  2052 !
  2053 
  2053 
  2054 doSelectNextOfApplicationClass:aClass startingIn:anItem
  2054 doSelectNextElementStartingIn:anItem forWhich:aBlock
  2055     |startItem firstFound searchNext|
  2055     |startItem firstFound searchNext|
  2056 
  2056 
  2057     startItem  := model last.
  2057     startItem  := model last.
  2058     searchNext := startItem notNil.        
  2058     searchNext := startItem notNil.        
  2059     firstFound := nil.
  2059     firstFound := nil.
  2060 
  2060 
  2061     anItem recursiveDo:[:el|
  2061     anItem recursiveDo:[:el|
  2062         el == startItem ifTrue:[
  2062         el == startItem ifTrue:[
  2063             searchNext := false
  2063             searchNext := false
  2064         ] ifFalse:[
  2064         ] ifFalse:[
  2065             (self resolveApplicationClassFor:el) == aClass ifTrue:[
  2065             (aBlock value:el) ifTrue:[
  2066                 searchNext ifFalse:[^ model selectItem:el].
  2066                 searchNext ifFalse:[^ model selectItem:el].
  2067 
  2067 
  2068                 firstFound isNil ifTrue:[
  2068                 firstFound isNil ifTrue:[
  2069                     firstFound := el
  2069                     firstFound := el
  2070                 ]
  2070                 ]
  2075         self window beep.
  2075         self window beep.
  2076         model selectItem:firstFound
  2076         model selectItem:firstFound
  2077     ].
  2077     ].
  2078 !
  2078 !
  2079 
  2079 
       
  2080 doSelectNextOfApplicationClass:aClass startingIn:anItem
       
  2081     self doSelectNextElementStartingIn:anItem forWhich:[:el | (self resolveApplicationClassFor:el) == aClass].
       
  2082 !
       
  2083 
  2080 doSelectNextOfClass:aClass startingIn:anItem
  2084 doSelectNextOfClass:aClass startingIn:anItem
  2081     |startItem firstFound searchNext|
  2085     self doSelectNextElementStartingIn:anItem forWhich:[:el | el widget class == aClass].
  2082 
       
  2083     startItem  := model last.
       
  2084     searchNext := startItem notNil.        
       
  2085     firstFound := nil.
       
  2086 
       
  2087     anItem recursiveDo:[:el|
       
  2088         el == startItem ifTrue:[
       
  2089             searchNext := false
       
  2090         ] ifFalse:[
       
  2091             el widget class == aClass ifTrue:[
       
  2092                 searchNext ifFalse:[^ model selectItem:el].
       
  2093 
       
  2094                 firstFound isNil ifTrue:[
       
  2095                     firstFound := el
       
  2096                 ]
       
  2097             ]
       
  2098         ]
       
  2099     ].
       
  2100     firstFound notNil ifTrue:[
       
  2101         self window beep.
       
  2102         model selectItem:firstFound
       
  2103     ].
       
  2104 !
  2086 !
  2105 
  2087 
  2106 doUncatchEvents
  2088 doUncatchEvents
  2107     "release the inspected window (no longer catch its events)"
  2089     "release the inspected window (no longer catch its events)"
  2108 
  2090