X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fevent%2Factors%2Factor-impl.cpp;h=4ad7d2962b3edf65d9ee18a8fdfeb678ccf29376;hb=cd1f8c935c88054e546c76834f077ba6677facb5;hp=8df598ebb2e686d062ff492c46edd385d058656b;hpb=170e0f5cde273cecde1990e5943cdaad8933e65a;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/event/actors/actor-impl.cpp b/dali/internal/event/actors/actor-impl.cpp old mode 100644 new mode 100755 index 8df598e..4ad7d29 --- a/dali/internal/event/actors/actor-impl.cpp +++ b/dali/internal/event/actors/actor-impl.cpp @@ -2446,6 +2446,7 @@ void Actor::RebuildDepthTree() SetDepthIndicesMessage( GetEventThreadServices().GetUpdateManager(), sceneGraphNodeDepths ); DALI_LOG_TIMER_END(depthTimer, gLogFilter, Debug::Concise, "Depth tree create time: "); + rootNode->~ActorDepthTreeNode(); } /** @@ -3242,144 +3243,305 @@ Property::Value Actor::GetDefaultPropertyCurrentValue( Property::Index index ) c return value; } -void Actor::OnNotifyDefaultPropertyAnimation( Animation& animation, Property::Index index, const Property::Value& value ) +void Actor::OnNotifyDefaultPropertyAnimation( Animation& animation, Property::Index index, const Property::Value& value, Animation::Type animationType ) { - switch( index ) + switch( animationType ) { - case Dali::Actor::Property::SIZE: + case Animation::TO: + case Animation::BETWEEN: { - if( value.Get( mTargetSize ) ) + switch( index ) { - // Notify deriving classes - OnSizeAnimation( animation, mTargetSize ); - } - break; - } + case Dali::Actor::Property::SIZE: + { + if( value.Get( mTargetSize ) ) + { + // Notify deriving classes + OnSizeAnimation( animation, mTargetSize ); + } + break; + } - case Dali::Actor::Property::SIZE_WIDTH: - { - if( value.Get( mTargetSize.width ) ) - { - // Notify deriving classes - OnSizeAnimation( animation, mTargetSize ); - } - break; - } + case Dali::Actor::Property::SIZE_WIDTH: + { + if( value.Get( mTargetSize.width ) ) + { + // Notify deriving classes + OnSizeAnimation( animation, mTargetSize ); + } + break; + } - case Dali::Actor::Property::SIZE_HEIGHT: - { - if( value.Get( mTargetSize.height ) ) - { - // Notify deriving classes - OnSizeAnimation( animation, mTargetSize ); + case Dali::Actor::Property::SIZE_HEIGHT: + { + if( value.Get( mTargetSize.height ) ) + { + // Notify deriving classes + OnSizeAnimation( animation, mTargetSize ); + } + break; + } + + case Dali::Actor::Property::SIZE_DEPTH: + { + if( value.Get( mTargetSize.depth ) ) + { + // Notify deriving classes + OnSizeAnimation( animation, mTargetSize ); + } + break; + } + + case Dali::Actor::Property::POSITION: + { + value.Get( mTargetPosition ); + break; + } + + case Dali::Actor::Property::POSITION_X: + { + value.Get( mTargetPosition.x ); + break; + } + + case Dali::Actor::Property::POSITION_Y: + { + value.Get( mTargetPosition.y ); + break; + } + + case Dali::Actor::Property::POSITION_Z: + { + value.Get( mTargetPosition.z ); + break; + } + + case Dali::Actor::Property::ORIENTATION: + { + value.Get( mTargetOrientation ); + break; + } + + case Dali::Actor::Property::SCALE: + { + value.Get( mTargetScale ); + break; + } + + case Dali::Actor::Property::SCALE_X: + { + value.Get( mTargetScale.x ); + break; + } + + case Dali::Actor::Property::SCALE_Y: + { + value.Get( mTargetScale.y ); + break; + } + + case Dali::Actor::Property::SCALE_Z: + { + value.Get( mTargetScale.z ); + break; + } + + case Dali::Actor::Property::VISIBLE: + { + SetVisibleInternal( value.Get< bool >(), SendMessage::FALSE ); + break; + } + + case Dali::Actor::Property::COLOR: + { + value.Get( mTargetColor ); + break; + } + + case Dali::Actor::Property::COLOR_RED: + { + value.Get( mTargetColor.r ); + break; + } + + case Dali::Actor::Property::COLOR_GREEN: + { + value.Get( mTargetColor.g ); + break; + } + + case Dali::Actor::Property::COLOR_BLUE: + { + value.Get( mTargetColor.b ); + break; + } + + case Dali::Actor::Property::COLOR_ALPHA: + case Dali::DevelActor::Property::OPACITY: + { + value.Get( mTargetColor.a ); + break; + } + + default: + { + // Not an animatable property. Do nothing. + break; + } } break; } - case Dali::Actor::Property::SIZE_DEPTH: + case Animation::BY: { - if( value.Get( mTargetSize.depth ) ) + switch( index ) { - // Notify deriving classes - OnSizeAnimation( animation, mTargetSize ); - } - break; - } + case Dali::Actor::Property::SIZE: + { + if( AdjustValue< Vector3 >( mTargetSize, value ) ) + { + // Notify deriving classes + OnSizeAnimation( animation, mTargetSize ); + } + break; + } - case Dali::Actor::Property::POSITION: - { - value.Get( mTargetPosition ); - break; - } + case Dali::Actor::Property::SIZE_WIDTH: + { + if( AdjustValue< float >( mTargetSize.width, value ) ) + { + // Notify deriving classes + OnSizeAnimation( animation, mTargetSize ); + } + break; + } - case Dali::Actor::Property::POSITION_X: - { - value.Get( mTargetPosition.x ); - break; - } + case Dali::Actor::Property::SIZE_HEIGHT: + { + if( AdjustValue< float >( mTargetSize.height, value ) ) + { + // Notify deriving classes + OnSizeAnimation( animation, mTargetSize ); + } + break; + } - case Dali::Actor::Property::POSITION_Y: - { - value.Get( mTargetPosition.y ); - break; - } + case Dali::Actor::Property::SIZE_DEPTH: + { + if( AdjustValue< float >( mTargetSize.depth, value ) ) + { + // Notify deriving classes + OnSizeAnimation( animation, mTargetSize ); + } + break; + } - case Dali::Actor::Property::POSITION_Z: - { - value.Get( mTargetPosition.z ); - break; - } + case Dali::Actor::Property::POSITION: + { + AdjustValue< Vector3 >( mTargetPosition, value ); + break; + } - case Dali::Actor::Property::ORIENTATION: - { - value.Get( mTargetOrientation ); - break; - } + case Dali::Actor::Property::POSITION_X: + { + AdjustValue< float >( mTargetPosition.x, value ); + break; + } - case Dali::Actor::Property::SCALE: - { - value.Get( mTargetScale ); - break; - } + case Dali::Actor::Property::POSITION_Y: + { + AdjustValue< float >( mTargetPosition.y, value ); + break; + } - case Dali::Actor::Property::SCALE_X: - { - value.Get( mTargetScale.x ); - break; - } + case Dali::Actor::Property::POSITION_Z: + { + AdjustValue< float >( mTargetPosition.z, value ); + break; + } - case Dali::Actor::Property::SCALE_Y: - { - value.Get( mTargetScale.y ); - break; - } + case Dali::Actor::Property::ORIENTATION: + { + Quaternion relativeValue; + if( value.Get( relativeValue ) ) + { + mTargetOrientation *= relativeValue; + } + break; + } - case Dali::Actor::Property::SCALE_Z: - { - value.Get( mTargetScale.z ); - break; - } + case Dali::Actor::Property::SCALE: + { + AdjustValue< Vector3 >( mTargetScale, value ); + break; + } - case Dali::Actor::Property::VISIBLE: - { - SetVisibleInternal( value.Get< bool >(), SendMessage::FALSE ); - break; - } + case Dali::Actor::Property::SCALE_X: + { + AdjustValue< float >( mTargetScale.x, value ); + break; + } - case Dali::Actor::Property::COLOR: - { - value.Get( mTargetColor ); - break; - } + case Dali::Actor::Property::SCALE_Y: + { + AdjustValue< float >( mTargetScale.y, value ); + break; + } - case Dali::Actor::Property::COLOR_RED: - { - value.Get( mTargetColor.r ); - break; - } + case Dali::Actor::Property::SCALE_Z: + { + AdjustValue< float >( mTargetScale.z, value ); + break; + } - case Dali::Actor::Property::COLOR_GREEN: - { - value.Get( mTargetColor.g ); - break; - } + case Dali::Actor::Property::VISIBLE: + { + bool relativeValue = false; + if( value.Get( relativeValue ) ) + { + bool visible = mVisible || relativeValue; + SetVisibleInternal( visible, SendMessage::FALSE ); + } + break; + } - case Dali::Actor::Property::COLOR_BLUE: - { - value.Get( mTargetColor.b ); - break; - } + case Dali::Actor::Property::COLOR: + { + AdjustValue< Vector4 >( mTargetColor, value ); + break; + } - case Dali::Actor::Property::COLOR_ALPHA: - case Dali::DevelActor::Property::OPACITY: - { - value.Get( mTargetColor.a ); - break; - } + case Dali::Actor::Property::COLOR_RED: + { + AdjustValue< float >( mTargetColor.r, value ); + break; + } - default: - { - // Not an animatable property. Do nothing. + case Dali::Actor::Property::COLOR_GREEN: + { + AdjustValue< float >( mTargetColor.g, value ); + break; + } + + case Dali::Actor::Property::COLOR_BLUE: + { + AdjustValue< float >( mTargetColor.b, value ); + break; + } + + case Dali::Actor::Property::COLOR_ALPHA: + case Dali::DevelActor::Property::OPACITY: + { + AdjustValue< float >( mTargetColor.a, value ); + break; + } + + default: + { + // Not an animatable property. Do nothing. + break; + } + } break; } }