ShowMeHowItWorks.st
changeset 3819 a2f591cb8405
parent 3818 c3fd02d2d975
child 3820 2c48933f35cb
equal deleted inserted replaced
3818:c3fd02d2d975 3819:a2f591cb8405
   455     self assert:(operationsOrNothing isNil or:[operationsOrNothing isSequenceable]).
   455     self assert:(operationsOrNothing isNil or:[operationsOrNothing isSequenceable]).
   456 
   456 
   457     messageView := ActiveHelpView for:xLatedMessage.
   457     messageView := ActiveHelpView for:xLatedMessage.
   458     "/ messageView shapeStyle:#cartoon.
   458     "/ messageView shapeStyle:#cartoon.
   459     [
   459     [
   460         |p top left bot right w h|
   460         |p top left bot right w h screen screenBounds|
   461 
   461 
   462         w := messageView preferredExtent x.
   462         w := messageView preferredExtent x.
   463         h := messageView preferredExtent y.
   463         h := messageView preferredExtent y.
   464 
   464 
   465         p := Screen current pointerPosition.
   465         screen := Screen current.
       
   466 
       
   467         p := screen pointerPosition.
       
   468         screenBounds := screen monitorBoundsAt:p.
       
   469 
   466         left := p x. top := p y.
   470         left := p x. top := p y.
       
   471         "/ try not to cover the thing we want to describe
       
   472         left := left + 50.
       
   473         top := top + 50.
       
   474 
   467         bot := top + h. right := left + w.
   475         bot := top + h. right := left + w.
       
   476 
       
   477         right > screenBounds right ifTrue:[
       
   478             right := screenBounds right.
       
   479             left := right - w.
       
   480         ].
       
   481         bot > screenBounds bottom ifTrue:[
       
   482             bot := screenBounds bottom.
       
   483             top := bot - h.
       
   484         ].
   468 
   485 
   469         messageView origin:(left @ top).
   486         messageView origin:(left @ top).
   470         messageView makeFullyVisible.
   487         messageView makeFullyVisible.
   471         messageView realize.
   488         messageView realize.
   472 
   489