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