[dali_1.9.23] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / scrollable / scrollable.cpp
1 /*
2  * Copyright (c) 2020 Samsung Electronics Co., Ltd.
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  *
16  */
17
18 #include <dali-toolkit/public-api/controls/scrollable/scrollable.h>
19 #include <dali-toolkit/internal/controls/scrollable/scrollable-impl.h>
20
21 using namespace Dali;
22
23 namespace Dali
24 {
25
26 namespace Toolkit
27 {
28
29 Scrollable::Scrollable()
30 {
31 }
32
33 Scrollable::Scrollable(Internal::Scrollable& implementation)
34 : Control(implementation)
35 {
36 }
37
38 Scrollable::Scrollable( Dali::Internal::CustomActor* internal )
39 : Control( internal )
40 {
41   VerifyCustomActorPointer<Internal::Scrollable>(internal);
42 }
43
44 Scrollable::Scrollable( const Scrollable& handle ) = default;
45
46 Scrollable::Scrollable( Scrollable&& rhs ) = default;
47
48 Scrollable& Scrollable::operator=( const Scrollable& handle ) = default;
49
50 Scrollable& Scrollable::operator=( Scrollable&& rhs ) = default;
51
52 Scrollable::~Scrollable()
53 {
54 }
55
56 Scrollable Scrollable::DownCast( BaseHandle handle )
57 {
58   return Control::DownCast<Scrollable, Internal::Scrollable>(handle);
59 }
60
61 Scrollable::ScrollStartedSignalType& Scrollable::ScrollStartedSignal()
62 {
63   return GetImpl(*this).ScrollStartedSignal();
64 }
65
66 Scrollable::ScrollUpdatedSignalType& Scrollable::ScrollUpdatedSignal()
67 {
68   return GetImpl(*this).ScrollUpdatedSignal();
69 }
70
71 Scrollable::ScrollCompletedSignalType& Scrollable::ScrollCompletedSignal()
72 {
73   return GetImpl(*this).ScrollCompletedSignal();
74 }
75
76 bool Scrollable::IsOvershootEnabled() const
77 {
78   return GetImpl(*this).IsOvershootEnabled();
79 }
80
81 void Scrollable::SetOvershootEnabled(bool enable)
82 {
83   GetImpl(*this).SetOvershootEnabled(enable);
84 }
85
86 void Scrollable::SetOvershootEffectColor( const Vector4& color )
87 {
88   GetImpl(*this).SetOvershootEffectColor(color);
89 }
90
91 Vector4 Scrollable::GetOvershootEffectColor() const
92 {
93   return GetImpl(*this).GetOvershootEffectColor();
94 }
95
96 void Scrollable::SetOvershootAnimationSpeed( float pixelsPerSecond )
97 {
98   GetImpl(*this).SetOvershootAnimationSpeed(pixelsPerSecond);
99 }
100
101 float Scrollable::GetOvershootAnimationSpeed() const
102 {
103   return GetImpl(*this).GetOvershootAnimationSpeed();
104 }
105
106 } // namespace Toolkit
107
108 } // namespace Dali