[AT-SPI] Squashed implementation
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / scrollable / scroll-view / scroll-base-impl.h
index a4b955c..9780e78 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_TOOLKIT_INTERNAL_SCROLL_BASE_H__
-#define __DALI_TOOLKIT_INTERNAL_SCROLL_BASE_H__
+#ifndef DALI_TOOLKIT_INTERNAL_SCROLL_BASE_H
+#define DALI_TOOLKIT_INTERNAL_SCROLL_BASE_H
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -21,7 +21,6 @@
 // EXTERNAL INCLUDES
 // TODO - Replace list with dali-vector.h
 #include <list>
-#include <dali/public-api/animation/active-constraint.h>
 #include <dali/public-api/animation/constraint.h>
 
 // INTERNAL INCLUDES
@@ -79,8 +78,9 @@ public:
      */
     void ApplyConstraint(Constraint constraint)
     {
-      ActiveConstraint activeConstraint = mActor.ApplyConstraint( constraint );
-      mConstraints.push_back( activeConstraint );
+      Constraint clone = constraint.Clone( mActor );
+      clone.Apply();
+      mConstraints.push_back( clone );
     }
 
     /**
@@ -90,17 +90,17 @@ public:
      */
     void RemoveConstraints()
     {
-      std::vector<ActiveConstraint>::iterator it = mConstraints.begin();
-      std::vector<ActiveConstraint>::iterator end = mConstraints.end();
+      std::vector<Constraint>::iterator it = mConstraints.begin();
+      std::vector<Constraint>::iterator end = mConstraints.end();
       for(;it!=end;++it)
       {
-        mActor.RemoveConstraint(*it);
+        it->Remove();
       }
       mConstraints.clear();
     }
 
     Actor mActor;                                     ///< The Actor that this ActorInfo represents.
-    std::vector<ActiveConstraint> mConstraints;       ///< A list keeping track of constraints applied to the actor via this delegate.
+    std::vector<Constraint> mConstraints;       ///< A list keeping track of constraints applied to the actor via this delegate.
   };
 
   typedef IntrusivePtr<ActorInfo> ActorInfoPtr;
@@ -187,9 +187,16 @@ protected:
 protected:
 
   /**
-   * Construct a new ScrollBase.
+   * Removed default costructor.
    */
-  ScrollBase();
+  ScrollBase() = delete;
+
+  /**
+   * @brief Construct a new ScrollBase.
+   *
+   * @param[in] behaviourFlags Flags to enable
+   */
+  ScrollBase( ControlBehaviour behaviourFlags );
 
 protected:
 
@@ -209,4 +216,4 @@ private:
 
 } // namespace Dali
 
-#endif // __DALI_TOOLKIT_INTERNAL_SCROLL_GROUP_H__
+#endif // DALI_TOOLKIT_INTERNAL_SCROLL_BASE_H