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