[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_RendererParameters_isTextColorSet_get")]
public static extern bool RendererParameters_isTextColorSet_get(global::System.Runtime.InteropServices.HandleRef jarg1);
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_RendererParameters_minLineSize_set")]
+ public static extern void RendererParameters_minLineSize_set(global::System.Runtime.InteropServices.HandleRef jarg1, float jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_RendererParameters_minLineSize_get")]
+ public static extern float RendererParameters_minLineSize_get(global::System.Runtime.InteropServices.HandleRef jarg1);
+
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_RendererParameters")]
public static extern void delete_RendererParameters(global::System.Runtime.InteropServices.HandleRef jarg1);
}
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
}
+ /// <summary>
+ /// Dispose
+ /// </summary>
protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
{
Interop.RendererParameters.delete_RendererParameters(swigCPtr);
}
}
+ /// <summary>
+ /// Minimum size of line.
+ /// </summary>
+ // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public float MinLineSize
+ {
+ set
+ {
+ Interop.RendererParameters.RendererParameters_minLineSize_set(swigCPtr, value);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ get
+ {
+ float ret = Interop.RendererParameters.RendererParameters_minLineSize_get(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+ }
+
}
/// <summary>
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
}
+ /// <summary>
+ /// Dispose
+ /// </summary>
protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
{
Interop.EmbeddedItemInfo.delete_EmbeddedItemInfo(swigCPtr);
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
}
+ /// <summary>
+ /// Dispose
+ /// </summary>
protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
{
Interop.ShadowParameters.delete_ShadowParameters(swigCPtr);
}
}
+ /// <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 TextUtils
/// <summary>
/// Splits the text in pages of the size given in @p textParameters
/// @note The returned indices are indices to utf32 characters. The input text is encoded in utf8.
- /// <returns> An array with the indices of the last character of each page
+ /// <returns> An array with the indices of the last character of each page </returns>
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public static Tizen.NUI.PropertyArray GetLastCharacterIndex(RendererParameters textParameters)
{
/// This is utility class for paging very long text.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public class TextPageUtil
+ public class TextPageUtil : Disposable
{
private static char LESS_THAN = '<';
private static char GREATER_THAN = '>';
private static char EQUAL = '=';
private static char QUOTATION_MARK = '\'';
private static char SLASH = '/';
- private static char BACK_SLASH = '\\';
- private static char AMPERSAND = '&';
- private static char HASH = '#';
- private static char SEMI_COLON = ';';
- private static char CHAR_ARRAY_END = '\0';
- private static char HEX_CODE = 'x';
+ // private static char BACK_SLASH = '\\';
+ // private static char AMPERSAND = '&';
+ // private static char HASH = '#';
+ // private static char SEMI_COLON = ';';
+ // private static char CHAR_ARRAY_END = '\0';
+ // private static char HEX_CODE = 'x';
private static byte WHITE_SPACE = 0x20;
- private static int TEXTPAGE_TEXT_CHUNK = 20000;
-
private int totalPageCnt;
private List<PageData> pageList;
[EditorBrowsable(EditorBrowsableState.Never)]
public int SetText(TextLabel label, string str)
{
- if(str == null) return 0;
+ if(label == null || str == null) return 0;
// perform this operation to match the utf32 character used in native Dali.
bool previousMarkup = label.EnableMarkup;
textParameters.TextHeight = (uint)label.Size.Height;
textParameters.EllipsisEnabled = true;
textParameters.MarkupEnabled = previousMarkup;
+ textParameters.MinLineSize = label.MinLineSize;
Tizen.NUI.PropertyArray cutOffIndexArray = TextUtils.GetLastCharacterIndex( textParameters );
if(offset <= 0 ) break;
}
+ textParameters.Dispose();
+ cutOffIndexArray.Dispose();
stream = null;
return totalPageCnt;
}
pageData.startOffset = offset;
- bool isPreviousLessThan = false;
- bool isPreviousSlash = false;
-
// If the markup was previously open, the markup tag should be attached to the front.
string tag ="";
foreach (TagData data in tagList)