Beispiel #1
0
 def __moveHandler(self, offset):
     self.__addLoupe()
     event = player.getCurrentEvent()
     eventPos = self.getRelPos(event.pos)
     if ((-1 <= eventPos[0] <= self.size[0]) and (0 <= eventPos[1] <= self.size[1])):
         self.__updateCursorPosition(event)
     else:
         self.__upHandler(None)
 def __moveHandler(self, offset):
     self.__addLoupe()
     event = player.getCurrentEvent()
     eventPos = self.getRelPos(event.pos)
     if (-1 <= eventPos[0] <= self.size[0]) and (0 <= eventPos[1] <= self.size[1]):
         self.__updateCursorPosition(event)
     else:
         self.__upHandler(None)
Beispiel #3
0
 def onDown(event):
     self.assert_(event.type == avg.Event.CURSOR_DOWN)
     curEvent = player.getCurrentEvent()
     self.assert_(curEvent.type == avg.Event.CURSOR_DOWN)
     self.assert_(curEvent.when == event.when)
     self.downCalled = True
Beispiel #4
0
 def __detectedHandler(self):
     event = player.getCurrentEvent()
     self.__updateCursorPosition(event)
     self.__timerID = player.setTimeout(1000, self.__addLoupe)
 def __detectedHandler(self):
     event = player.getCurrentEvent()
     self.__updateCursorPosition(event)
     self.__timerID = player.setTimeout(1000, self.__addLoupe)
 def onMotion(offset):
     ui.DragRecognizer(self.image, 
             detectedHandler=onDragStart, moveHandler=onDrag, 
             initialEvent=player.getCurrentEvent())
     self.image.unsubscribe(avg.Node.CURSOR_MOTION, onMotion)