2 * Copyright (c) 2018 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #include <dali/integration-api/debug.h>
19 #include <dali/public-api/animation/animation.h>
20 #include <dali/public-api/object/base-handle.h>
21 #include <dali/public-api/object/type-registry-helper.h>
22 #include <dali-toolkit/public-api/controls/control.h>
23 #include <dali/devel-api/object/handle-devel.h>
24 #include <dali-toolkit/devel-api/layouting/layout-item-impl.h>
25 #include <dali-toolkit/devel-api/layouting/layout-group-impl.h>
26 #include <dali-toolkit/internal/layouting/layout-transition-data-impl.h>
27 #include <dali-toolkit/internal/layouting/layout-item-data-impl.h>
29 #include <dali/devel-api/scripting/enum-helper.h>
33 #if defined(DEBUG_ENABLED)
34 Debug::Filter* gLayoutFilter = Debug::Filter::New( Debug::NoLogging, false, "LOG_LAYOUT" );
38 const char* TOKEN_CONDITION("condition");
39 const char* TOKEN_AFFECTS_SIBLINGS("affectsSiblings");
40 const char* TOKEN_PROPERTY("property");
41 const char* TOKEN_INITIAL_VALUE("initialValue");
42 const char* TOKEN_TARGET_VALUE("targetValue");
43 const char* TOKEN_ANIMATOR("animator");
44 const char* TOKEN_TYPE("type");
45 const char* TOKEN_NAME("name");
46 const char* TOKEN_TIME_PERIOD("timePeriod");
47 const char* TOKEN_DURATION("duration");
48 const char* TOKEN_DELAY("delay");
49 const char* TOKEN_ALPHA_FUNCTION("alphaFunction");
51 DALI_ENUM_TO_STRING_TABLE_BEGIN( ANIMATOR_TYPE )
52 DALI_ENUM_TO_STRING_WITH_SCOPE( Dali::Toolkit::LayoutTransitionData::Animator::Type, ANIMATE_TO )
53 DALI_ENUM_TO_STRING_WITH_SCOPE( Dali::Toolkit::LayoutTransitionData::Animator::Type, ANIMATE_BY )
54 DALI_ENUM_TO_STRING_WITH_SCOPE( Dali::Toolkit::LayoutTransitionData::Animator::Type, ANIMATE_BETWEEN )
55 DALI_ENUM_TO_STRING_WITH_SCOPE( Dali::Toolkit::LayoutTransitionData::Animator::Type, ANIMATE_PATH )
56 DALI_ENUM_TO_STRING_TABLE_END( ANIMATOR_TYPE )
58 DALI_ENUM_TO_STRING_TABLE_BEGIN( ALPHA_FUNCTION_BUILTIN )
59 DALI_ENUM_TO_STRING_WITH_SCOPE(Dali::AlphaFunction, LINEAR)
60 DALI_ENUM_TO_STRING_WITH_SCOPE(Dali::AlphaFunction, REVERSE)
61 DALI_ENUM_TO_STRING_WITH_SCOPE(Dali::AlphaFunction, EASE_IN)
62 DALI_ENUM_TO_STRING_WITH_SCOPE(Dali::AlphaFunction, EASE_OUT)
63 DALI_ENUM_TO_STRING_WITH_SCOPE(Dali::AlphaFunction, EASE_IN_OUT)
64 DALI_ENUM_TO_STRING_WITH_SCOPE(Dali::AlphaFunction, EASE_IN_SQUARE)
65 DALI_ENUM_TO_STRING_WITH_SCOPE(Dali::AlphaFunction, EASE_OUT_SQUARE)
66 DALI_ENUM_TO_STRING_WITH_SCOPE(Dali::AlphaFunction, EASE_IN_SINE)
67 DALI_ENUM_TO_STRING_WITH_SCOPE(Dali::AlphaFunction, EASE_OUT_SINE)
68 DALI_ENUM_TO_STRING_WITH_SCOPE(Dali::AlphaFunction, EASE_IN_OUT_SINE)
69 DALI_ENUM_TO_STRING_WITH_SCOPE(Dali::AlphaFunction, EASE_OUT_BACK)
70 DALI_ENUM_TO_STRING_WITH_SCOPE(Dali::AlphaFunction, BOUNCE)
71 DALI_ENUM_TO_STRING_WITH_SCOPE(Dali::AlphaFunction, SIN)
72 DALI_ENUM_TO_STRING_TABLE_END( ALPHA_FUNCTION_BUILTIN )
83 bool LayoutDataElement::AdjustMeasuredSize( float& width, float& height, Toolkit::LayoutTransitionData::Animator::Type animatorType )
86 if( targetValue.GetType() == Property::NONE )
91 Actor actor = Actor::DownCast( handle );
92 float animateByMultiplier = ( animatorType == Toolkit::LayoutTransitionData::Animator::Type::ANIMATE_BY ) ? 1.0f : 0.0f;
93 Vector3 size = actor.GetCurrentSize();
95 switch ( targetValue.GetType() )
97 case Property::Type::VECTOR3:
99 Vector3 value = targetValue.Get<Vector3>();
100 switch( propertyIndex )
102 case Actor::Property::SCALE:
104 width = size.x * ( animateByMultiplier + value.x );
105 height = size.y * ( animateByMultiplier + value.y );
108 case Actor::Property::SIZE:
110 width = value.x + ( animateByMultiplier * size.x );
111 height = value.y + ( animateByMultiplier * size.y );
122 case Property::Type::FLOAT:
124 float value = targetValue.Get<float>();
125 switch( propertyIndex )
127 case Actor::Property::SCALE_X:
129 width = size.x * ( animateByMultiplier + value );
132 case Actor::Property::SCALE_Y:
134 height = size.y * ( animateByMultiplier + value );
137 case Actor::Property::SIZE_WIDTH:
139 width = value + ( animateByMultiplier * size.x );
142 case Actor::Property::SIZE_HEIGHT:
144 height = value + ( animateByMultiplier * size.y );
165 void LayoutDataElement::UpdatePropertyIndex()
167 if( propertyIndex == -1 && handle && !propertyName.empty() )
169 Actor actor = Actor::DownCast( handle );
170 propertyIndex = DevelHandle::GetPropertyIndex( actor, Property::Key( propertyName ) );
174 void LayoutDataElement::UpdateAnimatorIndex( const LayoutAnimatorArray& animators )
176 if( animatorIndex == -1 )
178 if( animatorName.empty() )
184 std::string animatorName = this->animatorName;
185 auto animator = std::find_if( animators.begin(), animators.end(), [ &animatorName ](const LayoutDataAnimator& iter) {
186 return ( iter.name == animatorName ); } );
187 if( animator != animators.end() )
189 animatorIndex = std::distance( animators.begin(), animator );
194 void LayoutDataElement::UpdatePositionDataIndex( LayoutData& layoutData )
196 positionDataIndex = layoutData.layoutPositionDataArray.size() - 1;
197 switch( propertyIndex )
199 case Actor::Property::SCALE:
200 case Actor::Property::SCALE_X:
201 case Actor::Property::SCALE_Y:
202 if( positionDataIndex != -1 && updateMeasuredSize )
204 layoutData.layoutPositionDataArray[ positionDataIndex ].updateWithCurrentSize = true;
210 LayoutTransitionData::LayoutTransitionData() :
211 mUpdateMeasuredSize( false )
215 LayoutTransitionData::~LayoutTransitionData()
219 LayoutTransitionDataPtr LayoutTransitionData::New()
221 LayoutTransitionDataPtr layoutAnimationData( new LayoutTransitionData() );
222 return layoutAnimationData;
225 LayoutTransitionData::PropertyAnimator::PropertyAnimator( )
228 , interpolation( Animation::Linear )
232 LayoutTransitionData::PropertyAnimator::PropertyAnimator( Actor actor, Property::Map map )
235 , interpolation( Animation::Linear )
239 LayoutTransitionData::PropertyAnimator::PropertyAnimator( Actor actor, Property::Map map, Path path, Vector3 forward )
242 , interpolation( Animation::Linear )
248 LayoutTransitionData::PropertyAnimator::PropertyAnimator( Actor actor, Property::Map map, KeyFrames keyFrames, Animation::Interpolation interpolation )
251 , keyFrames( keyFrames )
252 , interpolation( interpolation )
256 void LayoutTransitionData::AddPropertyAnimator( Actor actor, Property::Map map )
258 LayoutDataElement layoutDataElement;
259 if( ConvertToLayoutDataElement( PropertyAnimator( actor, map ), layoutDataElement ) )
261 mLayoutDataElements.push_back( layoutDataElement );
264 UpdateAnimatorsIndices();
267 void LayoutTransitionData::AddPropertyAnimator( Actor actor, Property::Map map, KeyFrames keyFrames, Animation::Interpolation interpolation )
269 LayoutDataElement layoutDataElement;
270 if( ConvertToLayoutDataElement( PropertyAnimator( actor, map, keyFrames, interpolation ), layoutDataElement ) )
272 mLayoutDataElements.push_back( layoutDataElement );
275 UpdateAnimatorsIndices();
278 void LayoutTransitionData::AddPropertyAnimator( Actor actor, Property::Map map, Path path, Vector3 forward )
280 LayoutDataElement layoutDataElement;
281 if( ConvertToLayoutDataElement( PropertyAnimator( actor, map, path, forward ), layoutDataElement ) )
283 mLayoutDataElements.push_back( layoutDataElement );
286 UpdateAnimatorsIndices();
289 bool LayoutTransitionData::ConvertToLayoutAnimator( const Property::Map& animatorMap, const PropertyAnimator& propertyAnimator, LayoutDataAnimator& layoutDataAnimator )
293 for ( size_t animatorMapIdx = 0; animatorMapIdx < animatorMap.Count(); ++animatorMapIdx )
295 const KeyValuePair pair( animatorMap.GetKeyValue( animatorMapIdx ) );
297 Property::Index indexKey = Property::INVALID_INDEX;
298 if ( pair.first.type == Property::Key::STRING )
300 const std::string& key(pair.first.stringKey);
301 if( key == TOKEN_TYPE )
303 indexKey = Dali::Toolkit::LayoutTransitionData::AnimatorKey::TYPE;
305 else if( key == TOKEN_NAME )
307 indexKey = Dali::Toolkit::LayoutTransitionData::AnimatorKey::NAME;
309 else if( key == TOKEN_TIME_PERIOD )
311 indexKey = Dali::Toolkit::LayoutTransitionData::AnimatorKey::TIME_PERIOD;
313 else if( key == TOKEN_ALPHA_FUNCTION )
315 indexKey = Dali::Toolkit::LayoutTransitionData::AnimatorKey::ALPHA_FUNCTION;
320 indexKey = pair.first.indexKey;
323 const Property::Value& value( pair.second );
325 if ( indexKey == Dali::Toolkit::LayoutTransitionData::AnimatorKey::ALPHA_FUNCTION )
327 if ( value.GetType() == Property::ARRAY )
330 Vector4 controlPoints;
331 Property::Array *array = value.GetArray();
332 if ( array && array->Count() >= 4 )
334 for ( size_t vecIdx = 0; vecIdx < 4; ++vecIdx )
336 Property::Value& v = array->GetElementAt( vecIdx );
337 if ( v.GetType() == Property::FLOAT )
339 controlPoints[vecIdx] = v.Get<float>();
355 Vector2 controlPoint1( controlPoints.x, controlPoints.y );
356 Vector2 controlPoint2( controlPoints.z, controlPoints.w );
357 layoutDataAnimator.alphaFunction = AlphaFunction( controlPoint1, controlPoint2 );
364 else if ( value.GetType() == Property::VECTOR4 )
366 Vector4 controlPoints = value.Get<Vector4>();
367 Vector2 controlPoint1( controlPoints.x, controlPoints.y );
368 Vector2 controlPoint2( controlPoints.z, controlPoints.w );
369 layoutDataAnimator.alphaFunction = AlphaFunction( controlPoint1, controlPoint2 );
371 else if ( value.GetType() == Property::INTEGER )
373 layoutDataAnimator.alphaFunction = AlphaFunction( static_cast<AlphaFunction::BuiltinFunction>( value.Get<int>() ) );
375 else if ( value.GetType() == Property::STRING )
377 std::string alphaFunctionValue = value.Get<std::string>();
379 if ( alphaFunctionValue == "LINEAR" )
381 layoutDataAnimator.alphaFunction = AlphaFunction( AlphaFunction::LINEAR );
383 else if ( !alphaFunctionValue.compare( 0, 5, "EASE_" ) )
385 if ( alphaFunctionValue == "EASE_IN" )
387 layoutDataAnimator.alphaFunction = AlphaFunction( AlphaFunction::EASE_IN );
389 else if ( alphaFunctionValue == "EASE_OUT" )
391 layoutDataAnimator.alphaFunction = AlphaFunction( AlphaFunction::EASE_OUT );
393 else if ( !alphaFunctionValue.compare( 5, 3, "IN_" ) )
395 if ( !alphaFunctionValue.compare( 8, -1, "SQUARE" ) )
397 layoutDataAnimator.alphaFunction = AlphaFunction( AlphaFunction::EASE_IN_SQUARE );
399 else if ( !alphaFunctionValue.compare( 8, -1, "OUT" ) )
401 layoutDataAnimator.alphaFunction = AlphaFunction( AlphaFunction::EASE_IN_OUT );
403 else if ( !alphaFunctionValue.compare( 8, -1, "OUT_SINE" ) )
405 layoutDataAnimator.alphaFunction = AlphaFunction( AlphaFunction::EASE_IN_OUT_SINE );
407 else if ( !alphaFunctionValue.compare( 8, -1, "SINE" ) )
409 layoutDataAnimator.alphaFunction = AlphaFunction( AlphaFunction::EASE_IN_SINE );
412 else if ( !alphaFunctionValue.compare( 5, 4, "OUT_" ) )
414 if ( !alphaFunctionValue.compare( 9, -1, "SQUARE" ) )
416 layoutDataAnimator.alphaFunction = AlphaFunction( AlphaFunction::EASE_OUT_SQUARE );
418 else if ( !alphaFunctionValue.compare( 9, -1, "SINE" ) )
420 layoutDataAnimator.alphaFunction = AlphaFunction( AlphaFunction::EASE_OUT_SINE );
422 else if ( !alphaFunctionValue.compare( 9, -1, "BACK" ) )
424 layoutDataAnimator.alphaFunction = AlphaFunction( AlphaFunction::EASE_OUT_BACK );
428 else if ( alphaFunctionValue == "REVERSE" )
430 layoutDataAnimator.alphaFunction = AlphaFunction( AlphaFunction::REVERSE );
432 else if ( alphaFunctionValue == "BOUNCE" )
434 layoutDataAnimator.alphaFunction = AlphaFunction( AlphaFunction::BOUNCE );
436 else if ( alphaFunctionValue == "SIN" )
438 layoutDataAnimator.alphaFunction = AlphaFunction( AlphaFunction::SIN );
450 else if ( indexKey == Dali::Toolkit::LayoutTransitionData::AnimatorKey::NAME )
452 if( value.GetType() == Property::STRING )
454 layoutDataAnimator.name = value.Get<std::string>();
457 else if ( indexKey == Dali::Toolkit::LayoutTransitionData::AnimatorKey::TYPE )
459 if( value.GetType() == Property::STRING )
461 std::string animatorType = value.Get<std::string>();
462 if( animatorType == ANIMATOR_TYPE_TABLE[ Toolkit::LayoutTransitionData::Animator::Type::ANIMATE_TO ].string )
464 layoutDataAnimator.animatorType = Toolkit::LayoutTransitionData::Animator::Type::ANIMATE_TO;
466 else if( animatorType == ANIMATOR_TYPE_TABLE[ Toolkit::LayoutTransitionData::Animator::Type::ANIMATE_BY ].string )
468 layoutDataAnimator.animatorType = Toolkit::LayoutTransitionData::Animator::Type::ANIMATE_BY;
470 else if( animatorType == ANIMATOR_TYPE_TABLE[ Toolkit::LayoutTransitionData::Animator::Type::ANIMATE_BETWEEN ].string )
472 layoutDataAnimator.animatorType = Toolkit::LayoutTransitionData::Animator::Type::ANIMATE_BETWEEN;
473 layoutDataAnimator.keyFrames = propertyAnimator.keyFrames;
475 else if( animatorType == ANIMATOR_TYPE_TABLE[ Toolkit::LayoutTransitionData::Animator::Type::ANIMATE_PATH ].string )
477 layoutDataAnimator.animatorType = Toolkit::LayoutTransitionData::Animator::Type::ANIMATE_PATH;
478 layoutDataAnimator.path = propertyAnimator.path;
479 layoutDataAnimator.forward = propertyAnimator.forward;
482 else if ( value.GetType() == Property::INTEGER )
484 layoutDataAnimator.animatorType = static_cast<Toolkit::LayoutTransitionData::Animator::Type>( pair.second.Get<int>() );
487 else if ( indexKey == Dali::Toolkit::LayoutTransitionData::AnimatorKey::TIME_PERIOD )
489 Property::Map timeMap = value.Get<Property::Map>();
490 for ( size_t timeMapIdx = 0; timeMapIdx < timeMap.Count(); ++timeMapIdx )
492 const KeyValuePair pair( timeMap.GetKeyValue( timeMapIdx ) );
493 indexKey = Property::INVALID_INDEX;
495 if ( pair.first.type == Property::Key::STRING)
497 const std::string& key( pair.first.stringKey );
498 if( key == TOKEN_DURATION )
500 indexKey = Dali::Toolkit::LayoutTransitionData::AnimatorKey::DURATION;
502 else if( key == TOKEN_DELAY )
504 indexKey = Dali::Toolkit::LayoutTransitionData::AnimatorKey::DELAY;
509 indexKey = pair.first.indexKey;
512 if ( indexKey == Dali::Toolkit::LayoutTransitionData::AnimatorKey::DELAY )
514 layoutDataAnimator.timePeriod.delaySeconds = pair.second.Get<float>();
516 else if ( indexKey == Dali::Toolkit::LayoutTransitionData::AnimatorKey::DURATION )
518 layoutDataAnimator.timePeriod.durationSeconds = pair.second.Get<float>();
527 bool LayoutTransitionData::ConvertToLayoutDataElement(
528 const PropertyAnimator& propertyAnimator, LayoutDataElement& layoutDataElement )
530 const Property::Map& map = propertyAnimator.map;
531 bool propertyFound = false;
533 if( mLayoutAnimators.size() == 0 )
535 mLayoutAnimators.push_back( LayoutDataAnimator() );
538 layoutDataElement.handle = propertyAnimator.handle;
540 for( unsigned int mapIdx = 0; mapIdx < map.Count(); ++mapIdx )
542 const KeyValuePair pair( map.GetKeyValue( mapIdx ) );
543 const Property::Value& value( pair.second );
544 Property::Index indexKey = Property::INVALID_INDEX;
546 if ( pair.first.type == Property::Key::STRING )
548 const std::string& key( pair.first.stringKey );
549 if ( key == TOKEN_CONDITION )
551 indexKey = Dali::Toolkit::LayoutTransitionData::AnimatorKey::CONDITION;
553 if ( key == TOKEN_PROPERTY )
555 indexKey = Dali::Toolkit::LayoutTransitionData::AnimatorKey::PROPERTY;
557 else if( key == TOKEN_INITIAL_VALUE )
559 indexKey = Dali::Toolkit::LayoutTransitionData::AnimatorKey::INITIAL_VALUE;
561 else if( key == TOKEN_TARGET_VALUE )
563 indexKey = Dali::Toolkit::LayoutTransitionData::AnimatorKey::TARGET_VALUE;
565 else if( key == TOKEN_ANIMATOR )
567 indexKey = Dali::Toolkit::LayoutTransitionData::AnimatorKey::ANIMATOR;
569 else if( key == TOKEN_AFFECTS_SIBLINGS )
571 indexKey = Dali::Toolkit::LayoutTransitionData::AnimatorKey::AFFECTS_SIBLINGS;
576 indexKey = pair.first.indexKey;
579 if( indexKey == Dali::Toolkit::LayoutTransitionData::AnimatorKey::CONDITION )
581 layoutDataElement.condition = value.Get<int>();
583 else if ( indexKey == Dali::Toolkit::LayoutTransitionData::AnimatorKey::AFFECTS_SIBLINGS )
585 layoutDataElement.updateMeasuredSize = value.Get<bool>();
586 if( layoutDataElement.updateMeasuredSize )
588 mUpdateMeasuredSize = true;
591 else if( indexKey == Dali::Toolkit::LayoutTransitionData::AnimatorKey::PROPERTY )
593 if( value.GetType() == Property::STRING )
595 layoutDataElement.propertyName = value.Get<std::string>();
596 layoutDataElement.UpdatePropertyIndex();
600 layoutDataElement.propertyIndex = value.Get<int>();
602 propertyFound = true;
604 else if( indexKey == Dali::Toolkit::LayoutTransitionData::AnimatorKey::INITIAL_VALUE )
606 layoutDataElement.initialValue = value;
608 else if( indexKey == Dali::Toolkit::LayoutTransitionData::AnimatorKey::TARGET_VALUE )
610 layoutDataElement.targetValue = value;
612 else if( indexKey == Dali::Toolkit::LayoutTransitionData::AnimatorKey::ANIMATOR )
614 if( value.GetType() == Property::STRING )
616 layoutDataElement.animatorName = value.Get<std::string>();
617 layoutDataElement.UpdateAnimatorIndex( mLayoutAnimators );
619 else if ( value.GetType() == Property::MAP )
621 Property::Map animatorMap = value.Get< Property::Map >();
622 LayoutDataAnimator layoutDataAnimator;
623 if( ConvertToLayoutAnimator( animatorMap, propertyAnimator, layoutDataAnimator ) )
625 mLayoutAnimators.push_back( layoutDataAnimator );
626 layoutDataElement.animatorIndex = mLayoutAnimators.size() - 1;
632 return propertyFound;
635 void LayoutTransitionData::CollectChildrenLayoutDataElements( Actor child, LayoutData& layoutData )
637 LayoutDataArray& layoutDataArray = layoutData.layoutDataArray;
638 // Add the children animators
639 for( const LayoutDataElement& iter : layoutData.childrenLayoutDataArray )
641 if( iter.handle != nullptr && iter.handle != child )
646 LayoutDataElement layoutDataElement = iter;
647 switch ( layoutDataElement.condition )
649 case Dali::Toolkit::LayoutTransitionData::Condition::ON_ADD:
650 if ( layoutData.layoutTransition.layoutTransitionType != Dali::Toolkit::LayoutTransitionData::ON_CHILD_ADD
651 || layoutData.layoutTransition.gainedChild != child )
656 case Dali::Toolkit::LayoutTransitionData::Condition::ON_REMOVE:
657 if( layoutData.layoutTransition.layoutTransitionType != Dali::Toolkit::LayoutTransitionData::ON_CHILD_REMOVE
658 || layoutData.layoutTransition.lostChild != child )
663 case Dali::Toolkit::LayoutTransitionData::Condition::ON_FOCUS_GAINED:
664 if( layoutData.layoutTransition.layoutTransitionType != Dali::Toolkit::LayoutTransitionData::ON_CHILD_FOCUS
665 || layoutData.layoutTransition.gainedChild != child )
670 case Dali::Toolkit::LayoutTransitionData::Condition::ON_FOCUS_LOST:
671 if( layoutData.layoutTransition.layoutTransitionType != Dali::Toolkit::LayoutTransitionData::ON_CHILD_FOCUS
672 || layoutData.layoutTransition.lostChild != child )
681 if( layoutData.updateMeasuredSize && !layoutDataElement.updateMeasuredSize )
686 layoutDataElement.handle = child;
687 layoutDataElement.UpdatePropertyIndex();
688 layoutDataElement.UpdatePositionDataIndex( layoutData );
689 layoutDataArray.push_back( layoutDataElement );
693 void LayoutTransitionData::UpdateAnimatorsIndices()
695 for( LayoutDataElement& iter: mLayoutDataElements )
697 iter.UpdateAnimatorIndex( mLayoutAnimators );
701 void LayoutTransitionData::CollectLayoutDataElements( Actor owner, LayoutData& layoutData )
703 LayoutAnimatorArray& layoutAnimatorArray = layoutData.layoutAnimatorArray;
704 LayoutAnimatorArray::iterator it = mLayoutAnimators.begin();
705 if (layoutAnimatorArray.size() != 0)
707 // skip default animator
710 std::copy( it, mLayoutAnimators.end(), std::back_inserter( layoutAnimatorArray ) );
712 LayoutDataArray& layoutDataArray = layoutData.layoutDataArray;
713 // Collect the transition animators
714 for( const LayoutDataElement& iter : mLayoutDataElements )
716 if( iter.handle == nullptr || iter.handle != owner )
718 layoutData.childrenLayoutDataArray.push_back( iter );
722 LayoutDataElement layoutDataElement = iter;
723 if( layoutData.updateMeasuredSize && !layoutDataElement.updateMeasuredSize )
728 layoutDataElement.UpdatePropertyIndex();
729 layoutDataElement.UpdatePositionDataIndex( layoutData );
730 layoutDataArray.push_back( layoutDataElement );
734 Dali::Toolkit::LayoutTransitionData::LayoutTransitionSignalType& LayoutTransitionData::FinishedSignal()
736 return mFinishedSignal;
739 void LayoutTransitionData::EmitSignalFinish( int layoutTransitionType )
741 if ( !mFinishedSignal.Empty() )
743 Dali::Toolkit::LayoutTransitionData handle( this );
744 mFinishedSignal.Emit( static_cast<Dali::Toolkit::LayoutTransitionData::Type>(layoutTransitionType), handle );
748 bool LayoutTransitionData::HasUpdateMeasuredSize()
750 return mUpdateMeasuredSize;
753 } // namespace Internal
754 } // namespace Toolkit