[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextLabel_RequestAsyncNaturalSize")]
public static extern void RequestAsyncNaturalSize(global::System.Runtime.InteropServices.HandleRef textLabelRef);
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextLabel_RequestAsyncHeightForWidth")]
+ public static extern void RequestAsyncHeightForWidth(global::System.Runtime.InteropServices.HandleRef textLabelRef, float width);
+
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextLabel_AsyncTextRenderedSignal")]
public static extern global::System.IntPtr AsyncTextRenderedSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextLabel_AsyncNaturalSizeComputedSignal")]
public static extern global::System.IntPtr AsyncNaturalSizeComputedSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextLabel_AsyncHeightForWidthComputedSignal")]
+ public static extern global::System.IntPtr AsyncHeightForWidthComputedSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
}
}
}
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
+ /// <summary>
+ /// Requests asynchronous computation of the height of the text based on the given width.
+ /// </summary>
+ /// <param name="width">The width of text to compute.</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void RequestAsyncHeightForWidth(float width)
+ {
+ Interop.TextLabel.RequestAsyncHeightForWidth(SwigCPtr, width);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
/// <summary>
/// The TranslatableText property.<br />
/// The text can set the SID value.<br />
private EventHandler<AsyncTextSizeComputedEventArgs> textLabelAsyncTextNaturalSizeComputedEventHandler;
private AsyncTextNaturalSizeComputedCallbackDelegate textLabelAsyncTextNaturalSizeComputedCallbackDelegate;
+ private EventHandler<AsyncTextSizeComputedEventArgs> textLabelAsyncTextHeightForWidthComputedEventHandler;
+ private AsyncTextHeightForWidthComputedCallbackDelegate textLabelAsyncTextHeightForWidthComputedCallbackDelegate;
+
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
private delegate void AnchorClickedCallbackDelegate(IntPtr textLabel, IntPtr href, uint hrefLength);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
private delegate void AsyncTextNaturalSizeComputedCallbackDelegate(IntPtr textLabel, float width, float height);
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ private delegate void AsyncTextHeightForWidthComputedCallbackDelegate(IntPtr textLabel, float width, float height);
+
+
+ /// <summary>
+ /// The AsyncHeightForWidthComputed signal is emitted when the async natural size computed.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public event EventHandler<AsyncTextSizeComputedEventArgs> AsyncHeightForWidthComputed
+ {
+ add
+ {
+ if (textLabelAsyncTextHeightForWidthComputedEventHandler == null)
+ {
+ textLabelAsyncTextHeightForWidthComputedCallbackDelegate = (OnAsyncHeightForWidthComputed);
+ AsyncHeightForWidthComputedSignal().Connect(textLabelAsyncTextHeightForWidthComputedCallbackDelegate);
+ }
+ textLabelAsyncTextHeightForWidthComputedEventHandler += value;
+ }
+ remove
+ {
+ textLabelAsyncTextHeightForWidthComputedEventHandler -= value;
+ if (textLabelAsyncTextHeightForWidthComputedEventHandler == null && AsyncHeightForWidthComputedSignal().Empty() == false)
+ {
+ AsyncHeightForWidthComputedSignal().Disconnect(textLabelAsyncTextHeightForWidthComputedCallbackDelegate);
+ }
+ }
+ }
+
+ internal TextLabelSignal AsyncHeightForWidthComputedSignal()
+ {
+ TextLabelSignal ret = new TextLabelSignal(Interop.TextLabel.AsyncHeightForWidthComputedSignal(SwigCPtr), false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ private void OnAsyncHeightForWidthComputed(IntPtr textLabel, float width, float height)
+ {
+ AsyncTextSizeComputedEventArgs e = new AsyncTextSizeComputedEventArgs(width, height);
+
+ //here we send all data to user event handlers
+ textLabelAsyncTextHeightForWidthComputedEventHandler?.Invoke(this, e);
+ }
/// <summary>
/// The AsyncNaturalSizeComputed signal is emitted when the async natural size computed.