X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=examples%2Ftransitions%2Fshadow-button-impl.cpp;h=4273bccde52d86b8afd386cb1a85ae558586a46b;hb=a832af2813558a32f0a18747f3e6134ff6f6f301;hp=8a6ea5689ff2efb6a5a63fcdebe07ad1f9683f68;hpb=25250984089b6270054ea41df59b4f00b9956e8b;p=platform%2Fcore%2Fuifw%2Fdali-demo.git diff --git a/examples/transitions/shadow-button-impl.cpp b/examples/transitions/shadow-button-impl.cpp index 8a6ea56..4273bcc 100644 --- a/examples/transitions/shadow-button-impl.cpp +++ b/examples/transitions/shadow-button-impl.cpp @@ -16,11 +16,9 @@ #include "shadow-button-impl.h" #include -#include #include -#include #include -#include +#include #include @@ -124,7 +122,7 @@ bool ShadowButton::GetActiveState() void ShadowButton::SetCheckState( bool checkState ) { mCheckState = checkState; - EnableVisual( Demo::ShadowButton::Property::CHECKBOX_FG_VISUAL, true ); + DevelControl::EnableVisual( *this, Demo::ShadowButton::Property::CHECKBOX_FG_VISUAL, true ); if( Self().OnStage() ) { if( checkState ) @@ -157,7 +155,7 @@ void ShadowButton::StartTransition( Property::Index transitionId ) iter->mAnimation.FinishedSignal().Disconnect( this, &ShadowButton::OnTransitionFinished ); } - iter->mAnimation = CreateTransition( iter->mTransitionData ); + iter->mAnimation = DevelControl::CreateTransition( *this, iter->mTransitionData ); StoreTargetLayouts( iter->mTransitionData ); iter->mAnimation.FinishedSignal().Connect( this, &ShadowButton::OnTransitionFinished ); @@ -189,7 +187,7 @@ void ShadowButton::OnTransitionFinished( Animation& src ) } case Demo::ShadowButton::Property::UNCHECK_TRANSITION: { - EnableVisual( Demo::ShadowButton::Property::CHECKBOX_FG_VISUAL, false ); + DevelControl::EnableVisual( *this, Demo::ShadowButton::Property::CHECKBOX_FG_VISUAL, false ); break; } } @@ -352,32 +350,28 @@ void ShadowButton::ResetVisual( { case Demo::ShadowButton::Property::BACKGROUND_VISUAL: { - RegisterVisual( index, visual ); - visual.SetDepthIndex(0.0f); + DevelControl::RegisterVisual( *this, index, visual, 0 ); break; } case Demo::ShadowButton::Property::CHECKBOX_BG_VISUAL: { - RegisterVisual( index, visual ); - visual.SetDepthIndex(1.0f); + DevelControl::RegisterVisual( *this, index, visual, 1 ); break; } case Demo::ShadowButton::Property::CHECKBOX_FG_VISUAL: { - RegisterVisual( index, visual, mCheckState ); - visual.SetDepthIndex(2.0f); + DevelControl::RegisterVisual( *this, index, visual, mCheckState, 2 ); break; } case Demo::ShadowButton::Property::LABEL_VISUAL: { - RegisterVisual( index, visual ); - visual.SetDepthIndex(1.0f); + DevelControl::RegisterVisual( *this, index, visual, 1 ); break; } } // Extract transform maps out of the visual definition and store them - Property::Value* value = map->Find( DevelVisual::Property::TRANSFORM, "transform"); + Property::Value* value = map->Find( Visual::Property::TRANSFORM, "transform"); if( value ) { Property::Map* transformMap = value->GetMap(); @@ -399,7 +393,7 @@ void ShadowButton::ResetVisual( bool IsTransformProperty( const std::string& property ) { - const char* transformProperties[]= { "size", "offset", "origin", "anchorPoint", "offsetSizeMode" }; + const char* transformProperties[]= { "size", "offset", "origin", "anchorPoint", "offsetPolicy", "sizePolicy" }; const int NUM_TRANSFORM_PROPERTIES = sizeof( transformProperties ) / sizeof( const char * ); bool found=false; @@ -418,7 +412,7 @@ void ShadowButton::StoreTargetLayouts( TransitionData transitionData ) { // Pseudo code // foreach animator in transitionData - // if animator{"property"} in [ "size", "offset", "origin", "anchorPoint", "offsetSizeMode" ] + // if animator{"property"} in [ "size", "offset", "origin", "anchorPoint", "offsetPolicy", "sizePolicy" ] // transforms{ animator{"target"} }->{animator{"property"}} = animator{"targetValue"} @@ -496,7 +490,7 @@ void ShadowButton::SetProperty( BaseObject* object, Property::Index index, const case Demo::ShadowButton::Property::CHECKBOX_FG_VISUAL: { impl.ResetVisual( index, impl.mCheckboxFgVisual, value ); - impl.EnableVisual( Demo::ShadowButton::Property::CHECKBOX_FG_VISUAL, impl.mCheckState ); + DevelControl::EnableVisual( impl, Demo::ShadowButton::Property::CHECKBOX_FG_VISUAL, impl.mCheckState ); break; } case Demo::ShadowButton::Property::LABEL_VISUAL: