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;fp=dali-toolkit%2Finternal%2Fvisuals%2Fvisual-impl.cpp;h=d9e19de012e5fa6c87e3a9d50829d6e744e73a38;hp=46ef92ddf300cadfefdb66147cad6e29a7746993;hb=99e2ea03e6d6059f5803d700932df1ff1c848cd3;hpb=4cd15baa1eaa620c0ef5e94e56d82fad17b888d5 diff --git a/dali-toolkit/internal/visuals/visual-impl.cpp b/dali-toolkit/internal/visuals/visual-base-impl.cpp similarity index 75% rename from dali-toolkit/internal/visuals/visual-impl.cpp rename to dali-toolkit/internal/visuals/visual-base-impl.cpp index 46ef92d..d9e19de 100644 --- a/dali-toolkit/internal/visuals/visual-impl.cpp +++ b/dali-toolkit/internal/visuals/visual-base-impl.cpp @@ -16,14 +16,14 @@ */ // CLASS HEADER -#include "visual-impl.h" +#include "visual-base-impl.h" // EXTERNAL HEADER #include #include //INTERNAL HEARDER -#include +#include namespace { @@ -45,18 +45,21 @@ namespace Toolkit namespace Internal { -Visual::Visual( VisualFactoryCache& factoryCache ) +namespace Visual +{ + +Base::Base( VisualFactoryCache& factoryCache ) : mImpl( new Impl() ), mFactoryCache( factoryCache ) { } -Visual::~Visual() +Base::~Base() { delete mImpl; } -void Visual::SetCustomShader( const Property::Map& shaderMap ) +void Base::SetCustomShader( const Property::Map& shaderMap ) { if( mImpl->mCustomShader ) { @@ -68,7 +71,7 @@ void Visual::SetCustomShader( const Property::Map& shaderMap ) } } -void Visual::Initialize( Actor& actor, const Property::Map& propertyMap ) +void Base::Initialize( Actor& actor, const Property::Map& propertyMap ) { Property::Value* customShaderValue = propertyMap.Find( CUSTOM_SHADER ); if( customShaderValue ) @@ -83,31 +86,31 @@ void Visual::Initialize( Actor& actor, const Property::Map& propertyMap ) DoInitialize( actor, propertyMap ); } -void Visual::SetSize( const Vector2& size ) +void Base::SetSize( const Vector2& size ) { mImpl->mSize = size; } -const Vector2& Visual::GetSize() const +const Vector2& Base::GetSize() const { return mImpl->mSize; } -void Visual::GetNaturalSize( Vector2& naturalSize ) const +void Base::GetNaturalSize( Vector2& naturalSize ) const { naturalSize = Vector2::ZERO; } -void Visual::SetClipRect( const Rect& clipRect ) +void Base::SetClipRect( const Rect& clipRect ) { } -void Visual::SetOffset( const Vector2& offset ) +void Base::SetOffset( const Vector2& offset ) { mImpl->mOffset = offset; } -void Visual::SetDepthIndex( float index ) +void Base::SetDepthIndex( float index ) { mImpl->mDepthIndex = index; if( mImpl->mRenderer ) @@ -116,12 +119,12 @@ void Visual::SetDepthIndex( float index ) } } -float Visual::GetDepthIndex() const +float Base::GetDepthIndex() const { return mImpl->mDepthIndex; } -void Visual::SetOnStage( Actor& actor ) +void Base::SetOnStage( Actor& actor ) { DoSetOnStage( actor ); @@ -131,7 +134,7 @@ void Visual::SetOnStage( Actor& actor ) mImpl->mFlags |= Impl::IS_ON_STAGE; } -void Visual::SetOffStage( Actor& actor ) +void Base::SetOffStage( Actor& actor ) { if( GetIsOnStage() ) { @@ -141,7 +144,7 @@ void Visual::SetOffStage( Actor& actor ) } } -void Visual::EnablePreMultipliedAlpha( bool preMultipled ) +void Base::EnablePreMultipliedAlpha( bool preMultipled ) { if(preMultipled) { @@ -158,22 +161,22 @@ void Visual::EnablePreMultipliedAlpha( bool preMultipled ) } } -bool Visual::IsPreMultipliedAlphaEnabled() const +bool Base::IsPreMultipliedAlphaEnabled() const { return mImpl->mFlags & Impl::IS_PREMULTIPLIED_ALPHA; } -void Visual::DoSetOnStage( Actor& actor ) +void Base::DoSetOnStage( Actor& actor ) { } -void Visual::DoSetOffStage( Actor& actor ) +void Base::DoSetOffStage( Actor& actor ) { actor.RemoveRenderer( mImpl->mRenderer ); mImpl->mRenderer.Reset(); } -void Visual::CreatePropertyMap( Property::Map& map ) const +void Base::CreatePropertyMap( Property::Map& map ) const { DoCreatePropertyMap( map ); @@ -183,16 +186,18 @@ void Visual::CreatePropertyMap( Property::Map& map ) const } } -bool Visual::GetIsOnStage() const +bool Base::GetIsOnStage() const { return mImpl->mFlags & Impl::IS_ON_STAGE; } -bool Visual::GetIsFromCache() const +bool Base::GetIsFromCache() const { return mImpl->mFlags & Impl::IS_FROM_CACHE; } +} // namespace Visual + } // namespace Internal } // namespace Toolkit