1 /** Copyright (c) 2017 Samsung Electronics Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
17 namespace Tizen.NUI.BaseComponents
21 using System.Runtime.InteropServices;
24 /// A control which provides a multi-line editable text editor.
26 public class TextEditor : View
28 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
30 internal TextEditor(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.TextEditor_SWIGUpcast(cPtr), cMemoryOwn)
32 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
35 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TextEditor obj)
37 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
43 protected override void Dispose(DisposeTypes type)
50 if(type == DisposeTypes.Explicit)
53 //Release your own managed resources here.
54 //You should release all of your own disposable objects here.
57 //Release your own unmanaged resources here.
58 //You should not access any managed member here except static instance.
59 //because the execution order of Finalizes is non-deterministic.
61 if (_textEditorTextChangedCallbackDelegate != null)
63 TextChangedSignal().Disconnect(_textEditorTextChangedCallbackDelegate);
66 if (swigCPtr.Handle != global::System.IntPtr.Zero)
71 NDalicPINVOKE.delete_TextEditor(swigCPtr);
73 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
80 /// Event arguments that passed via TextChanged signal.
82 public class TextChangedEventArgs : EventArgs
84 private TextEditor _textEditor;
87 /// TextEditor - is the texteditor control which has the text contents changed.
89 public TextEditor TextEditor
102 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
103 private delegate void TextChangedCallbackDelegate(IntPtr textEditor);
104 private EventHandler<TextChangedEventArgs> _textEditorTextChangedEventHandler;
105 private TextChangedCallbackDelegate _textEditorTextChangedCallbackDelegate;
108 /// Event for TextChanged signal which can be used to subscribe/unsubscribe the event handler
109 /// provided by the user. TextChanged signal is emitted when the text changes.<br>
111 public event EventHandler<TextChangedEventArgs> TextChanged
115 if (_textEditorTextChangedEventHandler == null)
117 _textEditorTextChangedCallbackDelegate = (OnTextChanged);
118 TextChangedSignal().Connect(_textEditorTextChangedCallbackDelegate);
120 _textEditorTextChangedEventHandler += value;
124 _textEditorTextChangedEventHandler -= value;
125 if (_textEditorTextChangedEventHandler == null && TextChangedSignal().Empty() == false)
127 TextChangedSignal().Disconnect(_textEditorTextChangedCallbackDelegate);
132 private void OnTextChanged(IntPtr textEditor)
134 TextChangedEventArgs e = new TextChangedEventArgs();
136 // Populate all members of "e" (TextChangedEventArgs) with real data
137 e.TextEditor = Registry.GetManagedBaseHandleFromNativePtr(textEditor) as TextEditor;
139 if (_textEditorTextChangedEventHandler != null)
141 //here we send all data to user event handlers
142 _textEditorTextChangedEventHandler(this, e);
148 /// Event arguments that passed via ScrollStateChanged signal.
150 public class ScrollStateChangedEventArgs : EventArgs
152 private TextEditor _textEditor;
153 private ScrollState _scrollState;
156 /// TextEditor - is the texteditor control which has the scroll state changed.
158 public TextEditor TextEditor
171 /// ScrollState - is the texteditor control scroll state.
173 public ScrollState ScrollState
181 _scrollState = value;
186 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
187 private delegate void ScrollStateChangedCallbackDelegate(IntPtr textEditor, ScrollState state);
188 private EventHandler<ScrollStateChangedEventArgs> _textEditorScrollStateChangedEventHandler;
189 private ScrollStateChangedCallbackDelegate _textEditorScrollStateChangedCallbackDelegate;
192 /// Event for ScrollStateChanged signal which can be used to subscribe/unsubscribe the event handler
193 /// provided by the user. ScrollStateChanged signal is emitted when the scroll state changes.<br>
195 public event EventHandler<ScrollStateChangedEventArgs> ScrollStateChanged
199 if (_textEditorScrollStateChangedEventHandler == null)
201 _textEditorScrollStateChangedCallbackDelegate = OnScrollStateChanged;
202 ScrollStateChangedSignal(this).Connect(_textEditorScrollStateChangedCallbackDelegate);
204 _textEditorScrollStateChangedEventHandler += value;
208 _textEditorScrollStateChangedEventHandler -= value;
209 if (_textEditorScrollStateChangedEventHandler == null && ScrollStateChangedSignal(this).Empty() == false)
211 ScrollStateChangedSignal(this).Disconnect(_textEditorScrollStateChangedCallbackDelegate);
216 private void OnScrollStateChanged(IntPtr textEditor, ScrollState state)
218 ScrollStateChangedEventArgs e = new ScrollStateChangedEventArgs();
220 if (textEditor != null)
222 // Populate all members of "e" (ScrollStateChangedEventArgs) with real data
223 e.TextEditor = Registry.GetManagedBaseHandleFromNativePtr(textEditor) as TextEditor;
224 e.ScrollState = state;
227 if (_textEditorScrollStateChangedEventHandler != null)
229 //here we send all data to user event handlers
230 _textEditorScrollStateChangedEventHandler(this, e);
234 internal class Property
236 internal static readonly int RENDERING_BACKEND = NDalicPINVOKE.TextEditor_Property_RENDERING_BACKEND_get();
237 internal static readonly int TEXT = NDalicPINVOKE.TextEditor_Property_TEXT_get();
238 internal static readonly int TEXT_COLOR = NDalicPINVOKE.TextEditor_Property_TEXT_COLOR_get();
239 internal static readonly int FONT_FAMILY = NDalicPINVOKE.TextEditor_Property_FONT_FAMILY_get();
240 internal static readonly int FONT_STYLE = NDalicPINVOKE.TextEditor_Property_FONT_STYLE_get();
241 internal static readonly int POINT_SIZE = NDalicPINVOKE.TextEditor_Property_POINT_SIZE_get();
242 internal static readonly int HORIZONTAL_ALIGNMENT = NDalicPINVOKE.TextEditor_Property_HORIZONTAL_ALIGNMENT_get();
243 internal static readonly int SCROLL_THRESHOLD = NDalicPINVOKE.TextEditor_Property_SCROLL_THRESHOLD_get();
244 internal static readonly int SCROLL_SPEED = NDalicPINVOKE.TextEditor_Property_SCROLL_SPEED_get();
245 internal static readonly int PRIMARY_CURSOR_COLOR = NDalicPINVOKE.TextEditor_Property_PRIMARY_CURSOR_COLOR_get();
246 internal static readonly int SECONDARY_CURSOR_COLOR = NDalicPINVOKE.TextEditor_Property_SECONDARY_CURSOR_COLOR_get();
247 internal static readonly int ENABLE_CURSOR_BLINK = NDalicPINVOKE.TextEditor_Property_ENABLE_CURSOR_BLINK_get();
248 internal static readonly int CURSOR_BLINK_INTERVAL = NDalicPINVOKE.TextEditor_Property_CURSOR_BLINK_INTERVAL_get();
249 internal static readonly int CURSOR_BLINK_DURATION = NDalicPINVOKE.TextEditor_Property_CURSOR_BLINK_DURATION_get();
250 internal static readonly int CURSOR_WIDTH = NDalicPINVOKE.TextEditor_Property_CURSOR_WIDTH_get();
251 internal static readonly int GRAB_HANDLE_IMAGE = NDalicPINVOKE.TextEditor_Property_GRAB_HANDLE_IMAGE_get();
252 internal static readonly int GRAB_HANDLE_PRESSED_IMAGE = NDalicPINVOKE.TextEditor_Property_GRAB_HANDLE_PRESSED_IMAGE_get();
253 internal static readonly int SELECTION_HANDLE_IMAGE_LEFT = NDalicPINVOKE.TextEditor_Property_SELECTION_HANDLE_IMAGE_LEFT_get();
254 internal static readonly int SELECTION_HANDLE_IMAGE_RIGHT = NDalicPINVOKE.TextEditor_Property_SELECTION_HANDLE_IMAGE_RIGHT_get();
255 internal static readonly int SELECTION_HANDLE_PRESSED_IMAGE_LEFT = NDalicPINVOKE.TextEditor_Property_SELECTION_HANDLE_PRESSED_IMAGE_LEFT_get();
256 internal static readonly int SELECTION_HANDLE_PRESSED_IMAGE_RIGHT = NDalicPINVOKE.TextEditor_Property_SELECTION_HANDLE_PRESSED_IMAGE_RIGHT_get();
257 internal static readonly int SELECTION_HANDLE_MARKER_IMAGE_LEFT = NDalicPINVOKE.TextEditor_Property_SELECTION_HANDLE_MARKER_IMAGE_LEFT_get();
258 internal static readonly int SELECTION_HANDLE_MARKER_IMAGE_RIGHT = NDalicPINVOKE.TextEditor_Property_SELECTION_HANDLE_MARKER_IMAGE_RIGHT_get();
259 internal static readonly int SELECTION_HIGHLIGHT_COLOR = NDalicPINVOKE.TextEditor_Property_SELECTION_HIGHLIGHT_COLOR_get();
260 internal static readonly int DECORATION_BOUNDING_BOX = NDalicPINVOKE.TextEditor_Property_DECORATION_BOUNDING_BOX_get();
261 internal static readonly int ENABLE_MARKUP = NDalicPINVOKE.TextEditor_Property_ENABLE_MARKUP_get();
262 internal static readonly int INPUT_COLOR = NDalicPINVOKE.TextEditor_Property_INPUT_COLOR_get();
263 internal static readonly int INPUT_FONT_FAMILY = NDalicPINVOKE.TextEditor_Property_INPUT_FONT_FAMILY_get();
264 internal static readonly int INPUT_FONT_STYLE = NDalicPINVOKE.TextEditor_Property_INPUT_FONT_STYLE_get();
265 internal static readonly int INPUT_POINT_SIZE = NDalicPINVOKE.TextEditor_Property_INPUT_POINT_SIZE_get();
266 internal static readonly int LINE_SPACING = NDalicPINVOKE.TextEditor_Property_LINE_SPACING_get();
267 internal static readonly int INPUT_LINE_SPACING = NDalicPINVOKE.TextEditor_Property_INPUT_LINE_SPACING_get();
268 internal static readonly int UNDERLINE = NDalicPINVOKE.TextEditor_Property_UNDERLINE_get();
269 internal static readonly int INPUT_UNDERLINE = NDalicPINVOKE.TextEditor_Property_INPUT_UNDERLINE_get();
270 internal static readonly int SHADOW = NDalicPINVOKE.TextEditor_Property_SHADOW_get();
271 internal static readonly int INPUT_SHADOW = NDalicPINVOKE.TextEditor_Property_INPUT_SHADOW_get();
272 internal static readonly int EMBOSS = NDalicPINVOKE.TextEditor_Property_EMBOSS_get();
273 internal static readonly int INPUT_EMBOSS = NDalicPINVOKE.TextEditor_Property_INPUT_EMBOSS_get();
274 internal static readonly int OUTLINE = NDalicPINVOKE.TextEditor_Property_OUTLINE_get();
275 internal static readonly int INPUT_OUTLINE = NDalicPINVOKE.TextEditor_Property_INPUT_OUTLINE_get();
276 internal static readonly int SMOOTH_SCROLL = NDalicManualPINVOKE.TextEditor_Property_SMOOTH_SCROLL_get();
277 internal static readonly int SMOOTH_SCROLL_DURATION = NDalicManualPINVOKE.TextEditor_Property_SMOOTH_SCROLL_DURATION_get();
278 internal static readonly int ENABLE_SCROLL_BAR = NDalicManualPINVOKE.TextEditor_Property_ENABLE_SCROLL_BAR_get();
279 internal static readonly int SCROLL_BAR_SHOW_DURATION = NDalicManualPINVOKE.TextEditor_Property_SCROLL_BAR_SHOW_DURATION_get();
280 internal static readonly int SCROLL_BAR_FADE_DURATION = NDalicManualPINVOKE.TextEditor_Property_SCROLL_BAR_FADE_DURATION_get();
281 internal static readonly int PIXEL_SIZE = NDalicManualPINVOKE.TextEditor_Property_PIXEL_SIZE_get();
282 internal static readonly int LINE_COUNT = NDalicManualPINVOKE.TextEditor_Property_LINE_COUNT_get();
283 internal static readonly int PLACEHOLDER_TEXT = NDalicManualPINVOKE.TextEditor_Property_PLACEHOLDER_TEXT_get();
284 internal static readonly int PLACEHOLDER_TEXT_COLOR = NDalicManualPINVOKE.TextEditor_Property_PLACEHOLDER_TEXT_COLOR_get();
285 internal static readonly int ENABLE_SELECTION = NDalicManualPINVOKE.TextEditor_Property_ENABLE_SELECTION_get();
286 internal static readonly int PLACEHOLDER = NDalicManualPINVOKE.TextEditor_Property_PLACEHOLDER_get();
290 internal class InputStyle
299 LineSpacing = 0x0010,
308 /// Creates the TextEditor control.
310 public TextEditor() : this(NDalicPINVOKE.TextEditor_New(), true)
312 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
315 internal TextEditor(TextEditor handle) : this(NDalicPINVOKE.new_TextEditor__SWIG_1(TextEditor.getCPtr(handle)), true)
317 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
320 [Obsolete("Please do not use! this will be deprecated")]
321 public new static TextEditor DownCast(BaseHandle handle)
323 TextEditor ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as TextEditor;
324 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
328 internal TextEditorSignal TextChangedSignal()
330 TextEditorSignal ret = new TextEditorSignal(NDalicPINVOKE.TextEditor_TextChangedSignal(swigCPtr), false);
331 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
335 internal ScrollStateChangedSignal ScrollStateChangedSignal(TextEditor textEditor)
337 ScrollStateChangedSignal ret = new ScrollStateChangedSignal(NDalicManualPINVOKE.TextEditor_ScrollStateChangedSignal(TextEditor.getCPtr(textEditor)), false);
338 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
342 internal SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextEditor_Dali__Toolkit__TextEditor__InputStyle__MaskF_t InputStyleChangedSignal()
344 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(NDalicPINVOKE.TextEditor_InputStyleChangedSignal(swigCPtr), false);
345 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
357 GetProperty(TextEditor.Property.TEXT).Get(out temp);
362 SetProperty(TextEditor.Property.TEXT, new Tizen.NUI.PropertyValue(value));
367 /// Text color property.
369 public Vector4 TextColor
373 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
374 GetProperty(TextEditor.Property.TEXT_COLOR).Get(temp);
379 SetProperty(TextEditor.Property.TEXT_COLOR, new Tizen.NUI.PropertyValue(value));
384 /// Font family property.
386 public string FontFamily
391 GetProperty(TextEditor.Property.FONT_FAMILY).Get(out temp);
396 SetProperty(TextEditor.Property.FONT_FAMILY, new Tizen.NUI.PropertyValue(value));
401 /// Font style property.
403 public PropertyMap FontStyle
407 PropertyMap temp = new PropertyMap();
408 GetProperty(TextEditor.Property.FONT_STYLE).Get(temp);
413 SetProperty(TextEditor.Property.FONT_STYLE, new Tizen.NUI.PropertyValue(value));
418 /// Point size property.
420 public float PointSize
425 GetProperty(TextEditor.Property.POINT_SIZE).Get(out temp);
430 SetProperty(TextEditor.Property.POINT_SIZE, new Tizen.NUI.PropertyValue(value));
435 /// Horizontal alignment property.
437 public HorizontalAlignment HorizontalAlignment
442 if (GetProperty(TextEditor.Property.HORIZONTAL_ALIGNMENT).Get(out temp) == false)
444 NUILog.Error("HorizontalAlignment get error!");
450 return HorizontalAlignment.Begin;
452 return HorizontalAlignment.Center;
454 return HorizontalAlignment.End;
456 return HorizontalAlignment.Begin;
461 string valueToString = "";
464 case HorizontalAlignment.Begin:
466 valueToString = "BEGIN";
469 case HorizontalAlignment.Center:
471 valueToString = "CENTER";
474 case HorizontalAlignment.End:
476 valueToString = "END";
481 valueToString = "BEGIN";
485 SetProperty(TextEditor.Property.HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
490 /// Scroll threshold property.
492 public float ScrollThreshold
497 GetProperty(TextEditor.Property.SCROLL_THRESHOLD).Get(out temp);
502 SetProperty(TextEditor.Property.SCROLL_THRESHOLD, new Tizen.NUI.PropertyValue(value));
507 /// Scroll speed property.
509 public float ScrollSpeed
514 GetProperty(TextEditor.Property.SCROLL_SPEED).Get(out temp);
519 SetProperty(TextEditor.Property.SCROLL_SPEED, new Tizen.NUI.PropertyValue(value));
524 /// Primary cursor color property.
526 public Vector4 PrimaryCursorColor
530 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
531 GetProperty(TextEditor.Property.PRIMARY_CURSOR_COLOR).Get(temp);
536 SetProperty(TextEditor.Property.PRIMARY_CURSOR_COLOR, new Tizen.NUI.PropertyValue(value));
541 /// SecondaryCursorColor property.
543 public Vector4 SecondaryCursorColor
547 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
548 GetProperty(TextEditor.Property.SECONDARY_CURSOR_COLOR).Get(temp);
553 SetProperty(TextEditor.Property.SECONDARY_CURSOR_COLOR, new Tizen.NUI.PropertyValue(value));
558 /// EnableCursorBlink property.
560 public bool EnableCursorBlink
565 GetProperty(TextEditor.Property.ENABLE_CURSOR_BLINK).Get(out temp);
570 SetProperty(TextEditor.Property.ENABLE_CURSOR_BLINK, new Tizen.NUI.PropertyValue(value));
575 /// CursorBlinkInterval property.
577 public float CursorBlinkInterval
582 GetProperty(TextEditor.Property.CURSOR_BLINK_INTERVAL).Get(out temp);
587 SetProperty(TextEditor.Property.CURSOR_BLINK_INTERVAL, new Tizen.NUI.PropertyValue(value));
592 /// CursorBlinkDuration property.
594 public float CursorBlinkDuration
599 GetProperty(TextEditor.Property.CURSOR_BLINK_DURATION).Get(out temp);
604 SetProperty(TextEditor.Property.CURSOR_BLINK_DURATION, new Tizen.NUI.PropertyValue(value));
609 /// CursorWidth property.
611 public int CursorWidth
616 GetProperty(TextEditor.Property.CURSOR_WIDTH).Get(out temp);
621 SetProperty(TextEditor.Property.CURSOR_WIDTH, new Tizen.NUI.PropertyValue(value));
626 /// GrabHandleImage property.
628 public string GrabHandleImage
633 GetProperty(TextEditor.Property.GRAB_HANDLE_IMAGE).Get(out temp);
638 SetProperty(TextEditor.Property.GRAB_HANDLE_IMAGE, new Tizen.NUI.PropertyValue(value));
643 /// GrabHandlePressedImage property.
645 public string GrabHandlePressedImage
650 GetProperty(TextEditor.Property.GRAB_HANDLE_PRESSED_IMAGE).Get(out temp);
655 SetProperty(TextEditor.Property.GRAB_HANDLE_PRESSED_IMAGE, new Tizen.NUI.PropertyValue(value));
660 /// SelectionHandleImageLeft property.
662 public PropertyMap SelectionHandleImageLeft
666 PropertyMap temp = new PropertyMap();
667 GetProperty(TextEditor.Property.SELECTION_HANDLE_IMAGE_LEFT).Get(temp);
672 SetProperty(TextEditor.Property.SELECTION_HANDLE_IMAGE_LEFT, new Tizen.NUI.PropertyValue(value));
677 /// SelectionHandleImageRight property.
679 public PropertyMap SelectionHandleImageRight
683 PropertyMap temp = new PropertyMap();
684 GetProperty(TextEditor.Property.SELECTION_HANDLE_IMAGE_RIGHT).Get(temp);
689 SetProperty(TextEditor.Property.SELECTION_HANDLE_IMAGE_RIGHT, new Tizen.NUI.PropertyValue(value));
694 /// SelectionHandlePressedImageLeft property.
696 public PropertyMap SelectionHandlePressedImageLeft
700 PropertyMap temp = new PropertyMap();
701 GetProperty(TextEditor.Property.SELECTION_HANDLE_PRESSED_IMAGE_LEFT).Get(temp);
706 SetProperty(TextEditor.Property.SELECTION_HANDLE_PRESSED_IMAGE_LEFT, new Tizen.NUI.PropertyValue(value));
711 /// SelectionHandlePressedImageRight property.
713 public PropertyMap SelectionHandlePressedImageRight
717 PropertyMap temp = new PropertyMap();
718 GetProperty(TextEditor.Property.SELECTION_HANDLE_PRESSED_IMAGE_RIGHT).Get(temp);
723 SetProperty(TextEditor.Property.SELECTION_HANDLE_PRESSED_IMAGE_RIGHT, new Tizen.NUI.PropertyValue(value));
728 /// SelectionHandleMarkerImageLeft property.
730 public PropertyMap SelectionHandleMarkerImageLeft
734 PropertyMap temp = new PropertyMap();
735 GetProperty(TextEditor.Property.SELECTION_HANDLE_MARKER_IMAGE_LEFT).Get(temp);
740 SetProperty(TextEditor.Property.SELECTION_HANDLE_MARKER_IMAGE_LEFT, new Tizen.NUI.PropertyValue(value));
745 /// SelectionHandleMarkerImageRight property.
747 public PropertyMap SelectionHandleMarkerImageRight
751 PropertyMap temp = new PropertyMap();
752 GetProperty(TextEditor.Property.SELECTION_HANDLE_MARKER_IMAGE_RIGHT).Get(temp);
757 SetProperty(TextEditor.Property.SELECTION_HANDLE_MARKER_IMAGE_RIGHT, new Tizen.NUI.PropertyValue(value));
762 /// SelectionHighlightColor property.
764 public Vector4 SelectionHighlightColor
768 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
769 GetProperty(TextEditor.Property.SELECTION_HIGHLIGHT_COLOR).Get(temp);
774 SetProperty(TextEditor.Property.SELECTION_HIGHLIGHT_COLOR, new Tizen.NUI.PropertyValue(value));
779 /// DecorationBoundingBox property.
781 public Rectangle DecorationBoundingBox
785 Rectangle temp = new Rectangle(0, 0, 0, 0);
786 GetProperty(TextEditor.Property.DECORATION_BOUNDING_BOX).Get(temp);
791 SetProperty(TextEditor.Property.DECORATION_BOUNDING_BOX, new Tizen.NUI.PropertyValue(value));
796 /// EnableMarkup property.
798 public bool EnableMarkup
803 GetProperty(TextEditor.Property.ENABLE_MARKUP).Get(out temp);
808 SetProperty(TextEditor.Property.ENABLE_MARKUP, new Tizen.NUI.PropertyValue(value));
813 /// InputColor property.
815 public Vector4 InputColor
819 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
820 GetProperty(TextEditor.Property.INPUT_COLOR).Get(temp);
825 SetProperty(TextEditor.Property.INPUT_COLOR, new Tizen.NUI.PropertyValue(value));
830 /// InputFontFamily property.
832 public string InputFontFamily
837 GetProperty(TextEditor.Property.INPUT_FONT_FAMILY).Get(out temp);
842 SetProperty(TextEditor.Property.INPUT_FONT_FAMILY, new Tizen.NUI.PropertyValue(value));
847 /// InputFontStyle property.
849 public PropertyMap InputFontStyle
853 PropertyMap temp = new PropertyMap();
854 GetProperty(TextEditor.Property.INPUT_FONT_STYLE).Get(temp);
859 SetProperty(TextEditor.Property.INPUT_FONT_STYLE, new Tizen.NUI.PropertyValue(value));
864 /// InputPointSize property.
866 public float InputPointSize
871 GetProperty(TextEditor.Property.INPUT_POINT_SIZE).Get(out temp);
876 SetProperty(TextEditor.Property.INPUT_POINT_SIZE, new Tizen.NUI.PropertyValue(value));
881 /// LineSpacing property.
883 public float LineSpacing
888 GetProperty(TextEditor.Property.LINE_SPACING).Get(out temp);
893 SetProperty(TextEditor.Property.LINE_SPACING, new Tizen.NUI.PropertyValue(value));
898 /// InputLineSpacing property.
900 public float InputLineSpacing
905 GetProperty(TextEditor.Property.INPUT_LINE_SPACING).Get(out temp);
910 SetProperty(TextEditor.Property.INPUT_LINE_SPACING, new Tizen.NUI.PropertyValue(value));
915 /// Underline property.
917 public PropertyMap Underline
921 PropertyMap temp = new PropertyMap();
922 GetProperty(TextEditor.Property.UNDERLINE).Get(temp);
927 SetProperty(TextEditor.Property.UNDERLINE, new Tizen.NUI.PropertyValue(value));
932 /// InputUnderline property.
934 public string InputUnderline
939 GetProperty(TextEditor.Property.INPUT_UNDERLINE).Get(out temp);
944 SetProperty(TextEditor.Property.INPUT_UNDERLINE, new Tizen.NUI.PropertyValue(value));
951 public PropertyMap Shadow
955 PropertyMap temp = new PropertyMap();
956 GetProperty(TextEditor.Property.SHADOW).Get(temp);
961 SetProperty(TextEditor.Property.SHADOW, new Tizen.NUI.PropertyValue(value));
966 /// InputShadow property.
968 public string InputShadow
973 GetProperty(TextEditor.Property.INPUT_SHADOW).Get(out temp);
978 SetProperty(TextEditor.Property.INPUT_SHADOW, new Tizen.NUI.PropertyValue(value));
990 GetProperty(TextEditor.Property.EMBOSS).Get(out temp);
995 SetProperty(TextEditor.Property.EMBOSS, new Tizen.NUI.PropertyValue(value));
1000 /// InputEmboss property.
1002 public string InputEmboss
1007 GetProperty(TextEditor.Property.INPUT_EMBOSS).Get(out temp);
1012 SetProperty(TextEditor.Property.INPUT_EMBOSS, new Tizen.NUI.PropertyValue(value));
1017 /// Outline property.
1019 public string Outline
1024 GetProperty(TextEditor.Property.OUTLINE).Get(out temp);
1029 SetProperty(TextEditor.Property.OUTLINE, new Tizen.NUI.PropertyValue(value));
1034 /// InputOutline property.
1036 public string InputOutline
1041 GetProperty(TextEditor.Property.INPUT_OUTLINE).Get(out temp);
1046 SetProperty(TextEditor.Property.INPUT_OUTLINE, new Tizen.NUI.PropertyValue(value));
1051 /// SmoothScroll property.
1053 public bool SmoothScroll
1058 GetProperty(TextEditor.Property.SMOOTH_SCROLL).Get(out temp);
1063 SetProperty(TextEditor.Property.SMOOTH_SCROLL, new Tizen.NUI.PropertyValue(value));
1068 /// SmoothScrollDuration property.
1070 public float SmoothScrollDuration
1075 GetProperty(TextEditor.Property.SMOOTH_SCROLL_DURATION).Get(out temp);
1080 SetProperty(TextEditor.Property.SMOOTH_SCROLL_DURATION, new Tizen.NUI.PropertyValue(value));
1085 /// EnableScrollBar property.
1087 public bool EnableScrollBar
1092 GetProperty(TextEditor.Property.ENABLE_SCROLL_BAR).Get(out temp);
1097 SetProperty(TextEditor.Property.ENABLE_SCROLL_BAR, new Tizen.NUI.PropertyValue(value));
1102 /// ScrollBarShowDuration property.
1104 public float ScrollBarShowDuration
1109 GetProperty(TextEditor.Property.SCROLL_BAR_SHOW_DURATION).Get(out temp);
1114 SetProperty(TextEditor.Property.SCROLL_BAR_SHOW_DURATION, new Tizen.NUI.PropertyValue(value));
1119 /// ScrollBarFadeDuration property.
1121 public float ScrollBarFadeDuration
1126 GetProperty(TextEditor.Property.SCROLL_BAR_FADE_DURATION).Get(out temp);
1131 SetProperty(TextEditor.Property.SCROLL_BAR_FADE_DURATION, new Tizen.NUI.PropertyValue(value));
1136 /// PixelSize property.
1138 public float PixelSize
1143 GetProperty(TextEditor.Property.PIXEL_SIZE).Get(out temp);
1148 SetProperty(TextEditor.Property.PIXEL_SIZE, new Tizen.NUI.PropertyValue(value));
1153 /// The line count of text.
1155 public int LineCount
1160 GetProperty(TextEditor.Property.LINE_COUNT).Get(out temp);
1166 /// The text to display when the TextEditor is empty and inactive.
1168 public string PlaceholderText
1173 GetProperty(TextEditor.Property.PLACEHOLDER_TEXT).Get(out temp);
1178 SetProperty(TextEditor.Property.PLACEHOLDER_TEXT, new Tizen.NUI.PropertyValue(value));
1183 /// The placeholder-text color.
1185 public Color PlaceholderTextColor
1189 Color temp = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1190 GetProperty(TextEditor.Property.PLACEHOLDER_TEXT_COLOR).Get(temp);
1195 SetProperty(TextEditor.Property.PLACEHOLDER_TEXT_COLOR, new Tizen.NUI.PropertyValue(value));
1200 /// Enable selection property.
1202 public bool EnableSelection
1207 GetProperty(TextEditor.Property.ENABLE_SELECTION).Get(out temp);
1212 SetProperty(TextEditor.Property.ENABLE_SELECTION, new Tizen.NUI.PropertyValue(value));
1217 /// Placeholder property.
1218 /// Gets/Sets the placeholder : text, color, font family, font style, point size, and pixel size.
1221 /// The following example demonstrates how to set the placeholder property.
1223 /// PropertyMap propertyMap = new PropertyMap();
1224 /// propertyMap.Add("placeholderText", new PropertyValue("Setting Placeholder Text"));
1225 /// propertyMap.Add("placeholderColor", new PropertyValue(Color.Red));
1226 /// propertyMap.Add("placeholderFontFamily", new PropertyValue("Arial"));
1227 /// propertyMap.Add("placeholderPointSize", new PropertyValue(12.0f));
1229 /// PropertyMap fontStyleMap = new PropertyMap();
1230 /// fontStyleMap.Add("weight", new PropertyValue("bold"));
1231 /// fontStyleMap.Add("width", new PropertyValue("condensed"));
1232 /// fontStyleMap.Add("slant", new PropertyValue("italic"));
1233 /// propertyMap.Add("placeholderFontStyle", new PropertyValue(fontStyleMap));
1235 /// TextEditor editor = new TextEditor();
1236 /// editor.Placeholder = propertyMap;
1239 public Tizen.NUI.PropertyMap Placeholder
1243 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1244 GetProperty(TextEditor.Property.PLACEHOLDER).Get(temp);
1249 SetProperty(TextEditor.Property.PLACEHOLDER, new Tizen.NUI.PropertyValue(value));