618de4f514aab101d9914f3a37e09b241a9ecd1d
[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 Tizen.NUI.Text;
23
24 namespace Tizen.NUI.BaseComponents
25 {
26     /// <summary>
27     /// Class with the text and style parameters to be rendered into a pixel buffer.
28     /// </summary>
29     // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
30     [EditorBrowsable(EditorBrowsableState.Never)]
31     public class RendererParameters : Disposable
32     {
33         internal RendererParameters(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
34         {
35         }
36
37         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RendererParameters obj)
38         {
39             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr;
40         }
41
42         /// <summary>
43         /// Dispose
44         /// </summary>
45         protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
46         {
47             Interop.RendererParameters.DeleteRendererParameters(swigCPtr);
48         }
49
50         /// <summary>
51         /// Construct RendererParameters
52         /// </summary>
53         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
54         [EditorBrowsable(EditorBrowsableState.Never)]
55         public RendererParameters() : this(Interop.RendererParameters.NewRendererParameters(), true)
56         {
57             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
58         }
59
60         /// <summary>
61         /// The text to be rendered
62         /// </summary>
63         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
64         [EditorBrowsable(EditorBrowsableState.Never)]
65         public string Text
66         {
67             set
68             {
69                 Interop.RendererParameters.TextSet(SwigCPtr, value);
70                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
71             }
72             get
73             {
74                 string ret = Interop.RendererParameters.TextGet(SwigCPtr);
75                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
76                 return ret;
77             }
78         }
79
80         /// <summary>
81         /// The horizontal alignment: one of HorizontalAlignment.
82         /// </summary>
83         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
84         [EditorBrowsable(EditorBrowsableState.Never)]
85         public HorizontalAlignment HorizontalAlignment
86         {
87             set
88             {
89                 string alignment = "begin";
90                 switch (value)
91                 {
92                     case HorizontalAlignment.Begin:
93                         {
94                             alignment = "begin";
95                             break;
96                         }
97                     case HorizontalAlignment.Center:
98                         {
99                             alignment = "center";
100                             break;
101                         }
102                     case HorizontalAlignment.End:
103                         {
104                             alignment = "end";
105                             break;
106                         }
107                     default:
108                         {
109                             break;
110                         }
111                 }
112                 Interop.RendererParameters.HorizontalAlignmentSet(SwigCPtr, alignment);
113                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
114             }
115             get
116             {
117                 string ret = Interop.RendererParameters.HorizontalAlignmentGet(SwigCPtr);
118                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
119                 HorizontalAlignment alignment = HorizontalAlignment.Begin;
120                 switch (ret)
121                 {
122                     case "begin":
123                         {
124                             alignment = HorizontalAlignment.Begin;
125                             break;
126                         }
127                     case "center":
128                         {
129                             alignment = HorizontalAlignment.Center;
130                             break;
131                         }
132                     case "end":
133                         {
134                             alignment = HorizontalAlignment.End;
135                             break;
136                         }
137                     default:
138                         {
139                             break;
140                         }
141                 }
142                 return alignment;
143             }
144         }
145
146         /// <summary>
147         /// The vertical alignment: one of VerticalAlignment.
148         /// </summary>
149         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
150         [EditorBrowsable(EditorBrowsableState.Never)]
151         public VerticalAlignment VerticalAlignment
152         {
153             set
154             {
155                 string alignment = "top";
156                 switch (value)
157                 {
158                     case VerticalAlignment.Top:
159                         {
160                             alignment = "top";
161                             break;
162                         }
163                     case VerticalAlignment.Center:
164                         {
165                             alignment = "center";
166                             break;
167                         }
168                     case VerticalAlignment.Bottom:
169                         {
170                             alignment = "bottom";
171                             break;
172                         }
173                     default:
174                         {
175                             break;
176                         }
177                 }
178                 Interop.RendererParameters.VerticalAlignmentSet(SwigCPtr, alignment);
179                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
180             }
181             get
182             {
183                 string ret = Interop.RendererParameters.VerticalAlignmentGet(SwigCPtr);
184                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
185                 VerticalAlignment alignment = VerticalAlignment.Top;
186                 switch (ret)
187                 {
188                     case "top":
189                         {
190                             alignment = VerticalAlignment.Top;
191                             break;
192                         }
193                     case "center":
194                         {
195                             alignment = VerticalAlignment.Center;
196                             break;
197                         }
198                     case "bottom":
199                         {
200                             alignment = VerticalAlignment.Bottom;
201                             break;
202                         }
203                     default:
204                         {
205                             break;
206                         }
207                 }
208                 return alignment;
209             }
210         }
211
212         /// <summary>
213         /// The font's family.
214         /// </summary>
215         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
216         [EditorBrowsable(EditorBrowsableState.Never)]
217         public string FontFamily
218         {
219             set
220             {
221                 Interop.RendererParameters.FontFamilySet(SwigCPtr, value);
222                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
223             }
224             get
225             {
226                 string ret = Interop.RendererParameters.FontFamilyGet(SwigCPtr);
227                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
228                 return ret;
229             }
230         }
231
232         /// <summary>
233         /// The font's weight: one of {"thin", "ultraLight", "extraLight", "light", "demiLight", "semiLight", "book", "normal", "regular", "medium", "demiBold", "semiBold", "bold", "ultraBold", "extraBold", "black", "heavy", "extraBlack"}.
234         /// </summary>
235         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
236         [EditorBrowsable(EditorBrowsableState.Never)]
237         public string FontWeight
238         {
239             set
240             {
241                 Interop.RendererParameters.FontWeightSet(SwigCPtr, value);
242                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
243             }
244             get
245             {
246                 string ret = Interop.RendererParameters.FontWeightGet(SwigCPtr);
247                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
248                 return ret;
249             }
250         }
251
252         /// <summary>
253         /// The font's width: one of {"ultraCondensed", "extraCondensed", "condensed", "semiCondensed", "normal", "semiExpanded", "expanded", "extraExpanded", "ultraExpanded"}.
254         /// </summary>
255         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
256         [EditorBrowsable(EditorBrowsableState.Never)]
257         public string FontWidth
258         {
259             set
260             {
261                 Interop.RendererParameters.FontWidthSet(SwigCPtr, value);
262                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
263             }
264             get
265             {
266                 string ret = Interop.RendererParameters.FontWidthGet(SwigCPtr);
267                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
268                 return ret;
269             }
270         }
271
272         /// <summary>
273         /// The font's slant. one of {"normal", "roman", "italic", "oblique"}
274         /// </summary>
275         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
276         [EditorBrowsable(EditorBrowsableState.Never)]
277         public string FontSlant
278         {
279             set
280             {
281                 Interop.RendererParameters.FontSlantSet(SwigCPtr, value);
282                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
283             }
284             get
285             {
286                 string ret = Interop.RendererParameters.FontSlantGet(SwigCPtr);
287                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
288                 return ret;
289             }
290         }
291
292         /// <summary>
293         /// The type of layout: one of TextLayout {"singleLine", "multiLine", "circular"}
294         /// </summary>
295         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
296         [EditorBrowsable(EditorBrowsableState.Never)]
297         public TextLayout Layout
298         {
299             set
300             {
301                 string textLayout = "singleLine";
302                 switch (value)
303                 {
304                     case TextLayout.SingleLine:
305                         {
306                             textLayout = "singleLine";
307                             break;
308                         }
309                     case TextLayout.MultiLine:
310                         {
311                             textLayout = "multiLine";
312                             break;
313                         }
314                     case TextLayout.Circular:
315                         {
316                             textLayout = "circular";
317                             break;
318                         }
319                     default:
320                         {
321                             break;
322                         }
323                 }
324                 Interop.RendererParameters.LayoutSet(SwigCPtr, textLayout);
325                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
326             }
327             get
328             {
329                 string ret = Interop.RendererParameters.LayoutGet(SwigCPtr);
330                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
331                 TextLayout textLayout = TextLayout.SingleLine;
332                 switch (ret)
333                 {
334                     case "singleLine":
335                         {
336                             textLayout = TextLayout.SingleLine;
337                             break;
338                         }
339                     case "multiLine":
340                         {
341                             textLayout = TextLayout.MultiLine;
342                             break;
343                         }
344                     case "circular":
345                         {
346                             textLayout = TextLayout.Circular;
347                             break;
348                         }
349                     default:
350                         {
351                             break;
352                         }
353                 }
354                 return textLayout;
355             }
356         }
357
358         /// <summary>
359         /// 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.
360         /// </summary>
361         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
362         [EditorBrowsable(EditorBrowsableState.Never)]
363         public CircularAlignment CircularAlignment
364         {
365             set
366             {
367                 string alignment = "begin";
368                 switch (value)
369                 {
370                     case CircularAlignment.Begin:
371                         {
372                             alignment = "begin";
373                             break;
374                         }
375                     case CircularAlignment.Center:
376                         {
377                             alignment = "center";
378                             break;
379                         }
380                     case CircularAlignment.End:
381                         {
382                             alignment = "end";
383                             break;
384                         }
385                     default:
386                         {
387                             break;
388                         }
389                 }
390                 Interop.RendererParameters.CircularAlignmentSet(SwigCPtr, alignment);
391                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
392             }
393             get
394             {
395                 string ret = Interop.RendererParameters.CircularAlignmentGet(SwigCPtr);
396                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
397                 CircularAlignment alignment = CircularAlignment.Begin;
398                 switch (ret)
399                 {
400                     case "begin":
401                         {
402                             alignment = CircularAlignment.Begin;
403                             break;
404                         }
405                     case "center":
406                         {
407                             alignment = CircularAlignment.Center;
408                             break;
409                         }
410                     case "end":
411                         {
412                             alignment = CircularAlignment.End;
413                             break;
414                         }
415                     default:
416                         {
417                             break;
418                         }
419                 }
420                 return alignment;
421             }
422         }
423
424         /// <summary>
425         /// The default text's color. Default is white.
426         /// </summary>
427         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
428         [EditorBrowsable(EditorBrowsableState.Never)]
429         public Vector4 TextColor
430         {
431             set
432             {
433                 Interop.RendererParameters.TextColorSet(SwigCPtr, Vector4.getCPtr(value));
434                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
435             }
436             get
437             {
438                 Vector4 ret = new Vector4(Interop.RendererParameters.TextColorGet(SwigCPtr), true);
439                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
440                 return ret;
441             }
442         }
443
444         /// <summary>
445         /// The font's size (in points).
446         /// </summary>
447         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
448         [EditorBrowsable(EditorBrowsableState.Never)]
449         public float FontSize
450         {
451             set
452             {
453                 Interop.RendererParameters.FontSizeSet(SwigCPtr, value);
454                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
455             }
456             get
457             {
458                 float ret = Interop.RendererParameters.FontSizeGet(SwigCPtr);
459                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
460                 return ret;
461             }
462         }
463
464         /// <summary>
465         /// The width in pixels of the boundaries where the text is going to be laid-out.
466         /// </summary>
467         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
468         [EditorBrowsable(EditorBrowsableState.Never)]
469         public uint TextWidth
470         {
471             set
472             {
473                 Interop.RendererParameters.TextWidthSet(SwigCPtr, value);
474                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
475             }
476             get
477             {
478                 uint ret = Interop.RendererParameters.TextWidthGet(SwigCPtr);
479                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
480                 return ret;
481             }
482         }
483
484         /// <summary>
485         /// The height in pixels of the boundaries where the text is going to be laid-out.
486         /// </summary>
487         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
488         [EditorBrowsable(EditorBrowsableState.Never)]
489         public uint TextHeight
490         {
491             set
492             {
493                 Interop.RendererParameters.TextHeightSet(SwigCPtr, value);
494                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
495             }
496             get
497             {
498                 uint ret = Interop.RendererParameters.TextHeightGet(SwigCPtr);
499                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
500                 return ret;
501             }
502         }
503
504         /// <summary>
505         /// The radius in pixels of the circular text.
506         /// </summary>
507         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
508         [EditorBrowsable(EditorBrowsableState.Never)]
509         public uint Radius
510         {
511             set
512             {
513                 Interop.RendererParameters.RadiusSet(SwigCPtr, value);
514                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
515             }
516             get
517             {
518                 uint ret = Interop.RendererParameters.RadiusGet(SwigCPtr);
519                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
520                 return ret;
521             }
522         }
523
524         /// <summary>
525         /// 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°.
526         /// </summary>
527         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
528         [EditorBrowsable(EditorBrowsableState.Never)]
529         public float BeginAngle
530         {
531             set
532             {
533                 Interop.RendererParameters.BeginAngleSet(SwigCPtr, value);
534                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
535             }
536             get
537             {
538                 float ret = Interop.RendererParameters.BeginAngleGet(SwigCPtr);
539                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
540                 return ret;
541             }
542         }
543
544         /// <summary>
545         /// 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.
546         /// </summary>
547         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
548         [EditorBrowsable(EditorBrowsableState.Never)]
549         public float IncrementAngle
550         {
551             set
552             {
553                 Interop.RendererParameters.IncrementAngleSet(SwigCPtr, value);
554                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
555             }
556             get
557             {
558                 float ret = Interop.RendererParameters.IncrementAngleGet(SwigCPtr);
559                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
560                 return ret;
561             }
562         }
563
564         /// <summary>
565         /// Whether the ellipsis layout option is enabled.
566         /// </summary>
567         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
568         [EditorBrowsable(EditorBrowsableState.Never)]
569         public bool EllipsisEnabled
570         {
571             set
572             {
573                 Interop.RendererParameters.EllipsisEnabledSet(SwigCPtr, value);
574                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
575             }
576             get
577             {
578                 bool ret = Interop.RendererParameters.EllipsisEnabledGet(SwigCPtr);
579                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
580                 return ret;
581             }
582         }
583
584         /// <summary>
585         /// Whether the mark-up processor is enabled.
586         /// </summary>
587         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
588         [EditorBrowsable(EditorBrowsableState.Never)]
589         public bool MarkupEnabled
590         {
591             set
592             {
593                 Interop.RendererParameters.MarkupEnabledSet(SwigCPtr, value);
594                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
595             }
596             get
597             {
598                 bool ret = Interop.RendererParameters.MarkupEnabledGet(SwigCPtr);
599                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
600                 return ret;
601             }
602         }
603
604         /// <summary>
605         /// Whether a default color has been set.
606         /// </summary>
607         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
608         [EditorBrowsable(EditorBrowsableState.Never)]
609         public bool IsTextColorSet
610         {
611             set
612             {
613                 Interop.RendererParameters.IsTextColorSetSet(SwigCPtr, value);
614                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
615             }
616             get
617             {
618                 bool ret = Interop.RendererParameters.IsTextColorSetGet(SwigCPtr);
619                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
620                 return ret;
621             }
622         }
623
624         /// <summary>
625         /// Minimum size of line.
626         /// </summary>
627         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
628         [EditorBrowsable(EditorBrowsableState.Never)]
629         public float MinLineSize
630         {
631             set
632             {
633                 Interop.RendererParameters.MinLineSizeSet(SwigCPtr, value);
634                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
635             }
636             get
637             {
638                 float ret = Interop.RendererParameters.MinLineSizeGet(SwigCPtr);
639                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
640                 return ret;
641             }
642         }
643
644         /// <summary>
645         /// Padding of TextLabel.
646         /// </summary>
647         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
648         [EditorBrowsable(EditorBrowsableState.Never)]
649         public Extents Padding
650         {
651             set
652             {
653                 Interop.RendererParameters.PaddingSet(SwigCPtr, Extents.getCPtr(value));
654                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
655             }
656             get
657             {
658                 Extents ret = new Extents(Interop.RendererParameters.PaddingGet(SwigCPtr), true);
659                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
660                 return ret;
661             }
662         }
663
664     }
665
666     /// <summary>
667     /// Class with info of the embedded items layout.
668     /// </summary>
669     // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
670     [EditorBrowsable(EditorBrowsableState.Never)]
671     public class EmbeddedItemInfo : Disposable
672     {
673
674         internal EmbeddedItemInfo(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
675         {
676         }
677
678         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(EmbeddedItemInfo obj)
679         {
680             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr;
681         }
682
683         /// <summary>
684         /// Dispose
685         /// </summary>
686         protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
687         {
688             Interop.EmbeddedItemInfo.DeleteEmbeddedItemInfo(swigCPtr);
689         }
690
691         /// <summary>
692         /// Construct EmbeddedItemInfo
693         /// </summary>
694         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
695         [EditorBrowsable(EditorBrowsableState.Never)]
696         public EmbeddedItemInfo() : this(Interop.EmbeddedItemInfo.NewEmbeddedItemInfo(), true)
697         {
698             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
699         }
700
701         /// <summary>
702         /// Index to the character within the string.
703         /// </summary>
704         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
705         [EditorBrowsable(EditorBrowsableState.Never)]
706         public uint CharacterIndex
707         {
708             set
709             {
710                 Interop.EmbeddedItemInfo.CharacterIndexSet(SwigCPtr, value);
711                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
712             }
713             get
714             {
715                 uint ret = Interop.EmbeddedItemInfo.CharacterIndexGet(SwigCPtr);
716                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
717                 return ret;
718             }
719         }
720
721         /// <summary>
722         /// Index to the glyph
723         /// </summary>
724         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
725         [EditorBrowsable(EditorBrowsableState.Never)]
726         public uint GlyphIndex
727         {
728             set
729             {
730                 Interop.EmbeddedItemInfo.GlyphIndexSet(SwigCPtr, value);
731                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
732             }
733             get
734             {
735                 uint ret = Interop.EmbeddedItemInfo.GlyphIndexGet(SwigCPtr);
736                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
737                 return ret;
738             }
739         }
740
741         /// <summary>
742         /// The layout position within the buffer (top, left corner).
743         /// </summary>
744         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
745         [EditorBrowsable(EditorBrowsableState.Never)]
746         public Vector2 Position
747         {
748             set
749             {
750                 Interop.EmbeddedItemInfo.PositionSet(SwigCPtr, Vector2.getCPtr(value));
751                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
752             }
753             get
754             {
755                 Vector2 ret = new Vector2(Interop.EmbeddedItemInfo.PositionGet(SwigCPtr), SwigCMemOwn);
756                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
757                 return ret;
758             }
759         }
760
761         /// <summary>
762         /// The size within the buffer of the embedded item.
763         /// </summary>
764         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
765         [EditorBrowsable(EditorBrowsableState.Never)]
766         public Size Size
767         {
768             set
769             {
770                 Interop.EmbeddedItemInfo.SizeSet(SwigCPtr, Size.getCPtr(value));
771                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
772             }
773             get
774             {
775                 Size ret = new Size(Interop.EmbeddedItemInfo.SizeGet(SwigCPtr), SwigCMemOwn);
776                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
777                 return ret;
778             }
779         }
780
781         /// <summary>
782         /// The rotated size within the buffer of the embedded item.
783         /// </summary>
784         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
785         [EditorBrowsable(EditorBrowsableState.Never)]
786         public Size RotatedSize
787         {
788             set
789             {
790                 Interop.EmbeddedItemInfo.RotatedSizeSet(SwigCPtr, Size.getCPtr(value));
791                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
792             }
793             get
794             {
795                 Size ret = new Size(Interop.EmbeddedItemInfo.RotatedSizeGet(SwigCPtr), SwigCMemOwn);
796                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
797                 return ret;
798             }
799         }
800
801         /// <summary>
802         /// Rotation angle of the pixel buffer in degrees.
803         /// </summary>
804         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
805         [EditorBrowsable(EditorBrowsableState.Never)]
806         public Degree Angle
807         {
808             set
809             {
810                 Interop.EmbeddedItemInfo.AngleSet(SwigCPtr, Degree.getCPtr(value));
811                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
812             }
813             get
814             {
815                 Degree ret = new Degree(Interop.EmbeddedItemInfo.AngleGet(SwigCPtr), SwigCMemOwn);
816                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
817                 return ret;
818             }
819         }
820
821         /// <summary>
822         /// Whether the color of the image is multiplied by the color of the text.
823         /// </summary>
824         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
825         [EditorBrowsable(EditorBrowsableState.Never)]
826         public Tizen.NUI.ColorBlendingMode ColorBlendingMode
827         {
828             set
829             {
830                 Interop.EmbeddedItemInfo.ColorBlendingModeSet(SwigCPtr, value);
831                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
832             }
833             get
834             {
835                 Tizen.NUI.ColorBlendingMode ret = Interop.EmbeddedItemInfo.ColorBlendingModeGet(SwigCPtr);
836                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
837                 return ret;
838             }
839         }
840     }
841
842     /// <summary>
843     /// Class with the parameters needed to build a shadow for the given pixel buffer.
844     /// </summary>
845     // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
846     [EditorBrowsable(EditorBrowsableState.Never)]
847     public class ShadowParameters : Disposable
848     {
849
850         internal ShadowParameters(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
851         {
852         }
853
854         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ShadowParameters obj)
855         {
856             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr;
857         }
858
859         /// <summary>
860         /// Dispose
861         /// </summary>
862         protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
863         {
864             Interop.ShadowParameters.DeleteShadowParameters(swigCPtr);
865         }
866
867         /// <summary>
868         /// Construct ShadowParameters
869         /// </summary>
870         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
871         [EditorBrowsable(EditorBrowsableState.Never)]
872         public ShadowParameters() : this(Interop.ShadowParameters.NewShadowParameters(), true)
873         {
874             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
875         }
876
877         /// <summary>
878         /// The input pixel buffer used to create the shadow.
879         /// </summary>
880         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
881         [EditorBrowsable(EditorBrowsableState.Never)]
882         public PixelBuffer Input
883         {
884             set
885             {
886                 Interop.ShadowParameters.InputSet(SwigCPtr, PixelBuffer.getCPtr(value));
887                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
888             }
889             get
890             {
891                 PixelBuffer ret = new PixelBuffer(Interop.ShadowParameters.InputGet(SwigCPtr), true);
892                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
893                 return ret;
894             }
895         }
896
897         /// <summary>
898         /// The color of the text.
899         /// </summary>
900         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
901         [EditorBrowsable(EditorBrowsableState.Never)]
902         public Vector4 TextColor
903         {
904             set
905             {
906                 Interop.ShadowParameters.TextColorSet(SwigCPtr, Vector4.getCPtr(value));
907                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
908             }
909             get
910             {
911                 Vector4 ret = new Vector4(Interop.ShadowParameters.TextColorGet(SwigCPtr), true);
912                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
913                 return ret;
914             }
915         }
916
917         /// <summary>
918         /// The color of the shadow.
919         /// </summary>
920         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
921         [EditorBrowsable(EditorBrowsableState.Never)]
922         public Vector4 Color
923         {
924             set
925             {
926                 Interop.ShadowParameters.ColorSet(SwigCPtr, Vector4.getCPtr(value));
927                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
928             }
929             get
930             {
931                 Vector4 ret = new Vector4(Interop.ShadowParameters.ColorGet(SwigCPtr), true);
932                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
933                 return ret;
934             }
935         }
936
937         /// <summary>
938         /// The offset of the shadow.
939         /// </summary>
940         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
941         [EditorBrowsable(EditorBrowsableState.Never)]
942         public Vector2 Offset
943         {
944             set
945             {
946                 Interop.ShadowParameters.OffsetSet(SwigCPtr, Vector2.getCPtr(value));
947                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
948             }
949             get
950             {
951                 Vector2 ret = new Vector2(Interop.ShadowParameters.OffsetGet(SwigCPtr), true);
952                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
953                 return ret;
954             }
955         }
956
957         /// <summary>
958         /// Whether to blend the shadow.
959         /// </summary>
960         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
961         [EditorBrowsable(EditorBrowsableState.Never)]
962         public bool blendShadow
963         {
964             set
965             {
966                 Interop.ShadowParameters.BlendShadowSet(SwigCPtr, value);
967                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
968             }
969             get
970             {
971                 bool ret = Interop.ShadowParameters.BlendShadowGet(SwigCPtr);
972                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
973                 return ret;
974             }
975         }
976     }
977
978     /// <summary>
979     /// </summary>
980     // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
981     [EditorBrowsable(EditorBrowsableState.Never)]
982     public static partial class TextUtils
983     {
984         /// <summary>
985         /// Renders text into a pixel buffer.
986         /// @note: Can process a mark-up string.
987         /// @note: It does the font selection, RTL reordering, shaping and layouting.
988         /// @note: The width of the pixel buffer may be different to the given @e textWidth
989         ///        due to some padding pixels added.
990         ///
991         ///  The text is laid-out for the given size @e (textWidth,textHeight).
992         ///  If the @e multiLineEnabled option is enabled, the text will wrap in lines.
993         ///  If the @e ellipsisEnabled option is enabled, the text will be ellided if
994         ///  there is no more space for new lines.
995         ///
996         ///  It won't be rendered the parts of the text exceeding the boundaries of
997         ///  the given width and height.
998         ///
999         ///  If the given @e textHeight is zero, a big enough pixel buffer will be created
1000         ///  to render the full text.
1001         ///
1002         ///  If the given @e textWidth is zero, the 'natural size' of the text will be
1003         ///  used to create the pixel buffer to render the full text.
1004         ///
1005         ///  If the radius is not zero, the text will be laid-out following a circular path.
1006         ///  In that case the text is laid-out in a single line.
1007         ///
1008         /// If the mark-up string contains embedded items, the @p embeddedItemLayout vector
1009         /// contains the layout info of each embedded item.
1010         /// </summary>
1011         /// <param name="textParameters">The text and style options.</param>
1012         /// <param name="embeddedItemLayout">The layout info of the embedded items</param>
1013         /// <returns>A pixel buffer with the text rendered on it.</returns>
1014         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
1015         [EditorBrowsable(EditorBrowsableState.Never)]
1016         public static PixelBuffer Render(RendererParameters textParameters, ref EmbeddedItemInfo[] embeddedItemLayout)
1017         {
1018             int count = 0;
1019             int length = 0;
1020             global::System.IntPtr returnItem = IntPtr.Zero;
1021             PixelBuffer ret = new PixelBuffer(Interop.TextUtils.Render(RendererParameters.getCPtr(textParameters), ref returnItem, ref count, ref length), true);
1022
1023             embeddedItemLayout = new EmbeddedItemInfo[count];
1024             for (int i = 0; i < count; i++)
1025             {
1026                 IntPtr p = new IntPtr((returnItem.ToInt32() + i * length));
1027                 embeddedItemLayout[i] = new EmbeddedItemInfo(p, false);
1028             }
1029             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1030             return ret;
1031         }
1032
1033         /// <summary>
1034         /// Creates a shadow for the text given in the input pixel buffer.
1035         /// The function returns a RGBA8888 pixel buffer with the text and its shadow rendered on it.
1036         ///
1037         /// The pixel format of the @e input pixel buffer could be an A8 or an RGBA8888. If it's
1038         /// an A8 pixel buffer, it uses the given @e textColor to give color to the text. Otherwise
1039         /// it uses the color of the @e input pixel buffer.
1040         /// </summary>
1041         /// <param name="shadowParameters">The parameters needed to create the text's shadow.</param>
1042         /// <returns>A pixel buffer with the text and the shadow rendered on it.</returns>
1043         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
1044         [EditorBrowsable(EditorBrowsableState.Never)]
1045         public static PixelBuffer CreateShadow(ShadowParameters shadowParameters)
1046         {
1047             PixelBuffer ret = new PixelBuffer(Interop.TextUtils.CreateShadow(ShadowParameters.getCPtr(shadowParameters)), true);
1048             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1049             return ret;
1050         }
1051
1052         /// <summary>
1053         /// Converts a @p pixelBuffer with pixel format A8 to RGBA8888 using the given @p color.
1054         /// @note Does nothing if the @p pixelBuffer is not A8.
1055         /// </summary>
1056         /// <param name="pixelBuffer">The pixel buffer with pixel format A8</param>
1057         /// <param name="color">The color used to convert to RGBA8888</param>
1058         /// <param name="multiplyByAlpha">multiplyByAlpha Whether to multiply the @p color with the alpha value of the @p pixel @p buffer.</param>
1059         /// <returns>The pixel buffer converted to RGBA8888.</returns>
1060         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
1061         [EditorBrowsable(EditorBrowsableState.Never)]
1062         public static PixelBuffer ConvertToRgba8888(PixelBuffer pixelBuffer, Vector4 color, bool multiplyByAlpha)
1063         {
1064             PixelBuffer ret = new PixelBuffer(Interop.TextUtils.ConvertToRgba8888(PixelBuffer.getCPtr(pixelBuffer), Vector4.getCPtr(color), multiplyByAlpha), true);
1065             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1066             return ret;
1067         }
1068
1069         /// <summary>
1070         /// Updates the @p dst pixel buffer with the data from @p src pixel buffer.
1071         /// @note Both pixel buffers must have the same pixel format. Does nothing if both pixel format are different.
1072         /// @note The function does nothing if the @p src pixel buffer doesn't fit into the @p dst pixel buffer.
1073         ///
1074         /// The @p src pixel buffer could be blended with the @p dst pixel buffer if @p blend is set to @e true.
1075         /// </summary>
1076         /// <param name="src">The pixel buffer from where the data is read.</param>
1077         /// <param name="dst">The pixel buffer where the data is written.</param>
1078         /// <param name="x">The top left corner's X within the destination pixel buffer.</param>
1079         /// <param name="y">The top left corner's y within the destination pixel buffer.</param>
1080         /// <param name="blend">Whether to blend the source pixel buffer with the destination pixel buffer as background.</param>
1081         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
1082         [EditorBrowsable(EditorBrowsableState.Never)]
1083         public static void UpdateBuffer(PixelBuffer src, PixelBuffer dst, uint x, uint y, bool blend)
1084         {
1085             Interop.TextUtils.UpdateBuffer(PixelBuffer.getCPtr(src), PixelBuffer.getCPtr(dst), x, y, blend);
1086             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1087         }
1088
1089         /// <summary>
1090         /// Splits the text in pages of the size given in @p textParameters
1091         /// @note The returned indices are indices to utf32 characters. The input text is encoded in utf8.
1092         /// <returns> An array with the indices of the last character of each page </returns>
1093         /// </summary>
1094         [EditorBrowsable(EditorBrowsableState.Never)]
1095         public static Tizen.NUI.PropertyArray GetLastCharacterIndex(RendererParameters textParameters)
1096         {
1097             Tizen.NUI.PropertyArray ret = new Tizen.NUI.PropertyArray(Interop.TextUtils.GetLastCharacterIndex(RendererParameters.getCPtr(textParameters)), true);
1098             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1099             return ret;
1100         }
1101
1102 #if PROFILE_TV
1103         private const float FontSizeScaleSmall = 0.8f;
1104         private const float FontSizeScaleNormal = 1.0f;
1105         private const float FontSizeScaleLarge = 1.5f;
1106         private const float FontSizeScaleHuge = 1.9f;
1107         private const float FontSizeScaleGiant = 2.5f;
1108 #elif PROFILE_WEARABLE
1109         // The following values from 'system-settings/libutil/sstu.c'
1110         private const float FontSizeScaleSmall = 0.9f;
1111         private const float FontSizeScaleNormal = 1.0f;
1112         private const float FontSizeScaleLarge = 1.1f;
1113         private const float FontSizeScaleHuge = 1.9f;
1114         private const float FontSizeScaleGiant = 2.5f;
1115 #else   // PROFILE_MOBILE and etc
1116         // The following values from 'system-settings/libutil/sstu.c'
1117         private const float FontSizeScaleSmall = 0.8f;
1118         private const float FontSizeScaleNormal = 1.0f;
1119         private const float FontSizeScaleLarge = 1.5f;
1120         private const float FontSizeScaleHuge = 1.9f;
1121         private const float FontSizeScaleGiant = 2.5f;
1122 #endif
1123
1124         /// <summary>
1125         /// It returns a float value according to SystemSettingsFontSize.
1126         /// The returned value can be used for FontSizeScale property.
1127         /// <param name="systemSettingsFontSize">The SystemSettingsFontSize enum value.</param>
1128         /// <returns> A float value for FontSizeScale property. </returns>
1129         /// </summary>
1130         [EditorBrowsable(EditorBrowsableState.Never)]
1131         public static float GetFontSizeScale(SystemSettingsFontSize systemSettingsFontSize)
1132         {
1133             float ret = FontSizeScaleNormal;
1134
1135             switch (systemSettingsFontSize)
1136             {
1137                 case SystemSettingsFontSize.Small:
1138                     ret = FontSizeScaleSmall;
1139                     break;
1140                 case SystemSettingsFontSize.Normal:
1141                     ret = FontSizeScaleNormal;
1142                     break;
1143                 case SystemSettingsFontSize.Large:
1144                     ret = FontSizeScaleLarge;
1145                     break;
1146                 case SystemSettingsFontSize.Huge:
1147                     ret = FontSizeScaleHuge;
1148                     break;
1149                 case SystemSettingsFontSize.Giant:
1150                     ret = FontSizeScaleGiant;
1151                     break;
1152             }
1153
1154             return ret;
1155         }
1156
1157         /// <summary>
1158         /// It returns a string value according to FontWidthType.
1159         /// The returned value can be used for FontStyle PropertyMap.
1160         /// <param name="fontWidthType">The FontWidthType enum value.</param>
1161         /// <returns> A string value for FontStyle.Width property. </returns>
1162         /// </summary>
1163         [EditorBrowsable(EditorBrowsableState.Never)]
1164         public static string GetFontWidthString(FontWidthType fontWidthType)
1165         {
1166             string value = fontWidthType.ToString();
1167             if (!string.IsNullOrEmpty(value))
1168             {
1169                 char[] charArray = value.ToCharArray();
1170                 charArray[0] = Char.ToLower(charArray[0]);
1171                 value = new string(charArray);
1172             }
1173             else
1174             {
1175                 value = "none"; // The default value.
1176             }
1177
1178             return value;
1179         }
1180
1181         /// <summary>
1182         /// It returns a string value according to FontWeightType.
1183         /// The returned value can be used for FontStyle PropertyMap.
1184         /// <param name="fontWeightType">The FontWeightType enum value.</param>
1185         /// <returns> A string value for FontStyle.Weight property. </returns>
1186         /// </summary>
1187         [EditorBrowsable(EditorBrowsableState.Never)]
1188         public static string GetFontWeightString(FontWeightType fontWeightType)
1189         {
1190             string value = fontWeightType.ToString();
1191             if (!string.IsNullOrEmpty(value))
1192             {
1193                 char[] charArray = value.ToCharArray();
1194                 charArray[0] = Char.ToLower(charArray[0]);
1195                 value = new string(charArray);
1196             }
1197             else
1198             {
1199                 value = "none"; // The default value.
1200             }
1201
1202             return value;
1203         }
1204
1205         /// <summary>
1206         /// It returns a string value according to FontSlantType.
1207         /// The returned value can be used for FontStyle PropertyMap.
1208         /// <param name="fontSlantType">The FontSlantType enum value.</param>
1209         /// <returns> A string value for FontStyle.Slant property. </returns>
1210         /// </summary>
1211         [EditorBrowsable(EditorBrowsableState.Never)]
1212         public static string GetFontSlantString(FontSlantType fontSlantType)
1213         {
1214             string value = fontSlantType.ToString();
1215             if (!string.IsNullOrEmpty(value))
1216             {
1217                 char[] charArray = value.ToCharArray();
1218                 charArray[0] = Char.ToLower(charArray[0]);
1219                 value = new string(charArray);
1220             }
1221             else
1222             {
1223                 value = "none"; // The default value.
1224             }
1225
1226             return value;
1227         }
1228
1229         /// <summary>
1230         /// It returns a FontWidthType value according to fontWidthString.
1231         /// The returned value can be used for FontStyle PropertyMap.
1232         /// <param name="fontWidthString">The FontWidth string value.</param>
1233         /// <returns> A FontWidthType value for FontStyle.Width property. </returns>
1234         /// </summary>
1235         [EditorBrowsable(EditorBrowsableState.Never)]
1236         public static FontWidthType GetFontWidthType(string fontWidthString)
1237         {
1238             FontWidthType value;
1239
1240             if (!(Enum.TryParse(fontWidthString, true, out value) && Enum.IsDefined(typeof(FontWidthType), value)))
1241             {
1242                 value = FontWidthType.None; // If parsing fails, set a default value.
1243             }
1244
1245             return value;
1246         }
1247
1248         /// <summary>
1249         /// It returns a FontWeightType value according to fontWeightString.
1250         /// The returned value can be used for FontStyle PropertyMap.
1251         /// <param name="fontWeightString">The FontWeight string value.</param>
1252         /// <returns> A FontWeightType value for FontStyle.Weight property. </returns>
1253         /// </summary>
1254         [EditorBrowsable(EditorBrowsableState.Never)]
1255         public static FontWeightType GetFontWeightType(string fontWeightString)
1256         {
1257             FontWeightType value;
1258
1259             if (!(Enum.TryParse(fontWeightString, true, out value) && Enum.IsDefined(typeof(FontWeightType), value)))
1260             {
1261                 value = FontWeightType.None; // If parsing fails, set a default value.
1262             }
1263
1264             return value;
1265         }
1266
1267         /// <summary>
1268         /// It returns a FontSlantType value according to fontSlantString.
1269         /// The returned value can be used for FontStyle PropertyMap.
1270         /// <param name="fontSlantString">The FontSlant string value.</param>
1271         /// <returns> A FontSlantType value for FontStyle.Slant property. </returns>
1272         /// </summary>
1273         [EditorBrowsable(EditorBrowsableState.Never)]
1274         public static FontSlantType GetFontSlantType(string fontSlantString)
1275         {
1276             FontSlantType value;
1277
1278             if (!(Enum.TryParse(fontSlantString, true, out value) && Enum.IsDefined(typeof(FontSlantType), value)))
1279             {
1280                 value = FontSlantType.None; // If parsing fails, set a default value.
1281             }
1282
1283             return value;
1284         }
1285
1286         /// <summary>
1287         /// This method converts a FontStyle struct to a PropertyMap and returns it.
1288         /// The returned map can be used for set FontStyle PropertyMap in the SetFontStyle method.
1289         /// <param name="fontStyle">The FontStyle struct value.</param>
1290         /// <returns> A PropertyMap for FontStyle property. </returns>
1291         /// </summary>
1292         [EditorBrowsable(EditorBrowsableState.Never)]
1293         public static PropertyMap GetFontStyleMap(FontStyle fontStyle)
1294         {
1295             var map = new PropertyMap();
1296             var width = new PropertyValue(GetFontWidthString(fontStyle.Width));
1297             var weight = new PropertyValue(GetFontWeightString(fontStyle.Weight));
1298             var slant = new PropertyValue(GetFontSlantString(fontStyle.Slant));
1299
1300             map.Add("width", width);
1301             map.Add("weight", weight);
1302             map.Add("slant", slant);
1303
1304             return map;
1305         }
1306
1307         /// <summary>
1308         /// This method converts a FontStyle map to a struct and returns it.
1309         /// The returned struct can be returned to the user as a FontStyle in the GetFontStyle method.
1310         /// <param name="map">The FontStyle PropertyMap.</param>
1311         /// <returns> A FontStyle struct. </returns>
1312         /// </summary>
1313         [EditorBrowsable(EditorBrowsableState.Never)]
1314         public static FontStyle GetFontStyleStruct(PropertyMap map)
1315         {
1316             string width = "none";
1317             string weight = "none";
1318             string slant = "none";
1319             map.Find(0, "width")?.Get(out width);
1320             map.Find(0, "weight")?.Get(out weight);
1321             map.Find(0, "slant")?.Get(out slant);
1322
1323             var fontStyle = new FontStyle();
1324             fontStyle.Width = GetFontWidthType(width);
1325             fontStyle.Weight = GetFontWeightType(weight);
1326             fontStyle.Slant = GetFontSlantType(slant);
1327
1328             return fontStyle;
1329         }
1330
1331         /// <summary>
1332         /// This method converts a InputFilter struct to a PropertyMap and returns it. <br />
1333         /// The returned map can be used for set InputFilter PropertyMap in the SetInputFilter method. <br />
1334         /// <param name="inputFilter">The InputFilter struct value.</param>
1335         /// <returns> A PropertyMap for InputFilter property. </returns>
1336         /// </summary>
1337         [EditorBrowsable(EditorBrowsableState.Never)]
1338         public static PropertyMap GetInputFilterMap(InputFilter inputFilter)
1339         {
1340             var map = new PropertyMap();
1341             var accepted = inputFilter.Accepted != null ? new PropertyValue(inputFilter.Accepted) : new PropertyValue("");
1342             var rejected = inputFilter.Rejected != null ? new PropertyValue(inputFilter.Rejected) : new PropertyValue("");
1343             map.Add(0, accepted);
1344             map.Add(1, rejected);
1345
1346             return map;
1347         }
1348
1349         /// <summary>
1350         /// This method converts a InputFilter map to a struct and returns it. <br />
1351         /// The returned struct can be returned to the user as a InputFilter in the GetInputFilter method. <br />
1352         /// <param name="map">The InputFilter PropertyMap.</param>
1353         /// <returns> A InputFilter struct. </returns>
1354         /// </summary>
1355         [EditorBrowsable(EditorBrowsableState.Never)]
1356         public static InputFilter GetInputFilterStruct(PropertyMap map)
1357         {
1358             string accepted = "";
1359             string rejected = "";
1360             map.Find(0)?.Get(out accepted);
1361             map.Find(1)?.Get(out rejected);
1362
1363             var inputFilter = new InputFilter();
1364             inputFilter.Accepted = accepted;
1365             inputFilter.Rejected = rejected;
1366
1367             return inputFilter;
1368
1369         }
1370
1371         /// <summary>
1372         /// This method converts a Underline struct to a PropertyMap and returns it.
1373         /// The returned map can be used for set Underline PropertyMap in the SetUnderline method.
1374         /// <param name="underline">The Underline struct value.</param>
1375         /// <returns> A PropertyMap for Underline property. </returns>
1376         /// </summary>
1377         [EditorBrowsable(EditorBrowsableState.Never)]
1378         public static PropertyMap GetUnderlineMap(Underline underline)
1379         {
1380             var map = new PropertyMap();
1381
1382             map.Add("enable", new PropertyValue(underline.Enable));
1383
1384             if (underline.Color != null)
1385                 map.Add("color", new PropertyValue(underline.Color));
1386
1387             if (underline.Height != null)
1388                 map.Add("height", new PropertyValue((float)underline.Height));
1389
1390             return map;
1391         }
1392
1393         /// <summary>
1394         /// This method converts a Underline map to a struct and returns it.
1395         /// The returned struct can be returned to the user as a Underline in the GetUnderline method.
1396         /// <param name="map">The Underline PropertyMap.</param>
1397         /// <returns> A Underline struct. </returns>
1398         /// </summary>
1399         [EditorBrowsable(EditorBrowsableState.Never)]
1400         public static Underline GetUnderlineStruct(PropertyMap map)
1401         {
1402             Color color = new Color();
1403             map.Find(0, "enable").Get(out bool enable);
1404             map.Find(0, "color").Get(color);
1405             map.Find(0, "height").Get(out float height);
1406
1407             var underline = new Underline();
1408             underline.Enable = enable;
1409             underline.Color = color;
1410             underline.Height = height;
1411
1412             return underline;
1413         }
1414
1415         /// <summary>
1416         /// This method converts a Shadow struct to a PropertyMap and returns it.
1417         /// The returned map can be used for set Shadow PropertyMap in the SetShadow method.
1418         /// <param name="shadow">The Shadow struct value.</param>
1419         /// <returns> A PropertyMap for Shadow property. </returns>
1420         /// </summary>
1421         [EditorBrowsable(EditorBrowsableState.Never)]
1422         public static PropertyMap GetShadowMap(Tizen.NUI.Text.Shadow shadow)
1423         {
1424             var map = new PropertyMap();
1425
1426             if (shadow.Offset != null)
1427                 map.Add("offset", new PropertyValue(shadow.Offset));
1428
1429             if (shadow.Color != null)
1430                 map.Add("color", new PropertyValue(shadow.Color));
1431
1432             if (shadow.BlurRadius != null)
1433                 map.Add("blurRadius", new PropertyValue((float)shadow.BlurRadius));
1434
1435             return map;
1436         }
1437
1438         /// <summary>
1439         /// This method converts a Shadow map to a struct and returns it.
1440         /// The returned struct can be returned to the user as a Shadow in the GetShadow method.
1441         /// <param name="map">The Shadow PropertyMap.</param>
1442         /// <returns> A Shadow struct. </returns>
1443         /// </summary>
1444         [EditorBrowsable(EditorBrowsableState.Never)]
1445         public static Tizen.NUI.Text.Shadow GetShadowStruct(PropertyMap map)
1446         {
1447             Vector2 offset = new Vector2();
1448             Color color = new Color();
1449             map.Find(0, "offset").Get(offset);
1450             map.Find(0, "color").Get(color);
1451             map.Find(0, "blurRadius").Get(out float blurRadius);
1452
1453             var shadow = new Tizen.NUI.Text.Shadow();
1454             shadow.Offset = offset;
1455             shadow.Color = color;
1456             shadow.BlurRadius = blurRadius;
1457
1458             return shadow;
1459         }
1460
1461         /// <summary>
1462         /// This method converts a Outline struct to a PropertyMap and returns it.
1463         /// The returned map can be used for set Outline PropertyMap in the SetOutline method.
1464         /// <param name="outline">The Outline struct value.</param>
1465         /// <returns> A PropertyMap for Outline property. </returns>
1466         /// </summary>
1467         [EditorBrowsable(EditorBrowsableState.Never)]
1468         public static PropertyMap GetOutlineMap(Outline outline)
1469         {
1470             var map = new PropertyMap();
1471
1472             if (outline.Color != null)
1473                 map.Add("color", new PropertyValue(outline.Color));
1474
1475             if (outline.Width != null)
1476                 map.Add("width", new PropertyValue((float)outline.Width));
1477
1478             return map;
1479         }
1480
1481         /// <summary>
1482         /// This method converts a Outline map to a struct and returns it.
1483         /// The returned struct can be returned to the user as a Outline in the GetOutline method.
1484         /// <param name="map">The Outline PropertyMap.</param>
1485         /// <returns> A Outline struct. </returns>
1486         /// </summary>
1487         [EditorBrowsable(EditorBrowsableState.Never)]
1488         public static Outline GetOutlineStruct(PropertyMap map)
1489         {
1490             Color color = new Color();
1491             map.Find(0, "color").Get(color);
1492             map.Find(0, "width").Get(out float width);
1493
1494             var outline = new Outline();
1495             outline.Color = color;
1496             outline.Width = width;
1497
1498             return outline;
1499         }
1500
1501         /// <summary>
1502         /// It returns a string value according to FontSizeType.
1503         /// The returned value can be used for TextFit PropertyMap.
1504         /// <param name="fontSizeType">The FontSizeType enum value.</param>
1505         /// <returns> A string value for TextFit.FontSizeType property. </returns>
1506         /// </summary>
1507         [EditorBrowsable(EditorBrowsableState.Never)]
1508         public static string GetFontSizeString(FontSizeType fontSizeType)
1509         {
1510             string value = fontSizeType.ToString();
1511             if (!string.IsNullOrEmpty(value))
1512             {
1513                 char[] charArray = value.ToCharArray();
1514                 charArray[0] = Char.ToLower(charArray[0]);
1515                 value = new string(charArray);
1516             }
1517             else
1518             {
1519                 value = "pointSize"; // The default value.
1520             }
1521
1522             return value;
1523         }
1524
1525         /// <summary>
1526         /// It returns a FontSizeType value according to fontSizeString.
1527         /// The returned value can be used for FontStyle PropertyMap.
1528         /// <param name="fontSizeString">The FontSizeType string value.</param>
1529         /// <returns> A FontSizeType value for TextFit.FontSizeType property. </returns>
1530         /// </summary>
1531         [EditorBrowsable(EditorBrowsableState.Never)]
1532         public static FontSizeType GetFontSizeType(string fontSizeString)
1533         {
1534             FontSizeType value;
1535
1536             if (!(Enum.TryParse(fontSizeString, true, out value) && Enum.IsDefined(typeof(FontSizeType), value)))
1537             {
1538                 value = FontSizeType.PointSize; // If parsing fails, set a default value.
1539             }
1540
1541             return value;
1542         }
1543
1544         /// <summary>
1545         /// This method converts a TextFit struct to a PropertyMap and returns it.
1546         /// The returned map can be used for set TextFit PropertyMap in the SetTextFit method.
1547         /// <param name="textFit">The TextFit struct value.</param>
1548         /// <returns> A PropertyMap for TextFit property. </returns>
1549         /// </summary>
1550         [EditorBrowsable(EditorBrowsableState.Never)]
1551         public static PropertyMap GetTextFitMap(TextFit textFit)
1552         {
1553             var map = new PropertyMap();
1554             map.Add("enable", new PropertyValue(textFit.Enable));
1555             map.Add("fontSizeType", new PropertyValue(GetFontSizeString(textFit.FontSizeType)));
1556
1557             if (textFit.MinSize != null)
1558                 map.Add("minSize", new PropertyValue((float)textFit.MinSize));
1559
1560             if (textFit.MaxSize != null)
1561                 map.Add("maxSize", new PropertyValue((float)textFit.MaxSize));
1562
1563             if (textFit.StepSize != null)
1564                 map.Add("stepSize", new PropertyValue((float)textFit.StepSize));
1565
1566             return map;
1567         }
1568
1569         /// <summary>
1570         /// This method converts a TextFit map to a struct and returns it.
1571         /// The returned struct can be returned to the user as a TextFit in the GetTextFit method.
1572         /// <param name="map">The TextFit PropertyMap.</param>
1573         /// <returns> A TextFit struct. </returns>
1574         /// </summary>
1575         [EditorBrowsable(EditorBrowsableState.Never)]
1576         public static TextFit GetTextFitStruct(PropertyMap map)
1577         {
1578             map.Find(0, "enable").Get(out bool enable);
1579             map.Find(0, "minSize").Get(out float minSize);
1580             map.Find(0, "maxSize").Get(out float maxSize);
1581             map.Find(0, "stepSize").Get(out float stepSize);
1582             map.Find(0, "fontSizeType").Get(out string fontSizeType);
1583
1584             var textFit = new TextFit();
1585             textFit.Enable = enable;
1586             textFit.MinSize = minSize;
1587             textFit.MaxSize = maxSize;
1588             textFit.StepSize = stepSize;
1589             textFit.FontSizeType = GetFontSizeType(fontSizeType);
1590
1591             return textFit;
1592         }
1593
1594         /// <summary>
1595         /// This method converts a Placeholder struct to a PropertyMap and returns it.
1596         /// The returned map can be used for set Placeholder PropertyMap in the SetPlaceholder method.
1597         /// <param name="placeholder">The Placeholder struct value.</param>
1598         /// <returns> A PropertyMap for Placeholder property. </returns>
1599         /// </summary>
1600         [EditorBrowsable(EditorBrowsableState.Never)]
1601         public static PropertyMap GetPlaceholderMap(Placeholder placeholder)
1602         {
1603             var map = new PropertyMap();
1604
1605             if (placeholder.Text != null)
1606                 map.Add("text", new PropertyValue(placeholder.Text));
1607
1608             if (placeholder.TextFocused != null)
1609                 map.Add("textFocused", new PropertyValue(placeholder.TextFocused));
1610
1611             if (placeholder.Color != null)
1612                 map.Add("color", new PropertyValue(placeholder.Color));
1613
1614             if (placeholder.FontFamily != null)
1615                 map.Add("fontFamily", new PropertyValue(placeholder.FontFamily));
1616
1617             if (placeholder.FontStyle != null)
1618                 map.Add("fontStyle", new PropertyValue(GetFontStyleMap((FontStyle)placeholder.FontStyle)));
1619
1620             if (placeholder.PointSize != null && placeholder.PixelSize != null)
1621                 map.Add("pointSize", new PropertyValue((float)placeholder.PointSize));
1622
1623             else if (placeholder.PointSize != null)
1624                 map.Add("pointSize", new PropertyValue((float)placeholder.PointSize));
1625
1626             else if (placeholder.PixelSize != null)
1627                 map.Add("pixelSize", new PropertyValue((float)placeholder.PixelSize));
1628             
1629             map.Add("ellipsis", new PropertyValue(placeholder.Ellipsis));
1630
1631             return map;
1632         }
1633
1634         /// <summary>
1635         /// This method converts a Placeholder map to a struct and returns it.
1636         /// The returned struct can be returned to the user as a Placeholder in the GetPlaceholder method.
1637         /// <param name="map">The Placeholder PropertyMap.</param>
1638         /// <returns> A Placeholder struct. </returns>
1639         /// </summary>
1640         [EditorBrowsable(EditorBrowsableState.Never)]
1641         public static Placeholder GetPlaceholderStruct(PropertyMap map)
1642         {
1643             string text = "";
1644             string textFocused = "";
1645             Color color = new Color();
1646             string fontFamily = null;
1647             var fontStyle = new PropertyMap();
1648             PropertyValue pointSizeValue = null;
1649             PropertyValue pixelSizeValue = null;
1650             bool ellipsis = false;
1651
1652             map.Find(0)?.Get(out text);
1653             map.Find(1)?.Get(out textFocused);
1654             map.Find(2).Get(color);
1655             map.Find(3)?.Get(out fontFamily);
1656             map.Find(4).Get(fontStyle);
1657             pointSizeValue = map.Find(5);
1658             pixelSizeValue = map.Find(6);
1659             map.Find(7)?.Get(out ellipsis);
1660
1661             var placeholder = new Placeholder();
1662             placeholder.Text = text;
1663             placeholder.TextFocused = textFocused;
1664             placeholder.Color = color;
1665             placeholder.FontFamily = fontFamily;
1666             placeholder.Ellipsis = ellipsis;
1667             placeholder.FontStyle = GetFontStyleStruct(fontStyle);
1668
1669             if (pointSizeValue != null)
1670             {
1671                 pointSizeValue.Get(out float pointSize);
1672                 placeholder.PointSize = pointSize;
1673             }
1674
1675             if (pixelSizeValue != null)
1676             {
1677                 pixelSizeValue.Get(out float pixelSize);
1678                 placeholder.PixelSize = pixelSize;
1679             }
1680
1681             return placeholder;
1682         }
1683
1684         /// <summary>
1685         /// This method converts a HiddenInput struct to a PropertyMap and returns it.
1686         /// The returned map can be used for set HiddenInputSettings PropertyMap in the SetHiddenInput method.
1687         /// <param name="hiddenInput">The HiddenInput struct value.</param>
1688         /// <returns> A PropertyMap for HiddenInput property. </returns>
1689         /// </summary>
1690         [EditorBrowsable(EditorBrowsableState.Never)]
1691         public static PropertyMap GetHiddenInputMap(HiddenInput hiddenInput)
1692         {
1693             var map = new PropertyMap();
1694
1695             map.Add(0, new PropertyValue((int)hiddenInput.Mode));
1696
1697             if (hiddenInput.SubstituteCharacter != null)
1698                 map.Add(1, new PropertyValue(Convert.ToInt32(hiddenInput.SubstituteCharacter)));
1699
1700             if (hiddenInput.SubstituteCount != null)
1701                 map.Add(2, new PropertyValue((int)hiddenInput.SubstituteCount));
1702
1703             if (hiddenInput.ShowLastCharacterDuration != null)
1704                 map.Add(3, new PropertyValue((int)hiddenInput.ShowLastCharacterDuration));
1705
1706             return map;
1707         }
1708
1709         /// <summary>
1710         /// This method converts a HiddenInputSettings map to a struct and returns it.
1711         /// The returned struct can be returned to the user as a HiddenInput in the GetHiddenInput method.
1712         /// <param name="map">The HiddenInput PropertyMap.</param>
1713         /// <returns> A HiddenInput struct. </returns>
1714         /// </summary>
1715         [EditorBrowsable(EditorBrowsableState.Never)]
1716         public static HiddenInput GetHiddenInputStruct(PropertyMap map)
1717         {
1718             PropertyValue value = null;
1719
1720             var hiddenInput = new HiddenInput();
1721
1722             value = map.Find(0);
1723             if (value != null)
1724             {
1725                 value.Get(out int mode);
1726                 hiddenInput.Mode = (HiddenInputModeType)mode;
1727             }
1728
1729             value = map.Find(1);
1730             if (value != null)
1731             {
1732                 value.Get(out int substituteCharacter);
1733                 hiddenInput.SubstituteCharacter = Convert.ToChar(substituteCharacter);
1734             }
1735
1736             value = map.Find(2);
1737             if (value != null)
1738             {
1739                 value.Get(out int substituteCount);
1740                 hiddenInput.SubstituteCount = substituteCount;
1741             }
1742
1743             value = map.Find(3);
1744             if (value != null)
1745             {
1746                 value.Get(out int showLastCharacterDuration);
1747                 hiddenInput.ShowLastCharacterDuration = showLastCharacterDuration;
1748             }
1749
1750             return hiddenInput;
1751         }
1752
1753         /// <summary>
1754         /// This method converts a fileName string to a PropertyMap and returns it.
1755         /// The returned map can be used for set SelectionHandleImageLeft, SelectionHandleImageRight PropertyMap in the SetSelectionHandleImage method.
1756         /// <param name="fileName">The file path string value for SelectionHandleImage.</param>
1757         /// <returns> A PropertyMap for SelectionHandleImageLeft, SelectionHandleImageRight properties. </returns>
1758         /// </summary>
1759         [EditorBrowsable(EditorBrowsableState.Never)]
1760         public static PropertyMap GetFileNameMap(string fileName)
1761         {
1762             return new PropertyMap().Add("filename", new PropertyValue(fileName));
1763         }
1764
1765         /// <summary>
1766         /// This method converts a SelectionHandleImageLeft, SelectionHandleImageRight map to a struct and returns it.
1767         /// The returned struct can be returned to the user as a SelectionHandleImage in the GetSelectionHandleImage method.
1768         /// <param name="leftImageMap">The SelectionHandleImageLeft PropertyMap.</param>
1769         /// <param name="rightImageMap">The SelectionHandleImageRight PropertyMap.</param>
1770         /// <returns> A SelectionHandleImage struct. </returns>
1771         /// </summary>
1772         [EditorBrowsable(EditorBrowsableState.Never)]
1773         public static SelectionHandleImage GetSelectionHandleImageStruct(PropertyMap leftImageMap, PropertyMap rightImageMap)
1774         {
1775             string leftImageUrl = null;
1776             string rightImageUrl = null;
1777
1778             var selectionHandleImage = new SelectionHandleImage();
1779
1780             leftImageMap.Find(0, "filename")?.Get(out leftImageUrl);
1781             rightImageMap.Find(0, "filename")?.Get(out rightImageUrl);
1782
1783             selectionHandleImage.LeftImageUrl = leftImageUrl;
1784             selectionHandleImage.RightImageUrl = rightImageUrl;
1785
1786             return selectionHandleImage;
1787         }
1788
1789         /// <summary>
1790         /// Copy the previously selected text into the clipboard and return the copied value.
1791         /// </summary>
1792         /// <param name="textEditor">The textEditor control from which the text is copied.</param>
1793         /// <returns>The copied text.</returns>
1794         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
1795         [EditorBrowsable(EditorBrowsableState.Never)]
1796         public static string CopyToClipboard(TextEditor textEditor)
1797         {
1798             string copiedText = Interop.TextEditor.CopyText(textEditor.SwigCPtr);
1799             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1800             return copiedText;
1801         }
1802
1803         /// <summary>
1804         /// Copy the previously selected text into the clipboard and return the copied value.
1805         /// </summary>
1806         /// <param name="textField">The textField control from which the text is copied.</param>
1807         /// <returns>The copied text.</returns>
1808         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
1809         [EditorBrowsable(EditorBrowsableState.Never)]
1810         public static string CopyToClipboard(TextField textField)
1811         {
1812             string copiedText = Interop.TextField.CopyText(textField.SwigCPtr);
1813             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1814             return copiedText;
1815         }
1816
1817         /// <summary>
1818         /// Cut the previously selected text from the text control and into the clipboard and return the cut value.
1819         /// </summary>
1820         /// <param name="textEditor">The textEditor control from which the text is cut.</param>
1821         /// <returns>The cut text.</returns>
1822         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
1823         [EditorBrowsable(EditorBrowsableState.Never)]
1824         public static string CutToClipboard(TextEditor textEditor)
1825         {
1826             string cutText = Interop.TextEditor.CutText(textEditor.SwigCPtr);
1827             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1828             return cutText;
1829         }
1830
1831         /// <summary>
1832         /// Cut the previously selected text from the text control and into the clipboard and return the cut value.
1833         /// </summary>
1834         /// <param name="textField">The textField control from which the text is cut.</param>
1835         /// <returns>The cut text.</returns>
1836         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
1837         [EditorBrowsable(EditorBrowsableState.Never)]
1838         public static string CutToClipboard(TextField textField)
1839         {
1840             string cutText = Interop.TextField.CutText(textField.SwigCPtr);
1841             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1842             return cutText;
1843         }
1844
1845         /// <summary>
1846         /// Paste the most recently copied/cut text from the clipboard and into the text control.
1847         /// </summary>
1848         /// <param name="textEditor">The textEditor control into which the text is pasted.</param>
1849         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
1850         [EditorBrowsable(EditorBrowsableState.Never)]
1851         public static void PasteTo(TextEditor textEditor)
1852         {
1853             Interop.TextEditor.PasteText(textEditor.SwigCPtr);
1854             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1855         }
1856
1857         /// <summary>
1858         /// Paste the most recently copied/cut text from the clipboard and into the text control.
1859         /// </summary>
1860         /// <param name="textField">The textField control into which the text is pasted.</param>
1861         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
1862         [EditorBrowsable(EditorBrowsableState.Never)]
1863         public static void PasteTo(TextField textField)
1864         {
1865             Interop.TextField.PasteText(textField.SwigCPtr);
1866             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1867         }
1868     }
1869 }