Release 4.0.0-preview1-00271
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / BaseComponents / TextLabel.cs
1 /** Copyright (c) 2017 Samsung Electronics Co., Ltd.
2 *
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
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
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.
14 *
15 */
16
17 extern alias TizenSystemSettings;
18 using TizenSystemSettings.Tizen.System;
19 using System;
20 using System.Globalization;
21 namespace Tizen.NUI.BaseComponents
22 {
23
24     /// <summary>
25     /// A control which renders a short text string.<br>
26     /// Text labels are lightweight, non-editable, and do not respond to the user input.<br>
27     /// </summary>
28     public class TextLabel : View
29     {
30         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
31         private string textLabelSid = null;
32         private bool systemlangTextFlag = false;
33         internal TextLabel(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.TextLabel_SWIGUpcast(cPtr), cMemoryOwn)
34         {
35             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
36         }
37
38         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TextLabel obj)
39         {
40             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
41         }
42
43         /// <summary>
44         /// Dispose.
45         /// </summary>
46         protected override void Dispose(DisposeTypes type)
47         {
48             if (disposed)
49             {
50                 return;
51             }
52
53             if(type == DisposeTypes.Explicit)
54             {
55                 //Called by User
56                 //Release your own managed resources here.
57                 //You should release all of your own disposable objects here.
58             }
59
60             //Release your own unmanaged resources here.
61             //You should not access any managed member here except static instance.
62             //because the execution order of Finalizes is non-deterministic.
63
64             if (swigCPtr.Handle != global::System.IntPtr.Zero)
65             {
66                 if (swigCMemOwn)
67                 {
68                     swigCMemOwn = false;
69                     NDalicPINVOKE.delete_TextLabel(swigCPtr);
70                 }
71                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
72             }
73
74             base.Dispose(type);
75         }
76
77         internal new class Property
78         {
79             internal static readonly int RENDERING_BACKEND = NDalicPINVOKE.TextLabel_Property_RENDERING_BACKEND_get();
80             internal static readonly int TEXT = NDalicPINVOKE.TextLabel_Property_TEXT_get();
81             internal static readonly int FONT_FAMILY = NDalicPINVOKE.TextLabel_Property_FONT_FAMILY_get();
82             internal static readonly int FONT_STYLE = NDalicPINVOKE.TextLabel_Property_FONT_STYLE_get();
83             internal static readonly int POINT_SIZE = NDalicPINVOKE.TextLabel_Property_POINT_SIZE_get();
84             internal static readonly int MULTI_LINE = NDalicPINVOKE.TextLabel_Property_MULTI_LINE_get();
85             internal static readonly int HORIZONTAL_ALIGNMENT = NDalicPINVOKE.TextLabel_Property_HORIZONTAL_ALIGNMENT_get();
86             internal static readonly int VERTICAL_ALIGNMENT = NDalicPINVOKE.TextLabel_Property_VERTICAL_ALIGNMENT_get();
87             internal static readonly int TEXT_COLOR = NDalicPINVOKE.TextLabel_Property_TEXT_COLOR_get();
88             internal static readonly int SHADOW_OFFSET = NDalicPINVOKE.TextLabel_Property_SHADOW_OFFSET_get();
89             internal static readonly int SHADOW_COLOR = NDalicPINVOKE.TextLabel_Property_SHADOW_COLOR_get();
90             internal static readonly int UNDERLINE_ENABLED = NDalicPINVOKE.TextLabel_Property_UNDERLINE_ENABLED_get();
91             internal static readonly int UNDERLINE_COLOR = NDalicPINVOKE.TextLabel_Property_UNDERLINE_COLOR_get();
92             internal static readonly int UNDERLINE_HEIGHT = NDalicPINVOKE.TextLabel_Property_UNDERLINE_HEIGHT_get();
93             internal static readonly int ENABLE_MARKUP = NDalicPINVOKE.TextLabel_Property_ENABLE_MARKUP_get();
94             internal static readonly int ENABLE_AUTO_SCROLL = NDalicPINVOKE.TextLabel_Property_ENABLE_AUTO_SCROLL_get();
95             internal static readonly int AUTO_SCROLL_SPEED = NDalicPINVOKE.TextLabel_Property_AUTO_SCROLL_SPEED_get();
96             internal static readonly int AUTO_SCROLL_LOOP_COUNT = NDalicPINVOKE.TextLabel_Property_AUTO_SCROLL_LOOP_COUNT_get();
97             internal static readonly int AUTO_SCROLL_GAP = NDalicPINVOKE.TextLabel_Property_AUTO_SCROLL_GAP_get();
98             internal static readonly int LINE_SPACING = NDalicPINVOKE.TextLabel_Property_LINE_SPACING_get();
99             internal static readonly int UNDERLINE = NDalicPINVOKE.TextLabel_Property_UNDERLINE_get();
100             internal static readonly int SHADOW = NDalicPINVOKE.TextLabel_Property_SHADOW_get();
101             internal static readonly int EMBOSS = NDalicPINVOKE.TextLabel_Property_EMBOSS_get();
102             internal static readonly int OUTLINE = NDalicPINVOKE.TextLabel_Property_OUTLINE_get();
103             internal static readonly int PIXEL_SIZE = NDalicManualPINVOKE.TextLabel_Property_PIXEL_SIZE_get();
104             internal static readonly int ELLIPSIS = NDalicManualPINVOKE.TextLabel_Property_ELLIPSIS_get();
105             internal static readonly int AUTO_SCROLL_STOP_MODE = NDalicManualPINVOKE.TextLabel_Property_AUTO_SCROLL_STOP_MODE_get();
106             internal static readonly int AUTO_SCROLL_LOOP_DELAY = NDalicManualPINVOKE.TextLabel_Property_AUTO_SCROLL_LOOP_DELAY_get();
107             internal static readonly int LINE_COUNT = NDalicManualPINVOKE.TextLabel_Property_LINE_COUNT_get();
108             internal static readonly int LINE_WRAP_MODE = NDalicManualPINVOKE.TextLabel_Property_LINE_WRAP_MODE_get();
109             internal static readonly int TEXT_COLOR_ANIMATABLE = NDalicPINVOKE.TextLabel_Property_TEXT_COLOR_ANIMATABLE_get();
110
111         }
112
113         /// <summary>
114         /// Creates the TextLabel control.
115         /// </summary>
116         /// <since_tizen> 3 </since_tizen>
117         public TextLabel() : this(NDalicPINVOKE.TextLabel_New__SWIG_0(), true)
118         {
119             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
120
121         }
122
123         /// <summary>
124         /// Creates the TextLabel control.
125         /// </summary>
126         /// <param name="text">The text to display</param>
127         /// <since_tizen> 3 </since_tizen>
128         public TextLabel(string text) : this(NDalicPINVOKE.TextLabel_New__SWIG_1(text), true)
129         {
130             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
131
132         }
133         internal TextLabel(TextLabel handle) : this(NDalicPINVOKE.new_TextLabel__SWIG_1(TextLabel.getCPtr(handle)), true)
134         {
135             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
136         }
137
138
139         [Obsolete("Please do not use! this will be deprecated")]
140         public new static TextLabel DownCast(BaseHandle handle)
141         {
142             TextLabel ret =  Registry.GetManagedBaseHandleFromNativePtr(handle) as TextLabel;
143
144             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
145             return ret;
146         }
147         /// <summary>
148         /// The TranslatableText property.<br>
149         /// The text can set the SID value.<br>
150         /// </summary>
151         /// <exception cref='ArgumentNullException'>
152         /// ResourceManager about multilingual is null.
153         /// </exception>
154         /// <since_tizen> 4 </since_tizen>
155         public string TranslatableText
156         {
157             get
158             {
159                 return textLabelSid;
160             }
161             set
162             {
163                 if (NUIApplication.MultilingualResourceManager == null)
164                 {
165                     throw new ArgumentNullException("ResourceManager about multilingual is null");
166                 }
167                 string translatableText = null;
168                 textLabelSid = value;
169                 translatableText = NUIApplication.MultilingualResourceManager?.GetString(textLabelSid, new CultureInfo(SystemSettings.LocaleLanguage.Replace("_", "-")));
170                 if (translatableText != null)
171                 {
172                     Text = translatableText;
173                     if (systemlangTextFlag == false)
174                     {
175                         SystemSettings.LocaleLanguageChanged += new WeakEventHandler<LocaleLanguageChangedEventArgs>(SystemSettings_LocaleLanguageChanged).Handler;
176                         systemlangTextFlag = true;
177                     }
178                 }
179                 else
180                 {
181                     Text = "";
182                 }
183             }
184         }
185         private void SystemSettings_LocaleLanguageChanged(object sender, LocaleLanguageChangedEventArgs e)
186         {
187             Text = NUIApplication.MultilingualResourceManager?.GetString(textLabelSid, new CultureInfo(e.Value.Replace("_", "-")));
188         }
189
190         /// <summary>
191         /// The Text property.<br>
192         /// The text to display in the UTF-8 format.<br>
193         /// </summary>
194         /// <since_tizen> 3 </since_tizen>
195         public string Text
196         {
197             get
198             {
199                 string temp;
200                 GetProperty(TextLabel.Property.TEXT).Get(out temp);
201                 return temp;
202             }
203             set
204             {
205                 SetProperty(TextLabel.Property.TEXT, new Tizen.NUI.PropertyValue(value));
206             }
207         }
208
209         /// <summary>
210         /// The FontFamily property.<br>
211         /// The requested font family to use.<br>
212         /// </summary>
213         /// <since_tizen> 3 </since_tizen>
214         public string FontFamily
215         {
216             get
217             {
218                 string temp;
219                 GetProperty(TextLabel.Property.FONT_FAMILY).Get(out temp);
220                 return temp;
221             }
222             set
223             {
224                 SetProperty(TextLabel.Property.FONT_FAMILY, new Tizen.NUI.PropertyValue(value));
225             }
226         }
227
228         /// <summary>
229         /// The FontStyle property.<br>
230         /// The requested font style to use.<br>
231         /// </summary>
232         /// <since_tizen> 3 </since_tizen>
233         public PropertyMap FontStyle
234         {
235             get
236             {
237                 PropertyMap temp = new PropertyMap();
238                 GetProperty(TextLabel.Property.FONT_STYLE).Get(temp);
239                 return temp;
240             }
241             set
242             {
243                 SetProperty(TextLabel.Property.FONT_STYLE, new Tizen.NUI.PropertyValue(value));
244             }
245         }
246
247         /// <summary>
248         /// The PointSize property.<br>
249         /// The size of font in points.<br>
250         /// </summary>
251         /// <since_tizen> 3 </since_tizen>
252         public float PointSize
253         {
254             get
255             {
256                 float temp = 0.0f;
257                 GetProperty(TextLabel.Property.POINT_SIZE).Get(out temp);
258                 return temp;
259             }
260             set
261             {
262                 SetProperty(TextLabel.Property.POINT_SIZE, new Tizen.NUI.PropertyValue(value));
263             }
264         }
265
266         /// <summary>
267         /// The MultiLine property.<br>
268         /// The single-line or multi-line layout option.<br>
269         /// </summary>
270         /// <since_tizen> 3 </since_tizen>
271         public bool MultiLine
272         {
273             get
274             {
275                 bool temp = false;
276                 GetProperty(TextLabel.Property.MULTI_LINE).Get(out temp);
277                 return temp;
278             }
279             set
280             {
281                 SetProperty(TextLabel.Property.MULTI_LINE, new Tizen.NUI.PropertyValue(value));
282             }
283         }
284
285         /// <summary>
286         /// The HorizontalAlignment property.<br>
287         /// The line horizontal alignment.<br>
288         /// </summary>
289         /// <since_tizen> 3 </since_tizen>
290         public HorizontalAlignment HorizontalAlignment
291         {
292             get
293             {
294                 string temp;
295                 if (GetProperty(TextLabel.Property.HORIZONTAL_ALIGNMENT).Get(out temp) == false)
296                 {
297                     NUILog.Error("HorizontalAlignment get error!");
298                 }
299                 switch (temp)
300                 {
301                     case "BEGIN":
302                         return HorizontalAlignment.Begin;
303                     case "CENTER":
304                         return HorizontalAlignment.Center;
305                     case "END":
306                         return HorizontalAlignment.End;
307                     default:
308                         return HorizontalAlignment.Begin;
309                 }
310             }
311             set
312             {
313                 string valueToString = "";
314                 switch (value)
315                 {
316                     case HorizontalAlignment.Begin:
317                     {
318                         valueToString = "BEGIN";
319                         break;
320                     }
321                     case HorizontalAlignment.Center:
322                     {
323                         valueToString = "CENTER";
324                         break;
325                     }
326                     case HorizontalAlignment.End:
327                     {
328                         valueToString = "END";
329                         break;
330                     }
331                     default:
332                     {
333                         valueToString = "BEGIN";
334                         break;
335                     }
336                 }
337                 SetProperty(TextLabel.Property.HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
338             }
339         }
340
341         /// <summary>
342         /// The VerticalAlignment property.<br>
343         /// The line vertical alignment.<br>
344         /// </summary>
345         /// <since_tizen> 3 </since_tizen>
346         public VerticalAlignment VerticalAlignment
347         {
348             get
349             {
350                 string temp;
351                 if (GetProperty(TextLabel.Property.VERTICAL_ALIGNMENT).Get(out temp) == false)
352                 {
353                     NUILog.Error("VerticalAlignment get error!");
354                 }
355
356                 switch (temp)
357                 {
358                     case "TOP":
359                         return VerticalAlignment.Top;
360                     case "CENTER":
361                         return VerticalAlignment.Center;
362                     case "BOTTOM":
363                         return VerticalAlignment.Bottom;
364                     default:
365                         return VerticalAlignment.Bottom;
366                 }
367             }
368             set
369             {
370                 string valueToString = "";
371                 switch (value)
372                 {
373                     case VerticalAlignment.Top:
374                     {
375                         valueToString = "TOP";
376                         break;
377                     }
378                     case VerticalAlignment.Center:
379                     {
380                         valueToString = "CENTER";
381                         break;
382                     }
383                     case VerticalAlignment.Bottom:
384                     {
385                         valueToString = "BOTTOM";
386                         break;
387                     }
388                     default:
389                     {
390                         valueToString = "BOTTOM";
391                         break;
392                     }
393                 }
394                 SetProperty(TextLabel.Property.VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
395             }
396         }
397
398         /// <summary>
399         /// The TextColor property.<br>
400         /// The color of the text.<br>
401         /// </summary>
402         /// <since_tizen> 3 </since_tizen>
403         public Color TextColor
404         {
405             get
406             {
407                 Color temp = new Color(0.0f, 0.0f, 0.0f, 0.0f);
408                 GetProperty(TextLabel.Property.TEXT_COLOR).Get(temp);
409                 return temp;
410             }
411             set
412             {
413                 SetProperty(TextLabel.Property.TEXT_COLOR, new Tizen.NUI.PropertyValue(value));
414             }
415         }
416
417         /// <summary>
418         /// The ShadowOffset property.<br>
419         /// The drop shadow offset 0 indicates no shadow.<br>
420         /// </summary>
421         /// <since_tizen> 3 </since_tizen>
422         public Vector2 ShadowOffset
423         {
424             get
425             {
426                 Vector2 temp = new Vector2(0.0f, 0.0f);
427                 GetProperty(TextLabel.Property.SHADOW_OFFSET).Get(temp);
428                 return temp;
429             }
430             set
431             {
432                 SetProperty(TextLabel.Property.SHADOW_OFFSET, new Tizen.NUI.PropertyValue(value));
433             }
434         }
435
436         /// <summary>
437         /// The ShadowColor property.<br>
438         /// The color of a drop shadow.<br>
439         /// </summary>
440         /// <since_tizen> 3 </since_tizen>
441         public Vector4 ShadowColor
442         {
443             get
444             {
445                 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
446                 GetProperty(TextLabel.Property.SHADOW_COLOR).Get(temp);
447                 return temp;
448             }
449             set
450             {
451                 SetProperty(TextLabel.Property.SHADOW_COLOR, new Tizen.NUI.PropertyValue(value));
452             }
453         }
454
455         /// <summary>
456         /// The UnderlineEnabled property.<br>
457         /// The underline enabled flag.<br>
458         /// </summary>
459         /// <since_tizen> 3 </since_tizen>
460         public bool UnderlineEnabled
461         {
462             get
463             {
464                 bool temp = false;
465                 GetProperty(TextLabel.Property.UNDERLINE_ENABLED).Get(out temp);
466                 return temp;
467             }
468             set
469             {
470                 SetProperty(TextLabel.Property.UNDERLINE_ENABLED, new Tizen.NUI.PropertyValue(value));
471             }
472         }
473
474         /// <summary>
475         /// The UnderlineColor property.<br>
476         /// Overrides the underline height from font metrics.<br>
477         /// </summary>
478         /// <since_tizen> 3 </since_tizen>
479         public Vector4 UnderlineColor
480         {
481             get
482             {
483                 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
484                 GetProperty(TextLabel.Property.UNDERLINE_COLOR).Get(temp);
485                 return temp;
486             }
487             set
488             {
489                 SetProperty(TextLabel.Property.UNDERLINE_COLOR, new Tizen.NUI.PropertyValue(value));
490             }
491         }
492
493         /// <summary>
494         /// The UnderlineHeight property.<br>
495         /// Overrides the underline height from font metrics.<br>
496         /// </summary>
497         /// <since_tizen> 3 </since_tizen>
498         public float UnderlineHeight
499         {
500             get
501             {
502                 float temp = 0.0f;
503                 GetProperty(TextLabel.Property.UNDERLINE_HEIGHT).Get(out temp);
504                 return temp;
505             }
506             set
507             {
508                 SetProperty(TextLabel.Property.UNDERLINE_HEIGHT, new Tizen.NUI.PropertyValue(value));
509             }
510         }
511
512         /// <summary>
513         /// The EnableMarkup property.<br>
514         /// Whether the mark-up processing is enabled.<br>
515         /// </summary>
516         /// <since_tizen> 3 </since_tizen>
517         public bool EnableMarkup
518         {
519             get
520             {
521                 bool temp = false;
522                 GetProperty(TextLabel.Property.ENABLE_MARKUP).Get(out temp);
523                 return temp;
524             }
525             set
526             {
527                 SetProperty(TextLabel.Property.ENABLE_MARKUP, new Tizen.NUI.PropertyValue(value));
528             }
529         }
530
531         /// <summary>
532         /// The EnableAutoScroll property.<br>
533         /// Starts or stops auto scrolling.<br>
534         /// </summary>
535         /// <since_tizen> 3 </since_tizen>
536         public bool EnableAutoScroll
537         {
538             get
539             {
540                 bool temp = false;
541                 GetProperty(TextLabel.Property.ENABLE_AUTO_SCROLL).Get(out temp);
542                 return temp;
543             }
544             set
545             {
546                 SetProperty(TextLabel.Property.ENABLE_AUTO_SCROLL, new Tizen.NUI.PropertyValue(value));
547             }
548         }
549
550         /// <summary>
551         /// The AutoScrollSpeed property.<br>
552         /// Sets the speed of scrolling in pixels per second.<br>
553         /// </summary>
554         /// <since_tizen> 3 </since_tizen>
555         public int AutoScrollSpeed
556         {
557             get
558             {
559                 int temp = 0;
560                 GetProperty(TextLabel.Property.AUTO_SCROLL_SPEED).Get(out temp);
561                 return temp;
562             }
563             set
564             {
565                 SetProperty(TextLabel.Property.AUTO_SCROLL_SPEED, new Tizen.NUI.PropertyValue(value));
566             }
567         }
568
569         /// <summary>
570         /// The AutoScrollLoopCount property.<br>
571         /// Number of complete loops when scrolling enabled.<br>
572         /// </summary>
573         /// <since_tizen> 3 </since_tizen>
574         public int AutoScrollLoopCount
575         {
576             get
577             {
578                 int temp = 0;
579                 GetProperty(TextLabel.Property.AUTO_SCROLL_LOOP_COUNT).Get(out temp);
580                 return temp;
581             }
582             set
583             {
584                 SetProperty(TextLabel.Property.AUTO_SCROLL_LOOP_COUNT, new Tizen.NUI.PropertyValue(value));
585             }
586         }
587
588         /// <summary>
589         /// The AutoScrollGap property.<br>
590         /// Gap before scrolling wraps.<br>
591         /// </summary>
592         /// <since_tizen> 3 </since_tizen>
593         public float AutoScrollGap
594         {
595             get
596             {
597                 float temp = 0.0f;
598                 GetProperty(TextLabel.Property.AUTO_SCROLL_GAP).Get(out temp);
599                 return temp;
600             }
601             set
602             {
603                 SetProperty(TextLabel.Property.AUTO_SCROLL_GAP, new Tizen.NUI.PropertyValue(value));
604             }
605         }
606
607         /// <summary>
608         /// The LineSpacing property.<br>
609         /// The default extra space between lines in points.<br>
610         /// </summary>
611         /// <since_tizen> 3 </since_tizen>
612         public float LineSpacing
613         {
614             get
615             {
616                 float temp = 0.0f;
617                 GetProperty(TextLabel.Property.LINE_SPACING).Get(out temp);
618                 return temp;
619             }
620             set
621             {
622                 SetProperty(TextLabel.Property.LINE_SPACING, new Tizen.NUI.PropertyValue(value));
623             }
624         }
625
626         /// <summary>
627         /// The Underline property.<br>
628         /// The default underline parameters.<br>
629         /// </summary>
630         /// <since_tizen> 3 </since_tizen>
631         public PropertyMap Underline
632         {
633             get
634             {
635                 PropertyMap temp = new PropertyMap();
636                 GetProperty(TextLabel.Property.UNDERLINE).Get(temp);
637                 return temp;
638             }
639             set
640             {
641                 SetProperty(TextLabel.Property.UNDERLINE, new Tizen.NUI.PropertyValue(value));
642             }
643         }
644
645         /// <summary>
646         /// The Shadow property.<br>
647         /// The default shadow parameters.<br>
648         /// </summary>
649         /// <since_tizen> 3 </since_tizen>
650         public PropertyMap Shadow
651         {
652             get
653             {
654                 PropertyMap temp = new PropertyMap();
655                 GetProperty(TextLabel.Property.SHADOW).Get(temp);
656                 return temp;
657             }
658             set
659             {
660                 SetProperty(TextLabel.Property.SHADOW, new Tizen.NUI.PropertyValue(value));
661             }
662         }
663
664         /// <summary>
665         /// The Emboss property.<br>
666         /// The default emboss parameters.<br>
667         /// </summary>
668         /// <since_tizen> 3 </since_tizen>
669         public string Emboss
670         {
671             get
672             {
673                 string temp;
674                 GetProperty(TextLabel.Property.EMBOSS).Get( out temp);
675                 return temp;
676             }
677             set
678             {
679                 SetProperty(TextLabel.Property.EMBOSS, new Tizen.NUI.PropertyValue(value));
680             }
681         }
682
683         /// <summary>
684         /// The Outline property.<br>
685         /// The default outline parameters.<br>
686         /// </summary>
687         /// <since_tizen> 3 </since_tizen>
688         public string Outline
689         {
690             get
691             {
692                 string temp;
693                 GetProperty(TextLabel.Property.OUTLINE).Get(out temp);
694                 return temp;
695             }
696             set
697             {
698                 SetProperty(TextLabel.Property.OUTLINE, new Tizen.NUI.PropertyValue(value));
699             }
700         }
701
702         /// <summary>
703         /// The PixelSize property.<br>
704         /// The size of font in pixels.<br>
705         /// </summary>
706         /// <since_tizen> 3 </since_tizen>
707         public float PixelSize
708         {
709             get
710             {
711                 float temp = 0.0f;
712                 GetProperty(TextLabel.Property.PIXEL_SIZE).Get(out temp);
713                 return temp;
714             }
715             set
716             {
717                 SetProperty(TextLabel.Property.PIXEL_SIZE, new Tizen.NUI.PropertyValue(value));
718             }
719         }
720
721         /// <summary>
722         /// The Ellipsis property.<br>
723         /// Enable or disable the ellipsis.<br>
724         /// </summary>
725         /// <since_tizen> 3 </since_tizen>
726         public bool Ellipsis
727         {
728             get
729             {
730                 bool temp = false;
731                 GetProperty(TextLabel.Property.ELLIPSIS).Get(out temp);
732                 return temp;
733             }
734             set
735             {
736                 SetProperty(TextLabel.Property.ELLIPSIS, new Tizen.NUI.PropertyValue(value));
737             }
738         }
739
740         /// <summary>
741         /// The AutoScrollLoopDelay property.<br>
742         /// Do something.<br>
743         /// </summary>
744         /// <since_tizen> 3 </since_tizen>
745         public float AutoScrollLoopDelay
746         {
747             get
748             {
749                 float temp = 0.0f;
750                 GetProperty(TextLabel.Property.AUTO_SCROLL_LOOP_DELAY).Get(out temp);
751                 return temp;
752             }
753             set
754             {
755                 SetProperty(TextLabel.Property.AUTO_SCROLL_LOOP_DELAY, new Tizen.NUI.PropertyValue(value));
756             }
757         }
758
759         /// <summary>
760         /// The AutoScrollStopMode property.<br>
761         /// Do something.<br>
762         /// </summary>
763         /// <since_tizen> 3 </since_tizen>
764         public AutoScrollStopMode AutoScrollStopMode
765         {
766             get
767             {
768                 string temp;
769                 if(GetProperty(TextLabel.Property.AUTO_SCROLL_STOP_MODE).Get(out temp) == false)
770                 {
771                     NUILog.Error("AutoScrollStopMode get error!");
772                 }
773                 switch (temp)
774                 {
775                     case "FINISH_LOOP":
776                     return AutoScrollStopMode.FinishLoop;
777                     case "IMMEDIATE":
778                     return AutoScrollStopMode.Immediate;
779                     default:
780                     return AutoScrollStopMode.FinishLoop;
781                 }
782             }
783             set
784             {
785                 SetProperty(TextLabel.Property.AUTO_SCROLL_STOP_MODE, new Tizen.NUI.PropertyValue((int)value));
786             }
787         }
788
789         /// <summary>
790         /// The TextColorAnimatable property.<br>
791         /// The color of the text that can be animatated.<br>
792         /// Animation framework can be used to change the color of the text when not using mark up.<br>
793         /// Not possible when text is auto scrolling. <br>
794         /// </summary>
795         /// <since_tizen> 4 </since_tizen>
796         public Color TextColorAnimatable
797         {
798             get
799             {
800                 Color animatableColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
801                 GetProperty(TextLabel.Property.TEXT_COLOR_ANIMATABLE).Get(animatableColor);
802                 return animatableColor;
803             }
804             set
805             {
806                 SetProperty(TextLabel.Property.TEXT_COLOR_ANIMATABLE, new Tizen.NUI.PropertyValue(value));
807             }
808         }
809
810         /// The line count of the text.
811         /// </summary>
812         /// <since_tizen> 4 </since_tizen>
813         public int LineCount
814         {
815             get
816             {
817                 int temp = 0;
818                 GetProperty(TextLabel.Property.LINE_COUNT).Get(out temp);
819                 return temp;
820             }
821         }
822
823         /// <summary>
824         /// The LineWrapMode property.<br>
825         /// line wrap mode when the text lines over layout width.<br>
826         /// </summary>
827         /// <since_tizen> 4 </since_tizen>
828         public LineWrapMode LineWrapMode
829         {
830             get
831             {
832                 string temp;
833                 if(GetProperty(TextLabel.Property.LINE_WRAP_MODE).Get(out temp) == false)
834                 {
835                     NUILog.Error("LineWrapMode get error!");
836                 }
837                 switch (temp)
838                 {
839                     case "WRAP_MODE_WORD":
840                     return LineWrapMode.Word;
841                     case "WRAP_MODE_CHARACTER":
842                     return LineWrapMode.Character;
843                     default:
844                     return LineWrapMode.Word;
845                 }
846             }
847             set
848             {
849                 string temp = "";
850                 switch (value)
851                 {
852                     case LineWrapMode.Word:
853                     {
854                         temp = "WRAP_MODE_WORD";
855                         break;
856                     }
857                     case LineWrapMode.Character:
858                     {
859                         temp = "WRAP_MODE_CHARACTER";
860                         break;
861                     }
862                 }
863                 SetProperty(TextLabel.Property.LINE_WRAP_MODE, new Tizen.NUI.PropertyValue(temp));
864             }
865         }
866     }
867 }