mPinchGestureProcessor(),
mTapGestureProcessor(),
mRenderController( renderController ),
- mLongPressDetectorCount(0),
- mPanDetectorCount(0),
- mPinchDetectorCount(0),
- mTapDetectorCount(0),
envOptionMinimumPanDistance(-1),
envOptionMinimumPanEvents(-1)
{
void GestureEventProcessor::ProcessTouchEvent( Scene& scene, const Integration::TouchEvent& event)
{
- if( mLongPressDetectorCount > 0 )
- {
- mLongPressGestureProcessor.ProcessTouch(scene, event);
- }
- if( mPanDetectorCount > 0 )
- {
- mPanGestureProcessor.ProcessTouch(scene, event);
- }
- if( mPinchDetectorCount > 0 )
- {
- mPinchGestureProcessor.ProcessTouch(scene, event);
- }
- if( mTapDetectorCount > 0 )
- {
- mTapGestureProcessor.ProcessTouch(scene, event);
- }
+ mLongPressGestureProcessor.ProcessTouch(scene, event);
+ mPanGestureProcessor.ProcessTouch(scene, event);
+ mPinchGestureProcessor.ProcessTouch(scene, event);
+ mTapGestureProcessor.ProcessTouch(scene, event);
}
void GestureEventProcessor::AddGestureDetector(GestureDetector* gestureDetector, Scene& scene)
{
LongPressGestureDetector* longPress = static_cast<LongPressGestureDetector*>(gestureDetector);
mLongPressGestureProcessor.AddGestureDetector(longPress, scene);
- mLongPressDetectorCount++;
break;
}
{
PanGestureDetector* pan = static_cast<PanGestureDetector*>(gestureDetector);
mPanGestureProcessor.AddGestureDetector(pan, scene, envOptionMinimumPanDistance, envOptionMinimumPanEvents);
- mPanDetectorCount++;
break;
}
{
PinchGestureDetector* pinch = static_cast<PinchGestureDetector*>(gestureDetector);
mPinchGestureProcessor.AddGestureDetector(pinch, scene);
- mPinchDetectorCount++;
break;
}
{
TapGestureDetector* tap = static_cast<TapGestureDetector*>(gestureDetector);
mTapGestureProcessor.AddGestureDetector(tap, scene);
- mTapDetectorCount++;
break;
}
}
{
LongPressGestureDetector* longPress = static_cast<LongPressGestureDetector*>(gestureDetector);
mLongPressGestureProcessor.RemoveGestureDetector(longPress);
- mLongPressDetectorCount--;
break;
}
{
PanGestureDetector* pan = static_cast<PanGestureDetector*>(gestureDetector);
mPanGestureProcessor.RemoveGestureDetector(pan);
- mPanDetectorCount--;
break;
}
{
PinchGestureDetector* pinch = static_cast<PinchGestureDetector*>(gestureDetector);
mPinchGestureProcessor.RemoveGestureDetector(pinch);
- mPinchDetectorCount--;
break;
}
{
TapGestureDetector* tap = static_cast<TapGestureDetector*>(gestureDetector);
mTapGestureProcessor.RemoveGestureDetector(tap);
- mTapDetectorCount--;
break;
}
}