Updated all header files to new format
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / drag-drop-detector / drag-and-drop-detector-impl.h
old mode 100755 (executable)
new mode 100644 (file)
index 01ca57e..f4c5f82
@@ -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.
  */
 
 // EXTERNAL INCLUDES
+#include <algorithm>
 #include <string>
 #include <vector>
-#include <algorithm>
 
-#include <dali/public-api/object/base-object.h>
 #include <dali/public-api/math/vector2.h>
+#include <dali/public-api/object/base-object.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/devel-api/drag-drop-detector/drag-and-drop-detector.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
-using DragAndDropDetectorPtr = IntrusivePtr< DragAndDropDetector >;
+using DragAndDropDetectorPtr = IntrusivePtr<DragAndDropDetector>;
 
 /**
  * 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<Dali::Toolkit::Control> 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<uint32_t> mFirstEnter;                  //control id indicating if the cursor is enter
-  Dali::PanGestureDetector mPanGestureDetector;       //pangesture for calculating the shadow actor position
+  std::vector<Dali::Toolkit::Control> 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<uint32_t>               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();