Add support to unselect text And Get_SelectedText
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / text-controller.h
index 82a7a15..6a986f5 100755 (executable)
@@ -47,6 +47,16 @@ class EditableControlInterface;
 class View;
 class RenderingController;
 
+  /**
+   * @brief Text selection operations .
+   */
+  enum SelectionType
+  {
+    INTERACTIVE        = 0x0000,
+    ALL                = 0x0001,
+    NONE               = 0x0002
+  };
+
 typedef IntrusivePtr<Controller> ControllerPtr;
 
 /**
@@ -1462,9 +1472,9 @@ public: // Text-input Event Queuing.
    *
    * @param[in] x The x position relative to the top-left of the parent control.
    * @param[in] y The y position relative to the top-left of the parent control.
-   * @param[in] selectAll Whether the whole text is selected.
+   * @param[in] selection type like the whole text is selected or unselected.
    */
-  void SelectEvent( float x, float y, bool selectAll );
+  void SelectEvent( float x, float y, SelectionType selection );
 
   /**
    * @brief Event received from input method context
@@ -1494,6 +1504,13 @@ public: // Text-input Event Queuing.
    */
   Actor CreateBackgroundActor();
 
+  /**
+   * @brief Retrive Selected text.
+   *
+   * @return The seleced text.
+   */
+  std::string GetSelectedText();
+
 protected: // Inherit from Text::Decorator::ControllerInterface.
 
   /**