Merge "Changed README to README.md" into devel/master
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / visual-base-impl.cpp
index 4156d1a..d152a7f 100644 (file)
@@ -55,11 +55,11 @@ void Visual::Base::SetCustomShader( const Property::Map& shaderMap )
   }
   else
   {
-   mImpl->mCustomShader = new Impl::CustomShader( shaderMap );
+    mImpl->mCustomShader = new Impl::CustomShader( shaderMap );
   }
 }
 
-void Visual::Base::Initialize( Actor& actor, const Property::Map& propertyMap )
+void Visual::Base::SetProperties( const Property::Map& propertyMap )
 {
   Property::Value* customShaderValue = propertyMap.Find( Toolkit::Visual::Property::SHADER, CUSTOM_SHADER );
   if( customShaderValue )
@@ -71,7 +71,17 @@ void Visual::Base::Initialize( Actor& actor, const Property::Map& propertyMap )
     }
   }
 
-  DoInitialize( actor, propertyMap );
+  DoSetProperties( 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 )
@@ -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;
@@ -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,16 +177,6 @@ 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::IsOnStage() const
 {
   return mImpl->mFlags & Impl::IS_ON_STAGE;