parameters: (self,id,control,event)
docstring: Notifications from the vignette
docstring_summary: Notifications from the vignette
docstring_tokens: Notifications from the vignette
function: def OnGUINotify(self,id,control,event):
          "Notifications from the vignette"
          global scopeSpdUp
          global scopeSpdLeft
          global boolScopeAtTop
          global boolScopeAtBtm
  
          if not boolTwrRaised:
              return
  
          if event != kAction:
              return
          
          btnID = 0
          if isinstance(control,ptGUIControlButton):
              btnID = control.getTagID()
          else:
              #PtDebugPrint("SCOPE GUI: non-button notification")
              return
  
          #PtDebugPrint("tldnPwrTwrPeriscope.OnGUINotify():\tbefore click...left=%f,up=%f,top=%d,btm=%d" % (scopeSpdLeft,scopeSpdUp,boolScopeAtTop,boolScopeAtBtm))
  
          #PtDebugPrint("SCOPE GUI: got a button id = %d" % btnID)
          if btnID == kGUILeftBtn:
              if scopeSpdLeft == scopeSpdLeftMax:
                  return
              scopeSpdLeft = scopeSpdLeft + scopeSpdLeftInc
              if scopeSpdLeft == 0:
                  animScopeLeft.value.stop()
              else:
                  animScopeLeft.value.speed(scopeSpdLeft)
                  animScopeLeft.value.resume()
              self.SDL["scopeSpdLeft"] = (scopeSpdLeft,)
              return
  
          if btnID == kGUIRightBtn:
              if scopeSpdLeft == -scopeSpdLeftMax:
                  return
              scopeSpdLeft = scopeSpdLeft - scopeSpdLeftInc
              if scopeSpdLeft == 0:
                  animScopeLeft.value.stop()
              else:               
                  animScopeLeft.value.speed(scopeSpdLeft)
                  animScopeLeft.value.resume()
              self.SDL["scopeSpdLeft"] = (scopeSpdLeft,)
              return
  
          if btnID == kGUIUpBtn:
              if scopeSpdUp == scopeSpdUpMax or boolScopeAtTop:
                  PtDebugPrint("PERISCOPE: at top or max speed already")
                  return
              scopeSpdUp = scopeSpdUp + scopeSpdUpInc
              if scopeSpdUp == 0:
                  animScopeUp.value.stop()
              else:
                  if scopeSpdUp == scopeSpdUpInc:
                      animScopeUp.value.backwards(0)
                  if scopeSpdUp < 0:
                      animScopeUp.value.speed(-scopeSpdUp)
                  else:
                      animScopeUp.value.speed(scopeSpdUp)
                  animScopeUp.value.resume()
                  if boolScopeAtBtm:
                      boolScopeAtBtm = 0
                      self.SDL["scopeAtBtm"] = (0,)
              self.SDL["scopeSpdUp"] = (scopeSpdUp,)
              return
                      
          if btnID == kGUIDownBtn:
              if scopeSpdUp == -scopeSpdUpMax or boolScopeAtBtm:
                  PtDebugPrint("PERISCOPE: at bottom or max speed already")
                  return
              scopeSpdUp = scopeSpdUp - scopeSpdUpInc
              if scopeSpdUp == 0:
                  animScopeUp.value.stop()
              else:
                  if scopeSpdUp == -scopeSpdUpInc:
                      animScopeUp.value.backwards(1)
                  if scopeSpdUp < 0:
                      animScopeUp.value.speed(-scopeSpdUp)
                  else:
                      animScopeUp.value.speed(scopeSpdUp)
                  animScopeUp.value.resume()
                  if boolScopeAtTop:
                      boolScopeAtTop = 0
                      self.SDL["scopeAtTop"] = (0,)
              self.SDL["scopeSpdUp"] = (scopeSpdUp,)
              return
function_tokens: def OnGUINotify ( self , id , control , event ) : global scopeSpdUp global scopeSpdLeft global boolScopeAtTop global boolScopeAtBtm if not boolTwrRaised : return if event != kAction : return btnID = 0 if isinstance ( control , ptGUIControlButton ) : btnID = control . getTagID ( ) else : #PtDebugPrint("SCOPE GUI: non-button notification") return #PtDebugPrint("tldnPwrTwrPeriscope.OnGUINotify():\tbefore click...left=%f,up=%f,top=%d,btm=%d" % (scopeSpdLeft,scopeSpdUp,boolScopeAtTop,boolScopeAtBtm)) #PtDebugPrint("SCOPE GUI: got a button id = %d" % btnID) if btnID == kGUILeftBtn : if scopeSpdLeft == scopeSpdLeftMax : return scopeSpdLeft = scopeSpdLeft + scopeSpdLeftInc if scopeSpdLeft == 0 : animScopeLeft . value . stop ( ) else : animScopeLeft . value . speed ( scopeSpdLeft ) animScopeLeft . value . resume ( ) self . SDL [ "scopeSpdLeft" ] = ( scopeSpdLeft , ) return if btnID == kGUIRightBtn : if scopeSpdLeft == - scopeSpdLeftMax : return scopeSpdLeft = scopeSpdLeft - scopeSpdLeftInc if scopeSpdLeft == 0 : animScopeLeft . value . stop ( ) else : animScopeLeft . value . speed ( scopeSpdLeft ) animScopeLeft . value . resume ( ) self . SDL [ "scopeSpdLeft" ] = ( scopeSpdLeft , ) return if btnID == kGUIUpBtn : if scopeSpdUp == scopeSpdUpMax or boolScopeAtTop : PtDebugPrint ( "PERISCOPE: at top or max speed already" ) return scopeSpdUp = scopeSpdUp + scopeSpdUpInc if scopeSpdUp == 0 : animScopeUp . value . stop ( ) else : if scopeSpdUp == scopeSpdUpInc : animScopeUp . value . backwards ( 0 ) if scopeSpdUp < 0 : animScopeUp . value . speed ( - scopeSpdUp ) else : animScopeUp . value . speed ( scopeSpdUp ) animScopeUp . value . resume ( ) if boolScopeAtBtm : boolScopeAtBtm = 0 self . SDL [ "scopeAtBtm" ] = ( 0 , ) self . SDL [ "scopeSpdUp" ] = ( scopeSpdUp , ) return if btnID == kGUIDownBtn : if scopeSpdUp == - scopeSpdUpMax or boolScopeAtBtm : PtDebugPrint ( "PERISCOPE: at bottom or max speed already" ) return scopeSpdUp = scopeSpdUp - scopeSpdUpInc if scopeSpdUp == 0 : animScopeUp . value . stop ( ) else : if scopeSpdUp == - scopeSpdUpInc : animScopeUp . value . backwards ( 1 ) if scopeSpdUp < 0 : animScopeUp . value . speed ( - scopeSpdUp ) else : animScopeUp . value . speed ( scopeSpdUp ) animScopeUp . value . resume ( ) if boolScopeAtTop : boolScopeAtTop = 0 self . SDL [ "scopeAtTop" ] = ( 0 , ) self . SDL [ "scopeSpdUp" ] = ( scopeSpdUp , ) return