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 std::string ScrollViewTwistEffect::EFFECT_TIME( "ScrollViewTwistEffect::EFFECT_TIME" );
31 const std::string ScrollViewTwistEffect::EFFECT_REFERENCE( "ScrollViewTwistEffect::EFFECT_REFERENCE" );
32 const std::string ScrollViewTwistEffect::EFFECT_DEPTH( "ScrollViewTwistEffect::EFFECT_DEPTH");
33 const std::string ScrollViewTwistEffect::EFFECT_ACTIVATE( "ScrollViewTwistEffect::EFFECT_ACTIVATE");
35 const float ScrollViewTwistEffect::DEFAULT_MINIMUM_DISTANCE_FOR_SHRINK( 0.0f );
37 ScrollViewTwistEffect ScrollViewTwistEffect::New()
39 return ScrollViewTwistEffect(new Internal::ScrollViewTwistEffect());
42 ScrollViewTwistEffect::ScrollViewTwistEffect()
47 ScrollViewTwistEffect::ScrollViewTwistEffect(Internal::ScrollViewTwistEffect *impl)
48 : ScrollViewEffect(impl)
52 ScrollViewTwistEffect ScrollViewTwistEffect::DownCast( BaseHandle handle )
54 return ScrollViewTwistEffect( dynamic_cast<Internal::ScrollViewTwistEffect*>(handle.GetObjectPtr()) );
57 float ScrollViewTwistEffect::GetMinimumDistanceForShrink() const
59 return GetImpl(*this).GetMinimumDistanceForShrink();
62 void ScrollViewTwistEffect::SetMinimumDistanceForShrink(float distance)
64 GetImpl(*this).SetMinimumDistanceForShrink( distance );
67 void ScrollViewTwistEffect::EnableEffect(bool enableFlag)
69 GetImpl(*this).EnableEffect(enableFlag);
72 void ScrollViewTwistEffect::ApplyToActor( Actor child,
73 bool additionalEffects,
74 const Vector2& angleSwing,
79 GetImpl(*this).ApplyToActor( child,
87 void ScrollViewTwistEffect::SetMaxSwingAngle(const Vector2& maxSwingAngle)
89 GetImpl(*this).SetMaxSwingAngle(maxSwingAngle);
92 void ScrollViewTwistEffect::SetSwingDropOff(const Vector2& dropOff, const Vector2& distance, AlphaFunction function)
94 GetImpl(*this).SetSwingDropOff(dropOff, distance, function);
97 } // namespace Toolkit