Release 4.0.0-preview1-00235
[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         public TextLabel() : this(NDalicPINVOKE.TextLabel_New__SWIG_0(), true)
117         {
118             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
119
120         }
121
122         /// <summary>
123         /// Creates the TextLabel control.
124         /// </summary>
125         /// <param name="text">The text to display</param>
126         public TextLabel(string text) : this(NDalicPINVOKE.TextLabel_New__SWIG_1(text), true)
127         {
128             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
129
130         }
131         internal TextLabel(TextLabel handle) : this(NDalicPINVOKE.new_TextLabel__SWIG_1(TextLabel.getCPtr(handle)), true)
132         {
133             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
134         }
135
136
137         [Obsolete("Please do not use! this will be deprecated")]
138         public new static TextLabel DownCast(BaseHandle handle)
139         {
140             TextLabel ret =  Registry.GetManagedBaseHandleFromNativePtr(handle) as TextLabel;
141
142             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
143             return ret;
144         }
145         /// <summary>
146         /// The TranslatableText property.<br>
147         /// The text can set the SID value.<br>
148         /// </summary>
149         /// <exception cref='ArgumentNullException'>
150         /// ResourceManager about multilingual is null.
151         /// </exception>
152         public string TranslatableText
153         {
154             get
155             {
156                 return textLabelSid;
157             }
158             set
159             {
160                 if (NUIApplication.MultilingualResourceManager == null)
161                 {
162                     throw new ArgumentNullException("ResourceManager about multilingual is null");
163                 }
164                 string translatableText = null;
165                 textLabelSid = value;
166                 translatableText = NUIApplication.MultilingualResourceManager?.GetString(textLabelSid, new CultureInfo(SystemSettings.LocaleLanguage.Replace("_", "-")));
167                 if (translatableText != null)
168                 {
169                     Text = translatableText;
170                     if (systemlangTextFlag == false)
171                     {
172                         SystemSettings.LocaleLanguageChanged += new WeakEventHandler<LocaleLanguageChangedEventArgs>(SystemSettings_LocaleLanguageChanged).Handler;
173                         systemlangTextFlag = true;
174                     }
175                 }
176                 else
177                 {
178                     Text = "";
179                 }
180             }
181         }
182         private void SystemSettings_LocaleLanguageChanged(object sender, LocaleLanguageChangedEventArgs e)
183         {
184             Text = NUIApplication.MultilingualResourceManager?.GetString(textLabelSid, new CultureInfo(e.Value.Replace("_", "-")));
185         }
186
187         /// <summary>
188         /// The Text property.<br>
189         /// The text to display in the UTF-8 format.<br>
190         /// </summary>
191         public string Text
192         {
193             get
194             {
195                 string temp;
196                 GetProperty(TextLabel.Property.TEXT).Get(out temp);
197                 return temp;
198             }
199             set
200             {
201                 SetProperty(TextLabel.Property.TEXT, new Tizen.NUI.PropertyValue(value));
202             }
203         }
204
205         /// <summary>
206         /// The FontFamily property.<br>
207         /// The requested font family to use.<br>
208         /// </summary>
209         public string FontFamily
210         {
211             get
212             {
213                 string temp;
214                 GetProperty(TextLabel.Property.FONT_FAMILY).Get(out temp);
215                 return temp;
216             }
217             set
218             {
219                 SetProperty(TextLabel.Property.FONT_FAMILY, new Tizen.NUI.PropertyValue(value));
220             }
221         }
222
223         /// <summary>
224         /// The FontStyle property.<br>
225         /// The requested font style to use.<br>
226         /// </summary>
227         public PropertyMap FontStyle
228         {
229             get
230             {
231                 PropertyMap temp = new PropertyMap();
232                 GetProperty(TextLabel.Property.FONT_STYLE).Get(temp);
233                 return temp;
234             }
235             set
236             {
237                 SetProperty(TextLabel.Property.FONT_STYLE, new Tizen.NUI.PropertyValue(value));
238             }
239         }
240
241         /// <summary>
242         /// The PointSize property.<br>
243         /// The size of font in points.<br>
244         /// </summary>
245         public float PointSize
246         {
247             get
248             {
249                 float temp = 0.0f;
250                 GetProperty(TextLabel.Property.POINT_SIZE).Get(out temp);
251                 return temp;
252             }
253             set
254             {
255                 SetProperty(TextLabel.Property.POINT_SIZE, new Tizen.NUI.PropertyValue(value));
256             }
257         }
258
259         /// <summary>
260         /// The MultiLine property.<br>
261         /// The single-line or multi-line layout option.<br>
262         /// </summary>
263         public bool MultiLine
264         {
265             get
266             {
267                 bool temp = false;
268                 GetProperty(TextLabel.Property.MULTI_LINE).Get(out temp);
269                 return temp;
270             }
271             set
272             {
273                 SetProperty(TextLabel.Property.MULTI_LINE, new Tizen.NUI.PropertyValue(value));
274             }
275         }
276
277         /// <summary>
278         /// The HorizontalAlignment property.<br>
279         /// The line horizontal alignment.<br>
280         /// </summary>
281         public HorizontalAlignment HorizontalAlignment
282         {
283             get
284             {
285                 string temp;
286                 if (GetProperty(TextLabel.Property.HORIZONTAL_ALIGNMENT).Get(out temp) == false)
287                 {
288                     NUILog.Error("HorizontalAlignment get error!");
289                 }
290                 switch (temp)
291                 {
292                     case "BEGIN":
293                         return HorizontalAlignment.Begin;
294                     case "CENTER":
295                         return HorizontalAlignment.Center;
296                     case "END":
297                         return HorizontalAlignment.End;
298                     default:
299                         return HorizontalAlignment.Begin;
300                 }
301             }
302             set
303             {
304                 string valueToString = "";
305                 switch (value)
306                 {
307                     case HorizontalAlignment.Begin:
308                     {
309                         valueToString = "BEGIN";
310                         break;
311                     }
312                     case HorizontalAlignment.Center:
313                     {
314                         valueToString = "CENTER";
315                         break;
316                     }
317                     case HorizontalAlignment.End:
318                     {
319                         valueToString = "END";
320                         break;
321                     }
322                     default:
323                     {
324                         valueToString = "BEGIN";
325                         break;
326                     }
327                 }
328                 SetProperty(TextLabel.Property.HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
329             }
330         }
331
332         /// <summary>
333         /// The VerticalAlignment property.<br>
334         /// The line vertical alignment.<br>
335         /// </summary>
336         public VerticalAlignment VerticalAlignment
337         {
338             get
339             {
340                 string temp;
341                 if (GetProperty(TextLabel.Property.VERTICAL_ALIGNMENT).Get(out temp) == false)
342                 {
343                     NUILog.Error("VerticalAlignment get error!");
344                 }
345
346                 switch (temp)
347                 {
348                     case "TOP":
349                         return VerticalAlignment.Top;
350                     case "CENTER":
351                         return VerticalAlignment.Center;
352                     case "BOTTOM":
353                         return VerticalAlignment.Bottom;
354                     default:
355                         return VerticalAlignment.Bottom;
356                 }
357             }
358             set
359             {
360                 string valueToString = "";
361                 switch (value)
362                 {
363                     case VerticalAlignment.Top:
364                     {
365                         valueToString = "TOP";
366                         break;
367                     }
368                     case VerticalAlignment.Center:
369                     {
370                         valueToString = "CENTER";
371                         break;
372                     }
373                     case VerticalAlignment.Bottom:
374                     {
375                         valueToString = "BOTTOM";
376                         break;
377                     }
378                     default:
379                     {
380                         valueToString = "BOTTOM";
381                         break;
382                     }
383                 }
384                 SetProperty(TextLabel.Property.VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
385             }
386         }
387
388         /// <summary>
389         /// The TextColor property.<br>
390         /// The color of the text.<br>
391         /// </summary>
392         public Color TextColor
393         {
394             get
395             {
396                 Color temp = new Color(0.0f, 0.0f, 0.0f, 0.0f);
397                 GetProperty(TextLabel.Property.TEXT_COLOR).Get(temp);
398                 return temp;
399             }
400             set
401             {
402                 SetProperty(TextLabel.Property.TEXT_COLOR, new Tizen.NUI.PropertyValue(value));
403             }
404         }
405
406         /// <summary>
407         /// The ShadowOffset property.<br>
408         /// The drop shadow offset 0 indicates no shadow.<br>
409         /// </summary>
410         public Vector2 ShadowOffset
411         {
412             get
413             {
414                 Vector2 temp = new Vector2(0.0f, 0.0f);
415                 GetProperty(TextLabel.Property.SHADOW_OFFSET).Get(temp);
416                 return temp;
417             }
418             set
419             {
420                 SetProperty(TextLabel.Property.SHADOW_OFFSET, new Tizen.NUI.PropertyValue(value));
421             }
422         }
423
424         /// <summary>
425         /// The ShadowColor property.<br>
426         /// The color of a drop shadow.<br>
427         /// </summary>
428         public Vector4 ShadowColor
429         {
430             get
431             {
432                 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
433                 GetProperty(TextLabel.Property.SHADOW_COLOR).Get(temp);
434                 return temp;
435             }
436             set
437             {
438                 SetProperty(TextLabel.Property.SHADOW_COLOR, new Tizen.NUI.PropertyValue(value));
439             }
440         }
441
442         /// <summary>
443         /// The UnderlineEnabled property.<br>
444         /// The underline enabled flag.<br>
445         /// </summary>
446         public bool UnderlineEnabled
447         {
448             get
449             {
450                 bool temp = false;
451                 GetProperty(TextLabel.Property.UNDERLINE_ENABLED).Get(out temp);
452                 return temp;
453             }
454             set
455             {
456                 SetProperty(TextLabel.Property.UNDERLINE_ENABLED, new Tizen.NUI.PropertyValue(value));
457             }
458         }
459
460         /// <summary>
461         /// The UnderlineColor property.<br>
462         /// Overrides the underline height from font metrics.<br>
463         /// </summary>
464         public Vector4 UnderlineColor
465         {
466             get
467             {
468                 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
469                 GetProperty(TextLabel.Property.UNDERLINE_COLOR).Get(temp);
470                 return temp;
471             }
472             set
473             {
474                 SetProperty(TextLabel.Property.UNDERLINE_COLOR, new Tizen.NUI.PropertyValue(value));
475             }
476         }
477
478         /// <summary>
479         /// The UnderlineHeight property.<br>
480         /// Overrides the underline height from font metrics.<br>
481         /// </summary>
482         public float UnderlineHeight
483         {
484             get
485             {
486                 float temp = 0.0f;
487                 GetProperty(TextLabel.Property.UNDERLINE_HEIGHT).Get(out temp);
488                 return temp;
489             }
490             set
491             {
492                 SetProperty(TextLabel.Property.UNDERLINE_HEIGHT, new Tizen.NUI.PropertyValue(value));
493             }
494         }
495
496         /// <summary>
497         /// The EnableMarkup property.<br>
498         /// Whether the mark-up processing is enabled.<br>
499         /// </summary>
500         public bool EnableMarkup
501         {
502             get
503             {
504                 bool temp = false;
505                 GetProperty(TextLabel.Property.ENABLE_MARKUP).Get(out temp);
506                 return temp;
507             }
508             set
509             {
510                 SetProperty(TextLabel.Property.ENABLE_MARKUP, new Tizen.NUI.PropertyValue(value));
511             }
512         }
513
514         /// <summary>
515         /// The EnableAutoScroll property.<br>
516         /// Starts or stops auto scrolling.<br>
517         /// </summary>
518         public bool EnableAutoScroll
519         {
520             get
521             {
522                 bool temp = false;
523                 GetProperty(TextLabel.Property.ENABLE_AUTO_SCROLL).Get(out temp);
524                 return temp;
525             }
526             set
527             {
528                 SetProperty(TextLabel.Property.ENABLE_AUTO_SCROLL, new Tizen.NUI.PropertyValue(value));
529             }
530         }
531
532         /// <summary>
533         /// The AutoScrollSpeed property.<br>
534         /// Sets the speed of scrolling in pixels per second.<br>
535         /// </summary>
536         public int AutoScrollSpeed
537         {
538             get
539             {
540                 int temp = 0;
541                 GetProperty(TextLabel.Property.AUTO_SCROLL_SPEED).Get(out temp);
542                 return temp;
543             }
544             set
545             {
546                 SetProperty(TextLabel.Property.AUTO_SCROLL_SPEED, new Tizen.NUI.PropertyValue(value));
547             }
548         }
549
550         /// <summary>
551         /// The AutoScrollLoopCount property.<br>
552         /// Number of complete loops when scrolling enabled.<br>
553         /// </summary>
554         public int AutoScrollLoopCount
555         {
556             get
557             {
558                 int temp = 0;
559                 GetProperty(TextLabel.Property.AUTO_SCROLL_LOOP_COUNT).Get(out temp);
560                 return temp;
561             }
562             set
563             {
564                 SetProperty(TextLabel.Property.AUTO_SCROLL_LOOP_COUNT, new Tizen.NUI.PropertyValue(value));
565             }
566         }
567
568         /// <summary>
569         /// The AutoScrollGap property.<br>
570         /// Gap before scrolling wraps.<br>
571         /// </summary>
572         public float AutoScrollGap
573         {
574             get
575             {
576                 float temp = 0.0f;
577                 GetProperty(TextLabel.Property.AUTO_SCROLL_GAP).Get(out temp);
578                 return temp;
579             }
580             set
581             {
582                 SetProperty(TextLabel.Property.AUTO_SCROLL_GAP, new Tizen.NUI.PropertyValue(value));
583             }
584         }
585
586         /// <summary>
587         /// The LineSpacing property.<br>
588         /// The default extra space between lines in points.<br>
589         /// </summary>
590         public float LineSpacing
591         {
592             get
593             {
594                 float temp = 0.0f;
595                 GetProperty(TextLabel.Property.LINE_SPACING).Get(out temp);
596                 return temp;
597             }
598             set
599             {
600                 SetProperty(TextLabel.Property.LINE_SPACING, new Tizen.NUI.PropertyValue(value));
601             }
602         }
603
604         /// <summary>
605         /// The Underline property.<br>
606         /// The default underline parameters.<br>
607         /// </summary>
608         public PropertyMap Underline
609         {
610             get
611             {
612                 PropertyMap temp = new PropertyMap();
613                 GetProperty(TextLabel.Property.UNDERLINE).Get(temp);
614                 return temp;
615             }
616             set
617             {
618                 SetProperty(TextLabel.Property.UNDERLINE, new Tizen.NUI.PropertyValue(value));
619             }
620         }
621
622         /// <summary>
623         /// The Shadow property.<br>
624         /// The default shadow parameters.<br>
625         /// </summary>
626         public PropertyMap Shadow
627         {
628             get
629             {
630                 PropertyMap temp = new PropertyMap();
631                 GetProperty(TextLabel.Property.SHADOW).Get(temp);
632                 return temp;
633             }
634             set
635             {
636                 SetProperty(TextLabel.Property.SHADOW, new Tizen.NUI.PropertyValue(value));
637             }
638         }
639
640         /// <summary>
641         /// The Emboss property.<br>
642         /// The default emboss parameters.<br>
643         /// </summary>
644         public string Emboss
645         {
646             get
647             {
648                 string temp;
649                 GetProperty(TextLabel.Property.EMBOSS).Get( out temp);
650                 return temp;
651             }
652             set
653             {
654                 SetProperty(TextLabel.Property.EMBOSS, new Tizen.NUI.PropertyValue(value));
655             }
656         }
657
658         /// <summary>
659         /// The Outline property.<br>
660         /// The default outline parameters.<br>
661         /// </summary>
662         public string Outline
663         {
664             get
665             {
666                 string temp;
667                 GetProperty(TextLabel.Property.OUTLINE).Get(out temp);
668                 return temp;
669             }
670             set
671             {
672                 SetProperty(TextLabel.Property.OUTLINE, new Tizen.NUI.PropertyValue(value));
673             }
674         }
675
676         /// <summary>
677         /// The PixelSize property.<br>
678         /// The size of font in pixels.<br>
679         /// </summary>
680         public float PixelSize
681         {
682             get
683             {
684                 float temp = 0.0f;
685                 GetProperty(TextLabel.Property.PIXEL_SIZE).Get(out temp);
686                 return temp;
687             }
688             set
689             {
690                 SetProperty(TextLabel.Property.PIXEL_SIZE, new Tizen.NUI.PropertyValue(value));
691             }
692         }
693
694         /// <summary>
695         /// The Ellipsis property.<br>
696         /// Enable or disable the ellipsis.<br>
697         /// </summary>
698         public bool Ellipsis
699         {
700             get
701             {
702                 bool temp = false;
703                 GetProperty(TextLabel.Property.ELLIPSIS).Get(out temp);
704                 return temp;
705             }
706             set
707             {
708                 SetProperty(TextLabel.Property.ELLIPSIS, new Tizen.NUI.PropertyValue(value));
709             }
710         }
711
712         /// <summary>
713         /// The AutoScrollLoopDelay property.<br>
714         /// Do something.<br>
715         /// </summary>
716         public float AutoScrollLoopDelay
717         {
718             get
719             {
720                 float temp = 0.0f;
721                 GetProperty(TextLabel.Property.AUTO_SCROLL_LOOP_DELAY).Get(out temp);
722                 return temp;
723             }
724             set
725             {
726                 SetProperty(TextLabel.Property.AUTO_SCROLL_LOOP_DELAY, new Tizen.NUI.PropertyValue(value));
727             }
728         }
729
730         /// <summary>
731         /// The AutoScrollStopMode property.<br>
732         /// Do something.<br>
733         /// </summary>
734         public AutoScrollStopMode AutoScrollStopMode
735         {
736             get
737             {
738                 string temp;
739                 if(GetProperty(TextLabel.Property.AUTO_SCROLL_STOP_MODE).Get(out temp) == false)
740                 {
741                     NUILog.Error("AutoScrollStopMode get error!");
742                 }
743                 switch (temp)
744                 {
745                     case "FINISH_LOOP":
746                     return AutoScrollStopMode.FinishLoop;
747                     case "IMMEDIATE":
748                     return AutoScrollStopMode.Immediate;
749                     default:
750                     return AutoScrollStopMode.FinishLoop;
751                 }
752             }
753             set
754             {
755                 SetProperty(TextLabel.Property.AUTO_SCROLL_STOP_MODE, new Tizen.NUI.PropertyValue((int)value));
756             }
757         }
758
759         /// <summary>
760         /// The TextColorAnimatable property.<br>
761         /// The color of the text that can be animatated.<br>
762         /// Animation framework can be used to change the color of the text when not using mark up.<br>
763         /// Not possible when text is auto scrolling. <br>
764         /// </summary>
765         public Color TextColorAnimatable
766         {
767             get
768             {
769                 Color animatableColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
770                 GetProperty(TextLabel.Property.TEXT_COLOR_ANIMATABLE).Get(animatableColor);
771                 return animatableColor;
772             }
773             set
774             {
775                 SetProperty(TextLabel.Property.TEXT_COLOR_ANIMATABLE, new Tizen.NUI.PropertyValue(value));
776             }
777         }
778
779         /// The line count of the text.
780         /// </summary>
781         public int LineCount
782         {
783             get
784             {
785                 int temp = 0;
786                 GetProperty(TextLabel.Property.LINE_COUNT).Get(out temp);
787                 return temp;
788             }
789         }
790
791         /// <summary>
792         /// The LineWrapMode property.<br>
793         /// line wrap mode when the text lines over layout width.<br>
794         /// </summary>
795         public LineWrapMode LineWrapMode
796         {
797             get
798             {
799                 string temp;
800                 if(GetProperty(TextLabel.Property.LINE_WRAP_MODE).Get(out temp) == false)
801                 {
802                     NUILog.Error("LineWrapMode get error!");
803                 }
804                 switch (temp)
805                 {
806                     case "WRAP_MODE_WORD":
807                     return LineWrapMode.Word;
808                     case "WRAP_MODE_CHARACTER":
809                     return LineWrapMode.Character;
810                     default:
811                     return LineWrapMode.Word;
812                 }
813             }
814             set
815             {
816                 string temp = "";
817                 switch (value)
818                 {
819                     case LineWrapMode.Word:
820                     {
821                         temp = "WRAP_MODE_WORD";
822                         break;
823                     }
824                     case LineWrapMode.Character:
825                     {
826                         temp = "WRAP_MODE_CHARACTER";
827                         break;
828                     }
829                 }
830                 SetProperty(TextLabel.Property.LINE_WRAP_MODE, new Tizen.NUI.PropertyValue(temp));
831             }
832         }
833     }
834 }