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