|
|
@@ -7,10 +7,10 @@ class GestureTracker(Logger):
|
|
|
changing the state of touch points.
|
|
|
"""
|
|
|
# Supported gesture types
|
|
|
- __gesture_types__ = []
|
|
|
+ gesture_types = []
|
|
|
|
|
|
# Configurable properties (see configure() method)
|
|
|
- __configurable__ = []
|
|
|
+ configurable = []
|
|
|
|
|
|
def __init__(self, window=None):
|
|
|
# Hashmap of gesture types
|
|
|
@@ -25,7 +25,7 @@ class GestureTracker(Logger):
|
|
|
single gesture type. Optionally, (keyword) arguments that will be
|
|
|
passed to the handler along with a Gesture object can be specified.
|
|
|
"""
|
|
|
- if gesture_type not in self.__gesture_types__:
|
|
|
+ if gesture_type not in self.gesture_types:
|
|
|
raise ValueError('Unsupported gesture type "%s".' % gesture_type)
|
|
|
|
|
|
h = handler, args, kwargs
|
|
|
@@ -60,7 +60,7 @@ class GestureTracker(Logger):
|
|
|
|
|
|
def configure(self, **kwargs):
|
|
|
for name, value in kwargs.iteritems():
|
|
|
- if name not in self.__configurable__:
|
|
|
+ if name not in self.configurable:
|
|
|
raise ValueError('%s.%s is not a configurable property.'
|
|
|
% (self.__class__.__name__, name))
|
|
|
|
|
|
@@ -73,7 +73,7 @@ class GestureTracker(Logger):
|
|
|
instead of:
|
|
|
tracker.bind('gesture', ...)
|
|
|
"""
|
|
|
- if name not in self.__gesture_types__:
|
|
|
+ if name not in self.gesture_types:
|
|
|
raise AttributeError("'%s' has no attribute '%s'"
|
|
|
% (self.__class__.__name__, name))
|
|
|
|