Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
multitouch
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
multitouch
Commits
7ac935c6
Commit
7ac935c6
authored
Apr 24, 2012
by
UVA Multi-touch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed 'def' to 'class' (shame on me in the first place).
parent
5d2ed4f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
src/events.py
src/events.py
+9
-7
No files found.
src/events.py
View file @
7ac935c6
...
@@ -3,17 +3,19 @@ class GestureEvent(object):
...
@@ -3,17 +3,19 @@ class GestureEvent(object):
self
.
gesture
=
gesture
self
.
gesture
=
gesture
def
TapEvent
(
GestureEvent
):
class
TapEvent
(
GestureEvent
):
def
__init__
(
self
,
x
,
y
):
def
__init__
(
self
,
x
,
y
,
double
=
False
):
super
(
TapEvent
,
self
).
__init__
(
'tap'
)
super
(
TapEvent
,
self
).
__init__
(
'tap'
)
self
.
x
=
x
self
.
x
=
x
self
.
y
=
y
self
.
y
=
y
self
.
double
=
double
def
__str__
(
self
):
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
):
def
__init__
(
self
,
x
,
y
,
velocity
):
super
(
FlickEvent
,
self
).
__init__
(
'flick'
)
super
(
FlickEvent
,
self
).
__init__
(
'flick'
)
self
.
x
=
x
self
.
x
=
x
...
@@ -25,7 +27,7 @@ def FlickEvent(GestureEvent):
...
@@ -25,7 +27,7 @@ def FlickEvent(GestureEvent):
(
self
.
__class__
.
__name__
,
self
.
x
,
self
.
y
,
self
.
velocity
)
(
self
.
__class__
.
__name__
,
self
.
x
,
self
.
y
,
self
.
velocity
)
def
RotateEvent
(
GestureEvent
):
class
RotateEvent
(
GestureEvent
):
def
__init__
(
self
,
cx
,
cy
,
angle
,
n
):
def
__init__
(
self
,
cx
,
cy
,
angle
,
n
):
super
(
RotateEvent
,
self
).
__init__
(
'rotate'
)
super
(
RotateEvent
,
self
).
__init__
(
'rotate'
)
self
.
cx
=
cx
self
.
cx
=
cx
...
@@ -38,7 +40,7 @@ def RotateEvent(GestureEvent):
...
@@ -38,7 +40,7 @@ def RotateEvent(GestureEvent):
(
self
.
__class__
.
__name__
,
self
.
x
,
self
.
y
,
self
.
angle
,
self
.
n
)
(
self
.
__class__
.
__name__
,
self
.
x
,
self
.
y
,
self
.
angle
,
self
.
n
)
def
PinchEvent
(
GestureEvent
):
class
PinchEvent
(
GestureEvent
):
def
__init__
(
self
,
cx
,
cy
,
amount
,
n
):
def
__init__
(
self
,
cx
,
cy
,
amount
,
n
):
super
(
RotateEvent
,
self
).
__init__
(
'pinch'
)
super
(
RotateEvent
,
self
).
__init__
(
'pinch'
)
self
.
cx
=
cx
self
.
cx
=
cx
...
@@ -51,7 +53,7 @@ def PinchEvent(GestureEvent):
...
@@ -51,7 +53,7 @@ def PinchEvent(GestureEvent):
(
self
.
__class__
.
__name__
,
self
.
x
,
self
.
y
,
self
.
amount
,
self
.
n
)
(
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
):
def
__init__
(
self
,
x
,
y
,
dx
,
dy
,
n
):
super
(
RotateEvent
,
self
).
__init__
(
'pan'
)
super
(
RotateEvent
,
self
).
__init__
(
'pan'
)
self
.
x
=
x
self
.
x
=
x
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment