X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fdrag-drop-detector%2Fdrag-and-drop-detector-impl.h;h=f4c5f8225a1e2c43e8870ede3209796d4bc7efd4;hp=01ca57e12269ab933362dd3899f8b8c68246d853;hb=9ddd5fea6278d06b8874988498c7c4c6508750ba;hpb=f2039d47f9bed8104575da80a2ecf0bb6e37ff8d;ds=sidebyside diff --git a/dali-toolkit/internal/drag-drop-detector/drag-and-drop-detector-impl.h b/dali-toolkit/internal/drag-drop-detector/drag-and-drop-detector-impl.h old mode 100755 new mode 100644 index 01ca57e..f4c5f82 --- a/dali-toolkit/internal/drag-drop-detector/drag-and-drop-detector-impl.h +++ b/dali-toolkit/internal/drag-drop-detector/drag-and-drop-detector-impl.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_DRAG_AND_DROP_DETECTOR_H /* - * Copyright (c) 2020 Samsung Electronics Co., Ltd. + * Copyright (c) 2021 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. @@ -19,12 +19,12 @@ */ // EXTERNAL INCLUDES +#include #include #include -#include -#include #include +#include // INTERNAL INCLUDES #include @@ -33,14 +33,11 @@ namespace Dali { - namespace Toolkit { - namespace Internal { - -using DragAndDropDetectorPtr = IntrusivePtr< DragAndDropDetector >; +using DragAndDropDetectorPtr = IntrusivePtr; /** * This class listens to Drag & Drop events. @@ -48,7 +45,6 @@ using DragAndDropDetectorPtr = IntrusivePtr< DragAndDropDetector >; class DragAndDropDetector : public Dali::BaseObject, public ConnectionTracker { public: - using DragAndDropSignal = Dali::Toolkit::DragAndDropDetector::DragAndDropSignal; // Creation @@ -101,7 +97,7 @@ public: * Sets the dragged content. * @param[in] content A string that represents the content that has been dropped. */ - void SetContent( const std::string& content ); + void SetContent(const std::string& content); /** * Clears the stored content. @@ -111,7 +107,7 @@ public: /** * Sets the position the drop occurred. */ - void SetPosition( const Vector2& screenPosition ); + void SetPosition(const Vector2& screenPosition); /** * Called when a draggable object start drag. @@ -144,7 +140,6 @@ public: void EmitEndedSignal(Dali::Toolkit::Control& control); public: // Signals - /** * @copydoc Dali::Toolkit::DragAndDropDetector::StartedSignal */ @@ -198,7 +193,6 @@ public: void OnPan(Dali::Actor actor, const PanGesture& gesture); private: - // Construction & Destruction /** @@ -212,12 +206,11 @@ private: virtual ~DragAndDropDetector(); // Undefined - DragAndDropDetector( const DragAndDropDetector& ) = delete; - DragAndDropDetector& operator=( DragAndDropDetector& ); + DragAndDropDetector(const DragAndDropDetector&) = delete; + DragAndDropDetector& operator =(DragAndDropDetector&); private: - - std::string mContent; ///< The current Drag & drop content. + std::string mContent; ///< The current Drag & drop content. DragAndDropSignal mStartedSignal; DragAndDropSignal mEnteredSignal; @@ -226,11 +219,11 @@ private: DragAndDropSignal mDroppedSignal; DragAndDropSignal mEndedSignal; - std::vector mControls; //controls attached by Attach interface for drag&drop - Dali::Toolkit::Control mDragControl; //the current drag control - Dali::Toolkit::Control mShadowControl; //a shadow control for indicating where the control is, same size as the dragged control - std::vector mFirstEnter; //control id indicating if the cursor is enter - Dali::PanGestureDetector mPanGestureDetector; //pangesture for calculating the shadow actor position + std::vector mControls; //controls attached by Attach interface for drag&drop + Dali::Toolkit::Control mDragControl; //the current drag control + Dali::Toolkit::Control mShadowControl; //a shadow control for indicating where the control is, same size as the dragged control + std::vector mFirstEnter; //control id indicating if the cursor is enter + Dali::PanGestureDetector mPanGestureDetector; //pangesture for calculating the shadow actor position Vector2 mLocalPosition; Vector2 mDragLocalPosition; @@ -241,12 +234,11 @@ private: } // namespace Internal - // Helpers for public-api forwarding methods inline Internal::DragAndDropDetector& GetImplementation(Dali::Toolkit::DragAndDropDetector& detector) { - DALI_ASSERT_ALWAYS( detector && "DragAndDropDetector handle is empty" ); + DALI_ASSERT_ALWAYS(detector && "DragAndDropDetector handle is empty"); BaseObject& handle = detector.GetBaseObject(); @@ -255,7 +247,7 @@ inline Internal::DragAndDropDetector& GetImplementation(Dali::Toolkit::DragAndDr inline const Internal::DragAndDropDetector& GetImplementation(const Dali::Toolkit::DragAndDropDetector& detector) { - DALI_ASSERT_ALWAYS( detector && "DragAndDropDetector handle is empty" ); + DALI_ASSERT_ALWAYS(detector && "DragAndDropDetector handle is empty"); const BaseObject& handle = detector.GetBaseObject();