Updated all header files to new format
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / scrollable / bouncing-effect-actor.h
1 #ifndef DALI_TOOLKIT_INTERNAL_BOUNCING_EFFECT_ACTOR_H
2 #define DALI_TOOLKIT_INTERNAL_BOUNCING_EFFECT_ACTOR_H
3
4 /*
5  * Copyright (c) 2021 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22 #include <dali/public-api/actors/actor.h>
23 #include <dali/public-api/object/property.h>
24
25 namespace Dali
26 {
27 namespace Toolkit
28 {
29 namespace Internal
30 {
31 /**
32  * @brief Creates a Dali::Actor to display the bouncing effect for overshoot
33  *
34  * Usage example:
35  * @code
36  *  // create the actor and get the property index for animation
37  *  Property::Index bouncePropertyIndex = Property::INVALID_INDEX;
38  *  Actor bounceActor = CreateBouncingEffectActor( bouncePropertyIndex );
39
40  *  // set size and color
41  *  bounceActor.SetProperty( Actor::Property::SIZE, Vector2(720.f, 42.f );
42  *  bounceActor.SetProperty( Actor::Property::COLOR, Vector4( 0.0,0.64f,0.85f,0.25f ) );
43  *
44  *  // add to stage
45  *  bounceActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
46  *  Stage::GetCurrent().Add(bounceActor);
47
48  *  // start the bouncing animation
49  *  Animation anim = Animation::New(2.0f);
50  *  anim.AnimateTo( Property( bounceActor, bouncePropertyIndex ), 1.f, AlphaFunction::SIN );
51  *  anim.Play();
52  * @endcode
53  *
54  * @param[out] bouncePropertyIndex The property index which controls the bouncing
55  * @return The actor which displays the bouncing effect
56  */
57 Actor CreateBouncingEffectActor(Property::Index& bouncePropertyIndex);
58
59 } // namespace Internal
60
61 } // namespace Toolkit
62
63 } // namespace Dali
64
65 #endif // DALI_TOOLKIT_INTERNAL_BOUNCING_EFFECT_ACTOR_H