X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fevent%2Fevents%2Fpan-gesture-processor.cpp;h=d95fe0f394c032a794a5b1c98982479149af84ae;hb=c114bfe4714e8f02c54b25e381a41d80bdcb2d93;hp=1762821611ea8af75e9a7abb16c074c70813e577;hpb=8426283fe1942a440b1b4907141accf8eb3c6305;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/event/events/pan-gesture-processor.cpp b/dali/internal/event/events/pan-gesture-processor.cpp index 1762821..d95fe0f 100644 --- a/dali/internal/event/events/pan-gesture-processor.cpp +++ b/dali/internal/event/events/pan-gesture-processor.cpp @@ -195,7 +195,7 @@ void PanGestureProcessor::Process( const Integration::PanGestureEvent& panEvent if ( !outsideTouchesRangeEmitters.empty() || !mCurrentPanEmitters.empty() ) { - currentGesturedActor->ScreenToLocal( GetImplementation( mCurrentRenderTask ), actorCoords.x, actorCoords.y, panEvent.currentPosition.x, panEvent.currentPosition.y ); + currentGesturedActor->ScreenToLocal( *mCurrentRenderTask.Get(), actorCoords.x, actorCoords.y, panEvent.currentPosition.x, panEvent.currentPosition.y ); // EmitPanSignal checks whether we have a valid actor and whether the container we are passing in has emitters before it emits the pan. EmitPanSignal( currentGesturedActor, outsideTouchesRangeEmitters, panEvent, actorCoords, Gesture::Finished, mCurrentRenderTask); @@ -238,9 +238,6 @@ void PanGestureProcessor::AddGestureDetector( PanGestureDetector* gestureDetecto mGestureDetectors.push_back(gestureDetector); - // Set the pan scene object on the gesture detector - gestureDetector->SetSceneObject( mSceneObject ); - if (firstRegistration) { mMinTouchesRequired = gestureDetector->GetMinimumTouchesRequired(); @@ -400,6 +397,11 @@ void PanGestureProcessor::SetMultitapSmoothingRange( int value ) mSceneObject->SetMultitapSmoothingRange( value ); } +const SceneGraph::PanGesture& PanGestureProcessor::GetSceneObject() const +{ + return *mSceneObject; +} + void PanGestureProcessor::UpdateDetection() { DALI_ASSERT_DEBUG(!mGestureDetectors.empty()); @@ -444,7 +446,7 @@ void PanGestureProcessor::EmitPanSignal( Actor* actor, const Integration::PanGestureEvent& panEvent, Vector2 localCurrent, Gesture::State state, - Dali::RenderTask renderTask ) + RenderTaskPtr renderTask ) { if ( actor && !gestureDetectors.empty() ) { @@ -455,7 +457,7 @@ void PanGestureProcessor::EmitPanSignal( Actor* actor, pan.screenPosition = panEvent.currentPosition; pan.position = localCurrent; - RenderTask& renderTaskImpl( GetImplementation( renderTask ) ); + RenderTask& renderTaskImpl( *renderTask.Get() ); Vector2 localPrevious; actor->ScreenToLocal( renderTaskImpl, localPrevious.x, localPrevious.y, panEvent.previousPosition.x, panEvent.previousPosition.y ); @@ -530,7 +532,7 @@ bool PanGestureProcessor::CheckGestureDetector( GestureDetector* detector, Actor { // It does, calculate the angle of the pan in local actor coordinates and ensures it fits // the detector's criteria. - RenderTask& renderTaskImpl( GetImplementation( mCurrentRenderTask ) ); + RenderTask& renderTaskImpl = *mCurrentRenderTask.Get(); Vector2 startPosition, currentPosition; actor->ScreenToLocal( renderTaskImpl, startPosition.x, startPosition.y, mPossiblePanPosition.x, mPossiblePanPosition.y ); @@ -592,7 +594,7 @@ void PanGestureProcessor::EmitGestureSignal( Actor* actor, const GestureDetector mCurrentPanEmitters.clear(); ResetActor(); - actor->ScreenToLocal( GetImplementation(mCurrentRenderTask), actorCoordinates.x, actorCoordinates.y, mCurrentPanEvent->currentPosition.x, mCurrentPanEvent->currentPosition.y ); + actor->ScreenToLocal( *mCurrentRenderTask.Get(), actorCoordinates.x, actorCoordinates.y, mCurrentPanEvent->currentPosition.x, mCurrentPanEvent->currentPosition.y ); EmitPanSignal( actor, gestureDetectors, *mCurrentPanEvent, actorCoordinates, mCurrentPanEvent->state, mCurrentRenderTask );