[NUI] Fix text padding issue
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / BaseComponents / TextUtils.cs
1
2 /*
3  * Copyright(c) 2020 Samsung Electronics Co., Ltd.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18
19 extern alias TizenSystemSettings;
20 using TizenSystemSettings.Tizen.System;
21 using System;
22 using System.ComponentModel;
23 using System.Collections.Generic;
24 using Tizen.NUI.Text;
25
26 namespace Tizen.NUI.BaseComponents
27 {
28     /// <summary>
29     /// Class with the text and style parameters to be rendered into a pixel buffer.
30     /// </summary>
31     // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
32     [EditorBrowsable(EditorBrowsableState.Never)]
33     public class RendererParameters : Disposable
34     {
35         internal RendererParameters(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
36         {
37         }
38
39         /// <summary>
40         /// Dispose
41         /// </summary>
42         protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
43         {
44             Interop.RendererParameters.DeleteRendererParameters(swigCPtr);
45         }
46
47         /// <summary>
48         /// Construct RendererParameters
49         /// </summary>
50         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
51         [EditorBrowsable(EditorBrowsableState.Never)]
52         public RendererParameters() : this(Interop.RendererParameters.NewRendererParameters(), true)
53         {
54             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
55         }
56
57         /// <summary>
58         /// The text to be rendered
59         /// </summary>
60         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
61         [EditorBrowsable(EditorBrowsableState.Never)]
62         public string Text
63         {
64             set
65             {
66                 Interop.RendererParameters.TextSet(SwigCPtr, value);
67                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
68             }
69             get
70             {
71                 string ret = Interop.RendererParameters.TextGet(SwigCPtr);
72                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
73                 return ret;
74             }
75         }
76
77         /// <summary>
78         /// The horizontal alignment: one of HorizontalAlignment.
79         /// </summary>
80         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
81         [EditorBrowsable(EditorBrowsableState.Never)]
82         public HorizontalAlignment HorizontalAlignment
83         {
84             set
85             {
86                 string alignment = "begin";
87                 switch (value)
88                 {
89                     case HorizontalAlignment.Begin:
90                         {
91                             alignment = "begin";
92                             break;
93                         }
94                     case HorizontalAlignment.Center:
95                         {
96                             alignment = "center";
97                             break;
98                         }
99                     case HorizontalAlignment.End:
100                         {
101                             alignment = "end";
102                             break;
103                         }
104                     default:
105                         {
106                             break;
107                         }
108                 }
109                 Interop.RendererParameters.HorizontalAlignmentSet(SwigCPtr, alignment);
110                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
111             }
112             get
113             {
114                 string ret = Interop.RendererParameters.HorizontalAlignmentGet(SwigCPtr);
115                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
116                 HorizontalAlignment alignment = HorizontalAlignment.Begin;
117                 switch (ret)
118                 {
119                     case "begin":
120                         {
121                             alignment = HorizontalAlignment.Begin;
122                             break;
123                         }
124                     case "center":
125                         {
126                             alignment = HorizontalAlignment.Center;
127                             break;
128                         }
129                     case "end":
130                         {
131                             alignment = HorizontalAlignment.End;
132                             break;
133                         }
134                     default:
135                         {
136                             break;
137                         }
138                 }
139                 return alignment;
140             }
141         }
142
143         /// <summary>
144         /// The vertical alignment: one of VerticalAlignment.
145         /// </summary>
146         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
147         [EditorBrowsable(EditorBrowsableState.Never)]
148         public VerticalAlignment VerticalAlignment
149         {
150             set
151             {
152                 string alignment = "top";
153                 switch (value)
154                 {
155                     case VerticalAlignment.Top:
156                         {
157                             alignment = "top";
158                             break;
159                         }
160                     case VerticalAlignment.Center:
161                         {
162                             alignment = "center";
163                             break;
164                         }
165                     case VerticalAlignment.Bottom:
166                         {
167                             alignment = "bottom";
168                             break;
169                         }
170                     default:
171                         {
172                             break;
173                         }
174                 }
175                 Interop.RendererParameters.VerticalAlignmentSet(SwigCPtr, alignment);
176                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
177             }
178             get
179             {
180                 string ret = Interop.RendererParameters.VerticalAlignmentGet(SwigCPtr);
181                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
182                 VerticalAlignment alignment = VerticalAlignment.Top;
183                 switch (ret)
184                 {
185                     case "top":
186                         {
187                             alignment = VerticalAlignment.Top;
188                             break;
189                         }
190                     case "center":
191                         {
192                             alignment = VerticalAlignment.Center;
193                             break;
194                         }
195                     case "bottom":
196                         {
197                             alignment = VerticalAlignment.Bottom;
198                             break;
199                         }
200                     default:
201                         {
202                             break;
203                         }
204                 }
205                 return alignment;
206             }
207         }
208
209         /// <summary>
210         /// The font's family.
211         /// </summary>
212         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
213         [EditorBrowsable(EditorBrowsableState.Never)]
214         public string FontFamily
215         {
216             set
217             {
218                 Interop.RendererParameters.FontFamilySet(SwigCPtr, value);
219                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
220             }
221             get
222             {
223                 string ret = Interop.RendererParameters.FontFamilyGet(SwigCPtr);
224                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
225                 return ret;
226             }
227         }
228
229         /// <summary>
230         /// The font's weight: one of {"thin", "ultraLight", "extraLight", "light", "demiLight", "semiLight", "book", "normal", "regular", "medium", "demiBold", "semiBold", "bold", "ultraBold", "extraBold", "black", "heavy", "extraBlack"}.
231         /// </summary>
232         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
233         [EditorBrowsable(EditorBrowsableState.Never)]
234         public string FontWeight
235         {
236             set
237             {
238                 Interop.RendererParameters.FontWeightSet(SwigCPtr, value);
239                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
240             }
241             get
242             {
243                 string ret = Interop.RendererParameters.FontWeightGet(SwigCPtr);
244                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
245                 return ret;
246             }
247         }
248
249         /// <summary>
250         /// The font's width: one of {"ultraCondensed", "extraCondensed", "condensed", "semiCondensed", "normal", "semiExpanded", "expanded", "extraExpanded", "ultraExpanded"}.
251         /// </summary>
252         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
253         [EditorBrowsable(EditorBrowsableState.Never)]
254         public string FontWidth
255         {
256             set
257             {
258                 Interop.RendererParameters.FontWidthSet(SwigCPtr, value);
259                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
260             }
261             get
262             {
263                 string ret = Interop.RendererParameters.FontWidthGet(SwigCPtr);
264                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
265                 return ret;
266             }
267         }
268
269         /// <summary>
270         /// The font's slant. one of {"normal", "roman", "italic", "oblique"}
271         /// </summary>
272         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
273         [EditorBrowsable(EditorBrowsableState.Never)]
274         public string FontSlant
275         {
276             set
277             {
278                 Interop.RendererParameters.FontSlantSet(SwigCPtr, value);
279                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
280             }
281             get
282             {
283                 string ret = Interop.RendererParameters.FontSlantGet(SwigCPtr);
284                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
285                 return ret;
286             }
287         }
288
289         /// <summary>
290         /// The type of layout: one of TextLayout {"singleLine", "multiLine", "circular"}
291         /// </summary>
292         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
293         [EditorBrowsable(EditorBrowsableState.Never)]
294         public TextLayout Layout
295         {
296             set
297             {
298                 string textLayout = "singleLine";
299                 switch (value)
300                 {
301                     case TextLayout.SingleLine:
302                         {
303                             textLayout = "singleLine";
304                             break;
305                         }
306                     case TextLayout.MultiLine:
307                         {
308                             textLayout = "multiLine";
309                             break;
310                         }
311                     case TextLayout.Circular:
312                         {
313                             textLayout = "circular";
314                             break;
315                         }
316                     default:
317                         {
318                             break;
319                         }
320                 }
321                 Interop.RendererParameters.LayoutSet(SwigCPtr, textLayout);
322                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
323             }
324             get
325             {
326                 string ret = Interop.RendererParameters.LayoutGet(SwigCPtr);
327                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
328                 TextLayout textLayout = TextLayout.SingleLine;
329                 switch (ret)
330                 {
331                     case "singleLine":
332                         {
333                             textLayout = TextLayout.SingleLine;
334                             break;
335                         }
336                     case "multiLine":
337                         {
338                             textLayout = TextLayout.MultiLine;
339                             break;
340                         }
341                     case "circular":
342                         {
343                             textLayout = TextLayout.Circular;
344                             break;
345                         }
346                     default:
347                         {
348                             break;
349                         }
350                 }
351                 return textLayout;
352             }
353         }
354
355         /// <summary>
356         /// The text alignment within the arc: one of CircularAlignment. The @p horizontalAlignment and @p verticalAlignment can be used to align the text within the text area.
357         /// </summary>
358         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
359         [EditorBrowsable(EditorBrowsableState.Never)]
360         public CircularAlignment CircularAlignment
361         {
362             set
363             {
364                 string alignment = "begin";
365                 switch (value)
366                 {
367                     case CircularAlignment.Begin:
368                         {
369                             alignment = "begin";
370                             break;
371                         }
372                     case CircularAlignment.Center:
373                         {
374                             alignment = "center";
375                             break;
376                         }
377                     case CircularAlignment.End:
378                         {
379                             alignment = "end";
380                             break;
381                         }
382                     default:
383                         {
384                             break;
385                         }
386                 }
387                 Interop.RendererParameters.CircularAlignmentSet(SwigCPtr, alignment);
388                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
389             }
390             get
391             {
392                 string ret = Interop.RendererParameters.CircularAlignmentGet(SwigCPtr);
393                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
394                 CircularAlignment alignment = CircularAlignment.Begin;
395                 switch (ret)
396                 {
397                     case "begin":
398                         {
399                             alignment = CircularAlignment.Begin;
400                             break;
401                         }
402                     case "center":
403                         {
404                             alignment = CircularAlignment.Center;
405                             break;
406                         }
407                     case "end":
408                         {
409                             alignment = CircularAlignment.End;
410                             break;
411                         }
412                     default:
413                         {
414                             break;
415                         }
416                 }
417                 return alignment;
418             }
419         }
420
421         /// <summary>
422         /// The default text's color. Default is white.
423         /// </summary>
424         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
425         [EditorBrowsable(EditorBrowsableState.Never)]
426         public Vector4 TextColor
427         {
428             set
429             {
430                 Interop.RendererParameters.TextColorSet(SwigCPtr, Vector4.getCPtr(value));
431                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
432             }
433             get
434             {
435                 Vector4 ret = new Vector4(Interop.RendererParameters.TextColorGet(SwigCPtr), true);
436                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
437                 return ret;
438             }
439         }
440
441         /// <summary>
442         /// The font's size (in points).
443         /// </summary>
444         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
445         [EditorBrowsable(EditorBrowsableState.Never)]
446         public float FontSize
447         {
448             set
449             {
450                 Interop.RendererParameters.FontSizeSet(SwigCPtr, value);
451                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
452             }
453             get
454             {
455                 float ret = Interop.RendererParameters.FontSizeGet(SwigCPtr);
456                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
457                 return ret;
458             }
459         }
460
461         /// <summary>
462         /// The width in pixels of the boundaries where the text is going to be laid-out.
463         /// </summary>
464         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
465         [EditorBrowsable(EditorBrowsableState.Never)]
466         public uint TextWidth
467         {
468             set
469             {
470                 Interop.RendererParameters.TextWidthSet(SwigCPtr, value);
471                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
472             }
473             get
474             {
475                 uint ret = Interop.RendererParameters.TextWidthGet(SwigCPtr);
476                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
477                 return ret;
478             }
479         }
480
481         /// <summary>
482         /// The height in pixels of the boundaries where the text is going to be laid-out.
483         /// </summary>
484         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
485         [EditorBrowsable(EditorBrowsableState.Never)]
486         public uint TextHeight
487         {
488             set
489             {
490                 Interop.RendererParameters.TextHeightSet(SwigCPtr, value);
491                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
492             }
493             get
494             {
495                 uint ret = Interop.RendererParameters.TextHeightGet(SwigCPtr);
496                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
497                 return ret;
498             }
499         }
500
501         /// <summary>
502         /// The radius in pixels of the circular text.
503         /// </summary>
504         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
505         [EditorBrowsable(EditorBrowsableState.Never)]
506         public uint Radius
507         {
508             set
509             {
510                 Interop.RendererParameters.RadiusSet(SwigCPtr, value);
511                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
512             }
513             get
514             {
515                 uint ret = Interop.RendererParameters.RadiusGet(SwigCPtr);
516                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
517                 return ret;
518             }
519         }
520
521         /// <summary>
522         /// The begin angle in degrees of the text area on the circle. The top of the circle is 0°, the right side 90°, the bottom 180° and the left 270°.
523         /// </summary>
524         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
525         [EditorBrowsable(EditorBrowsableState.Never)]
526         public float BeginAngle
527         {
528             set
529             {
530                 Interop.RendererParameters.BeginAngleSet(SwigCPtr, value);
531                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
532             }
533             get
534             {
535                 float ret = Interop.RendererParameters.BeginAngleGet(SwigCPtr);
536                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
537                 return ret;
538             }
539         }
540
541         /// <summary>
542         /// The increment angle in degrees of the text area on the circle. The @p incrementAngle defines a direction. If positive, the text will be laid out clockwise.
543         /// </summary>
544         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
545         [EditorBrowsable(EditorBrowsableState.Never)]
546         public float IncrementAngle
547         {
548             set
549             {
550                 Interop.RendererParameters.IncrementAngleSet(SwigCPtr, value);
551                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
552             }
553             get
554             {
555                 float ret = Interop.RendererParameters.IncrementAngleGet(SwigCPtr);
556                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
557                 return ret;
558             }
559         }
560
561         /// <summary>
562         /// Whether the ellipsis layout option is enabled.
563         /// </summary>
564         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
565         [EditorBrowsable(EditorBrowsableState.Never)]
566         public bool EllipsisEnabled
567         {
568             set
569             {
570                 Interop.RendererParameters.EllipsisEnabledSet(SwigCPtr, value);
571                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
572             }
573             get
574             {
575                 bool ret = Interop.RendererParameters.EllipsisEnabledGet(SwigCPtr);
576                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
577                 return ret;
578             }
579         }
580
581         /// <summary>
582         /// Whether the mark-up processor is enabled.
583         /// </summary>
584         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
585         [EditorBrowsable(EditorBrowsableState.Never)]
586         public bool MarkupEnabled
587         {
588             set
589             {
590                 Interop.RendererParameters.MarkupEnabledSet(SwigCPtr, value);
591                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
592             }
593             get
594             {
595                 bool ret = Interop.RendererParameters.MarkupEnabledGet(SwigCPtr);
596                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
597                 return ret;
598             }
599         }
600
601         /// <summary>
602         /// Whether a default color has been set.
603         /// </summary>
604         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
605         [EditorBrowsable(EditorBrowsableState.Never)]
606         public bool IsTextColorSet
607         {
608             set
609             {
610                 Interop.RendererParameters.IsTextColorSetSet(SwigCPtr, value);
611                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
612             }
613             get
614             {
615                 bool ret = Interop.RendererParameters.IsTextColorSetGet(SwigCPtr);
616                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
617                 return ret;
618             }
619         }
620
621         /// <summary>
622         /// Minimum size of line.
623         /// </summary>
624         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
625         [EditorBrowsable(EditorBrowsableState.Never)]
626         public float MinLineSize
627         {
628             set
629             {
630                 Interop.RendererParameters.MinLineSizeSet(SwigCPtr, value);
631                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
632             }
633             get
634             {
635                 float ret = Interop.RendererParameters.MinLineSizeGet(SwigCPtr);
636                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
637                 return ret;
638             }
639         }
640
641         /// <summary>
642         /// Padding of TextLabel.
643         /// </summary>
644         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
645         [EditorBrowsable(EditorBrowsableState.Never)]
646         public Extents Padding
647         {
648             set
649             {
650                 Interop.RendererParameters.PaddingSet(SwigCPtr, Extents.getCPtr(value));
651                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
652             }
653             get
654             {
655                 Extents ret = new Extents(Interop.RendererParameters.PaddingGet(SwigCPtr), true);
656                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
657                 return ret;
658             }
659         }
660
661     }
662
663     /// <summary>
664     /// Class with info of the embedded items layout.
665     /// </summary>
666     // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
667     [EditorBrowsable(EditorBrowsableState.Never)]
668     public class EmbeddedItemInfo : Disposable
669     {
670
671         internal EmbeddedItemInfo(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
672         {
673         }
674
675         /// <summary>
676         /// Dispose
677         /// </summary>
678         protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
679         {
680             Interop.EmbeddedItemInfo.DeleteEmbeddedItemInfo(swigCPtr);
681         }
682
683         /// <summary>
684         /// Construct EmbeddedItemInfo
685         /// </summary>
686         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
687         [EditorBrowsable(EditorBrowsableState.Never)]
688         public EmbeddedItemInfo() : this(Interop.EmbeddedItemInfo.NewEmbeddedItemInfo(), true)
689         {
690             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
691         }
692
693         /// <summary>
694         /// Index to the character within the string.
695         /// </summary>
696         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
697         [EditorBrowsable(EditorBrowsableState.Never)]
698         public uint CharacterIndex
699         {
700             set
701             {
702                 Interop.EmbeddedItemInfo.CharacterIndexSet(SwigCPtr, value);
703                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
704             }
705             get
706             {
707                 uint ret = Interop.EmbeddedItemInfo.CharacterIndexGet(SwigCPtr);
708                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
709                 return ret;
710             }
711         }
712
713         /// <summary>
714         /// Index to the glyph
715         /// </summary>
716         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
717         [EditorBrowsable(EditorBrowsableState.Never)]
718         public uint GlyphIndex
719         {
720             set
721             {
722                 Interop.EmbeddedItemInfo.GlyphIndexSet(SwigCPtr, value);
723                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
724             }
725             get
726             {
727                 uint ret = Interop.EmbeddedItemInfo.GlyphIndexGet(SwigCPtr);
728                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
729                 return ret;
730             }
731         }
732
733         /// <summary>
734         /// The layout position within the buffer (top, left corner).
735         /// </summary>
736         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
737         [EditorBrowsable(EditorBrowsableState.Never)]
738         public Vector2 Position
739         {
740             set
741             {
742                 Interop.EmbeddedItemInfo.PositionSet(SwigCPtr, Vector2.getCPtr(value));
743                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
744             }
745             get
746             {
747                 Vector2 ret = new Vector2(Interop.EmbeddedItemInfo.PositionGet(SwigCPtr), SwigCMemOwn);
748                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
749                 return ret;
750             }
751         }
752
753         /// <summary>
754         /// The size within the buffer of the embedded item.
755         /// </summary>
756         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
757         [EditorBrowsable(EditorBrowsableState.Never)]
758         public Size Size
759         {
760             set
761             {
762                 Interop.EmbeddedItemInfo.SizeSet(SwigCPtr, Size.getCPtr(value));
763                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
764             }
765             get
766             {
767                 Size ret = new Size(Interop.EmbeddedItemInfo.SizeGet(SwigCPtr), SwigCMemOwn);
768                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
769                 return ret;
770             }
771         }
772
773         /// <summary>
774         /// The rotated size within the buffer of the embedded item.
775         /// </summary>
776         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
777         [EditorBrowsable(EditorBrowsableState.Never)]
778         public Size RotatedSize
779         {
780             set
781             {
782                 Interop.EmbeddedItemInfo.RotatedSizeSet(SwigCPtr, Size.getCPtr(value));
783                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
784             }
785             get
786             {
787                 Size ret = new Size(Interop.EmbeddedItemInfo.RotatedSizeGet(SwigCPtr), SwigCMemOwn);
788                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
789                 return ret;
790             }
791         }
792
793         /// <summary>
794         /// Rotation angle of the pixel buffer in degrees.
795         /// </summary>
796         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
797         [EditorBrowsable(EditorBrowsableState.Never)]
798         public Degree Angle
799         {
800             set
801             {
802                 Interop.EmbeddedItemInfo.AngleSet(SwigCPtr, Degree.getCPtr(value));
803                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
804             }
805             get
806             {
807                 Degree ret = new Degree(Interop.EmbeddedItemInfo.AngleGet(SwigCPtr), SwigCMemOwn);
808                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
809                 return ret;
810             }
811         }
812
813         /// <summary>
814         /// Whether the color of the image is multiplied by the color of the text.
815         /// </summary>
816         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
817         [EditorBrowsable(EditorBrowsableState.Never)]
818         public Tizen.NUI.ColorBlendingMode ColorBlendingMode
819         {
820             set
821             {
822                 Interop.EmbeddedItemInfo.ColorBlendingModeSet(SwigCPtr, value);
823                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
824             }
825             get
826             {
827                 Tizen.NUI.ColorBlendingMode ret = Interop.EmbeddedItemInfo.ColorBlendingModeGet(SwigCPtr);
828                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
829                 return ret;
830             }
831         }
832     }
833
834     /// <summary>
835     /// Class with the parameters needed to build a shadow for the given pixel buffer.
836     /// </summary>
837     // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
838     [EditorBrowsable(EditorBrowsableState.Never)]
839     public class ShadowParameters : Disposable
840     {
841
842         internal ShadowParameters(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
843         {
844         }
845
846         /// <summary>
847         /// Dispose
848         /// </summary>
849         protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
850         {
851             Interop.ShadowParameters.DeleteShadowParameters(swigCPtr);
852         }
853
854         /// <summary>
855         /// Construct ShadowParameters
856         /// </summary>
857         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
858         [EditorBrowsable(EditorBrowsableState.Never)]
859         public ShadowParameters() : this(Interop.ShadowParameters.NewShadowParameters(), true)
860         {
861             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
862         }
863
864         /// <summary>
865         /// The input pixel buffer used to create the shadow.
866         /// </summary>
867         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
868         [EditorBrowsable(EditorBrowsableState.Never)]
869         public PixelBuffer Input
870         {
871             set
872             {
873                 Interop.ShadowParameters.InputSet(SwigCPtr, PixelBuffer.getCPtr(value));
874                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
875             }
876             get
877             {
878                 PixelBuffer ret = new PixelBuffer(Interop.ShadowParameters.InputGet(SwigCPtr), true);
879                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
880                 return ret;
881             }
882         }
883
884         /// <summary>
885         /// The color of the text.
886         /// </summary>
887         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
888         [EditorBrowsable(EditorBrowsableState.Never)]
889         public Vector4 TextColor
890         {
891             set
892             {
893                 Interop.ShadowParameters.TextColorSet(SwigCPtr, Vector4.getCPtr(value));
894                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
895             }
896             get
897             {
898                 Vector4 ret = new Vector4(Interop.ShadowParameters.TextColorGet(SwigCPtr), true);
899                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
900                 return ret;
901             }
902         }
903
904         /// <summary>
905         /// The color of the shadow.
906         /// </summary>
907         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
908         [EditorBrowsable(EditorBrowsableState.Never)]
909         public Vector4 Color
910         {
911             set
912             {
913                 Interop.ShadowParameters.ColorSet(SwigCPtr, Vector4.getCPtr(value));
914                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
915             }
916             get
917             {
918                 Vector4 ret = new Vector4(Interop.ShadowParameters.ColorGet(SwigCPtr), true);
919                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
920                 return ret;
921             }
922         }
923
924         /// <summary>
925         /// The offset of the shadow.
926         /// </summary>
927         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
928         [EditorBrowsable(EditorBrowsableState.Never)]
929         public Vector2 Offset
930         {
931             set
932             {
933                 Interop.ShadowParameters.OffsetSet(SwigCPtr, Vector2.getCPtr(value));
934                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
935             }
936             get
937             {
938                 Vector2 ret = new Vector2(Interop.ShadowParameters.OffsetGet(SwigCPtr), true);
939                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
940                 return ret;
941             }
942         }
943
944         /// <summary>
945         /// Whether to blend the shadow.
946         /// </summary>
947         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
948         [EditorBrowsable(EditorBrowsableState.Never)]
949         public bool blendShadow
950         {
951             set
952             {
953                 Interop.ShadowParameters.BlendShadowSet(SwigCPtr, value);
954                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
955             }
956             get
957             {
958                 bool ret = Interop.ShadowParameters.BlendShadowGet(SwigCPtr);
959                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
960                 return ret;
961             }
962         }
963     }
964
965     /// <summary>
966     /// </summary>
967     // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
968     [EditorBrowsable(EditorBrowsableState.Never)]
969     public static partial class TextUtils
970     {
971         /// <summary>
972         /// Renders text into a pixel buffer.
973         /// @note: Can process a mark-up string.
974         /// @note: It does the font selection, RTL reordering, shaping and layouting.
975         /// @note: The width of the pixel buffer may be different to the given @e textWidth
976         ///        due to some padding pixels added.
977         ///
978         ///  The text is laid-out for the given size @e (textWidth,textHeight).
979         ///  If the @e multiLineEnabled option is enabled, the text will wrap in lines.
980         ///  If the @e ellipsisEnabled option is enabled, the text will be ellided if
981         ///  there is no more space for new lines.
982         ///
983         ///  It won't be rendered the parts of the text exceeding the boundaries of
984         ///  the given width and height.
985         ///
986         ///  If the given @e textHeight is zero, a big enough pixel buffer will be created
987         ///  to render the full text.
988         ///
989         ///  If the given @e textWidth is zero, the 'natural size' of the text will be
990         ///  used to create the pixel buffer to render the full text.
991         ///
992         ///  If the radius is not zero, the text will be laid-out following a circular path.
993         ///  In that case the text is laid-out in a single line.
994         ///
995         /// If the mark-up string contains embedded items, the @p embeddedItemLayout vector
996         /// contains the layout info of each embedded item.
997         /// </summary>
998         /// <param name="textParameters">The text and style options.</param>
999         /// <param name="embeddedItemLayout">The layout info of the embedded items</param>
1000         /// <returns>A pixel buffer with the text rendered on it.</returns>
1001         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
1002         [EditorBrowsable(EditorBrowsableState.Never)]
1003         public static PixelBuffer Render(RendererParameters textParameters, ref EmbeddedItemInfo[] embeddedItemLayout)
1004         {
1005             int count = 0;
1006             int length = 0;
1007             global::System.IntPtr returnItem = IntPtr.Zero;
1008             PixelBuffer ret = new PixelBuffer(Interop.TextUtils.Render(RendererParameters.getCPtr(textParameters), ref returnItem, ref count, ref length), true);
1009
1010             embeddedItemLayout = new EmbeddedItemInfo[count];
1011             for (int i = 0; i < count; i++)
1012             {
1013                 IntPtr p = new IntPtr((returnItem.ToInt32() + i * length));
1014                 embeddedItemLayout[i] = new EmbeddedItemInfo(p, false);
1015             }
1016             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1017             return ret;
1018         }
1019
1020         /// <summary>
1021         /// Creates a shadow for the text given in the input pixel buffer.
1022         /// The function returns a RGBA8888 pixel buffer with the text and its shadow rendered on it.
1023         ///
1024         /// The pixel format of the @e input pixel buffer could be an A8 or an RGBA8888. If it's
1025         /// an A8 pixel buffer, it uses the given @e textColor to give color to the text. Otherwise
1026         /// it uses the color of the @e input pixel buffer.
1027         /// </summary>
1028         /// <param name="shadowParameters">The parameters needed to create the text's shadow.</param>
1029         /// <returns>A pixel buffer with the text and the shadow rendered on it.</returns>
1030         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
1031         [EditorBrowsable(EditorBrowsableState.Never)]
1032         public static PixelBuffer CreateShadow(ShadowParameters shadowParameters)
1033         {
1034             PixelBuffer ret = new PixelBuffer(Interop.TextUtils.CreateShadow(ShadowParameters.getCPtr(shadowParameters)), true);
1035             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1036             return ret;
1037         }
1038
1039         /// <summary>
1040         /// Converts a @p pixelBuffer with pixel format A8 to RGBA8888 using the given @p color.
1041         /// @note Does nothing if the @p pixelBuffer is not A8.
1042         /// </summary>
1043         /// <param name="pixelBuffer">The pixel buffer with pixel format A8</param>
1044         /// <param name="color">The color used to convert to RGBA8888</param>
1045         /// <param name="multiplyByAlpha">multiplyByAlpha Whether to multiply the @p color with the alpha value of the @p pixel @p buffer.</param>
1046         /// <returns>The pixel buffer converted to RGBA8888.</returns>
1047         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
1048         [EditorBrowsable(EditorBrowsableState.Never)]
1049         public static PixelBuffer ConvertToRgba8888(PixelBuffer pixelBuffer, Vector4 color, bool multiplyByAlpha)
1050         {
1051             PixelBuffer ret = new PixelBuffer(Interop.TextUtils.ConvertToRgba8888(PixelBuffer.getCPtr(pixelBuffer), Vector4.getCPtr(color), multiplyByAlpha), true);
1052             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1053             return ret;
1054         }
1055
1056         /// <summary>
1057         /// Updates the @p dst pixel buffer with the data from @p src pixel buffer.
1058         /// @note Both pixel buffers must have the same pixel format. Does nothing if both pixel format are different.
1059         /// @note The function does nothing if the @p src pixel buffer doesn't fit into the @p dst pixel buffer.
1060         ///
1061         /// The @p src pixel buffer could be blended with the @p dst pixel buffer if @p blend is set to @e true.
1062         /// </summary>
1063         /// <param name="src">The pixel buffer from where the data is read.</param>
1064         /// <param name="dst">The pixel buffer where the data is written.</param>
1065         /// <param name="x">The top left corner's X within the destination pixel buffer.</param>
1066         /// <param name="y">The top left corner's y within the destination pixel buffer.</param>
1067         /// <param name="blend">Whether to blend the source pixel buffer with the destination pixel buffer as background.</param>
1068         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
1069         [EditorBrowsable(EditorBrowsableState.Never)]
1070         public static void UpdateBuffer(PixelBuffer src, PixelBuffer dst, uint x, uint y, bool blend)
1071         {
1072             Interop.TextUtils.UpdateBuffer(PixelBuffer.getCPtr(src), PixelBuffer.getCPtr(dst), x, y, blend);
1073             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1074         }
1075
1076         /// <summary>
1077         /// Splits the text in pages of the size given in @p textParameters
1078         /// @note The returned indices are indices to utf32 characters. The input text is encoded in utf8.
1079         /// <returns> An array with the indices of the last character of each page </returns>
1080         /// </summary>
1081         [EditorBrowsable(EditorBrowsableState.Never)]
1082         public static Tizen.NUI.PropertyArray GetLastCharacterIndex(RendererParameters textParameters)
1083         {
1084             Tizen.NUI.PropertyArray ret = new Tizen.NUI.PropertyArray(Interop.TextUtils.GetLastCharacterIndex(RendererParameters.getCPtr(textParameters)), true);
1085             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1086             return ret;
1087         }
1088
1089         /// <summary>
1090         /// This method converts a FontInfo property array to a list and returns it.
1091         /// <param name="fontArray">The FontInfo PropertyArray.</param>
1092         /// <returns> A list of FontInfo struct. </returns>
1093         /// </summary>
1094         [EditorBrowsable(EditorBrowsableState.Never)]
1095         public static List<FontInfo> GetFontInfoList(PropertyArray fontArray)
1096         {
1097             var fontList = new List<FontInfo>();
1098             if (fontArray != null)
1099             {
1100                 for (uint i = 0 ; i < fontArray.Count(); i ++)
1101                 {
1102                     using (var fontInfoMap = new PropertyMap())
1103                     using (var propertyValue = fontArray[i])
1104                     {
1105                         propertyValue.Get(fontInfoMap);
1106
1107                         if (fontInfoMap.Count() > 0)
1108                         {
1109                             var fontInfo = new FontInfo();
1110                             fontInfo.Family = TextMapHelper.GetStringFromMap(fontInfoMap, "family", "TizenSans");
1111                             fontInfo.Path = TextMapHelper.GetStringFromMap(fontInfoMap, "path", "");
1112                             fontInfo.Style = new FontStyle()
1113                             {
1114                                 Width = (FontWidthType)TextMapHelper.GetIntFromMap(fontInfoMap, "width", 0),
1115                                 Weight = (FontWeightType)TextMapHelper.GetIntFromMap(fontInfoMap, "weight", 0),
1116                                 Slant = (FontSlantType)TextMapHelper.GetIntFromMap(fontInfoMap, "slant", 0),
1117                             };
1118                             fontList.Add(fontInfo);
1119                         }
1120                     }
1121                 }
1122             }
1123             return fontList;
1124         }
1125
1126 #if PROFILE_TV
1127         private const float FontSizeScaleSmall = 0.8f;
1128         private const float FontSizeScaleNormal = 1.0f;
1129         private const float FontSizeScaleLarge = 1.5f;
1130         private const float FontSizeScaleHuge = 1.9f;
1131         private const float FontSizeScaleGiant = 2.5f;
1132 #elif PROFILE_WEARABLE
1133         // The following values from 'system-settings/libutil/sstu.c'
1134         private const float FontSizeScaleSmall = 0.9f;
1135         private const float FontSizeScaleNormal = 1.0f;
1136         private const float FontSizeScaleLarge = 1.1f;
1137         private const float FontSizeScaleHuge = 1.9f;
1138         private const float FontSizeScaleGiant = 2.5f;
1139 #else   // PROFILE_MOBILE and etc
1140         // The following values from 'system-settings/libutil/sstu.c'
1141         private const float FontSizeScaleSmall = 0.87f;
1142         private const float FontSizeScaleNormal = 1.0f;
1143         private const float FontSizeScaleLarge = 1.13f;
1144         private const float FontSizeScaleHuge = 1.26f;
1145         private const float FontSizeScaleGiant = 1.4f;
1146 #endif
1147
1148         /// <summary>
1149         /// It returns a float value according to SystemSettingsFontSize.
1150         /// The returned value can be used for FontSizeScale property.
1151         /// <param name="systemSettingsFontSize">The SystemSettingsFontSize enum value.</param>
1152         /// <returns> A float value for FontSizeScale property. </returns>
1153         /// </summary>
1154         [EditorBrowsable(EditorBrowsableState.Never)]
1155         public static float GetFontSizeScale(SystemSettingsFontSize systemSettingsFontSize)
1156         {
1157             float ret = FontSizeScaleNormal;
1158
1159             switch (systemSettingsFontSize)
1160             {
1161                 case SystemSettingsFontSize.Small:
1162                     ret = FontSizeScaleSmall;
1163                     break;
1164                 case SystemSettingsFontSize.Normal:
1165                     ret = FontSizeScaleNormal;
1166                     break;
1167                 case SystemSettingsFontSize.Large:
1168                     ret = FontSizeScaleLarge;
1169                     break;
1170                 case SystemSettingsFontSize.Huge:
1171                     ret = FontSizeScaleHuge;
1172                     break;
1173                 case SystemSettingsFontSize.Giant:
1174                     ret = FontSizeScaleGiant;
1175                     break;
1176             }
1177
1178             return ret;
1179         }
1180
1181         /// <summary>
1182         /// Copy the previously selected text from the text control into the clipboard.
1183         /// </summary>
1184         /// <param name="textEditor">The textEditor control from which the text is copied.</param>
1185         /// <returns>The copied text.</returns>
1186         /// <since_tizen> 9 </since_tizen>
1187         public static string CopyToClipboard(TextEditor textEditor)
1188         {
1189             string copiedText = Interop.TextEditor.CopyText(textEditor.SwigCPtr);
1190             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1191             return copiedText;
1192         }
1193
1194         /// <summary>
1195         /// Copy the previously selected text from the text control into the clipboard.
1196         /// </summary>
1197         /// <param name="textField">The textField control from which the text is copied.</param>
1198         /// <returns>The copied text.</returns>
1199         /// <since_tizen> 9 </since_tizen>
1200         public static string CopyToClipboard(TextField textField)
1201         {
1202             string copiedText = Interop.TextField.CopyText(textField.SwigCPtr);
1203             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1204             return copiedText;
1205         }
1206
1207         /// <summary>
1208         /// Cut the previously selected text from the text control into the clipboard.
1209         /// </summary>
1210         /// <param name="textEditor">The textEditor control from which the text is cut.</param>
1211         /// <returns>The cut text.</returns>
1212         /// <since_tizen> 9 </since_tizen>
1213         public static string CutToClipboard(TextEditor textEditor)
1214         {
1215             string cutText = Interop.TextEditor.CutText(textEditor.SwigCPtr);
1216             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1217             return cutText;
1218         }
1219
1220         /// <summary>
1221         /// Cut the previously selected text from the text control into the clipboard.
1222         /// </summary>
1223         /// <param name="textField">The textField control from which the text is cut.</param>
1224         /// <returns>The cut text.</returns>
1225         /// <since_tizen> 9 </since_tizen>
1226         public static string CutToClipboard(TextField textField)
1227         {
1228             string cutText = Interop.TextField.CutText(textField.SwigCPtr);
1229             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1230             return cutText;
1231         }
1232
1233         /// <summary>
1234         /// Paste the most recently copied/cut text item from the clipboard into the text control.
1235         /// </summary>
1236         /// <remarks>
1237         /// The pasted text will be inserted in the current cursor position and if the text control has no focus,
1238         /// the text will be appended to the last cursor position and the text control will gain focus.
1239         /// If some text inside the text control is selected, it will be replaced by the pasted text.
1240         /// </remarks>
1241         /// <param name="textEditor">The textEditor control into which the text is pasted.</param>
1242         /// <since_tizen> 9 </since_tizen>
1243         public static void PasteTo(TextEditor textEditor)
1244         {
1245             Interop.TextEditor.PasteText(textEditor.SwigCPtr);
1246             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1247         }
1248
1249         /// <summary>
1250         /// Paste the most recently copied/cut text item from the clipboard into the text control.
1251         /// </summary>
1252         /// <remarks>
1253         /// The pasted text will be inserted in the current cursor position and if the text control has no focus,
1254         /// the text will be appended to the last cursor position and the text control will gain focus.
1255         /// If some text inside the text control is selected, it will be replaced by the pasted text.
1256         /// </remarks>
1257         /// <param name="textField">The textField control into which the text is pasted.</param>
1258         /// <since_tizen> 9 </since_tizen>
1259         public static void PasteTo(TextField textField)
1260         {
1261             Interop.TextField.PasteText(textField.SwigCPtr);
1262             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1263         }
1264
1265     }
1266 }