Merge "Ensure UserDefined Font family is not changed by system font changing." into...
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / controls / renderer-factory / renderer-factory.h
index 3c3cec7..c4ac6a4 100644 (file)
@@ -25,6 +25,8 @@
 
 namespace Dali
 {
+class Image;
+class Vector4;
 
 namespace Toolkit
 {
@@ -35,7 +37,7 @@ class RendererFactory;
 }
 
 /**
- * RendererFactory is a singleton object that provides and shares renderers for controls
+ * @brief RendererFactory is a singleton object that provides and shares renderers for controls
  *
  * The renderer type is required in the property map for requesting a control renderer.
  *
@@ -84,13 +86,83 @@ public:
   RendererFactory& operator=( const RendererFactory& handle );
 
   /**
-   * Request the control renderer
+   * @brief Request the control renderer
+   *
    * @param[in] propertyMap The map contains the properties required by the control renderer
    *            Depends on the content of the map, different kind of renderer would be returned.
-   * @return the  pointer pointing to control renderer
+   * @return The pointer pointing to control renderer
    */
   ControlRenderer GetControlRenderer( const Property::Map& propertyMap  );
 
+  /**
+   * @brief Request the control renderer to render the given color
+   *
+   * @param[in] color The color to be rendered
+   * @return The pointer pointing to the control renderer
+   */
+  ControlRenderer GetControlRenderer( const Vector4& color );
+
+  /**
+   * @brief Request the current control renderer to render the given color
+   *
+   * if the current renderer is a handle to an internal color renderer, set this color to it,
+   * else the renderer would be a handle to a newly created internal color renderer.
+   *
+   * @param[in] renderer The ControlRenderer to reset
+   * @param[in] color The color to be rendered.
+   * @return Whether a new internal control renderer is created.
+   */
+  bool ResetRenderer( ControlRenderer& renderer, const Vector4& color );
+
+  /**
+   * @brief Request the control renderer to renderer the border with the given size and color.
+   *
+   * @param[in] borderSize The size of the border. Border size is the same along all edges.
+   * @param[in] borderColor The color of the border.
+   * @return The pointer pointing to the control renderer
+   */
+  ControlRenderer GetControlRenderer( float borderSize, const Vector4& borderColor );
+
+  /**
+   * @brief Request the control renderer to render the image.
+   *
+   * @param[in] image The image to be rendered.
+   * @return The pointer pointing to the control renderer
+   */
+  ControlRenderer GetControlRenderer( const Image& image );
+
+  /**
+   * @brief Request the current control renderer to render the given image
+   *
+   * if the current renderer is a handle to an internal image renderer, set this image to it,
+   * else the renderer would be a handle to a newly created internal image renderer.
+   *
+   * @param[in] renderer The ControlRenderer to reset
+   * @param[in] image The Image to be rendered.
+   * @return Whether a new internal control renderer is created.
+   */
+  bool ResetRenderer( ControlRenderer& renderer, const Image& image );
+
+  /**
+   * @brief Request the control renderer to render the given resource at the url.
+   *
+   * @param[in] url The URL to the resource to be rendered.
+   * @return The pointer pointing to the control renderer
+   */
+  ControlRenderer GetControlRenderer( const std::string& url );
+
+  /**
+   * @brief Request the current control renderer to render the given resource at the url
+   *
+   * if the current renderer is a handle to an internal image renderer, set this image to it,
+   * else the renderer would be a handle to a newly created internal image renderer.
+   *
+   * @param[in] renderer The ControlRenderer to reset
+   * @param[in] url The URL to the resource to be rendered.
+   * @return Whether a new internal control renderer is created.
+   */
+  bool ResetRenderer( ControlRenderer& renderer, const std::string& url );
+
 private:
 
   explicit DALI_INTERNAL RendererFactory(Internal::RendererFactory *impl);