--- /dev/null
+/*
+ * Copyright(c) 2021 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+namespace Tizen.NUI
+{
+ internal class VectorVector2 : Disposable
+ {
+ internal VectorVector2(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+ {
+ }
+
+ protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
+ {
+ Interop.VectorVector2.DeleteVectorVector2(swigCPtr);
+ }
+
+ public VectorVector2() : this(Interop.VectorVector2.NewVectorVector2(), true)
+ {
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ public VectorVector2(VectorVector2 vector) : this(Interop.VectorVector2.NewVectorVector2(VectorVector2.getCPtr(vector)), true)
+ {
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ public VectorVector2 Assign(VectorVector2 vector)
+ {
+ VectorVector2 ret = new VectorVector2(Interop.VectorVector2.Assign(SwigCPtr, VectorVector2.getCPtr(vector)), false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ public Vector2 Begin()
+ {
+ global::System.IntPtr cPtr = Interop.VectorVector2.Begin(SwigCPtr);
+ Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ public Vector2 End()
+ {
+ global::System.IntPtr cPtr = Interop.VectorVector2.End(SwigCPtr);
+ Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ public Vector2 ValueOfIndex(uint index)
+ {
+ Vector2 ret = new Vector2(Interop.VectorVector2.ValueOfIndex(SwigCPtr, index), false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ public void PushBack(Vector2 element)
+ {
+ Interop.VectorVector2.PushBack(SwigCPtr, Vector2.getCPtr(element));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ public void Insert(Vector2 at, Vector2 element)
+ {
+ Interop.VectorVector2.Insert(SwigCPtr, Vector2.getCPtr(at), Vector2.getCPtr(element));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ public void Insert(Vector2 at, Vector2 from, Vector2 to)
+ {
+ Interop.VectorVector2.Insert(SwigCPtr, Vector2.getCPtr(at), Vector2.getCPtr(from), Vector2.getCPtr(to));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ public void Reserve(uint count)
+ {
+ Interop.VectorVector2.Reserve(SwigCPtr, count);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ public void Resize(uint count)
+ {
+ Interop.VectorVector2.Resize(SwigCPtr, count);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ public void Resize(uint count, Vector2 item)
+ {
+ Interop.VectorVector2.Resize(SwigCPtr, count, Vector2.getCPtr(item));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ public Vector2 Erase(Vector2 iterator)
+ {
+ global::System.IntPtr cPtr = Interop.VectorVector2.Erase(SwigCPtr, Vector2.getCPtr(iterator));
+ Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ public Vector2 Erase(Vector2 first, Vector2 last)
+ {
+ global::System.IntPtr cPtr = Interop.VectorVector2.Erase(SwigCPtr, Vector2.getCPtr(first), Vector2.getCPtr(last));
+ Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ public void Remove(Vector2 iterator)
+ {
+ Interop.VectorVector2.Remove(SwigCPtr, Vector2.getCPtr(iterator));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ public void Swap(VectorVector2 vector)
+ {
+ Interop.VectorVector2.Swap(SwigCPtr, VectorVector2.getCPtr(vector));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ public void Clear()
+ {
+ Interop.VectorVector2.Clear(SwigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ public void Release()
+ {
+ Interop.VectorVector2.Release(SwigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ public int Size()
+ {
+ int size = Interop.VectorVector2.Size(SwigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return size;
+ }
+
+ public static readonly int BaseType = Interop.VectorVector2.BaseTypeGet();
+ }
+}
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextEditor_InputFilteredSignal")]
public static extern global::System.IntPtr InputFilteredSignal(global::System.Runtime.InteropServices.HandleRef textEditorRef);
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextEditor_GetTextSize")]
+ public static extern global::System.IntPtr GetTextSize(global::System.Runtime.InteropServices.HandleRef textEditorRef, uint start, uint end);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextEditor_GetTextPosition")]
+ public static extern global::System.IntPtr GetTextPosition(global::System.Runtime.InteropServices.HandleRef textEditorRef, uint start, uint end);
+
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextEditor_CopyText")]
public static extern string CopyText(global::System.Runtime.InteropServices.HandleRef textEditorRef);
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextField_InputFilteredSignal")]
public static extern global::System.IntPtr InputFilteredSignal(global::System.Runtime.InteropServices.HandleRef textFieldRef);
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextField_GetTextSize")]
+ public static extern global::System.IntPtr GetTextSize(global::System.Runtime.InteropServices.HandleRef textFieldRef, uint start, uint end);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextField_GetTextPosition")]
+ public static extern global::System.IntPtr GetTextPosition(global::System.Runtime.InteropServices.HandleRef textFieldRef, uint start, uint end);
+
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextField_CopyText")]
public static extern string CopyText(global::System.Runtime.InteropServices.HandleRef textFieldRef);
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextLabel_Property_FONT_SIZE_SCALE_get")]
public static extern int FontSizeScaleGet();
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextLabel_GetTextSize")]
+ public static extern global::System.IntPtr GetTextSize(global::System.Runtime.InteropServices.HandleRef textLabelRef, uint start, uint end);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextLabel_GetTextPosition")]
+ public static extern global::System.IntPtr GetTextPosition(global::System.Runtime.InteropServices.HandleRef textLabelRef, uint start, uint end);
+
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextLabel_AnchorClickedSignal")]
public static extern global::System.IntPtr AnchorClickedSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
--- /dev/null
+/*
+ * Copyright(c) 2021 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+namespace Tizen.NUI
+{
+ internal static partial class Interop
+ {
+ internal static partial class VectorVector2
+ {
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_VectorVector2_BaseType_get")]
+ public static extern int BaseTypeGet();
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_VectorVector2__SWIG_0")]
+ public static extern global::System.IntPtr NewVectorVector2();
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_VectorVector2")]
+ public static extern void DeleteVectorVector2(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_VectorVector2__SWIG_1")]
+ public static extern global::System.IntPtr NewVectorVector2(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_VectorVector2_Assign")]
+ public static extern global::System.IntPtr Assign(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_VectorVector2_Begin")]
+ public static extern global::System.IntPtr Begin(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_VectorVector2_End")]
+ public static extern global::System.IntPtr End(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_VectorVector2_ValueOfIndex__SWIG_0")]
+ public static extern global::System.IntPtr ValueOfIndex(global::System.Runtime.InteropServices.HandleRef jarg1, uint jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_VectorVector2_PushBack")]
+ public static extern void PushBack(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_VectorVector2_Insert__SWIG_0")]
+ public static extern void Insert(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_VectorVector2_Insert__SWIG_1")]
+ public static extern void Insert(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, global::System.Runtime.InteropServices.HandleRef jarg4);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_VectorVector2_Reserve")]
+ public static extern void Reserve(global::System.Runtime.InteropServices.HandleRef jarg1, uint jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_VectorVector2_Resize__SWIG_0")]
+ public static extern void Resize(global::System.Runtime.InteropServices.HandleRef jarg1, uint jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_VectorVector2_Resize__SWIG_1")]
+ public static extern void Resize(global::System.Runtime.InteropServices.HandleRef jarg1, uint jarg2, global::System.Runtime.InteropServices.HandleRef jarg3);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_VectorVector2_Erase__SWIG_0")]
+ public static extern global::System.IntPtr Erase(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_VectorVector2_Erase__SWIG_1")]
+ public static extern global::System.IntPtr Erase(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_VectorVector2_Remove")]
+ public static extern void Remove(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_VectorVector2_Swap")]
+ public static extern void Swap(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_VectorVector2_Clear")]
+ public static extern void Clear(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_VectorVector2_Release")]
+ public static extern void Release(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_VectorVector2_Size")]
+ public static extern int Size(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2020 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System;
+using System.ComponentModel;
+using Tizen.NUI.Text;
+using System.Collections.Generic;
+
+namespace Tizen.NUI.BaseComponents
+{
+ /// <summary>
+ /// </summary>
+ // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static partial class TextGeometry
+ {
+ private static void ValidateRange(int start, int end)
+ {
+ if (start < 0)
+ throw new global::System.ArgumentOutOfRangeException(nameof(start), "Value is less than zero");
+ if (end < 0)
+ throw new global::System.ArgumentOutOfRangeException(nameof(end), "Value is less than zero");
+ }
+
+ private static List<Size2D> GetSizeListFromNativeVector(System.IntPtr ptr)
+ {
+ VectorVector2 sizeVector = new VectorVector2 (ptr, true);
+ int count = sizeVector.Size();
+ List<Size2D> list = new List<Size2D>();
+
+ for(int i = 0; i < count; i++)
+ list.Add(sizeVector.ValueOfIndex( (uint)i ));
+
+ return list;
+ }
+
+ private static List<Position2D> GetPositionListFromNativeVector(System.IntPtr ptr)
+ {
+ VectorVector2 positionVector = new VectorVector2 (ptr, true);
+ int count = positionVector.Size();
+ List<Position2D> list = new List<Position2D>();
+
+ for(int i = 0; i < count; i++)
+ list.Add(positionVector.ValueOfIndex( (uint)i ));
+
+ return list;
+ }
+
+ private static void CheckSWIGPendingException()
+ {
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Get the rendered size of the text between start and end (included). <br />
+ /// if the requested text is at multilines, multiple sizes will be returned for each text located in a separate line. <br />
+ /// if a line contains characters with different directions, multiple sizes will be returned for each block of contiguous characters with the same direction. <br />
+ /// </summary>
+ /// <param name="textEditor">The TextEditor control containing the text.</param>
+ /// <param name="start">The start index of the text to get the size for</param>
+ /// <param name="end">The end index of the text to get the size for.</param>
+ // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static List<Size2D> GetTextSize(TextEditor textEditor, int start, int end)
+ {
+ ValidateRange(start, end);
+
+ List<Size2D> list = GetSizeListFromNativeVector(Interop.TextEditor.GetTextSize(textEditor.SwigCPtr, (uint)start, (uint)end));
+ CheckSWIGPendingException();
+ return list;
+ }
+
+ /// <summary>
+ /// Get the rendered size of the text between start and end (included). <br />
+ /// if the requested text is at multilines, multiple sizes will be returned for each text located in a separate line. <br />
+ /// if a line contains characters with different directions, multiple sizes will be returned for each block of contiguous characters with the same direction. <br />
+ /// </summary>
+ /// <param name="textField">The TextField control containing the text.</param>
+ /// <param name="start">The start index of the text to get the size for</param>
+ /// <param name="end">The end index of the text to get the size for.</param>
+ // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static List<Size2D> GetTextSize(TextField textField, int start, int end)
+ {
+ ValidateRange(start, end);
+
+ List<Size2D> list = GetSizeListFromNativeVector(Interop.TextField.GetTextSize(textField.SwigCPtr, (uint)start, (uint)end));
+ CheckSWIGPendingException();
+ return list;
+ }
+
+ /// <summary>
+ /// Get the rendered size of the text between start and end (included). <br />
+ /// if the requested text is at multilines, multiple sizes will be returned for each text located in a separate line. <br />
+ /// if a line contains characters with different directions, multiple sizes will be returned for each block of contiguous characters with the same direction. <br />
+ /// </summary>
+ /// <param name="textLabel">The TextLabel control containing the text.</param>
+ /// <param name="start">The start index of the text to get the size for</param>
+ /// <param name="end">The end index of the text to get the size for.</param>
+ // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static List<Size2D> GetTextSize(TextLabel textLabel, int start, int end)
+ {
+ ValidateRange(start, end);
+
+ List<Size2D> list = GetSizeListFromNativeVector(Interop.TextLabel.GetTextSize(textLabel.SwigCPtr, (uint)start, (uint)end));
+ CheckSWIGPendingException();
+ return list;
+ }
+
+ /// <summary>
+ /// Get the rendered position (top-left) of the text between start and end (included). <br />
+ /// if the requested text is at multilines, multiple positions will be returned for each text located in a separate line. <br />
+ /// if a line contains characters with different directions, multiple positions will be returned for each block of contiguous characters with the same direction. <br />
+ /// </summary>
+ /// <param name="textEditor">The TextEditor control containing the text.</param>
+ /// <param name="start">The start index of the text to get the position for</param>
+ /// <param name="end">The end index of the text to get the position for.</param>
+ // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static List<Position2D> GetTextPosition(TextEditor textEditor, int start, int end)
+ {
+ ValidateRange(start, end);
+
+ List<Position2D> list = GetPositionListFromNativeVector(Interop.TextEditor.GetTextPosition(textEditor.SwigCPtr, (uint)start, (uint)end));
+ CheckSWIGPendingException();
+ return list;
+ }
+
+ /// <summary>
+ /// Get the rendered position (top-left) of the text between start and end (included). <br />
+ /// if the requested text is at multilines, multiple positions will be returned for each text located in a separate line. <br />
+ /// if a line contains characters with different directions, multiple positions will be returned for each block of contiguous characters with the same direction. <br />
+ /// </summary>
+ /// <param name="textField">The TextField control containing the text.</param>
+ /// <param name="start">The start index of the text to get the position for</param>
+ /// <param name="end">The end index of the text to get the position for.</param>
+ // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static List<Position2D> GetTextPosition(TextField textField, int start, int end)
+ {
+ ValidateRange(start, end);
+
+ List<Position2D> list = GetPositionListFromNativeVector(Interop.TextField.GetTextPosition(textField.SwigCPtr, (uint)start, (uint)end));
+ CheckSWIGPendingException();
+ return list;
+ }
+
+ /// <summary>
+ /// Get the rendered position (top-left) of the text between start and end (included). <br />
+ /// if the requested text is at multilines, multiple positions will be returned for each text located in a separate line. <br />
+ /// if a line contains characters with different directions, multiple positions will be returned for each block of contiguous characters with the same direction. <br />
+ /// </summary>
+ /// <param name="textLabel">The TextLabel control containing the text.</param>
+ /// <param name="start">The start index of the text to get the position for</param>
+ /// <param name="end">The end index of the text to get the position for.</param>
+ // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static List<Position2D> GetTextPosition(TextLabel textLabel, int start, int end)
+ {
+ ValidateRange(start, end);
+
+ List<Position2D> list = GetPositionListFromNativeVector(Interop.TextLabel.GetTextPosition(textLabel.SwigCPtr, (uint)start, (uint)end));
+ CheckSWIGPendingException();
+ return list;
+ }
+ }
+}