[NUI] Fix text padding issue
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / BaseComponents / TextConstants.cs
1 // Copyright (c) 2021 Samsung Electronics Co., Ltd.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 using System;
16 using System.ComponentModel;
17 using System.Diagnostics.CodeAnalysis;
18
19 namespace Tizen.NUI.Text
20 {
21     /// <summary>
22     /// A struct to pass data of InputFilter PropertyMap. <br />
23     /// </summary>
24     /// <remarks>
25     /// InputFilter filters input based on regular expressions. <br />
26     /// Users can set the Accepted or Rejected regular expression set, or both. <br />
27     /// If both are used, Rejected has higher priority. <br />
28     /// The character set must follow the regular expression rules. <br />
29     /// Behaviour can not be guaranteed for incorrect grammars. <br />
30     /// Refer the link below for detailed rules. <br />
31     /// The functions in std::regex library use the ECMAScript grammar: <br />
32     /// http://cplusplus.com/reference/regex/ECMAScript/ <br />
33     /// The InputFilter struct is used as an argument to SetInputFilter and GetInputFilter methods. <br />
34     /// See <see cref="Tizen.NUI.BaseComponents.TextField.SetInputFilter"/>, <see cref="Tizen.NUI.BaseComponents.TextField.GetInputFilter"/>, <see cref="Tizen.NUI.BaseComponents.TextEditor.SetInputFilter"/> and <see cref="Tizen.NUI.BaseComponents.TextEditor.GetInputFilter"/>. <br />
35     /// </remarks>
36     /// <since_tizen> 9 </since_tizen>
37     public struct InputFilter : IEquatable<InputFilter>
38     {
39         /// <summary>
40         /// A regular expression in the set of characters to be accepted by the inputFilter.
41         /// </summary>
42         public string Accepted { get; set; }
43
44         /// <summary>
45         /// A regular expression in the set of characters to be rejected by the inputFilter.
46         /// </summary>
47         public string Rejected { get; set; }
48
49         /// <summary>
50         /// Determines whether the specified object is equal to the current object.
51         /// </summary>
52         /// <param name="obj">The object to compare with the current object.</param>
53         /// <returns>true if equal InputFilter, else false.</returns>
54         [EditorBrowsable(EditorBrowsableState.Never)]
55         public override bool Equals(object obj) => obj is InputFilter other && this.Equals(other);
56
57         /// <summary>
58         /// Determines whether the specified object is equal to the current object.
59         /// </summary>
60         /// <param name="other">The InputFilter to compare with the current InputFilter.</param>
61         /// <returns>true if equal InputFilter, else false.</returns>
62         [EditorBrowsable(EditorBrowsableState.Never)]
63         public bool Equals(InputFilter other) => Accepted == other.Accepted && Rejected == other.Rejected;
64
65         /// <summary>
66         /// The == operator.
67         /// </summary>
68         /// <param name="lhsInputFilter">InputFilter to compare</param>
69         /// <param name="rhsInputFilter">InputFilter to be compared</param>
70         /// <returns>true if InputFilters are equal</returns>
71         [EditorBrowsable(EditorBrowsableState.Never)]
72         public static bool operator ==(InputFilter lhsInputFilter, InputFilter rhsInputFilter) => lhsInputFilter.Equals(rhsInputFilter);
73
74         /// <summary>
75         /// The != operator.
76         /// </summary>
77         /// <param name="lhsInputFilter">InputFilter to compare</param>
78         /// <param name="rhsInputFilter">InputFilter to be compared</param>
79         /// <returns>true if InputFilters are not equal</returns>
80         [EditorBrowsable(EditorBrowsableState.Never)]
81         public static bool operator !=(InputFilter lhsInputFilter, InputFilter rhsInputFilter) => !lhsInputFilter.Equals(rhsInputFilter);
82
83         /// <summary>
84         /// Gets the hash code of this InputFilter.
85         /// </summary>
86         /// <returns>The hash code.</returns>
87         [EditorBrowsable(EditorBrowsableState.Never)]
88         public override int GetHashCode() => (Accepted, Rejected).GetHashCode();
89     }
90
91     /// <summary>
92     /// A struct to pass data of Strikethrough PropertyMap. <br />
93     /// </summary>
94     /// <remarks>
95     /// The Strikethrough struct is used as an argument to SetStrikethrough and GetStrikethrough methods. <br />
96     /// See <see cref="Tizen.NUI.BaseComponents.TextLabel.SetStrikethrough"/>, <see cref="Tizen.NUI.BaseComponents.TextLabel.GetStrikethrough"/>, <see cref="Tizen.NUI.BaseComponents.TextField.SetStrikethrough"/>, <see cref="Tizen.NUI.BaseComponents.TextField.GetStrikethrough"/>, <see cref="Tizen.NUI.BaseComponents.TextEditor.SetStrikethrough"/> and <see cref="Tizen.NUI.BaseComponents.TextEditor.GetStrikethrough"/>. <br />
97     /// </remarks>
98     [EditorBrowsable(EditorBrowsableState.Never)]
99     public struct Strikethrough : IEquatable<Strikethrough>
100     {
101         /// <summary>
102         /// Whether the strikethrough is enabled (the default value is false).
103         /// </summary>
104         [EditorBrowsable(EditorBrowsableState.Never)]
105         public bool Enable { get; set; }
106
107         /// <summary>
108         /// The color of the strikethrough (if not provided then the color of the text is used).
109         /// </summary>
110         [EditorBrowsable(EditorBrowsableState.Never)]
111         public Color Color { get; set; }
112
113         /// <summary>
114         /// The height in pixels of the strikethrough (if null, the default value is 1.0f).
115         /// </summary>
116         [EditorBrowsable(EditorBrowsableState.Never)]
117         public float? Height { get; set; }
118
119         /// <summary>
120         /// Determines whether the specified object is equal to the current object.
121         /// </summary>
122         /// <param name="obj">The object to compare with the current object.</param>
123         /// <returns>true if equal Strikethrough, else false.</returns>
124         [EditorBrowsable(EditorBrowsableState.Never)]
125         public override bool Equals(object obj) => obj is Strikethrough other && this.Equals(other);
126
127         /// <summary>
128         /// Determines whether the specified object is equal to the current object.
129         /// </summary>
130         /// <param name="other">The Strikethrough to compare with the current Strikethrough.</param>
131         /// <returns>true if equal Strikethrough, else false.</returns>
132         [EditorBrowsable(EditorBrowsableState.Never)]
133         public bool Equals(Strikethrough other) => Enable == other.Enable && Color == other.Color && Height == other.Height;
134
135         /// <summary>
136         /// The == operator.
137         /// </summary>
138         /// <param name="lhsStrikethrough">Strikethrough to compare</param>
139         /// <param name="rhsStrikethrough">Strikethrough to be compared</param>
140         /// <returns>true if Strikethroughs are equal</returns>
141         [EditorBrowsable(EditorBrowsableState.Never)]
142         public static bool operator ==(Strikethrough lhsStrikethrough, Strikethrough rhsStrikethrough) => lhsStrikethrough.Equals(rhsStrikethrough);
143
144         /// <summary>
145         /// The != operator.
146         /// </summary>
147         /// <param name="lhsStrikethrough">Strikethrough to compare</param>
148         /// <param name="rhsStrikethrough">Strikethrough to be compared</param>
149         /// <returns>true if Strikethroughs are not equal</returns>
150         [EditorBrowsable(EditorBrowsableState.Never)]
151         public static bool operator !=(Strikethrough lhsStrikethrough, Strikethrough rhsStrikethrough) => !lhsStrikethrough.Equals(rhsStrikethrough);
152
153         /// <summary>
154         /// Gets the hash code of this Strikethrough.
155         /// </summary>
156         /// <returns>The hash code.</returns>
157         [EditorBrowsable(EditorBrowsableState.Never)]
158         public override int GetHashCode() => (Enable, Color, Height).GetHashCode();
159     }
160
161     /// <summary>
162     /// A struct to pass data of FontStyle PropertyMap. <br />
163     /// </summary>
164     /// <remarks>
165     /// The FontStyle struct is used as an argument to SetFontStyle and GetFontStyle methods. <br />
166     /// See <see cref="Tizen.NUI.BaseComponents.TextLabel.SetFontStyle"/>, <see cref="Tizen.NUI.BaseComponents.TextLabel.GetFontStyle"/>, <see cref="Tizen.NUI.BaseComponents.TextField.SetFontStyle"/>, <see cref="Tizen.NUI.BaseComponents.TextField.GetFontStyle"/>, <see cref="Tizen.NUI.BaseComponents.TextEditor.SetFontStyle"/> and <see cref="Tizen.NUI.BaseComponents.TextEditor.GetFontStyle"/>. <br />
167     /// </remarks>
168     [EditorBrowsable(EditorBrowsableState.Never)]
169     public struct FontStyle : IEquatable<FontStyle>
170     {
171         /// <summary>
172         /// The Width defines occupied by each glyph.
173         /// </summary>
174         [EditorBrowsable(EditorBrowsableState.Never)]
175         public FontWidthType Width { get; set; }
176
177         /// <summary>
178         /// The Weight defines the thickness or darkness of the glyphs.
179         /// </summary>
180         [EditorBrowsable(EditorBrowsableState.Never)]
181         public FontWeightType Weight { get; set; }
182
183         /// <summary>
184         /// The Slant defines whether to use italics.
185         /// </summary>
186         [EditorBrowsable(EditorBrowsableState.Never)]
187         public FontSlantType Slant { get; set; }
188
189         /// <summary>
190         /// Determines whether the specified object is equal to the current object.
191         /// </summary>
192         /// <param name="obj">The object to compare with the current object.</param>
193         /// <returns>true if equal FontStyle, else false.</returns>
194         [EditorBrowsable(EditorBrowsableState.Never)]
195         public override bool Equals(object obj) => obj is FontStyle other && this.Equals(other);
196
197         /// <summary>
198         /// Determines whether the specified object is equal to the current object.
199         /// </summary>
200         /// <param name="other">The FontStyle to compare with the current FontStyle.</param>
201         /// <returns>true if equal FontStyle, else false.</returns>
202         [EditorBrowsable(EditorBrowsableState.Never)]
203         public bool Equals(FontStyle other) => Width == other.Width && Weight == other.Weight && Slant == other.Slant;
204
205         /// <summary>
206         /// The == operator.
207         /// </summary>
208         /// <param name="lhsFontStyle">FontStyle to compare</param>
209         /// <param name="rhsFontStyle">FontStyle to be compared</param>
210         /// <returns>true if FontStyles are equal</returns>
211         [EditorBrowsable(EditorBrowsableState.Never)]
212         public static bool operator ==(FontStyle lhsFontStyle, FontStyle rhsFontStyle) => lhsFontStyle.Equals(rhsFontStyle);
213
214         /// <summary>
215         /// The != operator.
216         /// </summary>
217         /// <param name="lhsFontStyle">FontStyle to compare</param>
218         /// <param name="rhsFontStyle">FontStyle to be compared</param>
219         /// <returns>true if FontStyles are not equal</returns>
220         [EditorBrowsable(EditorBrowsableState.Never)]
221         public static bool operator !=(FontStyle lhsFontStyle, FontStyle rhsFontStyle) => !lhsFontStyle.Equals(rhsFontStyle);
222
223         /// <summary>
224         /// Gets the hash code of this FontStyle.
225         /// </summary>
226         /// <returns>The hash code.</returns>
227         [EditorBrowsable(EditorBrowsableState.Never)]
228         public override int GetHashCode() => (Width, Weight, Slant).GetHashCode();
229     }
230
231     /// <summary>
232     /// A struct to pass data of Underline PropertyMap. <br />
233     /// </summary>
234     /// <remarks>
235     /// The Underline struct is used as an argument to SetUnderline and GetUnderline methods. <br />
236     /// See <see cref="Tizen.NUI.BaseComponents.TextLabel.SetUnderline"/>, <see cref="Tizen.NUI.BaseComponents.TextLabel.GetUnderline"/>, <see cref="Tizen.NUI.BaseComponents.TextField.SetUnderline"/>, <see cref="Tizen.NUI.BaseComponents.TextField.GetUnderline"/>, <see cref="Tizen.NUI.BaseComponents.TextEditor.SetUnderline"/> and <see cref="Tizen.NUI.BaseComponents.TextEditor.GetUnderline"/>. <br />
237     /// </remarks>
238     [EditorBrowsable(EditorBrowsableState.Never)]
239     public struct Underline : IEquatable<Underline>
240     {
241         /// <summary>
242         /// Whether the underline is enabled (the default value is false).
243         /// </summary>
244         [EditorBrowsable(EditorBrowsableState.Never)]
245         public bool Enable { get; set; }
246
247         /// <summary>
248         /// The type of the underline (the default type is Solid).
249         /// </summary>
250         [EditorBrowsable(EditorBrowsableState.Never)]
251         public UnderlineType Type { get; set; }
252
253         /// <summary>
254         /// The color of the underline (if not provided then the color of the text is used).
255         /// </summary>
256         [EditorBrowsable(EditorBrowsableState.Never)]
257         public Color Color { get; set; }
258
259         /// <summary>
260         /// The height in pixels of the underline (if null, the default value is 1.0f).
261         /// </summary>
262         [EditorBrowsable(EditorBrowsableState.Never)]
263         public float? Height { get; set; }
264         
265         /// <summary>
266         /// The width of the dashes of the dashed underline (if null, the default value is 2.0f). <br />
267         /// Only valid when "UnderlineType.Dashed" type is used.
268         /// </summary>
269         [EditorBrowsable(EditorBrowsableState.Never)]
270         public float? DashWidth { get; set; }
271
272         /// <summary>
273         /// The gap between the dashes of the dashed underline (if null, the default value is 1.0f). <br />
274         /// Only valid when "UnderlineType.Dashed" type is used.
275         /// </summary>
276         [EditorBrowsable(EditorBrowsableState.Never)]
277         public float? DashGap { get; set; }
278
279         /// <summary>
280         /// Determines whether the specified object is equal to the current object.
281         /// </summary>
282         /// <param name="obj">The object to compare with the current object.</param>
283         /// <returns>true if equal Underline, else false.</returns>
284         [EditorBrowsable(EditorBrowsableState.Never)]
285         public override bool Equals(object obj) => obj is Underline other && this.Equals(other);
286
287         /// <summary>
288         /// Determines whether the specified object is equal to the current object.
289         /// </summary>
290         /// <param name="other">The Underline to compare with the current Underline.</param>
291         /// <returns>true if equal Underline, else false.</returns>
292         [EditorBrowsable(EditorBrowsableState.Never)]
293         public bool Equals(Underline other) => Enable == other.Enable && Type == other.Type && Color == other.Color &&
294          Height == other.Height && DashWidth == other.DashWidth && DashGap == other.DashGap;
295
296         /// <summary>
297         /// The == operator.
298         /// </summary>
299         /// <param name="lhsUnderline">Underline to compare</param>
300         /// <param name="rhsUnderline">Underline to be compared</param>
301         /// <returns>true if Underlines are equal</returns>
302         [EditorBrowsable(EditorBrowsableState.Never)]
303         public static bool operator ==(Underline lhsUnderline, Underline rhsUnderline) => lhsUnderline.Equals(rhsUnderline);
304
305         /// <summary>
306         /// The != operator.
307         /// </summary>
308         /// <param name="lhsUnderline">Underline to compare</param>
309         /// <param name="rhsUnderline">Underline to be compared</param>
310         /// <returns>true if Underlines are not equal</returns>
311         [EditorBrowsable(EditorBrowsableState.Never)]
312         public static bool operator !=(Underline lhsUnderline, Underline rhsUnderline) => !lhsUnderline.Equals(rhsUnderline);
313
314         /// <summary>
315         /// Gets the hash code of this Underline.
316         /// </summary>
317         /// <returns>The hash code.</returns>
318         [EditorBrowsable(EditorBrowsableState.Never)]
319         public override int GetHashCode() => (Enable, Type, Color, Height, DashWidth, DashGap).GetHashCode();
320     }
321
322     /// <summary>
323     /// A struct to pass data of Shadow PropertyMap. <br />
324     /// </summary>
325     /// <remarks>
326     /// The Shadow struct is used as an argument to SetShadow and GetShadow methods. <br />
327     /// See <see cref="Tizen.NUI.BaseComponents.TextLabel.SetShadow"/>, <see cref="Tizen.NUI.BaseComponents.TextLabel.GetShadow"/>, <see cref="Tizen.NUI.BaseComponents.TextField.SetShadow"/>, <see cref="Tizen.NUI.BaseComponents.TextField.GetShadow"/>, <see cref="Tizen.NUI.BaseComponents.TextEditor.SetShadow"/> and <see cref="Tizen.NUI.BaseComponents.TextEditor.GetShadow"/>. <br />
328     /// </remarks>
329     [EditorBrowsable(EditorBrowsableState.Never)]
330     public struct Shadow : IEquatable<Shadow>
331     {
332         /// <summary>
333         /// The color of the shadow (the default color is Color.Black).
334         /// </summary>
335         [EditorBrowsable(EditorBrowsableState.Never)]
336         public Color Color { get; set; }
337
338         /// <summary>
339         /// The offset in pixels of the shadow (if null, the default value is 0, 0). <br />
340         /// If not provided then the shadow is not enabled. <br />
341         ///
342         /// </summary>
343         [EditorBrowsable(EditorBrowsableState.Never)]
344         public Vector2 Offset { get; set; }
345
346         /// <summary>
347         /// The radius of the Gaussian blur for the soft shadow (if null, the default value is 0.0f). <br />
348         /// If not provided then the soft shadow is not enabled. <br />
349         /// </summary>
350         [EditorBrowsable(EditorBrowsableState.Never)]
351         public float? BlurRadius { get; set; }
352
353         /// <summary>
354         /// Determines whether the specified object is equal to the current object.
355         /// </summary>
356         /// <param name="obj">The object to compare with the current object.</param>
357         /// <returns>true if equal Shadow, else false.</returns>
358         [EditorBrowsable(EditorBrowsableState.Never)]
359         public override bool Equals(object obj) => obj is Shadow other && this.Equals(other);
360
361         /// <summary>
362         /// Determines whether the specified object is equal to the current object.
363         /// </summary>
364         /// <param name="other">The Shadow to compare with the current Shadow.</param>
365         /// <returns>true if equal Shadow, else false.</returns>
366         [EditorBrowsable(EditorBrowsableState.Never)]
367         public bool Equals(Shadow other) => Color == other.Color && Offset == other.Offset && BlurRadius == other.BlurRadius;
368
369         /// <summary>
370         /// The == operator.
371         /// </summary>
372         /// <param name="lhsShadow">Shadow to compare</param>
373         /// <param name="rhsShadow">Shadow to be compared</param>
374         /// <returns>true if Shadows are equal</returns>
375         [EditorBrowsable(EditorBrowsableState.Never)]
376         public static bool operator ==(Shadow lhsShadow, Shadow rhsShadow) => lhsShadow.Equals(rhsShadow);
377
378         /// <summary>
379         /// The != operator.
380         /// </summary>
381         /// <param name="lhsShadow">Shadow to compare</param>
382         /// <param name="rhsShadow">Shadow to be compared</param>
383         /// <returns>true if Shadows are not equal</returns>
384         [EditorBrowsable(EditorBrowsableState.Never)]
385         public static bool operator !=(Shadow lhsShadow, Shadow rhsShadow) => !lhsShadow.Equals(rhsShadow);
386
387         /// <summary>
388         /// Gets the hash code of this Shadow.
389         /// </summary>
390         /// <returns>The hash code.</returns>
391         [EditorBrowsable(EditorBrowsableState.Never)]
392         public override int GetHashCode() => (Color, Offset, BlurRadius).GetHashCode();
393     }
394
395     /// <summary>
396     /// A struct to pass data of Outline PropertyMap. <br />
397     /// </summary>
398     /// <remarks>
399     /// The Outline struct is used as an argument to SetOutline and GetOutline methods. <br />
400     /// See <see cref="Tizen.NUI.BaseComponents.TextLabel.SetOutline"/>, <see cref="Tizen.NUI.BaseComponents.TextLabel.GetOutline"/>, <see cref="Tizen.NUI.BaseComponents.TextField.SetOutline"/>, <see cref="Tizen.NUI.BaseComponents.TextField.GetOutline"/>, <see cref="Tizen.NUI.BaseComponents.TextEditor.SetOutline"/> and <see cref="Tizen.NUI.BaseComponents.TextEditor.GetOutline"/>. <br />
401     /// </remarks>
402     [EditorBrowsable(EditorBrowsableState.Never)]
403     public struct Outline : IEquatable<Outline>
404     {
405         /// <summary>
406         /// The color of the outline (the default color is Color.White).
407         /// </summary>
408         [EditorBrowsable(EditorBrowsableState.Never)]
409         public Color Color { get; set; }
410
411         /// <summary>
412         /// The width in pixels of the outline (if null, the default value is 0.0f). <br />
413         /// If not provided then the outline is not enabled. <br />
414         /// </summary>
415         [EditorBrowsable(EditorBrowsableState.Never)]
416         public float? Width { get; set; }
417
418         /// <summary>
419         /// Determines whether the specified object is equal to the current object.
420         /// </summary>
421         /// <param name="obj">The object to compare with the current object.</param>
422         /// <returns>true if equal Outline, else false.</returns>
423         [EditorBrowsable(EditorBrowsableState.Never)]
424         public override bool Equals(object obj) => obj is Outline other && this.Equals(other);
425
426         /// <summary>
427         /// Determines whether the specified object is equal to the current object.
428         /// </summary>
429         /// <param name="other">The Outline to compare with the current Outline.</param>
430         /// <returns>true if equal Outline, else false.</returns>
431         [EditorBrowsable(EditorBrowsableState.Never)]
432         public bool Equals(Outline other) => Color == other.Color && Width == other.Width;
433
434         /// <summary>
435         /// The == operator.
436         /// </summary>
437         /// <param name="lhsOutline">Outline to compare</param>
438         /// <param name="rhsOutline">Outline to be compared</param>
439         /// <returns>true if Outlines are equal</returns>
440         [EditorBrowsable(EditorBrowsableState.Never)]
441         public static bool operator ==(Outline lhsOutline, Outline rhsOutline) => lhsOutline.Equals(rhsOutline);
442
443         /// <summary>
444         /// The != operator.
445         /// </summary>
446         /// <param name="lhsOutline">Outline to compare</param>
447         /// <param name="rhsOutline">Outline to be compared</param>
448         /// <returns>true if Outlines are not equal</returns>
449         [EditorBrowsable(EditorBrowsableState.Never)]
450         public static bool operator !=(Outline lhsOutline, Outline rhsOutline) => !lhsOutline.Equals(rhsOutline);
451
452         /// <summary>
453         /// Gets the hash code of this Outline.
454         /// </summary>
455         /// <returns>The hash code.</returns>
456         [EditorBrowsable(EditorBrowsableState.Never)]
457         public override int GetHashCode() => (Color, Width).GetHashCode();
458     }
459
460     /// <summary>
461     /// A struct to pass data of TextFit PropertyMap. <br />
462     /// </summary>
463     /// <remarks>
464     /// The TextFit struct is used as an argument to SetTextFit and GetTextFit methods. <br />
465     /// See <see cref="Tizen.NUI.BaseComponents.TextLabel.SetTextFit"/> and <see cref="Tizen.NUI.BaseComponents.TextLabel.GetTextFit"/>. <br />
466     /// </remarks>
467     [EditorBrowsable(EditorBrowsableState.Never)]
468     public struct TextFit : IEquatable<TextFit>
469     {
470         /// <summary>
471         /// True to enable the text fit or false to disable (the default value is false).
472         /// </summary>
473         [EditorBrowsable(EditorBrowsableState.Never)]
474         public bool Enable { get; set; }
475
476         /// <summary>
477         /// Minimum Size for text fit (if null, the default value is 10.0f).
478         /// </summary>
479         [EditorBrowsable(EditorBrowsableState.Never)]
480         public float? MinSize { get; set; }
481
482         /// <summary>
483         /// Maximum Size for text fit (if null, the default value is 100.0f).
484         /// </summary>
485         [EditorBrowsable(EditorBrowsableState.Never)]
486         public float? MaxSize { get; set; }
487
488         /// <summary>
489         /// Step Size for font increase (if null, the default value is 1.0f).
490         /// </summary>
491         [EditorBrowsable(EditorBrowsableState.Never)]
492         public float? StepSize { get; set; }
493
494         /// <summary>
495         /// The size type of font, PointSize or PixelSize (the default value is PointSize).
496         /// </summary>
497         [EditorBrowsable(EditorBrowsableState.Never)]
498         public FontSizeType FontSizeType { get; set; }
499
500         /// <summary>
501         /// Font Size for text fit
502         /// </summary>
503         [EditorBrowsable(EditorBrowsableState.Never)]
504         public float? FontSize { get; set; }
505
506         /// <summary>
507         /// Determines whether the specified object is equal to the current object.
508         /// </summary>
509         /// <param name="obj">The object to compare with the current object.</param>
510         /// <returns>true if equal TextFit, else false.</returns>
511         [EditorBrowsable(EditorBrowsableState.Never)]
512         public override bool Equals(object obj) => obj is TextFit other && this.Equals(other);
513
514         /// <summary>
515         /// Determines whether the specified object is equal to the current object.
516         /// </summary>
517         /// <param name="other">The TextFit to compare with the current TextFit.</param>
518         /// <returns>true if equal TextFit, else false.</returns>
519         [EditorBrowsable(EditorBrowsableState.Never)]
520         public bool Equals(TextFit other) => Enable == other.Enable && MinSize == other.MinSize && MaxSize == other.MaxSize &&
521          StepSize == other.StepSize && FontSizeType == other.FontSizeType && FontSize == other.FontSize;
522
523         /// <summary>
524         /// The == operator.
525         /// </summary>
526         /// <param name="lhsTextFit">TextFit to compare</param>
527         /// <param name="rhsTextFit">TextFit to be compared</param>
528         /// <returns>true if TextFits are equal</returns>
529         [EditorBrowsable(EditorBrowsableState.Never)]
530         public static bool operator ==(TextFit lhsTextFit, TextFit rhsTextFit) => lhsTextFit.Equals(rhsTextFit);
531
532         /// <summary>
533         /// The != operator.
534         /// </summary>
535         /// <param name="lhsTextFit">TextFit to compare</param>
536         /// <param name="rhsTextFit">TextFit to be compared</param>
537         /// <returns>true if TextFits are not equal</returns>
538         [EditorBrowsable(EditorBrowsableState.Never)]
539         public static bool operator !=(TextFit lhsTextFit, TextFit rhsTextFit) => !lhsTextFit.Equals(rhsTextFit);
540
541         /// <summary>
542         /// Gets the hash code of this TextFit.
543         /// </summary>
544         /// <returns>The hash code.</returns>
545         [EditorBrowsable(EditorBrowsableState.Never)]
546         public override int GetHashCode() => (Enable, MinSize, MaxSize, StepSize, FontSizeType, FontSize).GetHashCode();
547     }
548
549     /// <summary>
550     /// A struct to pass data of Placeholder PropertyMap. <br />
551     /// </summary>
552     /// <remarks>
553     /// The Placeholder struct is used as an argument to SetPlaceholder and GetPlaceholder methods. <br />
554     /// See <see cref="Tizen.NUI.BaseComponents.TextField.SetPlaceholder"/>, <see cref="Tizen.NUI.BaseComponents.TextField.SetPlaceholder"/>, <see cref="Tizen.NUI.BaseComponents.TextEditor.SetPlaceholder"/> and <see cref="Tizen.NUI.BaseComponents.TextEditor.SetPlaceholder"/>. <br />
555     /// </remarks>
556     [EditorBrowsable(EditorBrowsableState.Never)]
557     public struct Placeholder : IEquatable<Placeholder>
558     {
559         /// <summary>
560         /// The text to display when the TextField is empty and inactive.
561         /// </summary>
562         [EditorBrowsable(EditorBrowsableState.Never)]
563         public string Text { get; set; }
564
565         /// <summary>
566         /// The text to display when the placeholder has focus.
567         /// </summary>
568         [EditorBrowsable(EditorBrowsableState.Never)]
569         public string TextFocused { get; set; }
570
571         /// <summary>
572         /// The color of the placeholder text.
573         /// </summary>
574         [EditorBrowsable(EditorBrowsableState.Never)]
575         public Color Color { get; set; }
576
577         /// <summary>
578         /// The FontFamily of the placeholder text.
579         /// </summary>
580         [EditorBrowsable(EditorBrowsableState.Never)]
581         public string FontFamily { get; set; }
582
583         /// <summary>
584         /// The FontStyle of the placeholder text (if null, the text control FontStyle is used).
585         /// </summary>
586         [EditorBrowsable(EditorBrowsableState.Never)]
587         public FontStyle? FontStyle { get; set; }
588
589         /// <summary>
590         /// The PointSize of the placeholder text. <br />
591         /// Not required if PixelSize provided. <br />
592         /// If both provided or neither provided then the text control point size is used. <br />
593         /// </summary>
594         [EditorBrowsable(EditorBrowsableState.Never)]
595         public float? PointSize { get; set; }
596
597         /// <summary>
598         /// The PiexSize of the placeholder text.
599         /// Not required if PointSize provided. <br />
600         /// If both provided or neither provided then the text control point size is used. <br />
601         /// </summary>
602         [EditorBrowsable(EditorBrowsableState.Never)]
603         public float? PixelSize { get; set; }
604
605         /// <summary>
606         /// The ellipsis of the placeholder text (the default value is false).
607         /// </summary>
608         [EditorBrowsable(EditorBrowsableState.Never)]
609         public bool Ellipsis { get; set; }
610
611         /// <summary>
612         /// Determines whether the specified object is equal to the current object.
613         /// </summary>
614         /// <param name="obj">The object to compare with the current object.</param>
615         /// <returns>true if equal Placeholder, else false.</returns>
616         [EditorBrowsable(EditorBrowsableState.Never)]
617         public override bool Equals(object obj) => obj is Placeholder other && this.Equals(other);
618
619         /// <summary>
620         /// Determines whether the specified object is equal to the current object.
621         /// </summary>
622         /// <param name="other">The Placeholder to compare with the current Placeholder.</param>
623         /// <returns>true if equal Placeholder, else false.</returns>
624         [EditorBrowsable(EditorBrowsableState.Never)]
625         public bool Equals(Placeholder other) =>
626          Text == other.Text && TextFocused == other.TextFocused && Color == other.Color && FontFamily == other.FontFamily &&
627           FontStyle == other.FontStyle && PointSize == other.PointSize && PixelSize == other.PixelSize && Ellipsis == other.Ellipsis;
628
629         /// <summary>
630         /// The == operator.
631         /// </summary>
632         /// <param name="lhsPlaceholder">Placeholder to compare</param>
633         /// <param name="rhsPlaceholder">Placeholder to be compared</param>
634         /// <returns>true if Placeholders are equal</returns>
635         [EditorBrowsable(EditorBrowsableState.Never)]
636         public static bool operator ==(Placeholder lhsPlaceholder, Placeholder rhsPlaceholder) => lhsPlaceholder.Equals(rhsPlaceholder);
637
638         /// <summary>
639         /// The != operator.
640         /// </summary>
641         /// <param name="lhsPlaceholder">Placeholder to compare</param>
642         /// <param name="rhsPlaceholder">Placeholder to be compared</param>
643         /// <returns>true if Placeholders are not equal</returns>
644         [EditorBrowsable(EditorBrowsableState.Never)]
645         public static bool operator !=(Placeholder lhsPlaceholder, Placeholder rhsPlaceholder) => !lhsPlaceholder.Equals(rhsPlaceholder);
646
647         /// <summary>
648         /// Gets the hash code of this Placeholder.
649         /// </summary>
650         /// <returns>The hash code.</returns>
651         [EditorBrowsable(EditorBrowsableState.Never)]
652         public override int GetHashCode() => (Text, TextFocused, Color, FontFamily, FontStyle, PointSize, PixelSize, Ellipsis).GetHashCode();
653     }
654
655     /// <summary>
656     /// A struct to pass data of HiddenInputSettings PropertyMap. <br />
657     /// </summary>
658     /// <remarks>
659     /// The HiddenInput struct is used as an argument to SetHiddenInput and GetHiddenInput methods. <br />
660     /// See <see cref="Tizen.NUI.BaseComponents.TextField.SetHiddenInput"/> and <see cref="Tizen.NUI.BaseComponents.TextField.GetHiddenInput"/>. <br />
661     /// </remarks>
662     [EditorBrowsable(EditorBrowsableState.Never)]
663     public struct HiddenInput : IEquatable<HiddenInput>
664     {
665         /// <summary>
666         /// The mode for input text display. <br />
667         /// </summary>
668         [EditorBrowsable(EditorBrowsableState.Never)]
669         public HiddenInputModeType Mode { get; set; }
670
671         /// <summary>
672         /// All input characters are substituted by this character (if null, the default value is '*'). <br />
673         /// </summary>
674         [EditorBrowsable(EditorBrowsableState.Never)]
675         public char? SubstituteCharacter { get; set; }
676
677         /// <summary>
678         /// Length of text to show or hide, available when HideCount/ShowCount mode is used (if null, the default value is 0). <br />
679         /// </summary>
680         [EditorBrowsable(EditorBrowsableState.Never)]
681         public int? SubstituteCount { get; set; }
682
683         /// <summary>
684         /// Hide last character after this duration, available when ShowLastCharacter mode (if null, the default value is 1000). <br />
685         /// </summary>
686         [EditorBrowsable(EditorBrowsableState.Never)]
687         public int? ShowLastCharacterDuration { get; set; }
688
689         /// <summary>
690         /// Determines whether the specified object is equal to the current object.
691         /// </summary>
692         /// <param name="obj">The object to compare with the current object.</param>
693         /// <returns>true if equal HiddenInput, else false.</returns>
694         [EditorBrowsable(EditorBrowsableState.Never)]
695         public override bool Equals(object obj) => obj is HiddenInput other && this.Equals(other);
696
697         /// <summary>
698         /// Determines whether the specified object is equal to the current object.
699         /// </summary>
700         /// <param name="other">The HiddenInput to compare with the current HiddenInput.</param>
701         /// <returns>true if equal HiddenInput, else false.</returns>
702         [EditorBrowsable(EditorBrowsableState.Never)]
703         public bool Equals(HiddenInput other) => Mode == other.Mode && SubstituteCharacter == other.SubstituteCharacter &&
704          SubstituteCount == other.SubstituteCount && ShowLastCharacterDuration == other.ShowLastCharacterDuration;
705
706         /// <summary>
707         /// The == operator.
708         /// </summary>
709         /// <param name="lhsHiddenInput">HiddenInput to compare</param>
710         /// <param name="rhsHiddenInput">HiddenInput to be compared</param>
711         /// <returns>true if HiddenInputs are equal</returns>
712         [EditorBrowsable(EditorBrowsableState.Never)]
713         public static bool operator ==(HiddenInput lhsHiddenInput, HiddenInput rhsHiddenInput) => lhsHiddenInput.Equals(rhsHiddenInput);
714
715         /// <summary>
716         /// The != operator.
717         /// </summary>
718         /// <param name="lhsHiddenInput">HiddenInput to compare</param>
719         /// <param name="rhsHiddenInput">HiddenInput to be compared</param>
720         /// <returns>true if HiddenInputs are not equal</returns>
721         [EditorBrowsable(EditorBrowsableState.Never)]
722         public static bool operator !=(HiddenInput lhsHiddenInput, HiddenInput rhsHiddenInput) => !lhsHiddenInput.Equals(rhsHiddenInput);
723
724         /// <summary>
725         /// Gets the hash code of this HiddenInput.
726         /// </summary>
727         /// <returns>The hash code.</returns>
728         [EditorBrowsable(EditorBrowsableState.Never)]
729         public override int GetHashCode() => (Mode, SubstituteCharacter, SubstituteCount, ShowLastCharacterDuration).GetHashCode();
730     }
731
732     /// <summary>
733     /// A struct to pass data of SelectionHandleImageLeft, SelectionHandleImageRight, SelectionHandlePressedImageLeft, SelectionHandlePressedImageRight, SelectionHandleMarkerImageLeft and SelectionHandleMarkerImageRight PropertyMap. <br />
734     /// </summary>
735     /// <remarks>
736     /// The SelectionHandleImage struct is used as an argument to SetSelectionHandleImage, GetSelectionHandleImage methods, SetSelectionHandlePressedImage, GetSelectionHandlePressedImage, SetSelectionHandleMarkerImage and GetSelectionHandleMarkerImage. <br />
737     /// See <see cref="Tizen.NUI.BaseComponents.TextField.SetSelectionHandleImage"/>, <see cref="Tizen.NUI.BaseComponents.TextField.GetSelectionHandleImage"/>, <see cref="Tizen.NUI.BaseComponents.TextField.SetSelectionHandlePressedImage"/>, <see cref="Tizen.NUI.BaseComponents.TextField.GetSelectionHandlePressedImage"/>, <see cref="Tizen.NUI.BaseComponents.TextField.SetSelectionHandleMarkerImage"/>, <see cref="Tizen.NUI.BaseComponents.TextField.GetSelectionHandleMarkerImage"/>, <br />
738     /// <see cref="Tizen.NUI.BaseComponents.TextEditor.SetSelectionHandleImage"/>, <see cref="Tizen.NUI.BaseComponents.TextEditor.GetSelectionHandleImage"/>, <see cref="Tizen.NUI.BaseComponents.TextEditor.SetSelectionHandlePressedImage"/>, <see cref="Tizen.NUI.BaseComponents.TextEditor.GetSelectionHandlePressedImage"/>, <see cref="Tizen.NUI.BaseComponents.TextEditor.SetSelectionHandleMarkerImage"/> and <see cref="Tizen.NUI.BaseComponents.TextEditor.GetSelectionHandleMarkerImage"/>. <br />
739     /// </remarks>
740     [EditorBrowsable(EditorBrowsableState.Never)]
741     public struct SelectionHandleImage : IEquatable<SelectionHandleImage>
742     {
743         /// <summary>
744         /// The image path to display for the left selection handle. <br />
745         /// It means the handle in the bottom-left. <br />
746         /// If the handle needs to be displayed in the top-left, this image will be vertically flipped. <br />
747         /// If null or empty string, it doesn't change the property. <br />
748         /// </summary>
749         [EditorBrowsable(EditorBrowsableState.Never)]
750         public string LeftImageUrl { get; set; }
751
752         /// <summary>
753         /// The image path to display for the right selection handle. <br />
754         /// It means the handle in the bottom-right. <br />
755         /// If the handle needs to be displayed in the top-right, this image will be vertically flipped. <br />
756         /// If null or empty string, it doesn't change the property. <br />
757         /// </summary>
758         [EditorBrowsable(EditorBrowsableState.Never)]
759         public string RightImageUrl { get; set; }
760
761         /// <summary>
762         /// Determines whether the specified object is equal to the current object.
763         /// </summary>
764         /// <param name="obj">The object to compare with the current object.</param>
765         /// <returns>true if equal SelectionHandleImage, else false.</returns>
766         [EditorBrowsable(EditorBrowsableState.Never)]
767         public override bool Equals(object obj) => obj is SelectionHandleImage other && this.Equals(other);
768
769         /// <summary>
770         /// Determines whether the specified object is equal to the current object.
771         /// </summary>
772         /// <param name="other">The SelectionHandleImage to compare with the current SelectionHandleImage.</param>
773         /// <returns>true if equal SelectionHandleImage, else false.</returns>
774         [EditorBrowsable(EditorBrowsableState.Never)]
775         public bool Equals(SelectionHandleImage other) => LeftImageUrl == other.LeftImageUrl && RightImageUrl == other.RightImageUrl;
776
777         /// <summary>
778         /// The == operator.
779         /// </summary>
780         /// <param name="lhsSelectionHandleImage">SelectionHandleImage to compare</param>
781         /// <param name="rhsSelectionHandleImage">SelectionHandleImage to be compared</param>
782         /// <returns>true if SelectionHandleImages are equal</returns>
783         [EditorBrowsable(EditorBrowsableState.Never)]
784         public static bool operator ==(SelectionHandleImage lhsSelectionHandleImage, SelectionHandleImage rhsSelectionHandleImage)
785          => lhsSelectionHandleImage.Equals(rhsSelectionHandleImage);
786
787         /// <summary>
788         /// The != operator.
789         /// </summary>
790         /// <param name="lhsSelectionHandleImage">SelectionHandleImage to compare</param>
791         /// <param name="rhsSelectionHandleImage">SelectionHandleImage to be compared</param>
792         /// <returns>true if SelectionHandleImages are not equal</returns>
793         [EditorBrowsable(EditorBrowsableState.Never)]
794         public static bool operator !=(SelectionHandleImage lhsSelectionHandleImage, SelectionHandleImage rhsSelectionHandleImage)
795          => !lhsSelectionHandleImage.Equals(rhsSelectionHandleImage);
796
797         /// <summary>
798         /// Gets the hash code of this SelectionHandleImage.
799         /// </summary>
800         /// <returns>The hash code.</returns>
801         [EditorBrowsable(EditorBrowsableState.Never)]
802         public override int GetHashCode() => (LeftImageUrl, RightImageUrl).GetHashCode();
803     }
804
805     /// <summary>
806     /// A struct to pass data of FontInfo PropertyMap.
807     /// </summary>
808     [EditorBrowsable(EditorBrowsableState.Never)]
809     public struct FontInfo : IEquatable<FontInfo>
810     {
811         /// <summary>
812         /// The FontFamily of the font.
813         /// </summary>
814         [EditorBrowsable(EditorBrowsableState.Never)]
815         public string Family { get; set; }
816
817         /// <summary>
818         /// The FontPath of the font.
819         /// </summary>
820         [EditorBrowsable(EditorBrowsableState.Never)]
821         public string Path { get; set; }
822
823         /// <summary>
824         /// The FontStyle of the font.
825         /// </summary>
826         [EditorBrowsable(EditorBrowsableState.Never)]
827         public FontStyle Style { get; set; }
828
829         /// <summary>
830         /// Determines whether the specified object is equal to the current object.
831         /// </summary>
832         /// <param name="obj">The object to compare with the current object.</param>
833         /// <returns>true if equal FontInfo, else false.</returns>
834         [EditorBrowsable(EditorBrowsableState.Never)]
835         public override bool Equals(object obj) => obj is FontInfo other && this.Equals(other);
836
837         /// <summary>
838         /// Determines whether the specified object is equal to the current object.
839         /// </summary>
840         /// <param name="other">The FontInfo to compare with the current FontInfo.</param>
841         /// <returns>true if equal FontInfo, else false.</returns>
842         [EditorBrowsable(EditorBrowsableState.Never)]
843         public bool Equals(FontInfo other) => Family == other.Family && Path == other.Path && Style == other.Style;
844
845         /// <summary>
846         /// The == operator.
847         /// </summary>
848         /// <param name="lhsFontInfo">FontInfo to compare</param>
849         /// <param name="rhsFontInfo">FontInfo to be compared</param>
850         /// <returns>true if FontInfos are equal</returns>
851         [EditorBrowsable(EditorBrowsableState.Never)]
852         public static bool operator ==(FontInfo lhsFontInfo, FontInfo rhsFontInfo) => lhsFontInfo.Equals(rhsFontInfo);
853
854         /// <summary>
855         /// The != operator.
856         /// </summary>
857         /// <param name="lhsFontInfo">FontInfo to compare</param>
858         /// <param name="rhsFontInfo">FontInfo to be compared</param>
859         /// <returns>true if FontInfos are not equal</returns>
860         [EditorBrowsable(EditorBrowsableState.Never)]
861         public static bool operator !=(FontInfo lhsFontInfo, FontInfo rhsFontInfo) => !lhsFontInfo.Equals(rhsFontInfo);
862
863         /// <summary>
864         /// Gets the hash code of this FontInfo.
865         /// </summary>
866         /// <returns>The hash code.</returns>
867         [EditorBrowsable(EditorBrowsableState.Never)]
868         public override int GetHashCode() => (Family, Path, Style).GetHashCode();
869     }
870 }