Merge "Fix Ime Rotation" into tizen_2.1
[platform/framework/native/uifw.git] / inc / FUiAnimVisualElementAnimationGroup.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        FUiAnimVisualElementAnimationGroup.h
20  * @brief       This is the header file for the %VisualElementAnimationGroup class.
21  *
22  * This header file contains the declarations of the %VisualElementAnimationGroup class.
23  */
24
25 #ifndef _FUI_ANIM_VISUAL_ELEMENT_ANIMATION_GROUP_H_
26 #define _FUI_ANIM_VISUAL_ELEMENT_ANIMATION_GROUP_H_
27
28 #include <FUiAnimVisualElementAnimation.h>
29
30
31 namespace Tizen { namespace Ui { namespace Animations
32 {
33
34 class _VisualElementAnimationGroupImpl;
35
36 /**
37  * @class       VisualElementAnimationGroup
38  * @brief       This class is used to group a set of animations together.
39  *
40  * @since       2.0
41  *
42  * The %VisualElementAnimationGroup class is used to group a set of animations together.
43  *
44  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/groups.htm">Groups</a>.
45  */
46 class _OSP_EXPORT_ VisualElementAnimationGroup
47         : public VisualElementAnimation
48 {
49 public:
50
51         /**
52          * This is the default constructor for this class.
53          *
54          * @since       2.0
55          *
56          * @exception   E_SUCCESS               The method is successful.
57          * @exception   E_OUT_OF_MEMORY The memory is insufficient.
58          * @remarks             The specific error code can be accessed using the GetLastResult() method.
59          */
60         VisualElementAnimationGroup(void);
61
62
63         /**
64          * This is the destructor for this class.
65          *
66          * @since       2.0
67          */
68         virtual ~VisualElementAnimationGroup(void);
69
70
71         /**
72          * This is the copy constructor for the %VisualElementAnimationGroup class.
73          *
74          * @since       2.0
75          *
76          * @param[in]   animationGroup  An instance of %VisualElementAnimationGroup
77          * @exception   E_SUCCESS               The method is successful.
78          * @exception   E_OUT_OF_MEMORY The memory is insufficient.
79          * @remarks             The specific error code can be accessed using the GetLastResult() method.
80          */
81         VisualElementAnimationGroup(const VisualElementAnimationGroup& animationGroup);
82
83
84         /**
85          * Assigns the value of the specified instance to the current instance of %VisualElementAnimationGroup.
86          *
87          * @since       2.0
88          *
89          * @param[in]   rhs             An instance of %VisualElementAnimationGroup
90          * @exception   E_SUCCESS               The method is successful.
91          * @exception   E_OUT_OF_MEMORY The memory is insufficient.
92          * @remarks             The specific error code can be accessed using the GetLastResult() method.
93          */
94         VisualElementAnimationGroup& operator =(const VisualElementAnimationGroup& rhs);
95
96
97         /**
98          * Checks whether the specified instance and current instance of %VisualElementAnimationGroup have equal animation values.
99          *
100          * @since       2.0
101          *
102          * @return      @c true if the animation of the two instances of %VisualElementAnimationGroup are equal, @n
103          *                      else @c false
104          * @param[in]   rhs             An instance of %VisualElementAnimationGroup
105          */
106         bool operator ==(const VisualElementAnimationGroup& rhs) const;
107
108
109         /**
110          * Checks whether the specified instance and current instance of %VisualElementAnimationGroup have different animation values.
111          *
112          * @since       2.0
113          *
114          * @return      @c true if the values of the animations of the two instances of %VisualElementAnimationGroup are not equal, @n
115          *                      else @c false
116          * @param[in]   rhs             An instance of %VisualElementAnimationGroup
117          */
118         bool operator !=(const VisualElementAnimationGroup& rhs) const;
119
120
121         /**
122          * Checks whether the value of the current instance of %VisualElementAnimationGroup equals the value of the specified instance.
123          *
124          * @since       2.0
125          *
126          * @return      @c true if the value of the current instance equals the value of the specified instance, @n
127          *               else @c false
128          * @param[in]   obj             An instance of %VisualElementAnimationGroup
129          * @remarks     The %VisualElementAnimationGroup class has a semantic value that means this method checks whether the two instances have the same animation.
130          */
131         virtual bool Equals(const Tizen::Base::Object& obj) const;
132
133
134         /**
135          * Gets the hash value of the current instance.
136          *
137          * @since       2.0
138          *
139          * @return      The hash value of the current instance
140          * @remarks    The two equal instances must return the same hash value.
141          *              For better performance, the used hash function must generate a random distribution for all inputs.
142          */
143         virtual int GetHashCode(void) const;
144
145         /**
146          * Gets the copied instance of the class.
147          *
148          * @since   2.0
149          *
150          * @return      An instance of VisualElementAnimation
151          * @exception   E_SUCCESS               The method is successful.
152          * @exception   E_OUT_OF_MEMORY         The memory is insufficient.
153          * @remarks             The specific error code can be accessed using the GetLastResult() method.
154          */
155         virtual VisualElementAnimation* CloneN(void) const;
156
157
158         /**
159          * Gets the number of animations currently stored in a group.
160          *
161          * @since       2.0
162          *
163          * @return      The total number of animations stored in a group
164          * @remarks             If an error occurs, the return value is @c -1. @n
165          *                              An element of %VisualElementAnimationGroup is counted as one.
166          */
167         int GetAnimationCount(void) const;
168
169
170         /**
171          * Adds the specified @c animation to the animation group without key name.
172          *
173          * @since       2.0
174          *
175          * @return      An error code
176          * @param[in]   animation               An instance of VisualElementAnimation
177          * @exception   E_SUCCESS               The method is successful.
178          * @exception   E_OUT_OF_MEMORY         The memory is insufficient.
179          * @see         RemoveAnimationAt()
180          */
181         result AddAnimation(const VisualElementAnimation& animation);
182
183
184         /**
185          * Removes an animation from the group.
186          *
187          * @since       2.0
188          *
189          * @return      An error code
190          * @param[in]   index                   The index of the animation
191          * @exception   E_SUCCESS               The method is successful.
192          * @exception   E_OUT_OF_RANGE          The specified @c index is out of range.
193          * @exception   E_OBJ_NOT_FOUND         The specified @c index is not found.
194          * @see         AddAnimation()
195          */
196         result RemoveAnimationAt(int index);
197
198
199         /**
200          * Removes all the animations from the animation group.
201          *
202          * @since       2.0
203          *
204          * @see         AddAnimation()
205          * @see         RemoveAnimationAt()
206          */
207         void RemoveAllAnimations(void);
208
209
210         /**
211          * Gets an animation from the group.
212          *
213          * @since       2.0
214          *
215          * @return      An animation for the specified @c index in the animation group, @n
216          *                      else @c null if the animation does not exist
217          * @param[in]   index                   The index of the animation
218          * @exception   E_SUCCESS               The method is successful.
219          * @exception   E_OUT_OF_RANGE          The specified @c index is out of range.
220          * @exception   E_OBJ_NOT_FOUND         The animation is not found.
221          * @remarks             The specific error code can be accessed using the GetLastResult() method. @n
222          *                              This method allocates a Tizen::Ui::Animations::VisualElementAnimation.
223          *                              It is the developer's responsibility to deallocate the animation after use.
224          * @see         AddAnimation()
225          * @see         RemoveAnimationAt()
226          * @see         RemoveAllAnimations()
227          */
228         VisualElementAnimation* GetAnimationAtN(int index) const;
229
230
231 protected:
232
233         friend class _VisualElementAnimationGroupImpl;
234 };              // VisualElementAnimationGroup
235
236
237 }}}             // Tizen::Ui::Animations
238
239 #endif  // _FUI_ANIM_VISUAL_ELEMENT_ANIMATION_GROUP_H_