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.
16 // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
17 //------------------------------------------------------------------------------
20 // This file was automatically generated by SWIG (http://www.swig.org).
23 // Do not make changes to this file unless you know what you are doing--modify
24 // the SWIG interface file instead.
25 //------------------------------------------------------------------------------
30 using System.Runtime.InteropServices;
33 public class TextEditor : View {
34 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
36 internal TextEditor(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.TextEditor_SWIGUpcast(cPtr), cMemoryOwn) {
37 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
40 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TextEditor obj) {
41 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
45 DisposeQueue.Instance.Add(this);
48 public override void Dispose() {
49 if (!Window.IsInstalled()) {
50 DisposeQueue.Instance.Add(this);
55 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
58 NDalicPINVOKE.delete_TextEditor(swigCPtr);
60 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
62 global::System.GC.SuppressFinalize(this);
70 * @brief Event arguments that passed via TextChanged signal
73 public class TextChangedEventArgs : EventArgs
75 private TextEditor _textEditor;
77 * @brief TextEditor - is the texteditor control which has the text contents changed.
80 public TextEditor TextEditor
93 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
94 private delegate void TextChangedCallbackDelegate(IntPtr textEditor);
95 private DaliEventHandler<object,TextChangedEventArgs> _textEditorTextChangedEventHandler;
96 private TextChangedCallbackDelegate _textEditorTextChangedCallbackDelegate;
99 * @brief Event for TextChanged signal which can be used to subscribe/unsubscribe the event handler
100 * (in the type of TextChangedEventHandler-DaliEventHandler<object,TextChangedEventArgs>)
101 * provided by the user. TextChanged signal is emitted when the text changes.
103 public event DaliEventHandler<object,TextChangedEventArgs> TextChanged
109 // Restricted to only one listener
110 if (_textEditorTextChangedEventHandler == null)
112 _textEditorTextChangedEventHandler += value;
114 _textEditorTextChangedCallbackDelegate = new TextChangedCallbackDelegate(OnTextChanged);
115 this.TextChangedSignal().Connect(_textEditorTextChangedCallbackDelegate);
124 if (_textEditorTextChangedEventHandler != null)
126 this.TextChangedSignal().Disconnect(_textEditorTextChangedCallbackDelegate);
129 _textEditorTextChangedEventHandler -= value;
134 private void OnTextChanged(IntPtr textEditor)
136 TextChangedEventArgs e = new TextChangedEventArgs();
138 // Populate all members of "e" (TextChangedEventArgs) with real data
139 e.TextEditor = Dali.TextEditor.GetTextEditorFromPtr(textEditor);
141 if (_textEditorTextChangedEventHandler != null)
143 //here we send all data to user event handlers
144 _textEditorTextChangedEventHandler(this, e);
149 internal static TextEditor GetTextEditorFromPtr(global::System.IntPtr cPtr) {
150 TextEditor ret = new TextEditor(cPtr, false);
151 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
156 public class Property
158 public static readonly int RENDERING_BACKEND = NDalicPINVOKE.TextEditor_Property_RENDERING_BACKEND_get();
159 public static readonly int TEXT = NDalicPINVOKE.TextEditor_Property_TEXT_get();
160 public static readonly int TEXT_COLOR = NDalicPINVOKE.TextEditor_Property_TEXT_COLOR_get();
161 public static readonly int FONT_FAMILY = NDalicPINVOKE.TextEditor_Property_FONT_FAMILY_get();
162 public static readonly int FONT_STYLE = NDalicPINVOKE.TextEditor_Property_FONT_STYLE_get();
163 public static readonly int POINT_SIZE = NDalicPINVOKE.TextEditor_Property_POINT_SIZE_get();
164 public static readonly int HORIZONTAL_ALIGNMENT = NDalicPINVOKE.TextEditor_Property_HORIZONTAL_ALIGNMENT_get();
165 public static readonly int SCROLL_THRESHOLD = NDalicPINVOKE.TextEditor_Property_SCROLL_THRESHOLD_get();
166 public static readonly int SCROLL_SPEED = NDalicPINVOKE.TextEditor_Property_SCROLL_SPEED_get();
167 public static readonly int PRIMARY_CURSOR_COLOR = NDalicPINVOKE.TextEditor_Property_PRIMARY_CURSOR_COLOR_get();
168 public static readonly int SECONDARY_CURSOR_COLOR = NDalicPINVOKE.TextEditor_Property_SECONDARY_CURSOR_COLOR_get();
169 public static readonly int ENABLE_CURSOR_BLINK = NDalicPINVOKE.TextEditor_Property_ENABLE_CURSOR_BLINK_get();
170 public static readonly int CURSOR_BLINK_INTERVAL = NDalicPINVOKE.TextEditor_Property_CURSOR_BLINK_INTERVAL_get();
171 public static readonly int CURSOR_BLINK_DURATION = NDalicPINVOKE.TextEditor_Property_CURSOR_BLINK_DURATION_get();
172 public static readonly int CURSOR_WIDTH = NDalicPINVOKE.TextEditor_Property_CURSOR_WIDTH_get();
173 public static readonly int GRAB_HANDLE_IMAGE = NDalicPINVOKE.TextEditor_Property_GRAB_HANDLE_IMAGE_get();
174 public static readonly int GRAB_HANDLE_PRESSED_IMAGE = NDalicPINVOKE.TextEditor_Property_GRAB_HANDLE_PRESSED_IMAGE_get();
175 public static readonly int SELECTION_HANDLE_IMAGE_LEFT = NDalicPINVOKE.TextEditor_Property_SELECTION_HANDLE_IMAGE_LEFT_get();
176 public static readonly int SELECTION_HANDLE_IMAGE_RIGHT = NDalicPINVOKE.TextEditor_Property_SELECTION_HANDLE_IMAGE_RIGHT_get();
177 public static readonly int SELECTION_HANDLE_PRESSED_IMAGE_LEFT = NDalicPINVOKE.TextEditor_Property_SELECTION_HANDLE_PRESSED_IMAGE_LEFT_get();
178 public static readonly int SELECTION_HANDLE_PRESSED_IMAGE_RIGHT = NDalicPINVOKE.TextEditor_Property_SELECTION_HANDLE_PRESSED_IMAGE_RIGHT_get();
179 public static readonly int SELECTION_HANDLE_MARKER_IMAGE_LEFT = NDalicPINVOKE.TextEditor_Property_SELECTION_HANDLE_MARKER_IMAGE_LEFT_get();
180 public static readonly int SELECTION_HANDLE_MARKER_IMAGE_RIGHT = NDalicPINVOKE.TextEditor_Property_SELECTION_HANDLE_MARKER_IMAGE_RIGHT_get();
181 public static readonly int SELECTION_HIGHLIGHT_COLOR = NDalicPINVOKE.TextEditor_Property_SELECTION_HIGHLIGHT_COLOR_get();
182 public static readonly int DECORATION_BOUNDING_BOX = NDalicPINVOKE.TextEditor_Property_DECORATION_BOUNDING_BOX_get();
183 public static readonly int ENABLE_MARKUP = NDalicPINVOKE.TextEditor_Property_ENABLE_MARKUP_get();
184 public static readonly int INPUT_COLOR = NDalicPINVOKE.TextEditor_Property_INPUT_COLOR_get();
185 public static readonly int INPUT_FONT_FAMILY = NDalicPINVOKE.TextEditor_Property_INPUT_FONT_FAMILY_get();
186 public static readonly int INPUT_FONT_STYLE = NDalicPINVOKE.TextEditor_Property_INPUT_FONT_STYLE_get();
187 public static readonly int INPUT_POINT_SIZE = NDalicPINVOKE.TextEditor_Property_INPUT_POINT_SIZE_get();
188 public static readonly int LINE_SPACING = NDalicPINVOKE.TextEditor_Property_LINE_SPACING_get();
189 public static readonly int INPUT_LINE_SPACING = NDalicPINVOKE.TextEditor_Property_INPUT_LINE_SPACING_get();
190 public static readonly int UNDERLINE = NDalicPINVOKE.TextEditor_Property_UNDERLINE_get();
191 public static readonly int INPUT_UNDERLINE = NDalicPINVOKE.TextEditor_Property_INPUT_UNDERLINE_get();
192 public static readonly int SHADOW = NDalicPINVOKE.TextEditor_Property_SHADOW_get();
193 public static readonly int INPUT_SHADOW = NDalicPINVOKE.TextEditor_Property_INPUT_SHADOW_get();
194 public static readonly int EMBOSS = NDalicPINVOKE.TextEditor_Property_EMBOSS_get();
195 public static readonly int INPUT_EMBOSS = NDalicPINVOKE.TextEditor_Property_INPUT_EMBOSS_get();
196 public static readonly int OUTLINE = NDalicPINVOKE.TextEditor_Property_OUTLINE_get();
197 public static readonly int INPUT_OUTLINE = NDalicPINVOKE.TextEditor_Property_INPUT_OUTLINE_get();
200 public class InputStyle
206 FONT_FAMILY = 0x0002,
209 LINE_SPACING = 0x0010,
217 public TextEditor () : this (NDalicPINVOKE.TextEditor_New(), true) {
218 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
221 public TextEditor(TextEditor handle) : this(NDalicPINVOKE.new_TextEditor__SWIG_1(TextEditor.getCPtr(handle)), true) {
222 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
225 internal new static TextEditor DownCast(BaseHandle handle) {
226 TextEditor ret = new TextEditor(NDalicPINVOKE.TextEditor_DownCast(BaseHandle.getCPtr(handle)), true);
227 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
231 internal TextEditorSignal TextChangedSignal() {
232 TextEditorSignal ret = new TextEditorSignal(NDalicPINVOKE.TextEditor_TextChangedSignal(swigCPtr), false);
233 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
237 internal SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextEditor_Dali__Toolkit__TextEditor__InputStyle__MaskF_t InputStyleChangedSignal() {
238 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);
239 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
248 GetProperty( TextEditor.Property.TEXT).Get( out temp );
253 SetProperty( TextEditor.Property.TEXT, new Dali.Property.Value( value ) );
256 public Vector4 TextColor
260 Vector4 temp = new Vector4(0.0f,0.0f,0.0f,0.0f);
261 GetProperty( TextEditor.Property.TEXT_COLOR).Get( temp );
266 SetProperty( TextEditor.Property.TEXT_COLOR, new Dali.Property.Value( value ) );
269 public string FontFamily
274 GetProperty( TextEditor.Property.FONT_FAMILY).Get( out temp );
279 SetProperty( TextEditor.Property.FONT_FAMILY, new Dali.Property.Value( value ) );
282 public Dali.Property.Map FontStyle
286 Dali.Property.Map temp = new Dali.Property.Map();
287 GetProperty( TextEditor.Property.FONT_STYLE).Get( temp );
292 SetProperty( TextEditor.Property.FONT_STYLE, new Dali.Property.Value( value ) );
295 public float PointSize
300 GetProperty( TextEditor.Property.POINT_SIZE).Get( out temp );
305 SetProperty( TextEditor.Property.POINT_SIZE, new Dali.Property.Value( value ) );
308 public string HorizontalAlignment
313 GetProperty( TextEditor.Property.HORIZONTAL_ALIGNMENT).Get( out temp );
318 SetProperty( TextEditor.Property.HORIZONTAL_ALIGNMENT, new Dali.Property.Value( value ) );
321 public float ScrollThreshold
326 GetProperty( TextEditor.Property.SCROLL_THRESHOLD).Get( out temp );
331 SetProperty( TextEditor.Property.SCROLL_THRESHOLD, new Dali.Property.Value( value ) );
334 public float ScrollSpeed
339 GetProperty( TextEditor.Property.SCROLL_SPEED).Get( out temp );
344 SetProperty( TextEditor.Property.SCROLL_SPEED, new Dali.Property.Value( value ) );
347 public Vector4 PrimaryCursorColor
351 Vector4 temp = new Vector4(0.0f,0.0f,0.0f,0.0f);
352 GetProperty( TextEditor.Property.PRIMARY_CURSOR_COLOR).Get( temp );
357 SetProperty( TextEditor.Property.PRIMARY_CURSOR_COLOR, new Dali.Property.Value( value ) );
360 public Vector4 SecondaryCursorColor
364 Vector4 temp = new Vector4(0.0f,0.0f,0.0f,0.0f);
365 GetProperty( TextEditor.Property.SECONDARY_CURSOR_COLOR).Get( temp );
370 SetProperty( TextEditor.Property.SECONDARY_CURSOR_COLOR, new Dali.Property.Value( value ) );
373 public bool EnableCursorBlink
378 GetProperty( TextEditor.Property.ENABLE_CURSOR_BLINK).Get( out temp );
383 SetProperty( TextEditor.Property.ENABLE_CURSOR_BLINK, new Dali.Property.Value( value ) );
386 public float CursorBlinkInterval
391 GetProperty( TextEditor.Property.CURSOR_BLINK_INTERVAL).Get( out temp );
396 SetProperty( TextEditor.Property.CURSOR_BLINK_INTERVAL, new Dali.Property.Value( value ) );
399 public float CursorBlinkDuration
404 GetProperty( TextEditor.Property.CURSOR_BLINK_DURATION).Get( out temp );
409 SetProperty( TextEditor.Property.CURSOR_BLINK_DURATION, new Dali.Property.Value( value ) );
412 public int CursorWidth
417 GetProperty( TextEditor.Property.CURSOR_WIDTH).Get( out temp );
422 SetProperty( TextEditor.Property.CURSOR_WIDTH, new Dali.Property.Value( value ) );
425 public string GrabHandleImage
430 GetProperty( TextEditor.Property.GRAB_HANDLE_IMAGE).Get( out temp );
435 SetProperty( TextEditor.Property.GRAB_HANDLE_IMAGE, new Dali.Property.Value( value ) );
438 public string GrabHandlePressedImage
443 GetProperty( TextEditor.Property.GRAB_HANDLE_PRESSED_IMAGE).Get( out temp );
448 SetProperty( TextEditor.Property.GRAB_HANDLE_PRESSED_IMAGE, new Dali.Property.Value( value ) );
451 public Dali.Property.Map SelectionHandleImageLeft
455 Dali.Property.Map temp = new Dali.Property.Map();
456 GetProperty( TextEditor.Property.SELECTION_HANDLE_IMAGE_LEFT).Get( temp );
461 SetProperty( TextEditor.Property.SELECTION_HANDLE_IMAGE_LEFT, new Dali.Property.Value( value ) );
464 public Dali.Property.Map SelectionHandleImageRight
468 Dali.Property.Map temp = new Dali.Property.Map();
469 GetProperty( TextEditor.Property.SELECTION_HANDLE_IMAGE_RIGHT).Get( temp );
474 SetProperty( TextEditor.Property.SELECTION_HANDLE_IMAGE_RIGHT, new Dali.Property.Value( value ) );
477 public Dali.Property.Map SelectionHandlePressedImageLeft
481 Dali.Property.Map temp = new Dali.Property.Map();
482 GetProperty( TextEditor.Property.SELECTION_HANDLE_PRESSED_IMAGE_LEFT).Get( temp );
487 SetProperty( TextEditor.Property.SELECTION_HANDLE_PRESSED_IMAGE_LEFT, new Dali.Property.Value( value ) );
490 public Dali.Property.Map SelectionHandlePressedImageRight
494 Dali.Property.Map temp = new Dali.Property.Map();
495 GetProperty( TextEditor.Property.SELECTION_HANDLE_PRESSED_IMAGE_RIGHT).Get( temp );
500 SetProperty( TextEditor.Property.SELECTION_HANDLE_PRESSED_IMAGE_RIGHT, new Dali.Property.Value( value ) );
503 public Dali.Property.Map SelectionHandleMarkerImageLeft
507 Dali.Property.Map temp = new Dali.Property.Map();
508 GetProperty( TextEditor.Property.SELECTION_HANDLE_MARKER_IMAGE_LEFT).Get( temp );
513 SetProperty( TextEditor.Property.SELECTION_HANDLE_MARKER_IMAGE_LEFT, new Dali.Property.Value( value ) );
516 public Dali.Property.Map SelectionHandleMarkerImageRight
520 Dali.Property.Map temp = new Dali.Property.Map();
521 GetProperty( TextEditor.Property.SELECTION_HANDLE_MARKER_IMAGE_RIGHT).Get( temp );
526 SetProperty( TextEditor.Property.SELECTION_HANDLE_MARKER_IMAGE_RIGHT, new Dali.Property.Value( value ) );
529 public Vector4 SelectionHighlightColor
533 Vector4 temp = new Vector4(0.0f,0.0f,0.0f,0.0f);
534 GetProperty( TextEditor.Property.SELECTION_HIGHLIGHT_COLOR).Get( temp );
539 SetProperty( TextEditor.Property.SELECTION_HIGHLIGHT_COLOR, new Dali.Property.Value( value ) );
542 public Rectangle DecorationBoundingBox
546 Rectangle temp = new Rectangle(0,0,0,0);
547 GetProperty( TextEditor.Property.DECORATION_BOUNDING_BOX).Get( temp );
552 SetProperty( TextEditor.Property.DECORATION_BOUNDING_BOX, new Dali.Property.Value( value ) );
555 public bool EnableMarkup
560 GetProperty( TextEditor.Property.ENABLE_MARKUP).Get( out temp );
565 SetProperty( TextEditor.Property.ENABLE_MARKUP, new Dali.Property.Value( value ) );
568 public Vector4 InputColor
572 Vector4 temp = new Vector4(0.0f,0.0f,0.0f,0.0f);
573 GetProperty( TextEditor.Property.INPUT_COLOR).Get( temp );
578 SetProperty( TextEditor.Property.INPUT_COLOR, new Dali.Property.Value( value ) );
581 public string InputFontFamily
586 GetProperty( TextEditor.Property.INPUT_FONT_FAMILY).Get( out temp );
591 SetProperty( TextEditor.Property.INPUT_FONT_FAMILY, new Dali.Property.Value( value ) );
594 public Dali.Property.Map InputFontStyle
598 Dali.Property.Map temp = new Dali.Property.Map();
599 GetProperty( TextEditor.Property.INPUT_FONT_STYLE).Get( temp );
604 SetProperty( TextEditor.Property.INPUT_FONT_STYLE, new Dali.Property.Value( value ) );
607 public float InputPointSize
612 GetProperty( TextEditor.Property.INPUT_POINT_SIZE).Get( out temp );
617 SetProperty( TextEditor.Property.INPUT_POINT_SIZE, new Dali.Property.Value( value ) );
620 public float LineSpacing
625 GetProperty( TextEditor.Property.LINE_SPACING).Get( out temp );
630 SetProperty( TextEditor.Property.LINE_SPACING, new Dali.Property.Value( value ) );
633 public float InputLineSpacing
638 GetProperty( TextEditor.Property.INPUT_LINE_SPACING).Get( out temp );
643 SetProperty( TextEditor.Property.INPUT_LINE_SPACING, new Dali.Property.Value( value ) );
646 public Dali.Property.Map Underline
650 Dali.Property.Map temp = new Dali.Property.Map();
651 GetProperty( TextEditor.Property.UNDERLINE).Get( temp );
656 SetProperty( TextEditor.Property.UNDERLINE, new Dali.Property.Value( value ) );
659 public Dali.Property.Map InputUnderline
663 Dali.Property.Map temp = new Dali.Property.Map();
664 GetProperty( TextEditor.Property.INPUT_UNDERLINE).Get( temp );
669 SetProperty( TextEditor.Property.INPUT_UNDERLINE, new Dali.Property.Value( value ) );
672 public Dali.Property.Map Shadow
676 Dali.Property.Map temp = new Dali.Property.Map();
677 GetProperty( TextEditor.Property.SHADOW).Get( temp );
682 SetProperty( TextEditor.Property.SHADOW, new Dali.Property.Value( value ) );
685 public Dali.Property.Map InputShadow
689 Dali.Property.Map temp = new Dali.Property.Map();
690 GetProperty( TextEditor.Property.INPUT_SHADOW).Get( temp );
695 SetProperty( TextEditor.Property.INPUT_SHADOW, new Dali.Property.Value( value ) );
698 public Dali.Property.Map Emboss
702 Dali.Property.Map temp = new Dali.Property.Map();
703 GetProperty( TextEditor.Property.EMBOSS).Get( temp );
708 SetProperty( TextEditor.Property.EMBOSS, new Dali.Property.Value( value ) );
711 public Dali.Property.Map InputEmboss
715 Dali.Property.Map temp = new Dali.Property.Map();
716 GetProperty( TextEditor.Property.INPUT_EMBOSS).Get( temp );
721 SetProperty( TextEditor.Property.INPUT_EMBOSS, new Dali.Property.Value( value ) );
724 public Dali.Property.Map Outline
728 Dali.Property.Map temp = new Dali.Property.Map();
729 GetProperty( TextEditor.Property.OUTLINE).Get( temp );
734 SetProperty( TextEditor.Property.OUTLINE, new Dali.Property.Value( value ) );
737 public Dali.Property.Map InputOutline
741 Dali.Property.Map temp = new Dali.Property.Map();
742 GetProperty( TextEditor.Property.INPUT_OUTLINE).Get( temp );
747 SetProperty( TextEditor.Property.INPUT_OUTLINE, new Dali.Property.Value( value ) );