/*
- * Copyright(c) 2018 Samsung Electronics Co., Ltd.
+ * 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.
using TizenSystemSettings.Tizen.System;
using System;
-using System.Runtime.InteropServices;
using System.Globalization;
using System.ComponentModel;
-using Tizen.NUI.Binding;
+using Tizen.NUI.Text;
namespace Tizen.NUI.BaseComponents
{
/// A control which provides a multi-line editable text editor.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public class TextEditor : View
+ public partial class TextEditor : View
{
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty TextProperty = BindableProperty.Create(nameof(Text), typeof(string), typeof(TextEditor), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.TEXT, new Tizen.NUI.PropertyValue((string)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- string temp;
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.TEXT).Get(out temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty TextColorProperty = BindableProperty.Create(nameof(TextColor), typeof(Vector4), typeof(TextEditor), null, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.TEXT_COLOR, new Tizen.NUI.PropertyValue((Vector4)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.TEXT_COLOR).Get(temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty FontFamilyProperty = BindableProperty.Create(nameof(FontFamily), typeof(string), typeof(TextEditor), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.FONT_FAMILY, new Tizen.NUI.PropertyValue((string)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- string temp;
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.FONT_FAMILY).Get(out temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty FontStyleProperty = BindableProperty.Create(nameof(FontStyle), typeof(PropertyMap), typeof(TextEditor), null, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.FONT_STYLE, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- PropertyMap temp = new PropertyMap();
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.FONT_STYLE).Get(temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty PointSizeProperty = BindableProperty.Create(nameof(PointSize), typeof(float), typeof(TextEditor), default(float), propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.POINT_SIZE, new Tizen.NUI.PropertyValue((float)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- float temp = 0.0f;
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.POINT_SIZE).Get(out temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty HorizontalAlignmentProperty = BindableProperty.Create(nameof(HorizontalAlignment), typeof(HorizontalAlignment), typeof(TextEditor), HorizontalAlignment.Begin, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue((int)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- string temp;
- if (Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.HORIZONTAL_ALIGNMENT).Get(out temp) == false)
- {
- NUILog.Error("HorizontalAlignment get error!");
- }
-
- switch (temp)
- {
- case "BEGIN":
- return HorizontalAlignment.Begin;
- case "CENTER":
- return HorizontalAlignment.Center;
- case "END":
- return HorizontalAlignment.End;
- default:
- return HorizontalAlignment.Begin;
- }
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty ScrollThresholdProperty = BindableProperty.Create(nameof(ScrollThreshold), typeof(float), typeof(TextEditor), default(float), propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.SCROLL_THRESHOLD, new Tizen.NUI.PropertyValue((float)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- float temp = 0.0f;
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.SCROLL_THRESHOLD).Get(out temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty ScrollSpeedProperty = BindableProperty.Create(nameof(ScrollSpeed), typeof(float), typeof(TextEditor), default(float), propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.SCROLL_SPEED, new Tizen.NUI.PropertyValue((float)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- float temp = 0.0f;
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.SCROLL_SPEED).Get(out temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty PrimaryCursorColorProperty = BindableProperty.Create(nameof(PrimaryCursorColor), typeof(Vector4), typeof(TextEditor), null, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.PRIMARY_CURSOR_COLOR, new Tizen.NUI.PropertyValue((Vector4)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.PRIMARY_CURSOR_COLOR).Get(temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty SecondaryCursorColorProperty = BindableProperty.Create(nameof(SecondaryCursorColor), typeof(Vector4), typeof(TextEditor), null, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.SECONDARY_CURSOR_COLOR, new Tizen.NUI.PropertyValue((Vector4)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.SECONDARY_CURSOR_COLOR).Get(temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty EnableCursorBlinkProperty = BindableProperty.Create(nameof(EnableCursorBlink), typeof(bool), typeof(TextEditor), false, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.ENABLE_CURSOR_BLINK, new Tizen.NUI.PropertyValue((bool)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- bool temp = false;
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.ENABLE_CURSOR_BLINK).Get(out temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty CursorBlinkIntervalProperty = BindableProperty.Create(nameof(CursorBlinkInterval), typeof(float), typeof(TextEditor), default(float), propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.CURSOR_BLINK_INTERVAL, new Tizen.NUI.PropertyValue((float)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- float temp = 0.0f;
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.CURSOR_BLINK_INTERVAL).Get(out temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty CursorBlinkDurationProperty = BindableProperty.Create(nameof(CursorBlinkDuration), typeof(float), typeof(TextEditor), default(float), propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.CURSOR_BLINK_DURATION, new Tizen.NUI.PropertyValue((float)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- float temp = 0.0f;
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.CURSOR_BLINK_DURATION).Get(out temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty CursorWidthProperty = BindableProperty.Create(nameof(CursorWidth), typeof(int), typeof(TextEditor), default(int), propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.CURSOR_WIDTH, new Tizen.NUI.PropertyValue((int)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- int temp = 0;
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.CURSOR_WIDTH).Get(out temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty GrabHandleImageProperty = BindableProperty.Create(nameof(GrabHandleImage), typeof(string), typeof(TextEditor), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.GRAB_HANDLE_IMAGE, new Tizen.NUI.PropertyValue((string)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- string temp;
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.GRAB_HANDLE_IMAGE).Get(out temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty GrabHandlePressedImageProperty = BindableProperty.Create(nameof(GrabHandlePressedImage), typeof(string), typeof(TextEditor), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.GRAB_HANDLE_PRESSED_IMAGE, new Tizen.NUI.PropertyValue((string)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- string temp;
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.GRAB_HANDLE_PRESSED_IMAGE).Get(out temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty SelectionHandleImageLeftProperty = BindableProperty.Create(nameof(SelectionHandleImageLeft), typeof(PropertyMap), typeof(TextEditor), null, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.SELECTION_HANDLE_IMAGE_LEFT, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- PropertyMap temp = new PropertyMap();
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.SELECTION_HANDLE_IMAGE_LEFT).Get(temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty SelectionHandleImageRightProperty = BindableProperty.Create(nameof(SelectionHandleImageRight), typeof(PropertyMap), typeof(TextEditor), null, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.SELECTION_HANDLE_IMAGE_RIGHT, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- PropertyMap temp = new PropertyMap();
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.SELECTION_HANDLE_IMAGE_RIGHT).Get(temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty SelectionHandlePressedImageLeftProperty = BindableProperty.Create(nameof(SelectionHandlePressedImageLeft), typeof(PropertyMap), typeof(TextEditor), null, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.SELECTION_HANDLE_PRESSED_IMAGE_LEFT, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- PropertyMap temp = new PropertyMap();
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.SELECTION_HANDLE_PRESSED_IMAGE_LEFT).Get(temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty SelectionHandlePressedImageRightProperty = BindableProperty.Create(nameof(SelectionHandlePressedImageRight), typeof(PropertyMap), typeof(TextEditor), null, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.SELECTION_HANDLE_PRESSED_IMAGE_RIGHT, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- PropertyMap temp = new PropertyMap();
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.SELECTION_HANDLE_PRESSED_IMAGE_RIGHT).Get(temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty SelectionHandleMarkerImageLeftProperty = BindableProperty.Create(nameof(SelectionHandleMarkerImageLeft), typeof(PropertyMap), typeof(TextEditor), null, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.SELECTION_HANDLE_MARKER_IMAGE_LEFT, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- PropertyMap temp = new PropertyMap();
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.SELECTION_HANDLE_MARKER_IMAGE_LEFT).Get(temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty SelectionHandleMarkerImageRightProperty = BindableProperty.Create(nameof(SelectionHandleMarkerImageRight), typeof(PropertyMap), typeof(TextEditor), null, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.SELECTION_HANDLE_MARKER_IMAGE_RIGHT, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- PropertyMap temp = new PropertyMap();
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.SELECTION_HANDLE_MARKER_IMAGE_RIGHT).Get(temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty SelectionHighlightColorProperty = BindableProperty.Create(nameof(SelectionHighlightColor), typeof(Vector4), typeof(TextEditor), null, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.SELECTION_HIGHLIGHT_COLOR, new Tizen.NUI.PropertyValue((Vector4)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.SELECTION_HIGHLIGHT_COLOR).Get(temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty DecorationBoundingBoxProperty = BindableProperty.Create(nameof(DecorationBoundingBox), typeof(Rectangle), typeof(TextEditor), null, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.DECORATION_BOUNDING_BOX, new Tizen.NUI.PropertyValue((Rectangle)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- Rectangle temp = new Rectangle(0, 0, 0, 0);
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.DECORATION_BOUNDING_BOX).Get(temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty EnableMarkupProperty = BindableProperty.Create(nameof(EnableMarkup), typeof(bool), typeof(TextEditor), false, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.ENABLE_MARKUP, new Tizen.NUI.PropertyValue((bool)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- bool temp = false;
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.ENABLE_MARKUP).Get(out temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty InputColorProperty = BindableProperty.Create(nameof(InputColor), typeof(Vector4), typeof(TextEditor), null, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.INPUT_COLOR, new Tizen.NUI.PropertyValue((Vector4)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.INPUT_COLOR).Get(temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty InputFontFamilyProperty = BindableProperty.Create(nameof(InputFontFamily), typeof(string), typeof(TextEditor), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.INPUT_FONT_FAMILY, new Tizen.NUI.PropertyValue((string)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- string temp;
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.INPUT_FONT_FAMILY).Get(out temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty InputFontStyleProperty = BindableProperty.Create(nameof(InputFontStyle), typeof(PropertyMap), typeof(TextEditor), null, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.INPUT_FONT_STYLE, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- PropertyMap temp = new PropertyMap();
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.INPUT_FONT_STYLE).Get(temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty InputPointSizeProperty = BindableProperty.Create(nameof(InputPointSize), typeof(float), typeof(TextEditor), default(float), propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.INPUT_POINT_SIZE, new Tizen.NUI.PropertyValue((float)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- float temp = 0.0f;
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.INPUT_POINT_SIZE).Get(out temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty LineSpacingProperty = BindableProperty.Create(nameof(LineSpacing), typeof(float), typeof(TextEditor), default(float), propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.LINE_SPACING, new Tizen.NUI.PropertyValue((float)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- float temp = 0.0f;
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.LINE_SPACING).Get(out temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty InputLineSpacingProperty = BindableProperty.Create(nameof(InputLineSpacing), typeof(float), typeof(TextEditor), default(float), propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.INPUT_LINE_SPACING, new Tizen.NUI.PropertyValue((float)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- float temp = 0.0f;
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.INPUT_LINE_SPACING).Get(out temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty UnderlineProperty = BindableProperty.Create(nameof(Underline), typeof(PropertyMap), typeof(TextEditor), null, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.UNDERLINE, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- PropertyMap temp = new PropertyMap();
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.UNDERLINE).Get(temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty InputUnderlineProperty = BindableProperty.Create(nameof(InputUnderline), typeof(string), typeof(TextEditor), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.INPUT_UNDERLINE, new Tizen.NUI.PropertyValue((string)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- string temp;
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.INPUT_UNDERLINE).Get(out temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty ShadowProperty = BindableProperty.Create(nameof(Shadow), typeof(PropertyMap), typeof(TextEditor), null, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.SHADOW, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- PropertyMap temp = new PropertyMap();
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.SHADOW).Get(temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty InputShadowProperty = BindableProperty.Create(nameof(InputShadow), typeof(string), typeof(TextEditor), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.INPUT_SHADOW, new Tizen.NUI.PropertyValue((string)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- string temp;
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.INPUT_SHADOW).Get(out temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty EmbossProperty = BindableProperty.Create(nameof(Emboss), typeof(string), typeof(TextEditor), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.EMBOSS, new Tizen.NUI.PropertyValue((string)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- string temp;
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.EMBOSS).Get(out temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty InputEmbossProperty = BindableProperty.Create(nameof(InputEmboss), typeof(string), typeof(TextEditor), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.INPUT_EMBOSS, new Tizen.NUI.PropertyValue((string)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- string temp;
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.INPUT_EMBOSS).Get(out temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty OutlineProperty = BindableProperty.Create(nameof(Outline), typeof(PropertyMap), typeof(TextEditor), null, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.OUTLINE, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- PropertyMap temp = new PropertyMap();
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.OUTLINE).Get(temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty InputOutlineProperty = BindableProperty.Create(nameof(InputOutline), typeof(string), typeof(TextEditor), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.INPUT_OUTLINE, new Tizen.NUI.PropertyValue((string)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- string temp;
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.INPUT_OUTLINE).Get(out temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty SmoothScrollProperty = BindableProperty.Create(nameof(SmoothScroll), typeof(bool), typeof(TextEditor), false, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.SMOOTH_SCROLL, new Tizen.NUI.PropertyValue((bool)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- bool temp = false;
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.SMOOTH_SCROLL).Get(out temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty SmoothScrollDurationProperty = BindableProperty.Create(nameof(SmoothScrollDuration), typeof(float), typeof(TextEditor), default(float), propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.SMOOTH_SCROLL_DURATION, new Tizen.NUI.PropertyValue((float)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- float temp = 0.0f;
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.SMOOTH_SCROLL_DURATION).Get(out temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty EnableScrollBarProperty = BindableProperty.Create(nameof(EnableScrollBar), typeof(bool), typeof(TextEditor), false, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.ENABLE_SCROLL_BAR, new Tizen.NUI.PropertyValue((bool)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- bool temp = false;
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.ENABLE_SCROLL_BAR).Get(out temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty ScrollBarShowDurationProperty = BindableProperty.Create(nameof(ScrollBarShowDuration), typeof(float), typeof(TextEditor), default(float), propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.SCROLL_BAR_SHOW_DURATION, new Tizen.NUI.PropertyValue((float)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- float temp = 0.0f;
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.SCROLL_BAR_SHOW_DURATION).Get(out temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty ScrollBarFadeDurationProperty = BindableProperty.Create(nameof(ScrollBarFadeDuration), typeof(float), typeof(TextEditor), default(float), propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.SCROLL_BAR_FADE_DURATION, new Tizen.NUI.PropertyValue((float)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- float temp = 0.0f;
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.SCROLL_BAR_FADE_DURATION).Get(out temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty PixelSizeProperty = BindableProperty.Create(nameof(PixelSize), typeof(float), typeof(TextEditor), default(float), propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.PIXEL_SIZE, new Tizen.NUI.PropertyValue((float)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- float temp = 0.0f;
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.PIXEL_SIZE).Get(out temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty PlaceholderTextProperty = BindableProperty.Create(nameof(PlaceholderText), typeof(string), typeof(TextEditor), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.PLACEHOLDER_TEXT, new Tizen.NUI.PropertyValue((string)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- string temp;
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.PLACEHOLDER_TEXT).Get(out temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty PlaceholderTextColorProperty = BindableProperty.Create(nameof(PlaceholderTextColor), typeof(Color), typeof(TextEditor), null, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.PLACEHOLDER_TEXT_COLOR, new Tizen.NUI.PropertyValue((Color)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- Color temp = new Color(0.0f, 0.0f, 0.0f, 0.0f);
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.PLACEHOLDER_TEXT_COLOR).Get(temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty EnableSelectionProperty = BindableProperty.Create(nameof(EnableSelection), typeof(bool), typeof(TextEditor), false, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.ENABLE_SELECTION, new Tizen.NUI.PropertyValue((bool)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- bool temp = false;
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.ENABLE_SELECTION).Get(out temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty PlaceholderProperty = BindableProperty.Create(nameof(Placeholder), typeof(PropertyMap), typeof(TextEditor), null, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.PLACEHOLDER, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.PLACEHOLDER).Get(temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty LineWrapModeProperty = BindableProperty.Create(nameof(LineWrapMode), typeof(LineWrapMode), typeof(TextEditor), LineWrapMode.Word, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.LINE_WRAP_MODE, new Tizen.NUI.PropertyValue((int)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- int temp;
- if (Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.LINE_WRAP_MODE).Get(out temp) == false)
- {
- NUILog.Error("LineWrapMode get error!");
- }
- return (LineWrapMode)temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty EnableShiftSelectionProperty = BindableProperty.Create(nameof(TextEditor.EnableShiftSelection), typeof(bool), typeof(TextEditor), true, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.ENABLE_SHIFT_SELECTION, new Tizen.NUI.PropertyValue((bool)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- //textEditor.mShiftSelectionFlag(true);
- bool temp = false;
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.ENABLE_SHIFT_SELECTION).Get(out temp);
- return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty MatchSystemLanguageDirectionProperty = BindableProperty.Create(nameof(TextEditor.MatchSystemLanguageDirection), typeof(bool), typeof(TextEditor), false, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var textEditor = (TextEditor)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.MATCH_SYSTEM_LANGUAGE_DIRECTION, new Tizen.NUI.PropertyValue((bool)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var textEditor = (TextEditor)bindable;
- bool temp = false;
- Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.MATCH_SYSTEM_LANGUAGE_DIRECTION).Get(out temp);
- return (bool)temp;
- });
-
- private global::System.Runtime.InteropServices.HandleRef swigCPtr;
private string textEditorTextSid = null;
private string textEditorPlaceHolderTextSid = null;
private bool systemlangTextFlag = false;
private InputMethodContext inputMethodContext = null;
+ private float fontSizeScale = 1.0f;
+ private bool hasFontSizeChangedCallback = false;
- private EventHandler<TextChangedEventArgs> _textEditorTextChangedEventHandler;
- private TextChangedCallbackDelegate _textEditorTextChangedCallbackDelegate;
-
- private EventHandler<ScrollStateChangedEventArgs> _textEditorScrollStateChangedEventHandler;
- private ScrollStateChangedCallbackDelegate _textEditorScrollStateChangedCallbackDelegate;
+ static TextEditor() { }
/// <summary>
/// Creates the TextEditor control.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public TextEditor() : this(Interop.TextEditor.TextEditor_New(), true)
+ public TextEditor() : this(Interop.TextEditor.New(), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
/// <summary>
+ /// Creates the TextEditor with specified style.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public TextEditor(TextEditorStyle style) : this(Interop.TextLabel.New(), true, style: style)
+ {
+ }
+
+ /// <summary>
/// Creates the TextEditor with setting the status of shown or hidden.
/// </summary>
/// <param name="shown">false : Not displayed (hidden), true : displayed (shown)</param>
/// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
[EditorBrowsable(EditorBrowsableState.Never)]
- public TextEditor(bool shown) : this(Interop.TextEditor.TextEditor_New(), true)
+ public TextEditor(bool shown) : this(Interop.TextEditor.New(), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
SetVisible(shown);
}
- internal TextEditor(TextEditor handle, bool shown = true) : this(Interop.TextEditor.new_TextEditor__SWIG_1(TextEditor.getCPtr(handle)), true)
+ internal TextEditor(TextEditor handle, bool shown = true) : this(Interop.TextEditor.NewTextEditor(TextEditor.getCPtr(handle)), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
}
- internal TextEditor(global::System.IntPtr cPtr, bool cMemoryOwn, bool shown = true) : base(Interop.TextEditor.TextEditor_SWIGUpcast(cPtr), cMemoryOwn)
+ internal TextEditor(global::System.IntPtr cPtr, bool cMemoryOwn, bool shown = true, TextEditorStyle style = null) : base(cPtr, cMemoryOwn, style)
{
- swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
-
if (!shown)
{
SetVisible(false);
}
}
- [UnmanagedFunctionPointer(CallingConvention.StdCall)]
- private delegate void TextChangedCallbackDelegate(IntPtr textEditor);
-
- [UnmanagedFunctionPointer(CallingConvention.StdCall)]
- private delegate void ScrollStateChangedCallbackDelegate(IntPtr textEditor, ScrollState state);
-
- /// <summary>
- /// An event for the TextChanged signal which can be used to subscribe or unsubscribe the event handler
- /// provided by the user. The TextChanged signal is emitted when the text changes.<br />
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public event EventHandler<TextChangedEventArgs> TextChanged
- {
- add
- {
- if (_textEditorTextChangedEventHandler == null)
- {
- _textEditorTextChangedCallbackDelegate = (OnTextChanged);
- TextChangedSignal().Connect(_textEditorTextChangedCallbackDelegate);
- }
- _textEditorTextChangedEventHandler += value;
- }
- remove
- {
- _textEditorTextChangedEventHandler -= value;
- if (_textEditorTextChangedEventHandler == null && TextChangedSignal().Empty() == false)
- {
- TextChangedSignal().Disconnect(_textEditorTextChangedCallbackDelegate);
- }
- }
- }
-
- /// <summary>
- /// Event for the ScrollStateChanged signal which can be used to subscribe or unsubscribe the event handler
- /// provided by the user. The ScrollStateChanged signal is emitted when the scroll state changes.<br />
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public event EventHandler<ScrollStateChangedEventArgs> ScrollStateChanged
- {
- add
- {
- if (_textEditorScrollStateChangedEventHandler == null)
- {
- _textEditorScrollStateChangedCallbackDelegate = OnScrollStateChanged;
- ScrollStateChangedSignal(this).Connect(_textEditorScrollStateChangedCallbackDelegate);
- }
- _textEditorScrollStateChangedEventHandler += value;
- }
- remove
- {
- _textEditorScrollStateChangedEventHandler -= value;
- if (_textEditorScrollStateChangedEventHandler == null && ScrollStateChangedSignal(this).Empty() == false)
- {
- ScrollStateChangedSignal(this).Disconnect(_textEditorScrollStateChangedCallbackDelegate);
- }
- }
- }
-
/// <summary>
/// The TranslatableText property.<br />
/// The text can set the SID value.<br />
{
if (NUIApplication.MultilingualResourceManager == null)
{
- throw new ArgumentNullException("ResourceManager about multilingual is null");
+ throw new ArgumentNullException(null, "ResourceManager about multilingual is null");
}
textEditorTextSid = value;
Text = SetTranslatable(textEditorTextSid);
{
if (NUIApplication.MultilingualResourceManager == null)
{
- throw new ArgumentNullException("ResourceManager about multilingual is null");
+ throw new ArgumentNullException(null, "ResourceManager about multilingual is null");
}
textEditorPlaceHolderTextSid = value;
PlaceholderText = SetTranslatable(textEditorPlaceHolderTextSid);
/// <summary>
/// The TextColor property.
/// </summary>
+ /// <remarks>
+ /// The property cascade chaining set is possible. For example, this (textEditor.TextColor.X = 0.1f;) is possible.
+ /// </remarks>
/// <since_tizen> 3 </since_tizen>
public Vector4 TextColor
{
get
{
- return (Vector4)GetValue(TextColorProperty);
+ Vector4 temp = (Vector4)GetValue(TextColorProperty);
+ return new Vector4(OnTextColorChanged, temp.X, temp.Y, temp.Z, temp.W);
}
set
{
/// <summary>
/// The FontStyle property.
+ /// The fontStyle map contains the following keys :<br />
+ /// <list type="table">
+ /// <item><term>width (string)</term><description>The width key defines occupied by each glyph. (values: ultraCondensed, extraCondensed, condensed, semiCondensed, normal, semiExpanded, expanded, extraExpanded, ultraExpanded)</description></item>
+ /// <item><term>weight (string)</term><description>The weight key defines the thickness or darkness of the glyphs. (values: thin, ultraLight, extraLight, light, demiLight, semiLight, book, normal, regular, medium, demiBold, semiBold, bold, ultraBold, extraBold, black, heavy, extraBlack)</description></item>
+ /// <item><term>slant (string)</term><description>The slant key defines whether to use italics. (values: normal, roman, italic, oblique)</description></item>
+ /// </list>
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
public PropertyMap FontStyle
{
get
}
/// <summary>
+ /// Set FontStyle to TextEditor. <br />
+ /// </summary>
+ /// <param name="fontStyle">The FontStyle</param>
+ /// <remarks>
+ /// SetFontStyle specifies the requested font style through <see cref="Tizen.NUI.Text.FontStyle"/>. <br />
+ /// </remarks>
+ /// <example>
+ /// The following example demonstrates how to use the SetFontStyle method.
+ /// <code>
+ /// var fontStyle = new Tizen.NUI.Text.FontStyle();
+ /// fontStyle.Width = FontWidthType.Expanded;
+ /// fontStyle.Weight = FontWeightType.Bold;
+ /// fontStyle.Slant = FontSlantType.Italic;
+ /// editor.SetFontStyle(fontStyle);
+ /// </code>
+ /// </example>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetFontStyle(FontStyle fontStyle)
+ {
+ SetProperty(TextEditor.Property.FontStyle, new PropertyValue(TextUtils.GetFontStyleMap(fontStyle)));
+ }
+
+ /// <summary>
+ /// Get FontStyle from TextEditor. <br />
+ /// </summary>
+ /// <returns>The FontStyle</returns>
+ /// <remarks>
+ /// <see cref="Tizen.NUI.Text.FontStyle"/>
+ /// </remarks>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public FontStyle GetFontStyle()
+ {
+ var map = new PropertyMap();
+ GetProperty(TextEditor.Property.FontStyle).Get(map);
+ return TextUtils.GetFontStyleStruct(map);
+ }
+
+ /// <summary>
/// The PointSize property.
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <summary>
/// The PrimaryCursorColor property.
/// </summary>
+ /// <remarks>
+ /// The property cascade chaining set is possible. For example, this (textEditor.PrimaryCursorColor.X = 0.1f;) is possible.
+ /// </remarks>
/// <since_tizen> 3 </since_tizen>
public Vector4 PrimaryCursorColor
{
get
{
- return (Vector4)GetValue(PrimaryCursorColorProperty);
+ Vector4 temp = (Vector4)GetValue(PrimaryCursorColorProperty);
+ return new Vector4(OnPrimaryCursorColorChanged, temp.X, temp.Y, temp.Z, temp.W);
}
set
{
/// <summary>
/// The SecondaryCursorColor property.
/// </summary>
+ /// <remarks>
+ /// The property cascade chaining set is possible. For example, this (textEditor.SecondaryCursorColor.X = 0.1f;) is possible.
+ /// </remarks>
/// <since_tizen> 3 </since_tizen>
public Vector4 SecondaryCursorColor
{
get
{
- return (Vector4)GetValue(SecondaryCursorColorProperty);
+ Vector4 temp = (Vector4)GetValue(SecondaryCursorColorProperty);
+ return new Vector4(OnSecondaryCursorColorChanged, temp.X, temp.Y, temp.Z, temp.W);
}
set
{
/// <summary>
/// The SelectionHandleImageLeft property.
+ /// The selectionHandleImageLeft map contains the following key :<br />
+ /// <list type="table">
+ /// <item><term>filename (string)</term><description>The path of image file</description></item>
+ /// </list>
/// </summary>
/// <since_tizen> 3 </since_tizen>
public PropertyMap SelectionHandleImageLeft
/// <summary>
/// The SelectionHandleImageRight property.
+ /// The selectionHandleImageRight map contains the following key :<br />
+ /// <list type="table">
+ /// <item><term>filename (string)</term><description>The path of image file</description></item>
+ /// </list>
/// </summary>
/// <since_tizen> 3 </since_tizen>
public PropertyMap SelectionHandleImageRight
/// <summary>
/// The SelectionHandlePressedImageLeft property.
+ /// The selectionHandlePressedImageLeft map contains the following key :<br />
+ /// <list type="table">
+ /// <item><term>filename (string)</term><description>The path of image file</description></item>
+ /// </list>
/// </summary>
/// <since_tizen> 3 </since_tizen>
public PropertyMap SelectionHandlePressedImageLeft
/// <summary>
/// The SelectionHandlePressedImageRight property.
+ /// The selectionHandlePressedImageRight map contains the following key :<br />
+ /// <list type="table">
+ /// <item><term>filename (string)</term><description>The path of image file</description></item>
+ /// </list>
/// </summary>
/// <since_tizen> 3 </since_tizen>
public PropertyMap SelectionHandlePressedImageRight
/// <summary>
/// The SelectionHandleMarkerImageLeft property.
+ /// The selectionHandleMarkerImageLeft map contains the following key :<br />
+ /// <list type="table">
+ /// <item><term>filename (string)</term><description>The path of image file</description></item>
+ /// </list>
/// </summary>
/// <since_tizen> 3 </since_tizen>
public PropertyMap SelectionHandleMarkerImageLeft
/// <summary>
/// The SelectionHandleMarkerImageRight property.
+ /// The selectionHandleMarkerImageRight map contains the following key :<br />
+ /// <list type="table">
+ /// <item><term>filename (string)</term><description>The path of image file</description></item>
+ /// </list>
/// </summary>
/// <since_tizen> 3 </since_tizen>
public PropertyMap SelectionHandleMarkerImageRight
/// <summary>
/// The SelectionHighlightColor property.
/// </summary>
+ /// <remarks>
+ /// The property cascade chaining set is possible. For example, this (textEditor.SelectionHighlightColor.X = 0.1f;) is possible.
+ /// </remarks>
/// <since_tizen> 3 </since_tizen>
public Vector4 SelectionHighlightColor
{
get
{
- return (Vector4)GetValue(SelectionHighlightColorProperty);
+ Vector4 temp = (Vector4)GetValue(SelectionHighlightColorProperty);
+ return new Vector4(OnSelectionHighlightColorChanged, temp.X, temp.Y, temp.Z, temp.W);
}
set
{
/// <summary>
/// The DecorationBoundingBox property.
/// </summary>
+ /// <remarks>
+ /// The property cascade chaining set is possible. For example, this (textEditor.DecorationBoundingBox.X = 1;) is possible.
+ /// </remarks>
/// <since_tizen> 3 </since_tizen>
public Rectangle DecorationBoundingBox
{
get
{
- return (Rectangle)GetValue(DecorationBoundingBoxProperty);
+ Rectangle temp = (Rectangle)GetValue(DecorationBoundingBoxProperty);
+ return new Rectangle(OnDecorationBoundingBoxChanged, temp.X, temp.Y, temp.Width, temp.Height);
}
set
{
/// <summary>
/// The InputColor property.
/// </summary>
+ /// <remarks>
+ /// The property cascade chaining set is possible. For example, this (textEditor.InputColor.X = 0.1f;) is possible.
+ /// </remarks>
/// <since_tizen> 3 </since_tizen>
public Vector4 InputColor
{
get
{
- return (Vector4)GetValue(InputColorProperty);
+ Vector4 temp = (Vector4)GetValue(InputColorProperty);
+ return new Vector4(OnInputColorChanged, temp.X, temp.Y, temp.Z, temp.W);
}
set
{
/// <summary>
/// The InputFontStyle property.
+ /// The inputFontStyle map contains the following keys :<br />
+ /// <list type="table">
+ /// <item><term>width (string)</term><description>The width key defines occupied by each glyph. (values: ultraCondensed, extraCondensed, condensed, semiCondensed, normal, semiExpanded, expanded, extraExpanded, ultraExpanded)</description></item>
+ /// <item><term>weight (string)</term><description>The weight key defines the thickness or darkness of the glyphs. (values: thin, ultraLight, extraLight, light, demiLight, semiLight, book, normal, regular, medium, demiBold, semiBold, bold, ultraBold, extraBold, black, heavy, extraBlack)</description></item>
+ /// <item><term>slant (string)</term><description>The slant key defines whether to use italics. (values: normal, roman, italic, oblique)</description></item>
+ /// </list>
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
public PropertyMap InputFontStyle
{
get
}
/// <summary>
+ /// Set InputFontStyle to TextEditor. <br />
+ /// </summary>
+ /// <param name="fontStyle">The FontStyle</param>
+ /// <remarks>
+ /// SetInputFontStyle specifies the requested font style for new input text through <see cref="Tizen.NUI.Text.FontStyle"/>. <br />
+ /// </remarks>
+ /// <example>
+ /// The following example demonstrates how to use the SetInputFontStyle method.
+ /// <code>
+ /// var fontStyle = new Tizen.NUI.Text.FontStyle();
+ /// fontStyle.Width = FontWidthType.Expanded;
+ /// fontStyle.Weight = FontWeightType.Bold;
+ /// fontStyle.Slant = FontSlantType.Italic;
+ /// editor.SetInputFontStyle(fontStyle);
+ /// </code>
+ /// </example>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetInputFontStyle(FontStyle fontStyle)
+ {
+ SetProperty(TextEditor.Property.InputFontStyle, new PropertyValue(TextUtils.GetFontStyleMap(fontStyle)));
+ NotifyPropertyChanged();
+ }
+
+ /// <summary>
+ /// Get InputFontStyle from TextEditor. <br />
+ /// </summary>
+ /// <returns>The FontStyle</returns>
+ /// <remarks>
+ /// <see cref="Tizen.NUI.Text.FontStyle"/>
+ /// </remarks>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public FontStyle GetInputFontStyle()
+ {
+ var map = new PropertyMap();
+ GetProperty(TextEditor.Property.InputFontStyle).Get(map);
+ return TextUtils.GetFontStyleStruct(map);
+ }
+
+ /// <summary>
/// The InputPointSize property.
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <summary>
/// The Underline property.
+ /// The underline map contains the following keys :<br />
+ /// <list type="table">
+ /// <item><term>enable (bool)</term><description>Whether the underline is enabled (the default value is false)</description></item>
+ /// <item><term>color (Color)</term><description>The color of the underline (If not provided then the color of the text is used)</description></item>
+ /// <item><term>height (float)</term><description>The height in pixels of the underline (the default value is 1.f)</description></item>
+ /// </list>
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
public PropertyMap Underline
{
get
}
/// <summary>
+ /// Set Underline to TextEditor. <br />
+ /// </summary>
+ /// <param name="underline">The Underline</param>
+ /// <remarks>
+ /// SetUnderline specifies the underline of the text through <see cref="Tizen.NUI.Text.Underline"/>. <br />
+ /// </remarks>
+ /// <example>
+ /// The following example demonstrates how to use the SetUnderline method.
+ /// <code>
+ /// var underline = new Tizen.NUI.Text.Underline();
+ /// underline.Enable = true;
+ /// underline.Color = new Color("#3498DB");
+ /// underline.Height = 2.0f;
+ /// editor.SetUnderline(underline);
+ /// </code>
+ /// </example>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetUnderline(Underline underline)
+ {
+ SetProperty(TextEditor.Property.UNDERLINE, new PropertyValue(TextUtils.GetUnderlineMap(underline)));
+ }
+
+ /// <summary>
+ /// Get Underline from TextEditor. <br />
+ /// </summary>
+ /// <returns>The Underline</returns>
+ /// <remarks>
+ /// <see cref="Tizen.NUI.Text.Underline"/>
+ /// </remarks>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Underline GetUnderline()
+ {
+ var map = new PropertyMap();
+ GetProperty(TextEditor.Property.UNDERLINE).Get(map);
+ return TextUtils.GetUnderlineStruct(map);
+ }
+
+ /// <summary>
/// The InputUnderline property.
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <summary>
/// The Shadow property.
+ /// The shadow map contains the following keys :<br />
+ /// <list type="table">
+ /// <item><term>color (Color)</term><description>The color of the shadow (the default color is Color.Black)</description></item>
+ /// <item><term>offset (Vector2)</term><description>The offset in pixels of the shadow (If not provided then the shadow is not enabled)</description></item>
+ /// <item><term>blurRadius (float)</term><description>The radius of the Gaussian blur for the soft shadow (If not provided then the soft shadow is not enabled)</description></item>
+ /// </list>
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
public PropertyMap Shadow
{
get
}
/// <summary>
+ /// Set Shadow to TextEditor. <br />
+ /// </summary>
+ /// <param name="shadow">The Shadow</param>
+ /// <remarks>
+ /// SetShadow specifies the shadow of the text through <see cref="Tizen.NUI.Text.Shadow"/>. <br />
+ /// </remarks>
+ /// <example>
+ /// The following example demonstrates how to use the SetShadow method.
+ /// <code>
+ /// var shadow = new Tizen.NUI.Text.Shadow();
+ /// shadow.Offset = new Vector2(3, 3);
+ /// shadow.Color = new Color("#F1C40F");
+ /// editor.SetShadow(shadow);
+ /// </code>
+ /// </example>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetShadow(Tizen.NUI.Text.Shadow shadow)
+ {
+ SetProperty(TextEditor.Property.SHADOW, new PropertyValue(TextUtils.GetShadowMap(shadow)));
+ }
+
+ /// <summary>
+ /// Get Shadow from TextEditor. <br />
+ /// </summary>
+ /// <returns>The Shadow</returns>
+ /// <remarks>
+ /// <see cref="Tizen.NUI.Text.Shadow"/>
+ /// </remarks>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Tizen.NUI.Text.Shadow GetShadow()
+ {
+ var map = new PropertyMap();
+ GetProperty(TextEditor.Property.SHADOW).Get(map);
+ return TextUtils.GetShadowStruct(map);
+ }
+
+ /// <summary>
/// The InputShadow property.
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <summary>
/// The Outline property.
+ /// The outline map contains the following keys :<br />
+ /// <list type="table">
+ /// <item><term>color (Color)</term><description>The color of the outline (the default color is Color.White)</description></item>
+ /// <item><term>width (float)</term><description>The width in pixels of the outline (If not provided then the outline is not enabled)</description></item>
+ /// </list>
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
public PropertyMap Outline
{
get
}
/// <summary>
+ /// Set Outline to TextEditor. <br />
+ /// </summary>
+ /// <param name="outline">The Outline</param>
+ /// <remarks>
+ /// SetOutline specifies the outline of the text through <see cref="Tizen.NUI.Text.Outline"/>. <br />
+ /// </remarks>
+ /// <example>
+ /// The following example demonstrates how to use the SetOutline method.
+ /// <code>
+ /// var outline = new Tizen.NUI.Text.Outline();
+ /// outline.Width = 2.0f;
+ /// outline.Color = new Color("#45B39D");
+ /// editor.SetOutline(outline);
+ /// </code>
+ /// </example>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetOutline(Outline outline)
+ {
+ SetProperty(TextEditor.Property.OUTLINE, new PropertyValue(TextUtils.GetOutlineMap(outline)));
+ }
+
+ /// <summary>
+ /// Get Outline from TextEditor. <br />
+ /// </summary>
+ /// <returns>The Outline</returns>
+ /// <remarks>
+ /// <see cref="Tizen.NUI.Text.Outline"/>
+ /// </remarks>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Outline GetOutline()
+ {
+ var map = new PropertyMap();
+ GetProperty(TextEditor.Property.OUTLINE).Get(map);
+ return TextUtils.GetOutlineStruct(map);
+ }
+
+ /// <summary>
/// The InputOutline property.
/// </summary>
/// <since_tizen> 3 </since_tizen>
get
{
int temp = 0;
- GetProperty(TextEditor.Property.LINE_COUNT).Get(out temp);
+ GetProperty(TextEditor.Property.LineCount).Get(out temp);
return temp;
}
}
/// <summary>
- /// The text to display when the TextEditor is empty and inactive.
+ /// The text to display when the TextEditor is empty and inactive.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public string PlaceholderText
+ {
+ get
+ {
+ return (string)GetValue(PlaceholderTextProperty);
+ }
+ set
+ {
+ SetValue(PlaceholderTextProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ /// <summary>
+ /// The Selected Text property (read-only).
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public string SelectedText
+ {
+ get
+ {
+ string temp;
+ GetProperty(TextEditor.Property.SelectedText).Get(out temp);
+ return temp;
+ }
+ }
+
+ /// <summary>
+ /// The Placeholder text color.
+ /// </summary>
+ /// <remarks>
+ /// The property cascade chaining set is possible. For example, this (textEditor.PlaceholderTextColor.X = 0.1f;) is possible.
+ /// </remarks>
+ /// <since_tizen> 3 </since_tizen>
+ public Color PlaceholderTextColor
+ {
+ get
+ {
+ Color temp = (Color)GetValue(PlaceholderTextColorProperty);
+ return new Color(OnPlaceholderTextColorChanged, temp.R, temp.G, temp.B, temp.A);
+ }
+ set
+ {
+ SetValue(PlaceholderTextColorProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ /// <summary>
+ /// The EnableSelection property.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public bool EnableSelection
+ {
+ get
+ {
+ return (bool)GetValue(EnableSelectionProperty);
+ }
+ set
+ {
+ SetValue(EnableSelectionProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ /// <summary>
+ /// The start index for selection.
+ /// </summary>
+ /// <since_tizen> 8 </since_tizen>
+ /// This will be public opened in tizen_6.0 after ACR done, Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public int SelectedTextStart
+ {
+ get
+ {
+ int temp;
+ GetProperty(TextEditor.Property.SelectedTextStart).Get(out temp);
+ return temp;
+ }
+ set
+ {
+ SetProperty(TextEditor.Property.SelectedTextStart, new PropertyValue(value));
+ NotifyPropertyChanged();
+ }
+ }
+
+ /// <summary>
+ /// The end index for selection.
+ /// </summary>
+ /// <since_tizen> 8 </since_tizen>
+ /// This will be public opened in tizen_6.0 after ACR done, Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public int SelectedTextEnd
+ {
+ get
+ {
+ int temp;
+ GetProperty(TextEditor.Property.SelectedTextEnd).Get(out temp);
+ return temp;
+ }
+ set
+ {
+ SetProperty(TextEditor.Property.SelectedTextEnd, new PropertyValue(value));
+ NotifyPropertyChanged();
+ }
+ }
+
+ /// <summary>
+ /// Enable editing in text control.
+ /// </summary>
+ /// <since_tizen> 8 </since_tizen>
+ /// This will be public opened in tizen_6.0 after ACR done, Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool EnableEditing
+ {
+ get
+ {
+ bool temp;
+ GetProperty(TextEditor.Property.EnableEditing).Get(out temp);
+ return temp;
+ }
+ set
+ {
+ SetProperty(TextEditor.Property.EnableEditing, new PropertyValue(value));
+ NotifyPropertyChanged();
+ }
+ }
+
+ /// <summary>
+ /// Specify horizontal scroll position in text control.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public int HorizontalScrollPosition
+ {
+ get
+ {
+ int temp;
+ using (PropertyValue propertyValue = GetProperty(TextEditor.Property.HorizontalScrollPosition))
+ {
+ propertyValue.Get(out temp);
+ }
+ return temp;
+ }
+ set
+ {
+ using (PropertyValue propertyValue = new PropertyValue(value))
+ {
+ SetProperty(TextEditor.Property.HorizontalScrollPosition, propertyValue);
+ NotifyPropertyChanged();
+ }
+ }
+ }
+
+ /// <summary>
+ /// Specify vertical scroll position in text control.
/// </summary>
- /// <since_tizen> 3 </since_tizen>
- public string PlaceholderText
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public int VerticalScrollPosition
{
get
{
- return (string)GetValue(PlaceholderTextProperty);
+ int temp;
+ using (PropertyValue propertyValue = GetProperty(TextEditor.Property.VerticalScrollPosition))
+ {
+ propertyValue.Get(out temp);
+ }
+ return temp;
}
set
{
- SetValue(PlaceholderTextProperty, value);
- NotifyPropertyChanged();
+ using (PropertyValue propertyValue = new PropertyValue(value))
+ {
+ SetProperty(TextEditor.Property.VerticalScrollPosition, propertyValue);
+ NotifyPropertyChanged();
+ }
}
}
/// <summary>
- /// The Placeholder text color.
+ /// Specify primary cursor (caret) position in text control.
/// </summary>
- /// <since_tizen> 3 </since_tizen>
- public Color PlaceholderTextColor
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public int PrimaryCursorPosition
{
get
{
- return (Color)GetValue(PlaceholderTextColorProperty);
+ int temp;
+ using (PropertyValue propertyValue = GetProperty(TextEditor.Property.PrimaryCursorPosition))
+ {
+ propertyValue.Get(out temp);
+ }
+ return temp;
}
set
{
- SetValue(PlaceholderTextColorProperty, value);
- NotifyPropertyChanged();
+ using (PropertyValue propertyValue = new PropertyValue(value))
+ {
+ SetProperty(TextEditor.Property.PrimaryCursorPosition, propertyValue);
+ NotifyPropertyChanged();
+ }
}
}
/// <summary>
- /// The EnableSelection property.
+ /// The GrabHandleColor property.
/// </summary>
- /// <since_tizen> 3 </since_tizen>
- public bool EnableSelection
+ /// <remarks>
+ /// The property cascade chaining set is possible. For example, this (textEditor.GrabHandleColor.X = 0.1f;) is possible.
+ /// </remarks>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Color GrabHandleColor
{
get
{
- return (bool)GetValue(EnableSelectionProperty);
+ Color temp = (Color)GetValue(GrabHandleColorProperty);
+ return new Color(OnGrabHandleColorChanged, temp.R, temp.G, temp.B, temp.A);
}
set
{
- SetValue(EnableSelectionProperty, value);
+ SetValue(GrabHandleColorProperty, value);
NotifyPropertyChanged();
}
}
/// <summary>
+ /// Set InputFilter to TextEditor. <br />
+ /// </summary>
+ /// <param name="inputFilter">The InputFilter</param>
+ /// <remarks>
+ /// <see cref="Tizen.NUI.Text.InputFilter"/> filters input based on regular expressions. <br />
+ /// Users can set the Accepted or Rejected regular expression set, or both. <br />
+ /// If both are used, Rejected has higher priority. <br />
+ /// The character set must follow the regular expression rules. <br />
+ /// Behaviour can not be guaranteed for incorrect grammars. <br />
+ /// Refer the link below for detailed rules. <br />
+ /// The functions in std::regex library use the ECMAScript grammar: <br />
+ /// http://cplusplus.com/reference/regex/ECMAScript/ <br />
+ /// InputFiltered signal is emitted when the input is filtered by InputFilter <br />
+ /// See <see cref="InputFiltered"/>, <see cref="InputFilterType"/> and <see cref="InputFilteredEventArgs"/> for a detailed description. <br />
+ /// </remarks>
+ /// <example>
+ /// The following example demonstrates how to use the SetInputFilter method.
+ /// <code>
+ /// 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
+ /// </code>
+ /// </example>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetInputFilter(InputFilter inputFilter)
+ {
+ SetProperty(TextEditor.Property.InputFilter, new PropertyValue(TextUtils.GetInputFilterMap(inputFilter)));
+ }
+
+ /// <summary>
+ /// Get InputFilter from TextEditor. <br />
+ /// </summary>
+ /// <returns>The InputFilter</returns>
+ /// <remarks>
+ /// <see cref="Tizen.NUI.Text.InputFilter"/>
+ /// </remarks>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public InputFilter GetInputFilter()
+ {
+ var map = new PropertyMap();
+ GetProperty(TextEditor.Property.InputFilter).Get(map);
+ return TextUtils.GetInputFilterStruct(map);
+ }
+
+ /// <summary>
/// The Placeholder property.
- /// Gets or sets the placeholder: text, color, font family, font style, point size, and pixel size.
+ /// The placeholder map contains the following keys :<br />
+ /// <list type="table">
+ /// <item><term>text (string)</term><description>The text to display when the TextEditor is empty and inactive</description></item>
+ /// <item><term>textFocused (string)</term><description>The text to display when the placeholder has focus</description></item>
+ /// <item><term>color (Color)</term><description>The color of the placeholder text</description></item>
+ /// <item><term>fontFamily (string)</term><description>The fontFamily of the placeholder text</description></item>
+ /// <item><term>fontStyle (PropertyMap)</term><description>The fontStyle of the placeholder text</description></item>
+ /// <item><term>pointSize (float)</term><description>The pointSize of the placeholder text</description></item>
+ /// <item><term>pixelSize (float)</term><description>The pixelSize of the placeholder text</description></item>
+ /// <item><term>ellipsis (bool)</term><description>The ellipsis of the placeholder text</description></item>
+ /// </list>
/// </summary>
/// <example>
/// The following example demonstrates how to set the placeholder property.
{
get
{
- return (PropertyMap)GetValue(PlaceholderProperty);
+ PropertyMap map = (PropertyMap)GetValue(PlaceholderProperty);
+ PropertyValue value = null;
+
+ // text
+ value = map.Find(0);
+ if (null != value)
+ {
+ value.Get(out string text);
+ map.Add("text", new PropertyValue(text));
+ }
+
+ // textFocused
+ value = map.Find(1);
+ if (null != value)
+ {
+ value.Get(out string textFocused);
+ map.Add("textFocused", new PropertyValue(textFocused));
+ }
+
+ // color
+ value = map.Find(2);
+ if (null != value)
+ {
+ Color color = new Color();
+ value.Get(color);
+ map.Add("color", new PropertyValue(color));
+ }
+
+ // fontFamily
+ value = map.Find(3);
+ if (null != value)
+ {
+ value.Get(out string fontFamily);
+ map.Add("fontFamily", new PropertyValue(fontFamily));
+ }
+
+ // fontStyle
+ value = map.Find(4);
+ if (null != value)
+ {
+ PropertyMap fontStyle = new PropertyMap();
+ value.Get(fontStyle);
+ map.Add("fontStyle", new PropertyValue(fontStyle));
+ }
+
+ // pointSize
+ value = map.Find(5);
+ if (null != value)
+ {
+ value.Get(out float pointSize);
+ map.Add("pointSize", new PropertyValue(pointSize));
+ }
+
+ // pixelSize
+ value = map.Find(6);
+ if (null != value)
+ {
+ value.Get(out float pixelSize);
+ map.Add("pixelSize", new PropertyValue(pixelSize));
+ }
+
+ // ellipsis
+ value = map.Find(7);
+ if (null != value)
+ {
+ value.Get(out bool ellipsis);
+ map.Add("ellipsis", new PropertyValue(ellipsis));
+ }
+
+ return map;
}
set
{
}
/// <summary>
+ /// The Ellipsis property.<br />
+ /// Enable or disable the ellipsis.<br />
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool Ellipsis
+ {
+ get
+ {
+ return (bool)GetValue(EllipsisProperty);
+ }
+ set
+ {
+ SetValue(EllipsisProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+
+ /// <summary>
+ /// The ellipsis position of the text.
+ /// The ellipsis position type when the text size over the layout size.<br />
+ /// The ellipsis position: End, Start or Middle.<br />
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public EllipsisPosition EllipsisPosition
+ {
+ get
+ {
+ return (EllipsisPosition)GetValue(EllipsisPositionProperty);
+ }
+ set
+ {
+ SetValue(EllipsisPositionProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ /// <summary>
/// The LineWrapMode property.<br />
/// The line wrap mode when the text lines over the layout width.<br />
/// </summary>
}
}
+ /// <summary>
+ /// The MaxLength property.
+ /// </summary>
+ /// This will be public opened in tizen_6.5 after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public int MaxLength
+ {
+ get
+ {
+ return (int)GetValue(MaxLengthProperty);
+ }
+ set
+ {
+ SetValue(MaxLengthProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
/// Only used by the IL of xaml, will never changed to not hidden.
[EditorBrowsable(EditorBrowsableState.Never)]
public override bool IsCreateByXaml
{
this.TextChanged += (obj, e) =>
{
- this.Text = this.Text;
+ this.Text = e.TextEditor.Text;
};
}
}
}
/// <summary>
+ /// The FontSizeScale property. <br />
+ /// The default value is 1.0. <br />
+ /// If FontSizeScale.UseSystemSetting, will use the SystemSettings.FontSize internally. <br />
+ /// </summary>
+ /// <since_tizen> 9 </since_tizen>
+ public float FontSizeScale
+ {
+ get
+ {
+ return fontSizeScale;
+ }
+ set
+ {
+ float newFontSizeScale;
+
+ if (fontSizeScale == value) return;
+
+ fontSizeScale = value;
+ if (fontSizeScale == Tizen.NUI.FontSizeScale.UseSystemSetting)
+ {
+ SystemSettingsFontSize systemSettingsFontSize;
+
+ try
+ {
+ systemSettingsFontSize = SystemSettings.FontSize;
+ }
+ catch (Exception e)
+ {
+ Console.WriteLine("{0} Exception caught.", e);
+ systemSettingsFontSize = SystemSettingsFontSize.Normal;
+ }
+ newFontSizeScale = TextUtils.GetFontSizeScale(systemSettingsFontSize);
+ addFontSizeChangedCallback();
+ }
+ else
+ {
+ newFontSizeScale = fontSizeScale;
+ removeFontSizeChangedCallback();
+ }
+
+ SetValue(FontSizeScaleProperty, newFontSizeScale);
+ NotifyPropertyChanged();
+ }
+ }
+
+ /// <summary>
+ /// The InputMethodSettings property.
+ /// </summary>
+ /// <remarks>
+ /// <see cref="InputMethod"/> is a class encapsulating the input method map. Please use the <see cref="InputMethod"/> class for this property.
+ /// </remarks>
+ /// <example>
+ /// The following example demonstrates how to set the InputMethodSettings property.
+ /// <code>
+ /// InputMethod method = new InputMethod();
+ /// method.PanelLayout = InputMethod.PanelLayoutType.Normal;
+ /// method.ActionButton = InputMethod.ActionButtonTitleType.Default;
+ /// method.AutoCapital = InputMethod.AutoCapitalType.Word;
+ /// method.Variation = 1;
+ /// textEditor.InputMethodSettings = method.OutputMap;
+ /// </code>
+ /// </example>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public PropertyMap InputMethodSettings
+ {
+ get
+ {
+ return (PropertyMap)GetValue(InputMethodSettingsProperty);
+ }
+ set
+ {
+ SetValue(InputMethodSettingsProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ /// <summary>
+ /// Scroll the text control by specific amount..
+ /// </summary>
+ /// <param name="scroll">The amount (in pixels) of scrolling in horizontal & vertical directions.</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void ScrollBy(Vector2 scroll)
+ {
+ Interop.TextEditor.ScrollBy(SwigCPtr, Vector2.getCPtr(scroll));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
/// Get the InputMethodContext instance.
/// </summary>
/// <returns>The InputMethodContext instance.</returns>
if (inputMethodContext == null)
{
/*Avoid raising InputMethodContext reference count.*/
- inputMethodContext = new InputMethodContext(Interop.TextEditor.TextEditor_GetInputMethodContext(swigCPtr), true);
+ inputMethodContext = new InputMethodContext(Interop.TextEditor.GetInputMethodContext(SwigCPtr), true);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
return inputMethodContext;
}
- internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TextEditor obj)
+ /// <summary>
+ /// Select the whole text.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SelectWholeText()
{
- return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+ Interop.TextEditor.SelectWholeText(SwigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
- internal TextEditorSignal TextChangedSignal()
+ /// <summary>
+ /// Select text from start to end index.
+ /// </summary>
+ /// <param name="start">The start index for selection.</param>
+ /// <param name="end">The end index for selection.</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SelectText(uint start, uint end)
{
- TextEditorSignal ret = new TextEditorSignal(Interop.TextEditor.TextEditor_TextChangedSignal(swigCPtr), false);
+ Interop.TextEditor.SelectText(SwigCPtr, start, end);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
}
- internal ScrollStateChangedSignal ScrollStateChangedSignal(TextEditor textEditor)
+ /// <summary>
+ /// Clear selection of the text.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SelectNone()
{
- ScrollStateChangedSignal ret = new ScrollStateChangedSignal(Interop.TextEditor.TextEditor_ScrollStateChangedSignal(TextEditor.getCPtr(textEditor)), false);
+ _ = Interop.TextEditor.SelectNone(SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
+ }
+
+ /// <summary>
+ /// Enable grab handle property.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool EnableGrabHandle
+ {
+ get
+ {
+ return (bool)GetValue(EnableGrabHandleProperty);
+ }
+ set
+ {
+ SetValue(EnableGrabHandleProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ /// <summary>
+ /// Enable grab handle popup property.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool EnableGrabHandlePopup
+ {
+ get
+ {
+ return (bool)GetValue(EnableGrabHandlePopupProperty);
+ }
+ set
+ {
+ SetValue(EnableGrabHandlePopupProperty, 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;
}
internal SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextEditor_Dali__Toolkit__TextEditor__InputStyle__MaskF_t InputStyleChangedSignal()
{
- SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextEditor_Dali__Toolkit__TextEditor__InputStyle__MaskF_t ret = new SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextEditor_Dali__Toolkit__TextEditor__InputStyle__MaskF_t(Interop.TextEditor.TextEditor_InputStyleChangedSignal(swigCPtr), false);
+ SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextEditor_Dali__Toolkit__TextEditor__InputStyle__MaskF_t ret = new SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextEditor_Dali__Toolkit__TextEditor__InputStyle__MaskF_t(Interop.TextEditor.InputStyleChangedSignal(SwigCPtr));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
return;
}
+ if (systemlangTextFlag)
+ {
+ SystemSettings.LocaleLanguageChanged -= SystemSettings_LocaleLanguageChanged;
+ }
+
+ removeFontSizeChangedCallback();
+
//Release your own unmanaged resources here.
//You should not access any managed member here except static instance.
//because the execution order of Finalizes is non-deterministic.
- if (this.HasBody() && _textEditorTextChangedCallbackDelegate != null)
+ if (this.HasBody())
{
- TextChangedSignal().Disconnect(_textEditorTextChangedCallbackDelegate);
- }
+ if (textEditorTextChangedCallbackDelegate != null)
+ {
+ TextChangedSignal().Disconnect(textEditorTextChangedCallbackDelegate);
+ }
- if (swigCPtr.Handle != global::System.IntPtr.Zero)
- {
- if (swigCMemOwn)
+ if (textEditorMaxLengthReachedCallbackDelegate != null)
{
- swigCMemOwn = false;
- // In order to speed up IME hide, temporarily add
- GetInputMethodContext()?.DestroyContext();
- Interop.TextEditor.delete_TextEditor(swigCPtr);
+ this.MaxLengthReachedSignal().Disconnect(textEditorMaxLengthReachedCallbackDelegate);
}
- swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
}
base.Dispose(type);
}
- private void OnTextChanged(IntPtr textEditor)
- {
- TextChangedEventArgs e = new TextChangedEventArgs();
-
- // Populate all members of "e" (TextChangedEventArgs) with real data
- e.TextEditor = Registry.GetManagedBaseHandleFromNativePtr(textEditor) as TextEditor;
-
- if (_textEditorTextChangedEventHandler != null)
- {
- //here we send all data to user event handlers
- _textEditorTextChangedEventHandler(this, e);
- }
- }
-
- private void OnScrollStateChanged(IntPtr textEditor, ScrollState state)
+ /// This will not be public opened.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
{
- ScrollStateChangedEventArgs e = new ScrollStateChangedEventArgs();
-
- if (textEditor != global::System.IntPtr.Zero)
- {
- // Populate all members of "e" (ScrollStateChangedEventArgs) with real data
- e.TextEditor = Registry.GetManagedBaseHandleFromNativePtr(textEditor) as TextEditor;
- e.ScrollState = state;
- }
-
- if (_textEditorScrollStateChangedEventHandler != null)
- {
- //here we send all data to user event handlers
- _textEditorScrollStateChangedEventHandler(this, e);
- }
+ // In order to speed up IME hide, temporarily add
+ GetInputMethodContext()?.DestroyContext();
+ Interop.TextEditor.DeleteTextEditor(swigCPtr);
}
private string SetTranslatable(string textEditorSid)
{
if (systemlangTextFlag == false)
{
- SystemSettings.LocaleLanguageChanged += new WeakEventHandler<LocaleLanguageChangedEventArgs>(SystemSettings_LocaleLanguageChanged).Handler;
+ SystemSettings.LocaleLanguageChanged += SystemSettings_LocaleLanguageChanged;
systemlangTextFlag = true;
}
return translatableText;
}
}
- /// <summary>
- /// Event arguments that passed via the TextChanged signal.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public class TextChangedEventArgs : EventArgs
+ private void SystemSettingsFontSizeChanged(object sender, FontSizeChangedEventArgs e)
{
- private TextEditor _textEditor;
-
- /// <summary>
- /// TextEditor - is the texteditor control which has the text contents changed.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public TextEditor TextEditor
- {
- get
- {
- return _textEditor;
- }
- set
- {
- _textEditor = value;
- }
- }
+ float newFontSizeScale = TextUtils.GetFontSizeScale(e.Value);
+ SetValue(FontSizeScaleProperty, newFontSizeScale);
+ NotifyPropertyChanged();
}
- /// <summary>
- /// Event arguments that passed via the ScrollStateChanged signal.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public class ScrollStateChangedEventArgs : EventArgs
+ private void addFontSizeChangedCallback()
{
- private TextEditor _textEditor;
- private ScrollState _scrollState;
-
- /// <summary>
- /// TextEditor - is the texteditor control which has the scroll state changed.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public TextEditor TextEditor
+ if (hasFontSizeChangedCallback != true)
{
- get
+ try
{
- return _textEditor;
+ SystemSettings.FontSizeChanged += SystemSettingsFontSizeChanged;
+ hasFontSizeChangedCallback = true;
}
- set
+ catch (Exception e)
{
- _textEditor = value;
+ Console.WriteLine("{0} Exception caught.", e);
+ hasFontSizeChangedCallback = false;
}
}
+ }
- /// <summary>
- /// ScrollState - is the texteditor control scroll state.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public ScrollState ScrollState
+ private void removeFontSizeChangedCallback()
+ {
+ if (hasFontSizeChangedCallback == true)
{
- get
+ try
{
- return _scrollState;
+ SystemSettings.FontSizeChanged -= SystemSettingsFontSizeChanged;
+ hasFontSizeChangedCallback = false;
}
- set
+ catch (Exception e)
{
- _scrollState = value;
+ Console.WriteLine("{0} Exception caught.", e);
+ hasFontSizeChangedCallback = true;
}
}
}
internal new class Property
{
- internal static readonly int RENDERING_BACKEND = Interop.TextEditor.TextEditor_Property_RENDERING_BACKEND_get();
- internal static readonly int TEXT = Interop.TextEditor.TextEditor_Property_TEXT_get();
- internal static readonly int TEXT_COLOR = Interop.TextEditor.TextEditor_Property_TEXT_COLOR_get();
- internal static readonly int FONT_FAMILY = Interop.TextEditor.TextEditor_Property_FONT_FAMILY_get();
- internal static readonly int FONT_STYLE = Interop.TextEditor.TextEditor_Property_FONT_STYLE_get();
- internal static readonly int POINT_SIZE = Interop.TextEditor.TextEditor_Property_POINT_SIZE_get();
- internal static readonly int HORIZONTAL_ALIGNMENT = Interop.TextEditor.TextEditor_Property_HORIZONTAL_ALIGNMENT_get();
- internal static readonly int SCROLL_THRESHOLD = Interop.TextEditor.TextEditor_Property_SCROLL_THRESHOLD_get();
- internal static readonly int SCROLL_SPEED = Interop.TextEditor.TextEditor_Property_SCROLL_SPEED_get();
- internal static readonly int PRIMARY_CURSOR_COLOR = Interop.TextEditor.TextEditor_Property_PRIMARY_CURSOR_COLOR_get();
- internal static readonly int SECONDARY_CURSOR_COLOR = Interop.TextEditor.TextEditor_Property_SECONDARY_CURSOR_COLOR_get();
- internal static readonly int ENABLE_CURSOR_BLINK = Interop.TextEditor.TextEditor_Property_ENABLE_CURSOR_BLINK_get();
- internal static readonly int CURSOR_BLINK_INTERVAL = Interop.TextEditor.TextEditor_Property_CURSOR_BLINK_INTERVAL_get();
- internal static readonly int CURSOR_BLINK_DURATION = Interop.TextEditor.TextEditor_Property_CURSOR_BLINK_DURATION_get();
- internal static readonly int CURSOR_WIDTH = Interop.TextEditor.TextEditor_Property_CURSOR_WIDTH_get();
- internal static readonly int GRAB_HANDLE_IMAGE = Interop.TextEditor.TextEditor_Property_GRAB_HANDLE_IMAGE_get();
- internal static readonly int GRAB_HANDLE_PRESSED_IMAGE = Interop.TextEditor.TextEditor_Property_GRAB_HANDLE_PRESSED_IMAGE_get();
- internal static readonly int SELECTION_HANDLE_IMAGE_LEFT = Interop.TextEditor.TextEditor_Property_SELECTION_HANDLE_IMAGE_LEFT_get();
- internal static readonly int SELECTION_HANDLE_IMAGE_RIGHT = Interop.TextEditor.TextEditor_Property_SELECTION_HANDLE_IMAGE_RIGHT_get();
- internal static readonly int SELECTION_HANDLE_PRESSED_IMAGE_LEFT = Interop.TextEditor.TextEditor_Property_SELECTION_HANDLE_PRESSED_IMAGE_LEFT_get();
- internal static readonly int SELECTION_HANDLE_PRESSED_IMAGE_RIGHT = Interop.TextEditor.TextEditor_Property_SELECTION_HANDLE_PRESSED_IMAGE_RIGHT_get();
- internal static readonly int SELECTION_HANDLE_MARKER_IMAGE_LEFT = Interop.TextEditor.TextEditor_Property_SELECTION_HANDLE_MARKER_IMAGE_LEFT_get();
- internal static readonly int SELECTION_HANDLE_MARKER_IMAGE_RIGHT = Interop.TextEditor.TextEditor_Property_SELECTION_HANDLE_MARKER_IMAGE_RIGHT_get();
- internal static readonly int SELECTION_HIGHLIGHT_COLOR = Interop.TextEditor.TextEditor_Property_SELECTION_HIGHLIGHT_COLOR_get();
- internal static readonly int DECORATION_BOUNDING_BOX = Interop.TextEditor.TextEditor_Property_DECORATION_BOUNDING_BOX_get();
- internal static readonly int ENABLE_MARKUP = Interop.TextEditor.TextEditor_Property_ENABLE_MARKUP_get();
- internal static readonly int INPUT_COLOR = Interop.TextEditor.TextEditor_Property_INPUT_COLOR_get();
- internal static readonly int INPUT_FONT_FAMILY = Interop.TextEditor.TextEditor_Property_INPUT_FONT_FAMILY_get();
- internal static readonly int INPUT_FONT_STYLE = Interop.TextEditor.TextEditor_Property_INPUT_FONT_STYLE_get();
- internal static readonly int INPUT_POINT_SIZE = Interop.TextEditor.TextEditor_Property_INPUT_POINT_SIZE_get();
- internal static readonly int LINE_SPACING = Interop.TextEditor.TextEditor_Property_LINE_SPACING_get();
- internal static readonly int INPUT_LINE_SPACING = Interop.TextEditor.TextEditor_Property_INPUT_LINE_SPACING_get();
- internal static readonly int UNDERLINE = Interop.TextEditor.TextEditor_Property_UNDERLINE_get();
- internal static readonly int INPUT_UNDERLINE = Interop.TextEditor.TextEditor_Property_INPUT_UNDERLINE_get();
- internal static readonly int SHADOW = Interop.TextEditor.TextEditor_Property_SHADOW_get();
- internal static readonly int INPUT_SHADOW = Interop.TextEditor.TextEditor_Property_INPUT_SHADOW_get();
- internal static readonly int EMBOSS = Interop.TextEditor.TextEditor_Property_EMBOSS_get();
- internal static readonly int INPUT_EMBOSS = Interop.TextEditor.TextEditor_Property_INPUT_EMBOSS_get();
- internal static readonly int OUTLINE = Interop.TextEditor.TextEditor_Property_OUTLINE_get();
- internal static readonly int INPUT_OUTLINE = Interop.TextEditor.TextEditor_Property_INPUT_OUTLINE_get();
- internal static readonly int SMOOTH_SCROLL = Interop.TextEditor.TextEditor_Property_SMOOTH_SCROLL_get();
- internal static readonly int SMOOTH_SCROLL_DURATION = Interop.TextEditor.TextEditor_Property_SMOOTH_SCROLL_DURATION_get();
- internal static readonly int ENABLE_SCROLL_BAR = Interop.TextEditor.TextEditor_Property_ENABLE_SCROLL_BAR_get();
- internal static readonly int SCROLL_BAR_SHOW_DURATION = Interop.TextEditor.TextEditor_Property_SCROLL_BAR_SHOW_DURATION_get();
- internal static readonly int SCROLL_BAR_FADE_DURATION = Interop.TextEditor.TextEditor_Property_SCROLL_BAR_FADE_DURATION_get();
- internal static readonly int PIXEL_SIZE = Interop.TextEditor.TextEditor_Property_PIXEL_SIZE_get();
- internal static readonly int LINE_COUNT = Interop.TextEditor.TextEditor_Property_LINE_COUNT_get();
- internal static readonly int ENABLE_SELECTION = Interop.TextEditor.TextEditor_Property_ENABLE_SELECTION_get();
- internal static readonly int PLACEHOLDER = Interop.TextEditor.TextEditor_Property_PLACEHOLDER_get();
- internal static readonly int LINE_WRAP_MODE = Interop.TextEditor.TextEditor_Property_LINE_WRAP_MODE_get();
- internal static readonly int PLACEHOLDER_TEXT = Interop.TextEditor.TextEditor_Property_PLACEHOLDER_TEXT_get();
- internal static readonly int PLACEHOLDER_TEXT_COLOR = Interop.TextEditor.TextEditor_Property_PLACEHOLDER_TEXT_COLOR_get();
- internal static readonly int ENABLE_SHIFT_SELECTION = Interop.TextEditor.TextEditor_Property_ENABLE_SHIFT_SELECTION_get();
- internal static readonly int MATCH_SYSTEM_LANGUAGE_DIRECTION = Interop.TextEditor.TextEditor_Property_MATCH_SYSTEM_LANGUAGE_DIRECTION_get();
+ internal static readonly int TEXT = Interop.TextEditor.TextGet();
+ internal static readonly int TextColor = Interop.TextEditor.TextColorGet();
+ internal static readonly int FontFamily = Interop.TextEditor.FontFamilyGet();
+ internal static readonly int FontStyle = Interop.TextEditor.FontStyleGet();
+ internal static readonly int PointSize = Interop.TextEditor.PointSizeGet();
+ internal static readonly int HorizontalAlignment = Interop.TextEditor.HorizontalAlignmentGet();
+ internal static readonly int ScrollThreshold = Interop.TextEditor.ScrollThresholdGet();
+ internal static readonly int ScrollSpeed = Interop.TextEditor.ScrollSpeedGet();
+ internal static readonly int PrimaryCursorColor = Interop.TextEditor.PrimaryCursorColorGet();
+ internal static readonly int SecondaryCursorColor = Interop.TextEditor.SecondaryCursorColorGet();
+ internal static readonly int EnableCursorBlink = Interop.TextEditor.EnableCursorBlinkGet();
+ internal static readonly int CursorBlinkInterval = Interop.TextEditor.CursorBlinkIntervalGet();
+ internal static readonly int CursorBlinkDuration = Interop.TextEditor.CursorBlinkDurationGet();
+ internal static readonly int CursorWidth = Interop.TextEditor.CursorWidthGet();
+ internal static readonly int GrabHandleImage = Interop.TextEditor.GrabHandleImageGet();
+ internal static readonly int GrabHandlePressedImage = Interop.TextEditor.GrabHandlePressedImageGet();
+ internal static readonly int SelectionHandleImageLeft = Interop.TextEditor.SelectionHandleImageLeftGet();
+ internal static readonly int SelectionHandleImageRight = Interop.TextEditor.SelectionHandleImageRightGet();
+ internal static readonly int SelectionHandlePressedImageLeft = Interop.TextEditor.SelectionHandlePressedImageLeftGet();
+ internal static readonly int SelectionHandlePressedImageRight = Interop.TextEditor.SelectionHandlePressedImageRightGet();
+ internal static readonly int SelectionHandleMarkerImageLeft = Interop.TextEditor.SelectionHandleMarkerImageLeftGet();
+ internal static readonly int SelectionHandleMarkerImageRight = Interop.TextEditor.SelectionHandleMarkerImageRightGet();
+ internal static readonly int SelectionHighlightColor = Interop.TextEditor.SelectionHighlightColorGet();
+ internal static readonly int DecorationBoundingBox = Interop.TextEditor.DecorationBoundingBoxGet();
+ internal static readonly int EnableMarkup = Interop.TextEditor.EnableMarkupGet();
+ internal static readonly int InputColor = Interop.TextEditor.InputColorGet();
+ internal static readonly int InputFontFamily = Interop.TextEditor.InputFontFamilyGet();
+ internal static readonly int InputFontStyle = Interop.TextEditor.InputFontStyleGet();
+ internal static readonly int InputPointSize = Interop.TextEditor.InputPointSizeGet();
+ internal static readonly int LineSpacing = Interop.TextEditor.LineSpacingGet();
+ internal static readonly int InputLineSpacing = Interop.TextEditor.InputLineSpacingGet();
+ internal static readonly int UNDERLINE = Interop.TextEditor.UnderlineGet();
+ internal static readonly int InputUnderline = Interop.TextEditor.InputUnderlineGet();
+ internal static readonly int SHADOW = Interop.TextEditor.ShadowGet();
+ internal static readonly int InputShadow = Interop.TextEditor.InputShadowGet();
+ internal static readonly int EMBOSS = Interop.TextEditor.EmbossGet();
+ internal static readonly int InputEmboss = Interop.TextEditor.InputEmbossGet();
+ internal static readonly int OUTLINE = Interop.TextEditor.OutlineGet();
+ internal static readonly int InputOutline = Interop.TextEditor.InputOutlineGet();
+ internal static readonly int SmoothScroll = Interop.TextEditor.SmoothScrollGet();
+ internal static readonly int SmoothScrollDuration = Interop.TextEditor.SmoothScrollDurationGet();
+ internal static readonly int EnableScrollBar = Interop.TextEditor.EnableScrollBarGet();
+ internal static readonly int ScrollBarShowDuration = Interop.TextEditor.ScrollBarShowDurationGet();
+ internal static readonly int ScrollBarFadeDuration = Interop.TextEditor.ScrollBarFadeDurationGet();
+ internal static readonly int PixelSize = Interop.TextEditor.PixelSizeGet();
+ internal static readonly int LineCount = Interop.TextEditor.LineCountGet();
+ internal static readonly int EnableSelection = Interop.TextEditor.EnableSelectionGet();
+ internal static readonly int PLACEHOLDER = Interop.TextEditor.PlaceholderGet();
+ internal static readonly int LineWrapMode = Interop.TextEditor.LineWrapModeGet();
+ internal static readonly int PlaceholderText = Interop.TextEditor.PlaceholderTextGet();
+ internal static readonly int PlaceholderTextColor = Interop.TextEditor.PlaceholderTextColorGet();
+ internal static readonly int EnableShiftSelection = Interop.TextEditor.EnableShiftSelectionGet();
+ internal static readonly int MatchSystemLanguageDirection = Interop.TextEditor.MatchSystemLanguageDirectionGet();
+ internal static readonly int MaxLength = Interop.TextEditor.MaxLengthGet();
+ internal static readonly int SelectedTextStart = Interop.TextEditor.SelectedTextStartGet();
+ internal static readonly int SelectedTextEnd = Interop.TextEditor.SelectedTextEndGet();
+ internal static readonly int EnableEditing = Interop.TextEditor.EnableEditingGet();
+ internal static readonly int SelectedText = Interop.TextEditor.SelectedTextGet();
+ internal static readonly int HorizontalScrollPosition = Interop.TextEditor.HorizontalScrollPositionGet();
+ internal static readonly int VerticalScrollPosition = Interop.TextEditor.VerticalScrollPositionGet();
+ internal static readonly int PrimaryCursorPosition = Interop.TextEditor.PrimaryCursorPositionGet();
+ internal static readonly int FontSizeScale = Interop.TextEditor.FontSizeScaleGet();
+ internal static readonly int GrabHandleColor = Interop.TextEditor.GrabHandleColorGet();
+ internal static readonly int EnableGrabHandle = Interop.TextEditor.EnableGrabHandleGet();
+ internal static readonly int EnableGrabHandlePopup = Interop.TextEditor.EnableGrabHandlePopupGet();
+ 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 InputFilter = Interop.TextEditor.InputFilterGet();
}
internal class InputStyle
Outline = 0x0100
}
}
+
+ private void OnDecorationBoundingBoxChanged(int x, int y, int width, int height)
+ {
+ DecorationBoundingBox = new Rectangle(x, y, width, height);
+ }
+ private void OnInputColorChanged(float x, float y, float z, float w)
+ {
+ InputColor = new Vector4(x, y, z, w);
+ }
+ private void OnPlaceholderTextColorChanged(float r, float g, float b, float a)
+ {
+ PlaceholderTextColor = new Color(r, g, b, a);
+ }
+ private void OnPrimaryCursorColorChanged(float x, float y, float z, float w)
+ {
+ PrimaryCursorColor = new Vector4(x, y, z, w);
+ }
+ private void OnSecondaryCursorColorChanged(float x, float y, float z, float w)
+ {
+ SecondaryCursorColor = new Vector4(x, y, z, w);
+ }
+ private void OnSelectionHighlightColorChanged(float x, float y, float z, float w)
+ {
+ SelectionHighlightColor = new Vector4(x, y, z, w);
+ }
+ private void OnTextColorChanged(float x, float y, float z, float w)
+ {
+ TextColor = new Vector4(x, y, z, w);
+ }
+ private void OnGrabHandleColorChanged(float r, float g, float b, float a)
+ {
+ GrabHandleColor = new Color(r, g, b, a);
+ }
}
}