Control::UnregisterVisual does not remove renderers from actor
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / scroll-bar / scroll-bar.cpp
index 8683c02..b55f29c 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * 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.
  *
  */
 
+// CLASS HEADER
 #include <dali-toolkit/public-api/controls/scroll-bar/scroll-bar.h>
+
+// INTERNAL INCLUDES
 #include <dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.h>
 
 namespace Dali
@@ -29,18 +32,18 @@ ScrollBar::ScrollBar()
 }
 
 ScrollBar::ScrollBar(Internal::ScrollBar& implementation)
-: ScrollComponent( implementation )
+: Control( implementation )
 {
 }
 
 ScrollBar::ScrollBar( Dali::Internal::CustomActor* internal )
-: ScrollComponent( internal )
+: Control( internal )
 {
   VerifyCustomActorPointer<Internal::ScrollBar>(internal);
 }
 
-ScrollBar::ScrollBar( const ScrollBar& scrollBar )
-: ScrollComponent( scrollBar )
+ScrollBar::ScrollBar( const ScrollBar& handle )
+: Control( handle )
 {
 }
 
@@ -53,9 +56,9 @@ ScrollBar& ScrollBar::operator=( const ScrollBar& scrollBar )
   return *this;
 }
 
-ScrollBar ScrollBar::New()
+ScrollBar ScrollBar::New(ScrollBar::Direction direction)
 {
-  return Internal::ScrollBar::New();
+  return Internal::ScrollBar::New(direction);
 }
 
 ScrollBar ScrollBar::DownCast( BaseHandle handle )
@@ -67,9 +70,14 @@ ScrollBar::~ScrollBar()
 {
 }
 
-void ScrollBar::SetIndicatorImage( Image image )
+void ScrollBar::SetScrollPropertySource( Handle handle, Dali::Property::Index propertyScrollPosition, Dali::Property::Index propertyMinScrollPosition, Dali::Property::Index propertyMaxScrollPosition, Dali::Property::Index propertyScrollContentSize )
+{
+  GetImpl(*this).SetScrollPropertySource(handle, propertyScrollPosition, propertyMinScrollPosition, propertyMaxScrollPosition, propertyScrollContentSize);
+}
+
+void ScrollBar::SetScrollIndicator( Actor indicator )
 {
-  GetImpl(*this).SetIndicatorImage(image);
+  GetImpl(*this).SetScrollIndicator(indicator);
 }
 
 Actor ScrollBar::GetScrollIndicator()
@@ -77,9 +85,24 @@ Actor ScrollBar::GetScrollIndicator()
   return GetImpl(*this).GetScrollIndicator();
 }
 
-void ScrollBar::SetPositionNotifications( const std::vector<float>& positions )
+void ScrollBar::SetScrollPositionIntervals( const Dali::Vector<float>& positions )
+{
+  GetImpl(*this).SetScrollPositionIntervals(positions);
+}
+
+Dali::Vector<float> ScrollBar::GetScrollPositionIntervals() const
+{
+  return GetImpl(*this).GetScrollPositionIntervals();
+}
+
+void ScrollBar::SetScrollDirection( ScrollBar::Direction direction )
+{
+  GetImpl(*this).SetScrollDirection(direction);
+}
+
+ScrollBar::Direction ScrollBar::GetScrollDirection() const
 {
-  GetImpl(*this).SetPositionNotifications(positions);
+  return GetImpl(*this).GetScrollDirection();
 }
 
 void ScrollBar::SetIndicatorHeightPolicy( ScrollBar::IndicatorHeightPolicy policy )
@@ -87,7 +110,7 @@ void ScrollBar::SetIndicatorHeightPolicy( ScrollBar::IndicatorHeightPolicy polic
   GetImpl(*this).SetIndicatorHeightPolicy(policy);
 }
 
-ScrollBar::IndicatorHeightPolicy ScrollBar::GetIndicatorHeightPolicy()
+ScrollBar::IndicatorHeightPolicy ScrollBar::GetIndicatorHeightPolicy() const
 {
   return GetImpl(*this).GetIndicatorHeightPolicy();
 }
@@ -97,7 +120,7 @@ void ScrollBar::SetIndicatorFixedHeight( float height )
   GetImpl(*this).SetIndicatorFixedHeight(height);
 }
 
-float ScrollBar::GetIndicatorFixedHeight()
+float ScrollBar::GetIndicatorFixedHeight() const
 {
   return GetImpl(*this).GetIndicatorFixedHeight();
 }
@@ -107,7 +130,7 @@ void ScrollBar::SetIndicatorShowDuration( float durationSeconds )
   GetImpl(*this).SetIndicatorShowDuration(durationSeconds);
 }
 
-float ScrollBar::GetIndicatorShowDuration()
+float ScrollBar::GetIndicatorShowDuration() const
 {
   return GetImpl(*this).GetIndicatorShowDuration();
 }
@@ -117,24 +140,29 @@ void ScrollBar::SetIndicatorHideDuration( float durationSeconds )
   GetImpl(*this).SetIndicatorHideDuration(durationSeconds);
 }
 
-float ScrollBar::GetIndicatorHideDuration()
+float ScrollBar::GetIndicatorHideDuration() const
 {
   return GetImpl(*this).GetIndicatorHideDuration();
 }
 
-void ScrollBar::Show()
+void ScrollBar::ShowIndicator()
+{
+  GetImpl(*this).ShowIndicator();
+}
+
+void ScrollBar::HideIndicator()
 {
-  GetImpl(*this).Show();
+  GetImpl(*this).HideIndicator();
 }
 
-void ScrollBar::Hide()
+ScrollBar::PanFinishedSignalType& ScrollBar::PanFinishedSignal()
 {
-  GetImpl(*this).Hide();
+  return GetImpl(*this).PanFinishedSignal();
 }
 
-ScrollBar::ScrollPositionNotifiedSignalType& ScrollBar::ScrollPositionNotifiedSignal()
+ScrollBar::ScrollPositionIntervalReachedSignalType& ScrollBar::ScrollPositionIntervalReachedSignal()
 {
-  return GetImpl(*this).ScrollPositionNotifiedSignal();
+  return GetImpl(*this).ScrollPositionIntervalReachedSignal();
 }
 
 } // namespace Toolkit