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