2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.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
9 // http://www.apache.org/licenses/LICENSE-2.0/
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.
19 * @file FUiAnimVisualElementAnimationGroup.h
20 * @brief This is the header file for the %VisualElementAnimationGroup class.
22 * This header file contains the declarations of the %VisualElementAnimationGroup class.
25 #ifndef _FUI_ANIM_VISUAL_ELEMENT_ANIMATION_GROUP_H_
26 #define _FUI_ANIM_VISUAL_ELEMENT_ANIMATION_GROUP_H_
28 #include <FUiAnimVisualElementAnimation.h>
31 namespace Tizen { namespace Ui { namespace Animations
34 class _VisualElementAnimationGroupImpl;
37 * @class VisualElementAnimationGroup
38 * @brief This class is used to group a set of animations together.
42 * The %VisualElementAnimationGroup class is used to group a set of animations together.
44 * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/groups.htm">Groups</a>.
46 class _OSP_EXPORT_ VisualElementAnimationGroup
47 : public VisualElementAnimation
52 * This is the default constructor for this class.
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.
60 VisualElementAnimationGroup(void);
64 * This is the destructor for this class.
68 virtual ~VisualElementAnimationGroup(void);
72 * This is the copy constructor for the %VisualElementAnimationGroup class.
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.
81 VisualElementAnimationGroup(const VisualElementAnimationGroup& animationGroup);
85 * Assigns the value of the specified instance to the current instance of %VisualElementAnimationGroup.
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.
94 VisualElementAnimationGroup& operator =(const VisualElementAnimationGroup& rhs);
98 * Checks whether the specified instance and current instance of %VisualElementAnimationGroup have equal animation values.
102 * @return @c true if the animation of the two instances of %VisualElementAnimationGroup are equal, @n
104 * @param[in] rhs An instance of %VisualElementAnimationGroup
106 bool operator ==(const VisualElementAnimationGroup& rhs) const;
110 * Checks whether the specified instance and current instance of %VisualElementAnimationGroup have different animation values.
114 * @return @c true if the values of the animations of the two instances of %VisualElementAnimationGroup are not equal, @n
116 * @param[in] rhs An instance of %VisualElementAnimationGroup
118 bool operator !=(const VisualElementAnimationGroup& rhs) const;
122 * Checks whether the value of the current instance of %VisualElementAnimationGroup equals the value of the specified instance.
126 * @return @c true if the value of the current instance equals the value of the specified instance, @n
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.
131 virtual bool Equals(const Tizen::Base::Object& obj) const;
135 * Gets the hash value of the current instance.
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.
143 virtual int GetHashCode(void) const;
146 * Gets the copied instance of the class.
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.
155 virtual VisualElementAnimation* CloneN(void) const;
159 * Gets the number of animations currently stored in a group.
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.
167 int GetAnimationCount(void) const;
171 * Adds the specified @c animation to the animation group without key name.
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()
181 result AddAnimation(const VisualElementAnimation& animation);
185 * Removes an animation from the group.
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()
196 result RemoveAnimationAt(int index);
200 * Removes all the animations from the animation group.
204 * @see AddAnimation()
205 * @see RemoveAnimationAt()
207 void RemoveAllAnimations(void);
211 * Gets an animation from the group.
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()
228 VisualElementAnimation* GetAnimationAtN(int index) const;
233 friend class _VisualElementAnimationGroupImpl;
234 }; // VisualElementAnimationGroup
237 }}} // Tizen::Ui::Animations
239 #endif // _FUI_ANIM_VISUAL_ELEMENT_ANIMATION_GROUP_H_