X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Fdevel-api%2Flayouting%2Flayout-transition-data.h;h=6b56301aab4fc739f6b617508a7a204659a8b8fc;hp=5bd509a36d80adbf4b184293d97b21b3c7bf1920;hb=118f87dfe57967bfed8ccdf9143a078eaef1b119;hpb=259338bf01cb1d62350be74f4bcc3f43e40bcedb diff --git a/dali-toolkit/devel-api/layouting/layout-transition-data.h b/dali-toolkit/devel-api/layouting/layout-transition-data.h index 5bd509a..6b56301 100644 --- a/dali-toolkit/devel-api/layouting/layout-transition-data.h +++ b/dali-toolkit/devel-api/layouting/layout-transition-data.h @@ -36,6 +36,9 @@ namespace Internal class LayoutTransitionData; } +/** + * @brief The LayoutTransitionData class to collect the actors properties animators for layout transitions. + */ class DALI_TOOLKIT_API LayoutTransitionData final : public BaseHandle { public: @@ -47,27 +50,56 @@ public: { enum Type { - PROPERTY, ///< A property to animate - INITIAL_VALUE, ///< Initial value of an animated property - TARGET_VALUE, ///< Target value of an animated property - ANIMATOR, ///< Animator for an animated property - TYPE, ///< Type of an animator - NAME, ///< Name of an animator - TIME_PERIOD, ///< Time period of an property animation - DURATION, ///< Duration of an property animation - DELAY, ///< Delay of an property animation - ALPHA_FUNCTION, ///< Alpha function of a property animation + CONDITION, ///< A condition triggering the transition animation (the actor is added/removed/focus gained/focus lost) + PROPERTY, ///< A property to animate + INITIAL_VALUE, ///< Initial value of an animated property + TARGET_VALUE, ///< Target value of an animated property + ANIMATOR, ///< Animator for an animated property + TYPE, ///< Type of an animator + NAME, ///< Name of an animator + TIME_PERIOD, ///< Time period of an property animation + DURATION, ///< Duration of an property animation + DELAY, ///< Delay of an property animation + ALPHA_FUNCTION, ///< Alpha function of a property animation + AFFECTS_SIBLINGS, ///< Might change the actor siblings positions etc by updating the actor measured size if the actor size is changed due to the animation. False by default. + }; + }; + + struct Animator + { + enum Type + { + ANIMATE_TO, ///< Animate to property target value + ANIMATE_BY, ///< Animate by property target value + ANIMATE_BETWEEN, ///< Animate between property initial and target values + ANIMATE_PATH ///< Animate using the animation path }; }; - enum LayoutTransitionType + struct Condition { - ON_CHILD_ADD, - ON_CHILD_REMOVE, - ON_OWNER_SET + enum Type + { + NONE, ///< Default, no conditions to animate property. The property is animated for all relevant animations related to a control + ON_ADD, ///< A condition to animate property when a control is added to the container + ON_REMOVE, ///< A condition to animate property when a control is removed from the container + ON_FOCUS_GAINED, ///< A condition to animate property when a control focus is gained + ON_FOCUS_LOST, ///< A condition to animate property when a control focus is lost + }; }; - typedef Signal< void (LayoutTransitionData::LayoutTransitionType, LayoutTransitionData&) > LayoutTransitionSignalType; ///< Transition finished signal + enum Type + { + // Children related transitions + ON_CHILD_ADD, ///< A transition is triggered when a control is added to the container + ON_CHILD_REMOVE, ///< A transition is triggered when a control is removed from the container + ON_CHILD_FOCUS, ///< A transition is triggered when a control focus is changed in the container + // Layout related transitions + ON_OWNER_SET, ///< A transition is triggered when a layout is set to a new container + ON_LAYOUT_CHANGE, ///< A transition is triggered when a layout geometry is changed + }; + + typedef Signal< void (LayoutTransitionData::Type, LayoutTransitionData&) > LayoutTransitionSignalType; ///< Transition finished signal /** * Create an uninitialized handle @@ -102,7 +134,8 @@ public: /** * @brief Add a property animator for an actor * - * @param[in] actor An owner of the animated property + * @param[in] actor An owner of the animated property. + * If actor is empty then the property animator is generic and apply to all children excluding the parent if the condition is met. * @param[in] map The animated property map including animator map */ void AddPropertyAnimator( Actor actor, Property::Map map ); @@ -111,6 +144,7 @@ public: * @brief Add a property animator for an actor * * @param[in] actor An owner of the animated property + * If actor is empty then the property animator is generic and apply to all children excluding the parent if the condition is met. * @param[in] map The properties map * @param[in] keyFrames key frames * @param[in] interpolation An interpolation @@ -121,6 +155,7 @@ public: * @brief Add a property animator for an actor * * @param[in] actor An owner of the animated property + * If actor is empty then the property animator is generic and apply to all children excluding the parent if the condition is met. * @param[in] map A properties map * @param[in] path An animation path * @param[in] forward A forward vector for the path