Changed all property & signal names to lowerCamelCase
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / renderers / color / color-renderer.h
index 48c9778..6d13204 100644 (file)
@@ -35,9 +35,9 @@ namespace Internal
  *
  * The following properties are required for create a ColorRender
  *
- * | %Property Name   | Type        |
- * |------------------|-------------|
- * | blend-color      | VECTOR4     |
+ * | %Property Name  | Type        |
+ * |-----------------|-------------|
+ * | blendColor      | VECTOR4     |
  */
 class ColorRenderer: public ControlRenderer
 {
@@ -45,8 +45,10 @@ public:
 
   /**
    * @brief Constructor.
+   *
+   * @param[in] factoryCache A pointer pointing to the RendererFactoryCache object
    */
-  ColorRenderer();
+  ColorRenderer( RendererFactoryCache& factoryCache );
 
   /**
    * @brief A reference counted object may only be deleted by calling Unreference().
@@ -56,11 +58,6 @@ public:
 public:  // from ControlRenderer
 
   /**
-   * @copydoc ControlRenderer::Initialize
-   */
-  virtual void Initialize( RendererFactoryCache& factoryCache, const Property::Map& propertyMap );
-
-  /**
    * @copydoc ControlRenderer::SetSize
    */
   virtual void SetSize( const Vector2& size );
@@ -76,9 +73,35 @@ public:  // from ControlRenderer
   virtual void SetOffset( const Vector2& offset );
 
   /**
-   * @copydoc ControlRenderer::SetOnStage
+   * @copydoc ControlRenderer::CreatePropertyMap
+   */
+  virtual void DoCreatePropertyMap( Property::Map& map ) const;
+
+protected:
+
+  /**
+   * @copydoc ControlRenderer::DoInitialize
+   */
+  virtual void DoInitialize( Actor& actor, const Property::Map& propertyMap );
+
+  /**
+   * @copydoc ControlRenderer::DoSetOnStage
+   */
+  virtual void DoSetOnStage( Actor& actor );
+
+public:
+
+  /**
+   * Set the color for rendering.
+   * @param[in] color The color to be rendered.
+   */
+  void SetColor( const Vector4& color );
+
+private:
+  /**
+   * @brief Initialize the renderer with the geometry and shader from the cache, if not available, create and save to the cache for sharing.
    */
-  virtual void SetOnStage( Actor& actor );
+  void InitializeRenderer();
 
 private:
 
@@ -91,6 +114,7 @@ private:
 private:
 
   Vector4 mBlendColor;
+  Property::Index mBlendColorIndex;
 
 };