Further Setter/Getter public API removal from Dali::Actor
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / drag-drop-detector / drag-and-drop-detector-impl.cpp
index dcb52fa..06c3156 100755 (executable)
@@ -138,11 +138,11 @@ void DragAndDropDetector::OnPan(Dali::Actor actor, const PanGesture& gesture)
     Vector3 actorPos = control.GetProperty<Vector3>(Dali::Actor::Property::POSITION);
 
     mShadowControl = Dali::Toolkit::Control::New();
-    mShadowControl.SetPosition(actorPos);
-    mShadowControl.SetSize(width, height);
+    mShadowControl.SetProperty( Actor::Property::POSITION, actorPos );
+    mShadowControl.SetProperty( Actor::Property::SIZE, Vector2( width, height ) );
     mShadowControl.SetBackgroundColor(Vector4(0.3f, 0.3f, 0.3f, 0.7f));
-    mShadowControl.SetParentOrigin(control.GetCurrentParentOrigin());
-    mShadowControl.SetAnchorPoint(control.GetCurrentAnchorPoint());
+    mShadowControl.SetProperty( Actor::Property::PARENT_ORIGIN, control.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ) );
+    mShadowControl.SetProperty( Actor::Property::ANCHOR_POINT,control.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ));
     control.GetParent().Add(mShadowControl);
     SetPosition(gesture.screenPosition);
     EmitStartedSignal(control);
@@ -151,7 +151,7 @@ void DragAndDropDetector::OnPan(Dali::Actor actor, const PanGesture& gesture)
   {
       Vector2 screenPosition = gesture.screenPosition;
       control.GetParent().ScreenToLocal(mLocalPosition.x, mLocalPosition.y, screenPosition.x, screenPosition.y);
-      mShadowControl.SetPosition(mLocalPosition.x - mDragLocalPosition.x, mLocalPosition.y - mDragLocalPosition.y);
+      mShadowControl.SetProperty( Actor::Property::POSITION, Vector2(mLocalPosition.x - mDragLocalPosition.x, mLocalPosition.y - mDragLocalPosition.y));
   }
   if(gesture.state == Gesture::Finished)
   {
@@ -199,7 +199,7 @@ bool DragAndDropDetector::OnDrag(Dali::Actor actor, const Dali::TouchData& data)
     {
       SetPosition(data.GetScreenPosition(0));
       ClearContent();
-      SetContent(mDragControl.GetName());
+      SetContent(mDragControl.GetProperty< std::string >( Dali::Actor::Property::NAME ));
       EmitDroppedSignal(control);
     }