Merge "Remove obsolete and non functional SizeChanged signal from actor" into tizen
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / scrollable / scroll-connector-impl.h
index 7545fc5..f9a201e 100644 (file)
@@ -1,21 +1,26 @@
 #ifndef __DALI_TOOLKIT_INTERNAL_SCROLL_CONNECTOR_H__
 #define __DALI_TOOLKIT_INTERNAL_SCROLL_CONNECTOR_H__
 
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://floralicense.org/license/
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an AS IS BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
+/*
+ * Copyright (c) 2014 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <dali/public-api/object/base-object.h>
+#include <dali/public-api/signals/dali-signal.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/scrollable/scroll-connector.h>
@@ -36,9 +41,11 @@ class ScrollConnector : public Dali::BaseObject
 {
 public:
 
-  typedef Toolkit::ScrollConnector::LimitsChangedSignalType LimitsChangedSignalType;
+  typedef Toolkit::ScrollConnector::DomainChangedSignalType DomainChangedSignalType;
+  typedef Toolkit::ScrollConnector::ScrollPositionChangedSignalType ScrollPositionChangedSignalType;
 
   static const Property::Index SCROLL_POSITION;
+  static const Property::Index OVERSHOOT;
 
   /**
    * Create a ScrollConnector.
@@ -47,9 +54,9 @@ public:
   static ScrollConnector* New();
 
   /**
-   * @copydoc Toolkit::ScrollConnector::SetLimits()
+   * @copydoc Toolkit::ScrollConnector::SetScrollDomain()
    */
-  void SetLimits( float min, float max );
+  void SetScrollDomain( float min, float max, float length );
 
   /**
    * @copydoc Toolkit::ScrollConnector::GetMinLimit()
@@ -68,11 +75,40 @@ public:
   }
 
   /**
-   * Signal emitted after the SetLimits() method has been called.
+   * @copydoc Toolkit::ScrollConnector::GetContentLength()
+   */
+  float GetContentLength() const
+  {
+    return mContentLength;
+  }
+
+  /**
+   * @copydoc Toolkit::ScrollConnector::SetScrollPosition()
+   */
+  void SetScrollPosition( float position );
+
+  /**
+   * @copydoc Toolkit::ScrollConnector::GetScrollPosition()
+   */
+  float GetScrollPosition() const
+  {
+    return mScrollPositionObject.GetProperty<float>( Toolkit::ScrollConnector::SCROLL_POSITION );
+  }
+
+  /**
+   * Signal emitted after the SetScrollPosition() method has been called.
+   */
+  ScrollPositionChangedSignalType& ScrollPositionChangedSignal()
+  {
+    return mScrollPositionChangedSignal;
+  }
+
+  /**
+   * Signal emitted after the SetScrollDomain() method has been called.
    */
-  LimitsChangedSignalType& LimitsChangedSignal()
+  DomainChangedSignalType& DomainChangedSignal()
   {
-    return mLimitsChangedSignal;
+    return mDomainChangedSignal;
   }
 
   /**
@@ -106,10 +142,12 @@ private:
 
   Constrainable mScrollPositionObject;
 
-  LimitsChangedSignalType mLimitsChangedSignal;
+  DomainChangedSignalType mDomainChangedSignal;
+  ScrollPositionChangedSignalType mScrollPositionChangedSignal;
 
   float mMinLimit;
   float mMaxLimit;
+  float mContentLength;
 };
 
 } // namespace Internal