X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2FTizen.NUI%2Fsrc%2Fpublic%2FBaseComponents%2FTextEditor.cs;h=b1621c31d07acd9be82434efc40392a70825dc01;hb=308e593b8a453186b4a6275f68255d622a493f46;hp=2d6e1153e1f0868194ea3d38b6beaf9e2406d70e;hpb=1e727238a0b6b5901fda6f6e184de7fcbe1ff477;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git
diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs b/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs
index 2d6e115..b1621c3 100755
--- a/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs
+++ b/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs
@@ -21,6 +21,7 @@ using TizenSystemSettings.Tizen.System;
using System;
using System.Globalization;
using System.ComponentModel;
+using Tizen.NUI.Text;
namespace Tizen.NUI.BaseComponents
{
@@ -202,6 +203,7 @@ namespace Tizen.NUI.BaseComponents
///
///
/// 3
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
public PropertyMap FontStyle
{
get
@@ -216,6 +218,44 @@ namespace Tizen.NUI.BaseComponents
}
///
+ /// Set FontStyle to TextEditor.
+ ///
+ /// The FontStyle
+ ///
+ /// SetFontStyle specifies the requested font style through .
+ ///
+ ///
+ /// The following example demonstrates how to use the SetFontStyle method.
+ ///
+ /// var fontStyle = new Tizen.NUI.Text.FontStyle();
+ /// fontStyle.Width = FontWidthType.Expanded;
+ /// fontStyle.Weight = FontWeightType.Bold;
+ /// fontStyle.Slant = FontSlantType.Italic;
+ /// editor.SetFontStyle(fontStyle);
+ ///
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetFontStyle(FontStyle fontStyle)
+ {
+ SetProperty(TextEditor.Property.FontStyle, new PropertyValue(TextUtils.GetFontStyleMap(fontStyle)));
+ }
+
+ ///
+ /// Get FontStyle from TextEditor.
+ ///
+ /// The FontStyle
+ ///
+ ///
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public FontStyle GetFontStyle()
+ {
+ var map = new PropertyMap();
+ GetProperty(TextEditor.Property.FontStyle).Get(map);
+ return TextUtils.GetFontStyleStruct(map);
+ }
+
+ ///
/// The PointSize property.
///
/// 3
@@ -660,6 +700,7 @@ namespace Tizen.NUI.BaseComponents
///
///
/// 3
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
public PropertyMap InputFontStyle
{
get
@@ -674,6 +715,45 @@ namespace Tizen.NUI.BaseComponents
}
///
+ /// Set InputFontStyle to TextEditor.
+ ///
+ /// The FontStyle
+ ///
+ /// SetInputFontStyle specifies the requested font style for new input text through .
+ ///
+ ///
+ /// The following example demonstrates how to use the SetInputFontStyle method.
+ ///
+ /// var fontStyle = new Tizen.NUI.Text.FontStyle();
+ /// fontStyle.Width = FontWidthType.Expanded;
+ /// fontStyle.Weight = FontWeightType.Bold;
+ /// fontStyle.Slant = FontSlantType.Italic;
+ /// editor.SetInputFontStyle(fontStyle);
+ ///
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetInputFontStyle(FontStyle fontStyle)
+ {
+ SetProperty(TextEditor.Property.InputFontStyle, new PropertyValue(TextUtils.GetFontStyleMap(fontStyle)));
+ NotifyPropertyChanged();
+ }
+
+ ///
+ /// Get InputFontStyle from TextEditor.
+ ///
+ /// The FontStyle
+ ///
+ ///
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public FontStyle GetInputFontStyle()
+ {
+ var map = new PropertyMap();
+ GetProperty(TextEditor.Property.InputFontStyle).Get(map);
+ return TextUtils.GetFontStyleStruct(map);
+ }
+
+ ///
/// The InputPointSize property.
///
/// 3
@@ -734,6 +814,7 @@ namespace Tizen.NUI.BaseComponents
///
///
/// 3
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
public PropertyMap Underline
{
get
@@ -748,6 +829,44 @@ namespace Tizen.NUI.BaseComponents
}
///
+ /// Set Underline to TextEditor.
+ ///
+ /// The Underline
+ ///
+ /// SetUnderline specifies the underline of the text through .
+ ///
+ ///
+ /// The following example demonstrates how to use the SetUnderline method.
+ ///
+ /// var underline = new Tizen.NUI.Text.Underline();
+ /// underline.Enable = true;
+ /// underline.Color = new Color("#3498DB");
+ /// underline.Height = 2.0f;
+ /// editor.SetUnderline(underline);
+ ///
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetUnderline(Underline underline)
+ {
+ SetProperty(TextEditor.Property.UNDERLINE, new PropertyValue(TextUtils.GetUnderlineMap(underline)));
+ }
+
+ ///
+ /// Get Underline from TextEditor.
+ ///
+ /// The Underline
+ ///
+ ///
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Underline GetUnderline()
+ {
+ var map = new PropertyMap();
+ GetProperty(TextEditor.Property.UNDERLINE).Get(map);
+ return TextUtils.GetUnderlineStruct(map);
+ }
+
+ ///
/// The InputUnderline property.
///
/// 3
@@ -774,6 +893,7 @@ namespace Tizen.NUI.BaseComponents
///
///
/// 3
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
public PropertyMap Shadow
{
get
@@ -788,6 +908,43 @@ namespace Tizen.NUI.BaseComponents
}
///
+ /// Set Shadow to TextEditor.
+ ///
+ /// The Shadow
+ ///
+ /// SetShadow specifies the shadow of the text through .
+ ///
+ ///
+ /// The following example demonstrates how to use the SetShadow method.
+ ///
+ /// var shadow = new Tizen.NUI.Text.Shadow();
+ /// shadow.Offset = new Vector2(3, 3);
+ /// shadow.Color = new Color("#F1C40F");
+ /// editor.SetShadow(shadow);
+ ///
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetShadow(Tizen.NUI.Text.Shadow shadow)
+ {
+ SetProperty(TextEditor.Property.SHADOW, new PropertyValue(TextUtils.GetShadowMap(shadow)));
+ }
+
+ ///
+ /// Get Shadow from TextEditor.
+ ///
+ /// The Shadow
+ ///
+ ///
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Tizen.NUI.Text.Shadow GetShadow()
+ {
+ var map = new PropertyMap();
+ GetProperty(TextEditor.Property.SHADOW).Get(map);
+ return TextUtils.GetShadowStruct(map);
+ }
+
+ ///
/// The InputShadow property.
///
/// 3
@@ -847,6 +1004,7 @@ namespace Tizen.NUI.BaseComponents
///
///
/// 3
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
public PropertyMap Outline
{
get
@@ -861,6 +1019,43 @@ namespace Tizen.NUI.BaseComponents
}
///
+ /// Set Outline to TextEditor.
+ ///
+ /// The Outline
+ ///
+ /// SetOutline specifies the outline of the text through .
+ ///
+ ///
+ /// The following example demonstrates how to use the SetOutline method.
+ ///
+ /// var outline = new Tizen.NUI.Text.Outline();
+ /// outline.Width = 2.0f;
+ /// outline.Color = new Color("#45B39D");
+ /// editor.SetOutline(outline);
+ ///
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetOutline(Outline outline)
+ {
+ SetProperty(TextEditor.Property.OUTLINE, new PropertyValue(TextUtils.GetOutlineMap(outline)));
+ }
+
+ ///
+ /// Get Outline from TextEditor.
+ ///
+ /// The Outline
+ ///
+ ///
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Outline GetOutline()
+ {
+ var map = new PropertyMap();
+ GetProperty(TextEditor.Property.OUTLINE).Get(map);
+ return TextUtils.GetOutlineStruct(map);
+ }
+
+ ///
/// The InputOutline property.
///
/// 3
@@ -1222,6 +1417,52 @@ namespace Tizen.NUI.BaseComponents
}
///
+ /// Set InputFilter to TextEditor.
+ ///
+ /// The InputFilter
+ ///
+ /// filters input based on regular expressions.
+ /// Users can set the Accepted or Rejected regular expression set, or both.
+ /// If both are used, Rejected has higher priority.
+ /// The character set must follow the regular expression rules.
+ /// Behaviour can not be guaranteed for incorrect grammars.
+ /// Refer the link below for detailed rules.
+ /// The functions in std::regex library use the ECMAScript grammar:
+ /// http://cplusplus.com/reference/regex/ECMAScript/
+ /// InputFiltered signal is emitted when the input is filtered by InputFilter
+ /// See , and for a detailed description.
+ ///
+ ///
+ /// The following example demonstrates how to use the SetInputFilter method.
+ ///
+ /// var inputFilter = new Tizen.NUI.Text.InputFilter();
+ /// inputFilter.Accepted = @"[\d]"; // accept whole digits
+ /// inputFilter.Rejected = "[0-3]"; // reject 0, 1, 2, 3
+ /// editor.SetInputFilter(inputFilter); // acceptable inputs are 4, 5, 6, 7, 8, 9
+ ///
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetInputFilter(InputFilter inputFilter)
+ {
+ SetProperty(TextEditor.Property.InputFilter, new PropertyValue(TextUtils.GetInputFilterMap(inputFilter)));
+ }
+
+ ///
+ /// Get InputFilter from TextEditor.
+ ///
+ /// The InputFilter
+ ///
+ ///
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public InputFilter GetInputFilter()
+ {
+ var map = new PropertyMap();
+ GetProperty(TextEditor.Property.InputFilter).Get(map);
+ return TextUtils.GetInputFilterStruct(map);
+ }
+
+ ///
/// The Placeholder property.
/// The placeholder map contains the following keys :
///
@@ -1585,6 +1826,18 @@ namespace Tizen.NUI.BaseComponents
}
///
+ /// Select text from start to end index.
+ ///
+ /// The start index for selection.
+ /// The end index for selection.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SelectText(uint start, uint end)
+ {
+ Interop.TextEditor.SelectText(SwigCPtr, start, end);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ ///
/// Clear selection of the text.
///
[EditorBrowsable(EditorBrowsableState.Never)]
@@ -1628,6 +1881,23 @@ namespace Tizen.NUI.BaseComponents
}
}
+ ///
+ /// Minimum line size to be used.
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public float MinLineSize
+ {
+ get
+ {
+ return (float)GetValue(MinLineSizeProperty);
+ }
+ set
+ {
+ SetValue(MinLineSizeProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TextEditor obj)
{
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr;
@@ -1830,6 +2100,8 @@ namespace Tizen.NUI.BaseComponents
internal static readonly int InputMethodSettings = Interop.TextEditor.InputMethodSettingsGet();
internal static readonly int ELLIPSIS = Interop.TextEditor.EllipsisGet();
internal static readonly int EllipsisPosition = Interop.TextEditor.EllipsisPositionGet();
+ internal static readonly int MinLineSize = Interop.TextEditor.MinLineSizeGet();
+ internal static readonly int InputFilter = Interop.TextEditor.InputFilterGet();
}
internal class InputStyle