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