2 * Copyright (c) 2014 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 const std::string Scrollable::SCROLL_RELATIVE_POSITION_PROPERTY_NAME( "scroll-relative-position" );
30 const std::string Scrollable::SCROLL_POSITION_MIN_PROPERTY_NAME( "scroll-position-min" );
31 const std::string Scrollable::SCROLL_POSITION_MAX_PROPERTY_NAME( "scroll-position-max" );
32 const std::string Scrollable::SCROLL_DIRECTION_PROPERTY_NAME( "scroll-direction" );
34 Scrollable::Scrollable()
38 Scrollable::Scrollable(Internal::Scrollable& implementation)
39 : Control(implementation)
43 Scrollable::Scrollable( Dali::Internal::CustomActor* internal )
46 VerifyCustomActorPointer<Internal::Scrollable>(internal);
49 Scrollable::Scrollable( const Scrollable& handle )
54 Scrollable& Scrollable::operator=( const Scrollable& handle )
58 Control::operator=( handle );
63 Scrollable::~Scrollable()
67 Scrollable Scrollable::DownCast( BaseHandle handle )
69 return Control::DownCast<Scrollable, Internal::Scrollable>(handle);
72 Scrollable::ScrollStartedSignalType& Scrollable::ScrollStartedSignal()
74 return GetImpl(*this).ScrollStartedSignal();
77 Scrollable::ScrollUpdatedSignalType& Scrollable::ScrollUpdatedSignal()
79 return GetImpl(*this).ScrollUpdatedSignal();
82 Scrollable::ScrollCompletedSignalType& Scrollable::ScrollCompletedSignal()
84 return GetImpl(*this).ScrollCompletedSignal();
87 bool Scrollable::IsScrollComponentEnabled(Scrollable::ScrollComponentType indicator) const
89 return GetImpl(*this).IsScrollComponentEnabled(indicator);
92 void Scrollable::EnableScrollComponent(Scrollable::ScrollComponentType indicator)
94 GetImpl(*this).EnableScrollComponent(indicator);
97 void Scrollable::DisableScrollComponent(Scrollable::ScrollComponentType indicator)
99 GetImpl(*this).DisableScrollComponent(indicator);
102 void Scrollable::SetOvershootEffectColor( const Vector4& color )
104 GetImpl(*this).SetOvershootEffectColor(color);
107 Vector4 Scrollable::GetOvershootEffectColor() const
109 return GetImpl(*this).GetOvershootEffectColor();
112 void Scrollable::SetOvershootAnimationSpeed( float pixelsPerSecond )
114 GetImpl(*this).SetOvershootAnimationSpeed(pixelsPerSecond);
117 float Scrollable::GetOvershootAnimationSpeed() const
119 return GetImpl(*this).GetOvershootAnimationSpeed();
122 } // namespace Toolkit