struct LayoutTransition
{
- LayoutTransition( LayoutItem& layoutItem, int layoutTransitionType )
+ LayoutTransition( LayoutItem& layoutItem, int layoutTransitionType, Actor gainedChild, Actor lostChild )
: layoutItem( &layoutItem )
, layoutTransitionType( layoutTransitionType )
+ , gainedChild( gainedChild )
+ , lostChild( lostChild )
{
}
bool operator==( const LayoutTransition& rhs )
{
- return ( ( layoutItem.Get() == rhs.layoutItem.Get() ) && layoutTransitionType == rhs.layoutTransitionType );
+ return ( layoutItem.Get() == rhs.layoutItem.Get()
+ && layoutTransitionType == rhs.layoutTransitionType
+ && gainedChild == rhs.gainedChild
+ && lostChild == rhs.lostChild );
}
LayoutItemPtr layoutItem;
int layoutTransitionType;
+ Actor gainedChild;
+ Actor lostChild;
};
const float DEFAULT_TRANSITION_DURATION( 0.5f );
struct LayoutDataElement
{
LayoutDataElement()
- : propertyIndex( Property::INVALID_KEY ), animatorIndex( -1 ), positionDataIndex(-1 )
- {
- };
-
- LayoutDataElement( Actor actor, Property::Index propertyIndex, Property::Value value )
- : handle( actor ),
- propertyIndex( propertyIndex ),
- targetValue( value ),
+ : propertyIndex( Property::INVALID_KEY ),
animatorIndex( -1 ),
- positionDataIndex( -1 )
+ positionDataIndex(-1 ),
+ condition( Dali::Toolkit::LayoutTransitionData::Condition::NONE )
{
};
Property::Value targetValue;
int animatorIndex;
int positionDataIndex;
+ int condition;
};
class LayoutTransitionData;
LayoutTransitionData( const LayoutTransitionData& ) = delete;
LayoutTransitionData& operator=( const LayoutTransitionData& ) = delete;
+ /**
+ * @brief Add a property animator for an actor in the transition
+ * @param[in] actor The actor
+ * @param[in] map The map containing the transition animator keys
+ *
+ * This will add the property animator to the list of animators related to this transition
+ */
void AddPropertyAnimator( Actor actor, Property::Map map );
+
+ /**
+ * @brief Add a property animator for an actor in the transition
+ * @param[in] actor The actor
+ * @param[in] map The map containing the transition animator keys
+ * @param[in] keyFrames The key frames used by the property animator
+ * @param[in] interpolation The interpolation used by the property animator
+ *
+ * This will add the property animator to the list of animators related to this transition
+ */
void AddPropertyAnimator( Actor actor, Property::Map map, KeyFrames keyFrames, Animation::Interpolation interpolation );
+
+ /**
+ * @brief Add a property animator for an actor in the transition
+ * @param[in] actor The actor
+ * @param[in] map The map containing the transition animator keys
+ * @param[in] path The path for the property animator
+ * @param[in] forward The forward vector for the property animator
+ *
+ * This will add the property animator to the list of animators related to this transition
+ */
void AddPropertyAnimator( Actor actor, Property::Map map, Path path, Vector3 forward );
+ /**
+ * @brief Convert the transition property animators to the layout data elements
+ * @param[in] actor The actor the transition property animators are applied to
+ * @param[in] layoutData The layout data containing layout data elements array for the layout update
+ *
+ * This will parse the property animators and add the layout data elements to the layout data elements array
+ */
void ConvertToLayoutDataElements( Actor, LayoutData& layoutData );
/**
- * @copydoc Dali::Animation::FinishedSignal()
+ * @brief Convert the transition children property animators to the layout data elements
+ * @param[in] actor The actor the transition property animators are applied to
+ * @param[in] layoutData The layout data containing layout data elements array for the layout update
+ *
+ * This will parse the children property animators and add the layout data elements to the layout data elements array
+ */
+ static void ConvertChildrenAnimatorsToLayoutDataElements( Actor, LayoutData& layoutData );
+
+ /**
+ * @copydoc Dali::Toolkit::LayoutTransitionData::FinishedSignal()
*/
Dali::Toolkit::LayoutTransitionData::LayoutTransitionSignalType& FinishedSignal();
+ /**
+ * @brief Emit the transition finish signal
+ * @param[in] layoutTransitionType The transition type
+ */
void EmitSignalFinish( int layoutTransitionType );
private:
- bool ConvertToLayoutAnimator( const Property::Map& animatorData, const PropertyAnimator& propertyAnimator, LayoutDataAnimator& layoutAnimator );
- bool ConvertToLayoutDataElement( const PropertyAnimator& propertyAnimator, LayoutDataElement& layoutDataElement, LayoutData& layoutData );
+ /**
+ * @brief Convert the property animator data to the layout data animator
+ * @param[in] animatorData The animator data map
+ * @param[in] propertyAnimator The property animator
+ * @param[in] layoutAnimator The layout animator
+ *
+ * This will parse the property animator data and add the layout data element animator
+ */
+ static bool ConvertToLayoutAnimator( const Property::Map& animatorData, const PropertyAnimator& propertyAnimator, LayoutDataAnimator& layoutAnimator );
+
+ /**
+ * @brief Convert the property animator to the layout data element
+ * @param[in] propertyAnimator The property animator
+ * @param[in] layoutDataElement The layout data element
+ * @param[in] layoutDataElement The layout data
+ *
+ * This will parse the children property animators and add the layout data elements to the layout data elements array
+ */
+ static bool ConvertToLayoutDataElement( const PropertyAnimator& propertyAnimator, LayoutDataElement& layoutDataElement, LayoutData& layoutData );
PropertyAnimatorArray mPropertyAnimators;