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 const char* const Scrollable::SIGNAL_SCROLL_STARTED = "scroll-started";
35 const char* const Scrollable::SIGNAL_SCROLL_COMPLETED = "scroll-completed";
36 const char* const Scrollable::SIGNAL_SCROLL_UPDATED = "scroll-updated";
37 const char* const Scrollable::SIGNAL_SCROLL_CLAMPED = "scroll-clamped";
39 Scrollable::Scrollable()
43 Scrollable::Scrollable(Internal::Scrollable& implementation)
44 : Control(implementation)
48 Scrollable::Scrollable( Dali::Internal::CustomActor* internal )
51 VerifyCustomActorPointer<Internal::Scrollable>(internal);
54 Scrollable::Scrollable( const Scrollable& handle )
59 Scrollable& Scrollable::operator=( const Scrollable& handle )
63 Control::operator=( handle );
68 Scrollable::~Scrollable()
72 Scrollable Scrollable::DownCast( BaseHandle handle )
74 return Control::DownCast<Scrollable, Internal::Scrollable>(handle);
77 Scrollable::ScrollStartedSignalType& Scrollable::ScrollStartedSignal()
79 return GetImpl(*this).ScrollStartedSignal();
82 Scrollable::ScrollUpdatedSignalType& Scrollable::ScrollUpdatedSignal()
84 return GetImpl(*this).ScrollUpdatedSignal();
87 Scrollable::ScrollCompletedSignalType& Scrollable::ScrollCompletedSignal()
89 return GetImpl(*this).ScrollCompletedSignal();
92 Scrollable::ScrollClampedSignalType& Scrollable::ScrollClampedSignal()
94 return GetImpl(*this).ScrollClampedSignal();
97 bool Scrollable::IsScrollComponentEnabled(Scrollable::ScrollComponentType indicator) const
99 return GetImpl(*this).IsScrollComponentEnabled(indicator);
102 void Scrollable::EnableScrollComponent(Scrollable::ScrollComponentType indicator)
104 GetImpl(*this).EnableScrollComponent(indicator);
107 void Scrollable::DisableScrollComponent(Scrollable::ScrollComponentType indicator)
109 GetImpl(*this).DisableScrollComponent(indicator);
112 void Scrollable::SetOvershootEffectColor( const Vector4& color )
114 GetImpl(*this).SetOvershootEffectColor(color);
117 Vector4 Scrollable::GetOvershootEffectColor() const
119 return GetImpl(*this).GetOvershootEffectColor();
122 void Scrollable::SetOvershootAnimationSpeed( float pixelsPerSecond )
124 GetImpl(*this).SetOvershootAnimationSpeed(pixelsPerSecond);
127 float Scrollable::GetOvershootAnimationSpeed() const
129 return GetImpl(*this).GetOvershootAnimationSpeed();
132 } // namespace Toolkit