Update copyright year to 2015 for public api: toolkit
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / scrollable / scrollable.cpp
1 /*
2  * Copyright (c) 2015 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 )
45 : Control( handle )
46 {
47 }
48
49 Scrollable& Scrollable::operator=( const Scrollable& handle )
50 {
51   if( &handle != this )
52   {
53     Control::operator=( handle );
54   }
55   return *this;
56 }
57
58 Scrollable::~Scrollable()
59 {
60 }
61
62 Scrollable Scrollable::DownCast( BaseHandle handle )
63 {
64   return Control::DownCast<Scrollable, Internal::Scrollable>(handle);
65 }
66
67 Scrollable::ScrollStartedSignalType& Scrollable::ScrollStartedSignal()
68 {
69   return GetImpl(*this).ScrollStartedSignal();
70 }
71
72 Scrollable::ScrollUpdatedSignalType& Scrollable::ScrollUpdatedSignal()
73 {
74   return GetImpl(*this).ScrollUpdatedSignal();
75 }
76
77 Scrollable::ScrollCompletedSignalType& Scrollable::ScrollCompletedSignal()
78 {
79   return GetImpl(*this).ScrollCompletedSignal();
80 }
81
82 bool Scrollable::IsScrollComponentEnabled(Scrollable::ScrollComponentType indicator) const
83 {
84   return GetImpl(*this).IsScrollComponentEnabled(indicator);
85 }
86
87 void Scrollable::EnableScrollComponent(Scrollable::ScrollComponentType indicator)
88 {
89   GetImpl(*this).EnableScrollComponent(indicator);
90 }
91
92 void Scrollable::DisableScrollComponent(Scrollable::ScrollComponentType indicator)
93 {
94   GetImpl(*this).DisableScrollComponent(indicator);
95 }
96
97 void Scrollable::SetOvershootEffectColor( const Vector4& color )
98 {
99   GetImpl(*this).SetOvershootEffectColor(color);
100 }
101
102 Vector4 Scrollable::GetOvershootEffectColor() const
103 {
104   return GetImpl(*this).GetOvershootEffectColor();
105 }
106
107 void Scrollable::SetOvershootAnimationSpeed( float pixelsPerSecond )
108 {
109   GetImpl(*this).SetOvershootAnimationSpeed(pixelsPerSecond);
110 }
111
112 float Scrollable::GetOvershootAnimationSpeed() const
113 {
114   return GetImpl(*this).GetOvershootAnimationSpeed();
115 }
116
117 } // namespace Toolkit
118
119 } // namespace Dali