X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Fvisual-base-impl.cpp;h=48df29a81623f2f9961fc662784972f6d3b289da;hp=32f8b8d83e95e24dde44de40c6a3bab93e9c009b;hb=f4c1e7f52d49c3ce033b9ee4c3c7414b06a22d45;hpb=02318dd256a2edbef78a37cd40e153279385cc94;ds=sidebyside diff --git a/dali-toolkit/internal/visuals/visual-base-impl.cpp b/dali-toolkit/internal/visuals/visual-base-impl.cpp index 32f8b8d..48df29a 100644 --- a/dali-toolkit/internal/visuals/visual-base-impl.cpp +++ b/dali-toolkit/internal/visuals/visual-base-impl.cpp @@ -55,7 +55,7 @@ void Visual::Base::SetCustomShader( const Property::Map& shaderMap ) } else { - mImpl->mCustomShader = new Impl::CustomShader( shaderMap ); + mImpl->mCustomShader = new Impl::CustomShader( shaderMap ); } } @@ -74,6 +74,16 @@ void Visual::Base::Initialize( Actor& actor, const Property::Map& propertyMap ) DoInitialize( actor, propertyMap ); } +void Visual::Base::SetName( const std::string& name ) +{ + mImpl->mName = name; +} + +const std::string& Visual::Base::GetName() +{ + return mImpl->mName; +} + void Visual::Base::SetSize( const Vector2& size ) { mImpl->mSize = size; @@ -84,6 +94,11 @@ const Vector2& Visual::Base::GetSize() const return mImpl->mSize; } +float Visual::Base::GetHeightForWidth( float width ) const +{ + return 0.f; +} + void Visual::Base::GetNaturalSize( Vector2& naturalSize ) const { naturalSize = Vector2::ZERO; @@ -116,7 +131,7 @@ void Visual::Base::SetOnStage( Actor& actor ) void Visual::Base::SetOffStage( Actor& actor ) { - if( GetIsOnStage() ) + if( IsOnStage() ) { DoSetOffStage( actor ); @@ -124,6 +139,16 @@ void Visual::Base::SetOffStage( Actor& actor ) } } +void Visual::Base::CreatePropertyMap( Property::Map& map ) const +{ + DoCreatePropertyMap( map ); + + if( mImpl->mCustomShader ) + { + mImpl->mCustomShader->CreatePropertyMap( map ); + } +} + void Visual::Base::EnablePreMultipliedAlpha( bool preMultipled ) { if(preMultipled) @@ -152,22 +177,12 @@ void Visual::Base::DoSetOffStage( Actor& actor ) mImpl->mRenderer.Reset(); } -void Visual::Base::CreatePropertyMap( Property::Map& map ) const -{ - DoCreatePropertyMap( map ); - - if( mImpl->mCustomShader ) - { - mImpl->mCustomShader->CreatePropertyMap( map ); - } -} - -bool Visual::Base::GetIsOnStage() const +bool Visual::Base::IsOnStage() const { return mImpl->mFlags & Impl::IS_ON_STAGE; } -bool Visual::Base::GetIsFromCache() const +bool Visual::Base::IsFromCache() const { return mImpl->mFlags & Impl::IS_FROM_CACHE; }