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