Added New methods to cater for second step initialization
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / color / color-visual.cpp
index 6406bcc..8736d54 100644 (file)
@@ -65,6 +65,11 @@ const char* FRAGMENT_SHADER = DALI_COMPOSE_SHADER(
 );
 }
 
+ColorVisualPtr ColorVisual::New( VisualFactoryCache& factoryCache )
+{
+  return new ColorVisual( factoryCache );
+}
+
 ColorVisual::ColorVisual( VisualFactoryCache& factoryCache )
 : Visual::Base( factoryCache ),
   mMixColorIndex( Property::INVALID_INDEX )
@@ -105,6 +110,27 @@ void ColorVisual::DoCreatePropertyMap( Property::Map& map ) const
   map.Insert( Toolkit::ColorVisual::Property::MIX_COLOR, mMixColor );
 }
 
+void ColorVisual::DoSetProperty( Dali::Property::Index index, const Dali::Property::Value& propertyValue )
+{
+  // TODO
+  /* David Steele comented :
+
+     Some things to bear in mind:
+
+     We currently keep a copy of the mix color in the ColorVisual object, which is then used to instantiate the registered property on the renderer.
+
+     The user can get the renderer and animate the mixColor property (it's registered, so is automatically a scene-graph property).
+
+     The GetProperty method will have to read from the renderer, or from the cached value in the Visual, and the SetProperty will have to write to cache and to the renderer if present.
+  */
+}
+
+Dali::Property::Value ColorVisual::DoGetProperty( Dali::Property::Index index )
+{
+  // TODO
+  return Dali::Property::Value();
+}
+
 void ColorVisual::InitializeRenderer()
 {
   Geometry geometry = mFactoryCache.GetGeometry( VisualFactoryCache::QUAD_GEOMETRY );