/*
- * 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
namespace Toolkit
{
-const char* const ScrollBar::SCROLL_POSITION_NOTIFIED_SIGNAL_NAME = "scroll-position-notified";
-
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 )
{
}
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 )
{
}
-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()
return GetImpl(*this).GetScrollIndicator();
}
-void ScrollBar::SetPositionNotifications( const std::vector<float>& positions )
+void ScrollBar::SetScrollPositionIntervals( const Dali::Vector<float>& positions )
{
- GetImpl(*this).SetPositionNotifications(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
+{
+ return GetImpl(*this).GetScrollDirection();
}
void ScrollBar::SetIndicatorHeightPolicy( ScrollBar::IndicatorHeightPolicy policy )
GetImpl(*this).SetIndicatorHeightPolicy(policy);
}
-ScrollBar::IndicatorHeightPolicy ScrollBar::GetIndicatorHeightPolicy()
+ScrollBar::IndicatorHeightPolicy ScrollBar::GetIndicatorHeightPolicy() const
{
return GetImpl(*this).GetIndicatorHeightPolicy();
}
GetImpl(*this).SetIndicatorFixedHeight(height);
}
-float ScrollBar::GetIndicatorFixedHeight()
+float ScrollBar::GetIndicatorFixedHeight() const
{
return GetImpl(*this).GetIndicatorFixedHeight();
}
GetImpl(*this).SetIndicatorShowDuration(durationSeconds);
}
-float ScrollBar::GetIndicatorShowDuration()
+float ScrollBar::GetIndicatorShowDuration() const
{
return GetImpl(*this).GetIndicatorShowDuration();
}
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