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