2 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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.
17 #include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-effect.h>
18 #include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-twist-effect.h>
19 #include <dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-effect-impl.h>
20 #include <dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-twist-effect-impl.h>
30 const float ScrollViewTwistEffect::DEFAULT_MINIMUM_DISTANCE_FOR_SHRINK( 0.0f );
32 ScrollViewTwistEffect ScrollViewTwistEffect::New()
34 return ScrollViewTwistEffect(new Internal::ScrollViewTwistEffect());
37 ScrollViewTwistEffect::ScrollViewTwistEffect()
42 ScrollViewTwistEffect::ScrollViewTwistEffect(Internal::ScrollViewTwistEffect *impl)
43 : ScrollViewEffect(impl)
47 ScrollViewTwistEffect ScrollViewTwistEffect::DownCast( BaseHandle handle )
49 return ScrollViewTwistEffect( dynamic_cast<Internal::ScrollViewTwistEffect*>(handle.GetObjectPtr()) );
52 float ScrollViewTwistEffect::GetMinimumDistanceForShrink() const
54 return GetImpl(*this).GetMinimumDistanceForShrink();
57 void ScrollViewTwistEffect::SetMinimumDistanceForShrink(float distance)
59 GetImpl(*this).SetMinimumDistanceForShrink( distance );
62 void ScrollViewTwistEffect::EnableEffect(bool enableFlag)
64 GetImpl(*this).EnableEffect(enableFlag);
67 void ScrollViewTwistEffect::ApplyToActor( Actor child,
68 bool additionalEffects,
69 const Vector2& angleSwing,
74 GetImpl(*this).ApplyToActor( child,
82 void ScrollViewTwistEffect::SetMaxSwingAngle(const Vector2& maxSwingAngle)
84 GetImpl(*this).SetMaxSwingAngle(maxSwingAngle);
87 void ScrollViewTwistEffect::SetSwingDropOff(const Vector2& dropOff, const Vector2& distance, AlphaFunction function)
89 GetImpl(*this).SetSwingDropOff(dropOff, distance, function);
92 } // namespace Toolkit