2 * Copyright (c) 2020 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #include <dali-toolkit/public-api/controls/scrollable/scrollable.h>
19 #include <dali-toolkit/internal/controls/scrollable/scrollable-impl.h>
29 Scrollable::Scrollable()
33 Scrollable::Scrollable(Internal::Scrollable& implementation)
34 : Control(implementation)
38 Scrollable::Scrollable( Dali::Internal::CustomActor* internal )
41 VerifyCustomActorPointer<Internal::Scrollable>(internal);
44 Scrollable::Scrollable( const Scrollable& handle ) = default;
46 Scrollable::Scrollable( Scrollable&& rhs ) = default;
48 Scrollable& Scrollable::operator=( const Scrollable& handle ) = default;
50 Scrollable& Scrollable::operator=( Scrollable&& rhs ) = default;
52 Scrollable::~Scrollable()
56 Scrollable Scrollable::DownCast( BaseHandle handle )
58 return Control::DownCast<Scrollable, Internal::Scrollable>(handle);
61 Scrollable::ScrollStartedSignalType& Scrollable::ScrollStartedSignal()
63 return GetImpl(*this).ScrollStartedSignal();
66 Scrollable::ScrollUpdatedSignalType& Scrollable::ScrollUpdatedSignal()
68 return GetImpl(*this).ScrollUpdatedSignal();
71 Scrollable::ScrollCompletedSignalType& Scrollable::ScrollCompletedSignal()
73 return GetImpl(*this).ScrollCompletedSignal();
76 bool Scrollable::IsOvershootEnabled() const
78 return GetImpl(*this).IsOvershootEnabled();
81 void Scrollable::SetOvershootEnabled(bool enable)
83 GetImpl(*this).SetOvershootEnabled(enable);
86 void Scrollable::SetOvershootEffectColor( const Vector4& color )
88 GetImpl(*this).SetOvershootEffectColor(color);
91 Vector4 Scrollable::GetOvershootEffectColor() const
93 return GetImpl(*this).GetOvershootEffectColor();
96 void Scrollable::SetOvershootAnimationSpeed( float pixelsPerSecond )
98 GetImpl(*this).SetOvershootAnimationSpeed(pixelsPerSecond);
101 float Scrollable::GetOvershootAnimationSpeed() const
103 return GetImpl(*this).GetOvershootAnimationSpeed();
106 } // namespace Toolkit