Add TextSelect()
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / controls / text-controls / text-editor-devel.h
index fb96330..2d14542 100644 (file)
@@ -253,6 +253,20 @@ enum Type
    * @endcode
    */
   INPUT_FILTER,
+
+  /**
+  * @brief Whether we should show the ellipsis if required.
+  * @details Name "ellipsis", type Property::BOOLEAN.
+  */
+  ELLIPSIS,
+
+  /**
+  * @brief The enumerations used to specify whether to position the ellipsis at the END, START or MIDDLE of the text.
+  * @details Name "EllipsisPosition", type [Type](@ref Dali::Toolkit::DevelText::EllipsisPosition::Type) (Property::INTEGER), or Property::STRING. Read/Write
+  * @note Default is EllipsisPosition::END.
+  * @see DevelText::EllipsisPosition
+  */
+  ELLIPSIS_POSITION,
 };
 
 } // namespace Property
@@ -349,6 +363,21 @@ DALI_TOOLKIT_API void SelectWholeText(TextEditor textEditor);
 DALI_TOOLKIT_API void SelectNone(TextEditor textEditor);
 
 /**
+ * @brief Select the text from start index to end index of TextEditor.
+ * @note
+ * The selection index is based on the cursor index.
+ *
+ * text   H e l l o
+ * index 0 1 2 3 4 5
+ * if textEditor.SelectText(1, 4); is executed, "ell" is selected.
+ *
+ * @param[in] textEditor The instance of TextEditor.
+ * @param[in] start The start index of the text to select. (The starting point of start index is 0.)
+ * @param[in] end The end index of the text to select. (If end index > text's length, the end index is set to the length of the text.)
+ */
+DALI_TOOLKIT_API void SelectText(TextEditor textEditor, const uint32_t start, const uint32_t end);
+
+/**
  * @brief Scroll the TextEditor by specific amount.
  *
  * @param[in] textEditor The instance of TextEditor.