[dali_1.0.39] Merge branch 'tizen'
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / scrollable / scroll-connector.cpp
index 97721b2..ac15652 100644 (file)
@@ -1,18 +1,19 @@
-//
-// 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) 2015 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.
+ *
+ */
 
 #include <dali-toolkit/public-api/controls/scrollable/scroll-connector.h>
 #include <dali-toolkit/internal/controls/scrollable/scroll-connector-impl.h>
@@ -31,8 +32,6 @@ const char* const ScrollConnector::OVERSHOOT_PROPERTY_NAME       = "overshoot";
 const Property::Index ScrollConnector::SCROLL_POSITION = Internal::ScrollConnector::SCROLL_POSITION;
 const Property::Index ScrollConnector::OVERSHOOT       = Internal::ScrollConnector::OVERSHOOT;
 
-const char* const ScrollConnector::LIMITS_CHANGED_SIGNAL_NAME = "limits-changed";
-
 ScrollConnector ScrollConnector::New()
 {
   return ScrollConnector( Internal::ScrollConnector::New() );
@@ -56,9 +55,9 @@ ScrollConnector ScrollConnector::DownCast( BaseHandle handle )
   return ScrollConnector( dynamic_cast<Internal::ScrollConnector*>(handle.GetObjectPtr()) );
 }
 
-void ScrollConnector::SetLimits( float min, float max )
+void ScrollConnector::SetScrollDomain( float min, float max, float length )
 {
-  GetImpl(*this).SetLimits( min, max );
+  GetImpl(*this).SetScrollDomain( min, max, length );
 }
 
 float ScrollConnector::GetMinLimit() const
@@ -71,14 +70,34 @@ float ScrollConnector::GetMaxLimit() const
   return GetImpl(*this).GetMaxLimit();
 }
 
-Constrainable ScrollConnector::GetScrollPositionObject() const
+float ScrollConnector::GetContentLength() const
+{
+  return GetImpl(*this).GetContentLength();
+}
+
+Handle ScrollConnector::GetScrollPositionObject() const
 {
   return GetImpl(*this).GetScrollPositionObject();
 }
 
-ScrollConnector::LimitsChangedSignalType& ScrollConnector::LimitsChangedSignal()
+void ScrollConnector::SetScrollPosition( float position )
+{
+  GetImpl(*this).SetScrollPosition( position );
+}
+
+float ScrollConnector::GetScrollPosition() const
+{
+  return GetImpl(*this).GetScrollPosition();
+}
+
+ScrollConnector::ScrollPositionChangedSignalType& ScrollConnector::ScrollPositionChangedSignal()
+{
+  return GetImpl(*this).ScrollPositionChangedSignal();
+}
+
+ScrollConnector::DomainChangedSignalType& ScrollConnector::DomainChangedSignal()
 {
-  return GetImpl(*this).LimitsChangedSignal();
+  return GetImpl(*this).DomainChangedSignal();
 }
 
 ScrollConnector::ScrollConnector( Internal::ScrollConnector* impl )