Render control background without creating extra actor
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / renderers / control-renderer-impl.h
index 56cef7e..773e7c0 100644 (file)
@@ -61,6 +61,16 @@ public:
   virtual void SetSize( const Vector2& size );
 
   /**
+   * @copydoc Toolkit::ControlRenderer::GetSize
+   */
+  const Vector2& GetSize() const;
+
+  /**
+   * @copydoc Toolkit::ControlRenderer::GetNaturalSize
+   */
+  virtual void GetNaturalSize( Vector2& naturalSize ) const;
+
+  /**
    * ToDo: Add this function to Toolkit::ControlRenderer when it is fully implemented.
    *
    * Set the clip rectangular of this renderer.
@@ -85,20 +95,26 @@ public:
   void SetDepthIndex( float index );
 
   /**
+   * @copydoc Toolkit::ControlRenderer::GetDepthIndex
+   */
+  float GetDepthIndex() const;
+
+  /**
    * @copydoc Toolkit::ControlRenderer::SetOnStage
+   * @pre Impl->mGeometry must be created before this method is called
    */
-  virtual void SetOnStage( Actor& actor );
+  void SetOnStage( Actor& actor );
 
   /**
-   * ToDo: Add this function to Toolkit::ControlRenderer when the Renderer can be removed from actor properly.
-   *
-   * Renderer is destroyed when control is off stage.
-   * This function should be called when the control removes from stage
-   *
-   * @param[in] actor The actor applying this renderer.
+   * @copydoc Toolkit::ControlRenderer::SetOffStage
    */
   void SetOffStage( Actor& actor );
 
+  /**
+   * @copydoc Toolkit::ControlRenderer::CreatePropertyMap
+   */
+  virtual void CreatePropertyMap( Property::Map& map ) const = 0;
+
 protected:
 
   /**
@@ -111,6 +127,22 @@ protected:
    */
   virtual ~ControlRenderer();
 
+protected:
+
+  /**
+   * Called by SetOnStage() allowing sub classes to respond to the SetOnStage event
+   *
+   * @param[in] actor The actor applying this renderer.
+   */
+  virtual void DoSetOnStage( Actor& actor );
+
+  /**
+   * Called by SetOffStage() allowing sub classes to respond to the SetOffStage event
+   *
+   * @param[in] actor The actor applying this renderer.
+   */
+  virtual void DoSetOffStage( Actor& actor );
+
 private:
 
   // Undefined