Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / animations / FUiAnim_AnimationBaseImpl.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://floralicense.org/license/
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 /**
19  * @file        FUiAnim_AnimationBaseImpl.h
20  * @brief       This is the header file for the _AnimationBaseImpl class.
21  *
22  * This header file contains the declarations of the _AnimationBaseImpl class. @n
23  */
24
25 #ifndef _FUI_ANIM_INTERNAL_ANIMATION_BASE_IMPL_H_
26 #define _FUI_ANIM_INTERNAL_ANIMATION_BASE_IMPL_H_
27
28 #include <FBaseColArrayList.h>
29 #include <FBaseFloat.h>
30
31 #include <FUiAnimAnimationBase.h>
32
33
34 namespace Tizen { namespace Ui { namespace Animations
35 {
36
37
38 /**
39  * @class       _AnimationBaseImpl
40  * @brief       This is the header file for the _AnimationBaseImpl class.
41  * @since       2.0
42  *
43  * This header file contains the declarations of the _AnimationBaseImpl class. @n
44  *
45  */
46 class _AnimationBaseImpl
47         : public Tizen::Base::Object
48 {
49 public:
50         /**
51          * Default constructor for %_AnimationBaseImpl class.
52          */
53         _AnimationBaseImpl(AnimationBase* pAnimationBase);
54
55         /**
56          * Destructor for %_AnimationBaseImpl class.
57          */
58         ~_AnimationBaseImpl(void);
59
60         /**
61          * Initializes this instance of Animation with the specified parameters.
62          *
63          * @since                       2.0
64          * @return                      An error code
65          * @exception           E_SUCCESS The method was successful.
66          * @exception           E_SYSTEM Failed to construct.
67          */
68         result Construct(void);
69
70         result RemoveKeyFrame(long time);
71         result RemoveKeyFrameAt(int index);
72         result RemoveAllKeyFrames(void);
73
74         /**
75          *      Compares the timeline values of two Animation instances
76          */
77         bool CompareTimingValues(const AnimationBase& animBase);
78
79         /**
80          *      Calculates actual progress based on timing function
81          */
82         float GetActualProgressValue(long currentTime);
83
84         /**
85          *      The List composing keyframe values
86          */
87         Tizen::Base::Collection::HashMapT< long, Tizen::Base::Object* > keyFrameList;
88
89         /**
90          *      The Bezier Control point - Time1
91          */
92         float controlPointTime1;
93
94         /**
95          *      The Bezier Control point - value 1
96          */
97         float controlPointValue1;
98
99         /**
100          *      The Bezier Control point - Time 2
101          */
102         float controlPointTime2;
103
104         /**
105          *      The Bezier Control point - value 2
106          */
107         float controlPointValue2;
108
109         /**
110          *      The Interpolator type
111          */
112         AnimationInterpolatorType interpolator;
113
114         /**
115          *      The Animation name
116          */
117         Tizen::Base::String animName;
118
119         /**
120          *      The duration of animation in milliseconds
121          */
122         long duration;
123
124         /**
125          *      Offset in milliseconds after the start of the animation
126          */
127         long offset;
128
129         /**
130          *      The delay in milliseconds before animaiton start
131          */
132         long delay;
133
134         /**
135          *      Number of times the animation has to be repeated
136          */
137         long repeatCount;
138
139         /**
140          * AutoReverse the animation after completing the animation
141          */
142         bool autoReverse;
143
144         /**
145          *      Sclae ratio of the animation duration
146          */
147         float scaleRatio;
148
149         /**
150          *      Hold the animation end values or not
151          */
152         bool holdEnd;
153
154 private:
155         //
156         // This method is for internal use only. Using this method can cause behavioral, security-related,
157         // and consistency-related issues in the application.
158         //
159         // This is the assignment operator for this class.
160         //
161         // @since       2.0
162         //
163         _AnimationBaseImpl& operator =(const _AnimationBaseImpl&);
164
165         //
166         // This method is for internal use only. Using this method can cause behavioral, security-related,
167         // and consistency-related issues in the application.
168         //
169         // This is the copy constructor for this class.
170         //
171         // @since        2.0
172         //
173         _AnimationBaseImpl(const _AnimationBaseImpl& rhs);
174
175         //
176         // This method is for internal use only. Using this method can cause behavioral, security-related,
177         // and consistency-related issues in the application.
178         //
179         // @since        2.0
180         //
181         Tizen::Ui::Animations::AnimationBase* __pAnimationBase;
182 };      // _AnimationBaseImpl
183
184 }}}     // Tizen::Ui::Animations
185
186 #endif //_FUI_ANIM_INTERNAL_ANIMATION_BASE_IMPL_H_