X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fscroll-bar%2Fscroll-bar-impl.cpp;h=7056b0c1a6b29c11272d3ef75bcdd9b6ba1685e6;hb=3a2dfe800fe4ec8214f42b28b3851ea8b8ffc72b;hp=22272428088cf6492b8262dfe2da3bcde384238e;hpb=5e937a6322849b76d49d5b3f41cb5d91c94acd3e;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.cpp b/dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.cpp index 2227242..7056b0c 100755 --- a/dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.cpp +++ b/dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 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. @@ -22,7 +22,6 @@ #include // for strcmp #include #include -#include #include #include #include @@ -187,7 +186,7 @@ ScrollBar::ScrollBar(Toolkit::ScrollBar::Direction direction) : Control( ControlBehaviour( CONTROL_BEHAVIOUR_DEFAULT ) ), mIndicatorShowAlpha(1.0f), mDirection(direction), - mScrollableObject(WeakHandleBase()), + mScrollableObject(WeakHandle()), mPropertyScrollPosition(Property::INVALID_INDEX), mPropertyMinScrollPosition(Property::INVALID_INDEX), mPropertyMaxScrollPosition(Property::INVALID_INDEX), @@ -215,7 +214,7 @@ ScrollBar::~ScrollBar() void ScrollBar::OnInitialize() { CreateDefaultIndicatorActor(); - Self().SetDrawMode(DrawMode::OVERLAY_2D); + Self().SetProperty( Actor::Property::DRAW_MODE,DrawMode::OVERLAY_2D); } void ScrollBar::SetScrollPropertySource( Handle handle, Property::Index propertyScrollPosition, Property::Index propertyMinScrollPosition, Property::Index propertyMaxScrollPosition, Property::Index propertyScrollContentSize ) @@ -226,7 +225,7 @@ void ScrollBar::SetScrollPropertySource( Handle handle, Property::Index property && propertyMaxScrollPosition != Property::INVALID_INDEX && propertyScrollContentSize != Property::INVALID_INDEX ) { - mScrollableObject = WeakHandleBase(handle); + mScrollableObject = WeakHandle(handle); mPropertyScrollPosition = propertyScrollPosition; mPropertyMinScrollPosition = propertyMinScrollPosition; mPropertyMaxScrollPosition = propertyMaxScrollPosition; @@ -247,7 +246,7 @@ void ScrollBar::CreateDefaultIndicatorActor() indicator.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); indicator.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); indicator.SetStyleName( "ScrollBarIndicator" ); - indicator.SetColorMode( USE_OWN_MULTIPLY_PARENT_COLOR ); + indicator.SetProperty( Actor::Property::COLOR_MODE, USE_OWN_MULTIPLY_PARENT_COLOR ); SetScrollIndicator(indicator); } @@ -295,7 +294,7 @@ Actor ScrollBar::GetScrollIndicator() void ScrollBar::ApplyConstraints() { - Handle scrollableHandle = mScrollableObject.GetBaseHandle(); + Handle scrollableHandle = mScrollableObject.GetHandle(); if( scrollableHandle ) { @@ -307,7 +306,7 @@ void ScrollBar::ApplyConstraints() // Set indicator height according to the indicator's height policy if(mIndicatorHeightPolicy == Toolkit::ScrollBar::Fixed) { - mIndicator.SetSize(Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).width, mIndicatorFixedHeight); + mIndicator.SetProperty( Actor::Property::SIZE, Vector2( Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).width, mIndicatorFixedHeight) ); } else { @@ -338,7 +337,7 @@ void ScrollBar::SetScrollPositionIntervals( const Dali::Vector& positions { mScrollPositionIntervals = positions; - Handle scrollableHandle = mScrollableObject.GetBaseHandle(); + Handle scrollableHandle = mScrollableObject.GetHandle(); if( scrollableHandle ) { @@ -360,7 +359,7 @@ Dali::Vector ScrollBar::GetScrollPositionIntervals() const void ScrollBar::OnScrollPositionIntervalReached(PropertyNotification& source) { // Emit the signal to notify the scroll position crossing - Handle scrollableHandle = mScrollableObject.GetBaseHandle(); + Handle scrollableHandle = mScrollableObject.GetHandle(); if(scrollableHandle) { mScrollPositionIntervalReachedSignal.Emit( scrollableHandle.GetCurrentProperty< float >( mPropertyScrollPosition ) ); @@ -391,7 +390,7 @@ void ScrollBar::ShowIndicator() } else { - mIndicator.SetProperty( DevelActor::Property::OPACITY,mIndicatorShowAlpha); + mIndicator.SetProperty( Actor::Property::OPACITY,mIndicatorShowAlpha); } } @@ -412,7 +411,7 @@ void ScrollBar::HideIndicator() } else { - mIndicator.SetProperty( DevelActor::Property::OPACITY,0.0f); + mIndicator.SetProperty( Actor::Property::OPACITY,0.0f); } } @@ -433,7 +432,7 @@ void ScrollBar::ShowTransientIndicator() } else { - mIndicator.SetProperty( DevelActor::Property::OPACITY,mIndicatorShowAlpha); + mIndicator.SetProperty( Actor::Property::OPACITY,mIndicatorShowAlpha); } mAnimation.AnimateTo( Property( mIndicator, Actor::Property::COLOR_ALPHA ), 0.0f, AlphaFunction::EASE_IN, TimePeriod((mIndicatorShowDuration + mTransientIndicatorDuration), mIndicatorHideDuration) ); @@ -443,7 +442,7 @@ void ScrollBar::ShowTransientIndicator() bool ScrollBar::OnPanGestureProcessTick() { // Update the scroll position property. - Handle scrollableHandle = mScrollableObject.GetBaseHandle(); + Handle scrollableHandle = mScrollableObject.GetHandle(); if( scrollableHandle ) { scrollableHandle.SetProperty(mPropertyScrollPosition, mCurrentScrollPosition); @@ -454,7 +453,7 @@ bool ScrollBar::OnPanGestureProcessTick() void ScrollBar::OnPan( const PanGesture& gesture ) { - Handle scrollableHandle = mScrollableObject.GetBaseHandle(); + Handle scrollableHandle = mScrollableObject.GetHandle(); if(scrollableHandle) { @@ -532,7 +531,7 @@ void ScrollBar::OnSizeSet( const Vector3& size ) { if(mIndicatorHeightPolicy == Toolkit::ScrollBar::Fixed) { - mIndicator.SetSize(size.width, mIndicatorFixedHeight); + mIndicator.SetProperty( Actor::Property::SIZE, Vector2( size.width, mIndicatorFixedHeight ) ); } Control::OnSizeSet( size ); @@ -568,7 +567,7 @@ void ScrollBar::SetIndicatorFixedHeight( float height ) if(mIndicatorHeightPolicy == Toolkit::ScrollBar::Fixed) { - mIndicator.SetSize(Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).width, mIndicatorFixedHeight); + mIndicator.SetProperty( Actor::Property::SIZE, Vector2( Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).width, mIndicatorFixedHeight) ); } }