CanvasView: Add RemoveDrawable() API
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / controls / canvas-view / canvas-view.h
index 9e59722..5860539 100644 (file)
@@ -51,12 +51,42 @@ class CanvasView;
  *    myCanvasView.AddDrawable( shape );
  * @endcode
  *
+ * @section CanvasViewProperties Properties
+ * |%Property enum                    |String name          |Type            |Writable|Animatable|
+ * |----------------------------------|---------------------|----------------|--------|----------|
+ * | Property::VIEW_BOX               | viewBox             |  Vector2       | O      | X        |
  *
  */
 class DALI_TOOLKIT_API CanvasView : public Control
 {
 public:
   /**
+   * @brief The start and end property ranges for this control.
+   */
+  enum PropertyRange
+  {
+    PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1,
+  };
+
+  /**
+   * @brief An enumeration of properties belonging to the CanvasView class.
+   */
+  struct Property
+  {
+    /**
+     * @brief An enumeration of properties belonging to the CanvasView class.
+     */
+    enum
+    {
+      /**
+       * @brief the viewbox of the CanvasView.
+       * @details Name "viewBox", type Property::VECTOR2.
+       */
+      VIEW_BOX = PROPERTY_START_INDEX,
+    };
+  };
+public:
+  /**
    * @brief Creates an uninitialized CanvasView.
    */
   CanvasView();
@@ -64,6 +94,13 @@ public:
   /**
    * @brief Creates an initialized CanvasView
    *
+   * @return A handle to a newly allocated CanvasView
+   */
+  static CanvasView New();
+
+  /**
+   * @brief Creates an initialized CanvasView
+   *
    * @param [in] viewBox The width and height.
    * @return A handle to a newly allocated CanvasView
    */
@@ -120,9 +157,18 @@ public:
   /**
    * @brief Add drawable object to the CanvasView.
    * This method is similar to registration. The added shape is drawn on the inner canvas.
+   * @param[in] drawable the drawable object.
    */
   void AddDrawable(Dali::CanvasRenderer::Drawable& drawable);
 
+  /**
+   * @brief Remove drawable object to the CanvasView.
+   * This method is similar to deregistration.
+   * @param[in] drawable the drawable object.
+   * @return Returns True when it's successful. False otherwise.
+   */
+  bool RemoveDrawable(Dali::CanvasRenderer::Drawable& drawable);
+
 public: // Not intended for application developers
   /// @cond internal
   /**