[dali_2.3.22] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / controls / text-controls / text-editor-devel.cpp
index a685aee..84a80b7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -40,11 +40,31 @@ AnchorClickedSignalType& AnchorClickedSignal(TextEditor textEditor)
   return GetImpl(textEditor).AnchorClickedSignal();
 }
 
+CursorPositionChangedSignalType& CursorPositionChangedSignal(TextEditor textEditor)
+{
+  return GetImpl(textEditor).CursorPositionChangedSignal();
+}
+
 InputFilteredSignalType& InputFilteredSignal(TextEditor textEditor)
 {
   return GetImpl(textEditor).InputFilteredSignal();
 }
 
+SelectionChangedSignalType& SelectionChangedSignal(TextEditor textEditor)
+{
+  return GetImpl(textEditor).SelectionChangedSignal();
+}
+
+SelectionClearedSignalType& SelectionClearedSignal(TextEditor textEditor)
+{
+  return GetImpl(textEditor).SelectionClearedSignal();
+}
+
+SelectionStartedSignalType& SelectionStartedSignal(TextEditor textEditor)
+{
+  return GetImpl(textEditor).SelectionStartedSignal();
+}
+
 void SelectWholeText(TextEditor textEditor)
 {
   GetImpl(textEditor).SelectWholeText();
@@ -55,11 +75,66 @@ void SelectNone(TextEditor textEditor)
   GetImpl(textEditor).SelectNone();
 }
 
+void SelectText(TextEditor textEditor, const uint32_t start, const uint32_t end)
+{
+  GetImpl(textEditor).SelectText(start, end);
+}
+
 void ScrollBy(TextEditor textEditor, Vector2 scroll)
 {
   GetImpl(textEditor).ScrollBy(scroll);
 }
 
+Vector<Vector2> GetTextSize(TextEditor textEditor, const uint32_t startIndex, const uint32_t endIndex)
+{
+  return GetImpl(textEditor).GetTextSize(startIndex, endIndex);
+}
+
+Vector<Vector2> GetTextPosition(TextEditor textEditor, const uint32_t startIndex, const uint32_t endIndex)
+{
+  return GetImpl(textEditor).GetTextPosition(startIndex, endIndex);
+}
+
+Rect<> GetTextBoundingRectangle(TextEditor textEditor, uint32_t startIndex, uint32_t endIndex)
+{
+  return GetImpl(textEditor).GetTextBoundingRectangle(startIndex, endIndex);
+}
+
+string CopyText(TextEditor textEditor)
+{
+  return GetImpl(textEditor).CopyText();
+}
+
+string CutText(TextEditor textEditor)
+{
+  return GetImpl(textEditor).CutText();
+}
+
+void PasteText(TextEditor textEditor)
+{
+  GetImpl(textEditor).PasteText();
+}
+
+void SetRemoveFrontInset(TextEditor textEditor, const bool remove)
+{
+  GetImpl(textEditor).SetRemoveFrontInset(remove);
+}
+
+bool IsRemoveFrontInset(TextEditor textEditor)
+{
+  return GetImpl(textEditor).IsRemoveFrontInset();
+}
+
+void SetRemoveBackInset(TextEditor textEditor, const bool remove)
+{
+  GetImpl(textEditor).SetRemoveBackInset(remove);
+}
+
+bool IsRemoveBackInset(TextEditor textEditor)
+{
+  return GetImpl(textEditor).IsRemoveBackInset();
+}
+
 } // namespace DevelTextEditor
 
 } // namespace Toolkit