X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=base%2Fdali-toolkit%2Fpublic-api%2Fcontrols%2Fscrollable%2Fscroll-view%2Fscroll-view.cpp;h=8c3784205f13e56798507a7678052e13b8c86c29;hb=fba034a17645832eecc1ac8544de26add0745a39;hp=ff8fd791b0a1f81e5c2a236eaffc05c7ce303509;hpb=3c09751d4d69591a42a90f107731505c5ccaaa6d;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/base/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.cpp b/base/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.cpp index ff8fd79..8c37842 100644 --- a/base/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.cpp +++ b/base/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.cpp @@ -15,8 +15,14 @@ * */ -#include +// CLASS HEADER #include + +// EXTERNAL INCLUDES +#include + +// INTERNAL INCLUDES +#include #include using namespace Dali; @@ -233,6 +239,10 @@ unsigned int FixedRuler::GetPageFromPosition(float position, bool wrap) const // spacing must be present. if(mEnabled && fabsf(mSpacing) > Math::MACHINE_EPSILON_1) { + if( wrap ) + { + position = WrapInDomain(position, mDomain.min, mDomain.max); + } page = floor((position - mDomain.min) / mSpacing + 0.5f); if(wrap) @@ -269,8 +279,6 @@ const std::string ScrollView::SCROLL_PRE_POSITION_PROPERTY_NAME( "scroll-pre-pos const std::string ScrollView::SCROLL_OVERSHOOT_X_PROPERTY_NAME( "scroll-overshoot-x" ); const std::string ScrollView::SCROLL_OVERSHOOT_Y_PROPERTY_NAME( "scroll-overshoot-y" ); const std::string ScrollView::SCROLL_FINAL_PROPERTY_NAME( "scroll-final" ); -const std::string ScrollView::SCROLL_X_PROPERTY_NAME( "scroll-x" ); -const std::string ScrollView::SCROLL_Y_PROPERTY_NAME( "scroll-y" ); const std::string ScrollView::SCROLL_SCALE_PROPERTY_NAME( "scroll-scale" ); const std::string ScrollView::SCROLL_WRAP_PROPERTY_NAME( "scroll-wrap" ); const std::string ScrollView::SCROLL_PANNING_PROPERTY_NAME( "scroll-panning" ); @@ -385,12 +393,12 @@ void ScrollView::SetRulerY(RulerPtr ruler) void ScrollView::SetRulerScaleX(RulerPtr ruler) { - GetImpl(*this).SetRulerScaleX(ruler); + DALI_LOG_ERROR( "Deprecated" ); } void ScrollView::SetRulerScaleY(RulerPtr ruler) { - GetImpl(*this).SetRulerScaleY(ruler); + DALI_LOG_ERROR( "Deprecated" ); } void ScrollView::SetScrollSensitive(bool sensitive) @@ -488,6 +496,26 @@ void ScrollView::SetFlickSpeedCoefficient(float speed) GetImpl(*this).SetFlickSpeedCoefficient(speed); } +Vector2 ScrollView::GetMinimumDistanceForFlick() const +{ + return GetImpl(*this).GetMinimumDistanceForFlick(); +} + +void ScrollView::SetMinimumDistanceForFlick( const Vector2& distance ) +{ + GetImpl(*this).SetMinimumDistanceForFlick(distance); +} + +float ScrollView::GetMinimumSpeedForFlick() const +{ + return GetImpl(*this).GetMinimumSpeedForFlick(); +} + +void ScrollView::SetMinimumSpeedForFlick( float speed ) +{ + GetImpl(*this).SetMinimumSpeedForFlick(speed); +} + float ScrollView::GetMaxFlickSpeed() const { return GetImpl(*this).GetMaxFlickSpeed(); @@ -520,7 +548,8 @@ void ScrollView::SetScrollPosition(const Vector3& position) Vector3 ScrollView::GetCurrentScrollScale() const { - return GetImpl(*this).GetCurrentScrollScale(); + DALI_LOG_ERROR( "Deprecated" ); + return Vector3::ONE; } unsigned int ScrollView::GetCurrentPage() const @@ -530,12 +559,16 @@ unsigned int ScrollView::GetCurrentPage() const void ScrollView::TransformTo(const Vector3& position, const Vector3& scale, float rotation) { - GetImpl(*this).TransformTo(position, scale, rotation); + DALI_LOG_ERROR( "Deprecated" ); + + GetImpl(*this).TransformTo(position); } void ScrollView::TransformTo(const Vector3& position, const Vector3& scale, float rotation, float duration) { - GetImpl(*this).TransformTo(position, scale, rotation, duration); + DALI_LOG_ERROR( "Deprecated" ); + + GetImpl(*this).TransformTo(position, duration); } void ScrollView::ScrollTo(const Vector3 &position) @@ -586,12 +619,12 @@ bool ScrollView::ScrollToSnapPoint() void ScrollView::ScaleTo(const Vector3 &scale) { - GetImpl(*this).ScaleTo(scale); + DALI_LOG_ERROR( "Deprecated" ); } void ScrollView::ScaleTo(const Vector3 &scale, float duration) { - GetImpl(*this).ScaleTo(scale, duration); + DALI_LOG_ERROR( "Deprecated" ); } void ScrollView::ApplyConstraintToChildren(Constraint constraint)