Commit 7ac935c6 authored by UVA Multi-touch's avatar UVA Multi-touch

Changed 'def' to 'class' (shame on me in the first place).

parent 5d2ed4f0
......@@ -3,17 +3,19 @@ class GestureEvent(object):
self.gesture = gesture
def TapEvent(GestureEvent):
def __init__(self, x, y):
class TapEvent(GestureEvent):
def __init__(self, x, y, double=False):
super(TapEvent, self).__init__('tap')
self.x = x
self.y = y
self.double = double
def __str__(self):
return '<%s (%s, %s)>' % (self.__class__.__name__, self.x, self.y)
return '<%s (%s, %s)%s>' % (self.__class__.__name__, self.x, self.y,
' double' if self.double else '')
def FlickEvent(GestureEvent):
class FlickEvent(GestureEvent):
def __init__(self, x, y, velocity):
super(FlickEvent, self).__init__('flick')
self.x = x
......@@ -25,7 +27,7 @@ def FlickEvent(GestureEvent):
(self.__class__.__name__, self.x, self.y, self.velocity)
def RotateEvent(GestureEvent):
class RotateEvent(GestureEvent):
def __init__(self, cx, cy, angle, n):
super(RotateEvent, self).__init__('rotate')
self.cx = cx
......@@ -38,7 +40,7 @@ def RotateEvent(GestureEvent):
(self.__class__.__name__, self.x, self.y, self.angle, self.n)
def PinchEvent(GestureEvent):
class PinchEvent(GestureEvent):
def __init__(self, cx, cy, amount, n):
super(RotateEvent, self).__init__('pinch')
self.cx = cx
......@@ -51,7 +53,7 @@ def PinchEvent(GestureEvent):
(self.__class__.__name__, self.x, self.y, self.amount, self.n)
def PanEvent(GestureEvent):
class PanEvent(GestureEvent):
def __init__(self, x, y, dx, dy, n):
super(RotateEvent, self).__init__('pan')
self.x = x
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment