X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fpage-turn-view%2Fpage-turn-view-impl.cpp;h=e258b694b21816f0b71ad9216f650f38ef2cc6a8;hb=81b6946e6eae9989ba04ba164adf9347e85efdfe;hp=8e5613ec45fba01cbde644a0af6481d4776991cf;hpb=ad110f27c01af7e617df158891eef5cf60bf22e6;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/controls/page-turn-view/page-turn-view-impl.cpp b/dali-toolkit/internal/controls/page-turn-view/page-turn-view-impl.cpp index 8e5613e..e258b69 100644 --- a/dali-toolkit/internal/controls/page-turn-view/page-turn-view-impl.cpp +++ b/dali-toolkit/internal/controls/page-turn-view/page-turn-view-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -395,7 +395,7 @@ void PageTurnView::OnInitialize() // create the layer for turning pages mTurningPageLayer = Layer::New(); mTurningPageLayer.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT ); - mTurningPageLayer.SetBehavior(Layer::LAYER_3D); + mTurningPageLayer.SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D ); mTurningPageLayer.Raise(); // Set control size and the parent origin of page layers @@ -413,7 +413,7 @@ void PageTurnView::OnInitialize() mPages[0].actor.SetProperty( Actor::Property::VISIBLE,true); // enable the pan gesture which is attached to the control - EnableGestureDetection(Gesture::Type(Gesture::Pan)); + EnableGestureDetection(GestureType::Value(GestureType::PAN)); } Shader PageTurnView::CreateShader( const Property::Map& shaderMap ) @@ -471,14 +471,14 @@ void PageTurnView::SetupShadowView() mShadowView.Activate(); } -void PageTurnView::OnStageConnection( int depth ) +void PageTurnView::OnSceneConnection( int depth ) { SetupShadowView(); - Control::OnStageConnection( depth ); + Control::OnSceneConnection( depth ); } -void PageTurnView::OnStageDisconnection() +void PageTurnView::OnSceneDisconnection() { if(mShadowView) { @@ -491,7 +491,7 @@ void PageTurnView::OnStageDisconnection() // make sure the status of the control is updated correctly when the pan gesture is interrupted StopTurning(); - Control::OnStageDisconnection(); + Control::OnSceneDisconnection(); } void PageTurnView::SetPageSize( const Vector2& viewPageSize ) @@ -612,19 +612,20 @@ void PageTurnView::RemovePage( int pageIndex ) void PageTurnView::OnPan( const PanGesture& gesture ) { // the pan gesture is attached to control itself instead of each page - switch( gesture.state ) + switch( gesture.GetState() ) { - case Gesture::Started: + case GestureState::STARTED: { // check whether the undergoing turning page number already reaches the maximum allowed if( mPageUpdated && mAnimatingCount< MAXIMUM_TURNING_NUM && mSlidingCount < 1 ) { - SetPanActor( gesture.position ); // determine which page actor is panned + const Vector2& position = gesture.GetPosition(); + SetPanActor( position ); // determine which page actor is panned if( mTurningPageIndex != -1 && mPages[mTurningPageIndex % NUMBER_OF_CACHED_PAGES].actor.GetParent() != Self()) // if the page is added to turning layer,it is undergoing an animation currently { mTurningPageIndex = -1; } - PanStarted( SetPanPosition( gesture.position ) ); // pass in the pan position in the local page coordinate + PanStarted( SetPanPosition( position ) ); // pass in the pan position in the local page coordinate } else { @@ -632,19 +633,19 @@ void PageTurnView::OnPan( const PanGesture& gesture ) } break; } - case Gesture::Continuing: + case GestureState::CONTINUING: { - PanContinuing( SetPanPosition( gesture.position ) ); // pass in the pan position in the local page coordinate + PanContinuing( SetPanPosition( gesture.GetPosition() ) ); // pass in the pan position in the local page coordinate break; } - case Gesture::Finished: - case Gesture::Cancelled: + case GestureState::FINISHED: + case GestureState::CANCELLED: { - PanFinished( SetPanPosition( gesture.position ), gesture.GetSpeed() ); + PanFinished( SetPanPosition( gesture.GetPosition() ), gesture.GetSpeed() ); break; } - case Gesture::Clear: - case Gesture::Possible: + case GestureState::CLEAR: + case GestureState::POSSIBLE: default: { break;