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