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