[NUI] Rebase develnui (DevelNUI only patches --> master) (#3910)
[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         public UnderlineType Type { get; set; }
251
252         /// <summary>
253         /// The color of the underline (if not provided then the color of the text is used).
254         /// </summary>
255         [EditorBrowsable(EditorBrowsableState.Never)]
256         public Color Color { get; set; }
257
258         /// <summary>
259         /// The height in pixels of the underline (if null, the default value is 1.0f).
260         /// </summary>
261         [EditorBrowsable(EditorBrowsableState.Never)]
262         public float? Height { get; set; }
263         
264         /// <summary>
265         /// The width of the dashes of the dashed underline (if null, the default value is 2.0f). <br />
266         /// Only valid when "UnderlineType.Dashed" type is used.
267         /// </summary>
268         public float? DashWidth { get; set; }
269
270         /// <summary>
271         /// The gap between the dashes of the dashed underline (if null, the default value is 1.0f). <br />
272         /// Only valid when "UnderlineType.Dashed" type is used.
273         /// </summary>
274         public float? DashGap { get; set; }
275
276         /// <summary>
277         /// Determines whether the specified object is equal to the current object.
278         /// </summary>
279         /// <param name="obj">The object to compare with the current object.</param>
280         /// <returns>true if equal Underline, else false.</returns>
281         [EditorBrowsable(EditorBrowsableState.Never)]
282         public override bool Equals(object obj) => obj is Underline other && this.Equals(other);
283
284         /// <summary>
285         /// Determines whether the specified object is equal to the current object.
286         /// </summary>
287         /// <param name="other">The Underline to compare with the current Underline.</param>
288         /// <returns>true if equal Underline, else false.</returns>
289         [EditorBrowsable(EditorBrowsableState.Never)]
290         public bool Equals(Underline other) => Enable == other.Enable && Color == other.Color && Height == other.Height;
291
292         /// <summary>
293         /// The == operator.
294         /// </summary>
295         /// <param name="lhsUnderline">Underline to compare</param>
296         /// <param name="rhsUnderline">Underline to be compared</param>
297         /// <returns>true if Underlines are equal</returns>
298         [EditorBrowsable(EditorBrowsableState.Never)]
299         public static bool operator ==(Underline lhsUnderline, Underline rhsUnderline) => lhsUnderline.Equals(rhsUnderline);
300
301         /// <summary>
302         /// The != operator.
303         /// </summary>
304         /// <param name="lhsUnderline">Underline to compare</param>
305         /// <param name="rhsUnderline">Underline to be compared</param>
306         /// <returns>true if Underlines are not equal</returns>
307         [EditorBrowsable(EditorBrowsableState.Never)]
308         public static bool operator !=(Underline lhsUnderline, Underline rhsUnderline) => !lhsUnderline.Equals(rhsUnderline);
309
310         /// <summary>
311         /// Gets the hash code of this Underline.
312         /// </summary>
313         /// <returns>The hash code.</returns>
314         [EditorBrowsable(EditorBrowsableState.Never)]
315         public override int GetHashCode() => (Enable, Color, Height).GetHashCode();
316     }
317
318     /// <summary>
319     /// A struct to pass data of Shadow PropertyMap. <br />
320     /// </summary>
321     /// <remarks>
322     /// The Shadow struct is used as an argument to SetShadow and GetShadow methods. <br />
323     /// 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 />
324     /// </remarks>
325     [EditorBrowsable(EditorBrowsableState.Never)]
326     public struct Shadow : IEquatable<Shadow>
327     {
328         /// <summary>
329         /// The color of the shadow (the default color is Color.Black).
330         /// </summary>
331         [EditorBrowsable(EditorBrowsableState.Never)]
332         public Color Color { get; set; }
333
334         /// <summary>
335         /// The offset in pixels of the shadow (if null, the default value is 0, 0). <br />
336         /// If not provided then the shadow is not enabled. <br />
337         ///
338         /// </summary>
339         [EditorBrowsable(EditorBrowsableState.Never)]
340         public Vector2 Offset { get; set; }
341
342         /// <summary>
343         /// The radius of the Gaussian blur for the soft shadow (if null, the default value is 0.0f). <br />
344         /// If not provided then the soft shadow is not enabled. <br />
345         /// </summary>
346         [EditorBrowsable(EditorBrowsableState.Never)]
347         public float? BlurRadius { get; set; }
348
349         /// <summary>
350         /// Determines whether the specified object is equal to the current object.
351         /// </summary>
352         /// <param name="obj">The object to compare with the current object.</param>
353         /// <returns>true if equal Shadow, else false.</returns>
354         [EditorBrowsable(EditorBrowsableState.Never)]
355         public override bool Equals(object obj) => obj is Shadow other && this.Equals(other);
356
357         /// <summary>
358         /// Determines whether the specified object is equal to the current object.
359         /// </summary>
360         /// <param name="other">The Shadow to compare with the current Shadow.</param>
361         /// <returns>true if equal Shadow, else false.</returns>
362         [EditorBrowsable(EditorBrowsableState.Never)]
363         public bool Equals(Shadow other) => Color == other.Color && Offset == other.Offset && BlurRadius == other.BlurRadius;
364
365         /// <summary>
366         /// The == operator.
367         /// </summary>
368         /// <param name="lhsShadow">Shadow to compare</param>
369         /// <param name="rhsShadow">Shadow to be compared</param>
370         /// <returns>true if Shadows are equal</returns>
371         [EditorBrowsable(EditorBrowsableState.Never)]
372         public static bool operator ==(Shadow lhsShadow, Shadow rhsShadow) => lhsShadow.Equals(rhsShadow);
373
374         /// <summary>
375         /// The != operator.
376         /// </summary>
377         /// <param name="lhsShadow">Shadow to compare</param>
378         /// <param name="rhsShadow">Shadow to be compared</param>
379         /// <returns>true if Shadows are not equal</returns>
380         [EditorBrowsable(EditorBrowsableState.Never)]
381         public static bool operator !=(Shadow lhsShadow, Shadow rhsShadow) => !lhsShadow.Equals(rhsShadow);
382
383         /// <summary>
384         /// Gets the hash code of this Shadow.
385         /// </summary>
386         /// <returns>The hash code.</returns>
387         [EditorBrowsable(EditorBrowsableState.Never)]
388         public override int GetHashCode() => (Color, Offset, BlurRadius).GetHashCode();
389     }
390
391     /// <summary>
392     /// A struct to pass data of Outline PropertyMap. <br />
393     /// </summary>
394     /// <remarks>
395     /// The Outline struct is used as an argument to SetOutline and GetOutline methods. <br />
396     /// 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 />
397     /// </remarks>
398     [EditorBrowsable(EditorBrowsableState.Never)]
399     public struct Outline : IEquatable<Outline>
400     {
401         /// <summary>
402         /// The color of the outline (the default color is Color.White).
403         /// </summary>
404         [EditorBrowsable(EditorBrowsableState.Never)]
405         public Color Color { get; set; }
406
407         /// <summary>
408         /// The width in pixels of the outline (if null, the default value is 0.0f). <br />
409         /// If not provided then the outline is not enabled. <br />
410         /// </summary>
411         [EditorBrowsable(EditorBrowsableState.Never)]
412         public float? Width { get; set; }
413
414         /// <summary>
415         /// Determines whether the specified object is equal to the current object.
416         /// </summary>
417         /// <param name="obj">The object to compare with the current object.</param>
418         /// <returns>true if equal Outline, else false.</returns>
419         [EditorBrowsable(EditorBrowsableState.Never)]
420         public override bool Equals(object obj) => obj is Outline other && this.Equals(other);
421
422         /// <summary>
423         /// Determines whether the specified object is equal to the current object.
424         /// </summary>
425         /// <param name="other">The Outline to compare with the current Outline.</param>
426         /// <returns>true if equal Outline, else false.</returns>
427         [EditorBrowsable(EditorBrowsableState.Never)]
428         public bool Equals(Outline other) => Color == other.Color && Width == other.Width;
429
430         /// <summary>
431         /// The == operator.
432         /// </summary>
433         /// <param name="lhsOutline">Outline to compare</param>
434         /// <param name="rhsOutline">Outline to be compared</param>
435         /// <returns>true if Outlines are equal</returns>
436         [EditorBrowsable(EditorBrowsableState.Never)]
437         public static bool operator ==(Outline lhsOutline, Outline rhsOutline) => lhsOutline.Equals(rhsOutline);
438
439         /// <summary>
440         /// The != operator.
441         /// </summary>
442         /// <param name="lhsOutline">Outline to compare</param>
443         /// <param name="rhsOutline">Outline to be compared</param>
444         /// <returns>true if Outlines are not equal</returns>
445         [EditorBrowsable(EditorBrowsableState.Never)]
446         public static bool operator !=(Outline lhsOutline, Outline rhsOutline) => !lhsOutline.Equals(rhsOutline);
447
448         /// <summary>
449         /// Gets the hash code of this Outline.
450         /// </summary>
451         /// <returns>The hash code.</returns>
452         [EditorBrowsable(EditorBrowsableState.Never)]
453         public override int GetHashCode() => (Color, Width).GetHashCode();
454     }
455
456     /// <summary>
457     /// A struct to pass data of TextFit PropertyMap. <br />
458     /// </summary>
459     /// <remarks>
460     /// The TextFit struct is used as an argument to SetTextFit and GetTextFit methods. <br />
461     /// See <see cref="Tizen.NUI.BaseComponents.TextLabel.SetTextFit"/> and <see cref="Tizen.NUI.BaseComponents.TextLabel.GetTextFit"/>. <br />
462     /// </remarks>
463     [EditorBrowsable(EditorBrowsableState.Never)]
464     public struct TextFit : IEquatable<TextFit>
465     {
466         /// <summary>
467         /// True to enable the text fit or false to disable (the default value is false).
468         /// </summary>
469         [EditorBrowsable(EditorBrowsableState.Never)]
470         public bool Enable { get; set; }
471
472         /// <summary>
473         /// Minimum Size for text fit (if null, the default value is 10.0f).
474         /// </summary>
475         [EditorBrowsable(EditorBrowsableState.Never)]
476         public float? MinSize { get; set; }
477
478         /// <summary>
479         /// Maximum Size for text fit (if null, the default value is 100.0f).
480         /// </summary>
481         [EditorBrowsable(EditorBrowsableState.Never)]
482         public float? MaxSize { get; set; }
483
484         /// <summary>
485         /// Step Size for font increase (if null, the default value is 1.0f).
486         /// </summary>
487         [EditorBrowsable(EditorBrowsableState.Never)]
488         public float? StepSize { get; set; }
489
490         /// <summary>
491         /// The size type of font, PointSize or PixelSize (the default value is PointSize).
492         /// </summary>
493         [EditorBrowsable(EditorBrowsableState.Never)]
494         public FontSizeType FontSizeType { get; set; }
495
496         /// <summary>
497         /// Font Size for text fit
498         /// </summary>
499         [EditorBrowsable(EditorBrowsableState.Never)]
500         public float? FontSize { get; set; }
501
502         /// <summary>
503         /// Determines whether the specified object is equal to the current object.
504         /// </summary>
505         /// <param name="obj">The object to compare with the current object.</param>
506         /// <returns>true if equal TextFit, else false.</returns>
507         [EditorBrowsable(EditorBrowsableState.Never)]
508         public override bool Equals(object obj) => obj is TextFit other && this.Equals(other);
509
510         /// <summary>
511         /// Determines whether the specified object is equal to the current object.
512         /// </summary>
513         /// <param name="other">The TextFit to compare with the current TextFit.</param>
514         /// <returns>true if equal TextFit, else false.</returns>
515         [EditorBrowsable(EditorBrowsableState.Never)]
516         public bool Equals(TextFit other) => Enable == other.Enable && MinSize == other.MinSize && MaxSize == other.MaxSize &&
517          StepSize == other.StepSize && FontSizeType == other.FontSizeType && FontSize == other.FontSize;
518
519         /// <summary>
520         /// The == operator.
521         /// </summary>
522         /// <param name="lhsTextFit">TextFit to compare</param>
523         /// <param name="rhsTextFit">TextFit to be compared</param>
524         /// <returns>true if TextFits are equal</returns>
525         [EditorBrowsable(EditorBrowsableState.Never)]
526         public static bool operator ==(TextFit lhsTextFit, TextFit rhsTextFit) => lhsTextFit.Equals(rhsTextFit);
527
528         /// <summary>
529         /// The != operator.
530         /// </summary>
531         /// <param name="lhsTextFit">TextFit to compare</param>
532         /// <param name="rhsTextFit">TextFit to be compared</param>
533         /// <returns>true if TextFits are not equal</returns>
534         [EditorBrowsable(EditorBrowsableState.Never)]
535         public static bool operator !=(TextFit lhsTextFit, TextFit rhsTextFit) => !lhsTextFit.Equals(rhsTextFit);
536
537         /// <summary>
538         /// Gets the hash code of this TextFit.
539         /// </summary>
540         /// <returns>The hash code.</returns>
541         [EditorBrowsable(EditorBrowsableState.Never)]
542         public override int GetHashCode() => (Enable, MinSize, MaxSize, StepSize, FontSizeType, FontSize).GetHashCode();
543     }
544
545     /// <summary>
546     /// A struct to pass data of Placeholder PropertyMap. <br />
547     /// </summary>
548     /// <remarks>
549     /// The Placeholder struct is used as an argument to SetPlaceholder and GetPlaceholder methods. <br />
550     /// 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 />
551     /// </remarks>
552     [EditorBrowsable(EditorBrowsableState.Never)]
553     public struct Placeholder : IEquatable<Placeholder>
554     {
555         /// <summary>
556         /// The text to display when the TextField is empty and inactive.
557         /// </summary>
558         [EditorBrowsable(EditorBrowsableState.Never)]
559         public string Text { get; set; }
560
561         /// <summary>
562         /// The text to display when the placeholder has focus.
563         /// </summary>
564         [EditorBrowsable(EditorBrowsableState.Never)]
565         public string TextFocused { get; set; }
566
567         /// <summary>
568         /// The color of the placeholder text.
569         /// </summary>
570         [EditorBrowsable(EditorBrowsableState.Never)]
571         public Color Color { get; set; }
572
573         /// <summary>
574         /// The FontFamily of the placeholder text.
575         /// </summary>
576         [EditorBrowsable(EditorBrowsableState.Never)]
577         public string FontFamily { get; set; }
578
579         /// <summary>
580         /// The FontStyle of the placeholder text (if null, the text control FontStyle is used).
581         /// </summary>
582         [EditorBrowsable(EditorBrowsableState.Never)]
583         public FontStyle? FontStyle { get; set; }
584
585         /// <summary>
586         /// The PointSize of the placeholder text. <br />
587         /// Not required if PixelSize provided. <br />
588         /// If both provided or neither provided then the text control point size is used. <br />
589         /// </summary>
590         [EditorBrowsable(EditorBrowsableState.Never)]
591         public float? PointSize { get; set; }
592
593         /// <summary>
594         /// The PiexSize of the placeholder text.
595         /// Not required if PointSize provided. <br />
596         /// If both provided or neither provided then the text control point size is used. <br />
597         /// </summary>
598         [EditorBrowsable(EditorBrowsableState.Never)]
599         public float? PixelSize { get; set; }
600
601         /// <summary>
602         /// The ellipsis of the placeholder text (the default value is false).
603         /// </summary>
604         [EditorBrowsable(EditorBrowsableState.Never)]
605         public bool Ellipsis { get; set; }
606
607         /// <summary>
608         /// Determines whether the specified object is equal to the current object.
609         /// </summary>
610         /// <param name="obj">The object to compare with the current object.</param>
611         /// <returns>true if equal Placeholder, else false.</returns>
612         [EditorBrowsable(EditorBrowsableState.Never)]
613         public override bool Equals(object obj) => obj is Placeholder other && this.Equals(other);
614
615         /// <summary>
616         /// Determines whether the specified object is equal to the current object.
617         /// </summary>
618         /// <param name="other">The Placeholder to compare with the current Placeholder.</param>
619         /// <returns>true if equal Placeholder, else false.</returns>
620         [EditorBrowsable(EditorBrowsableState.Never)]
621         public bool Equals(Placeholder other) =>
622          Text == other.Text && TextFocused == other.TextFocused && Color == other.Color && FontFamily == other.FontFamily &&
623           FontStyle == other.FontStyle && PointSize == other.PointSize && PixelSize == other.PixelSize && Ellipsis == other.Ellipsis;
624
625         /// <summary>
626         /// The == operator.
627         /// </summary>
628         /// <param name="lhsPlaceholder">Placeholder to compare</param>
629         /// <param name="rhsPlaceholder">Placeholder to be compared</param>
630         /// <returns>true if Placeholders are equal</returns>
631         [EditorBrowsable(EditorBrowsableState.Never)]
632         public static bool operator ==(Placeholder lhsPlaceholder, Placeholder rhsPlaceholder) => lhsPlaceholder.Equals(rhsPlaceholder);
633
634         /// <summary>
635         /// The != operator.
636         /// </summary>
637         /// <param name="lhsPlaceholder">Placeholder to compare</param>
638         /// <param name="rhsPlaceholder">Placeholder to be compared</param>
639         /// <returns>true if Placeholders are not equal</returns>
640         [EditorBrowsable(EditorBrowsableState.Never)]
641         public static bool operator !=(Placeholder lhsPlaceholder, Placeholder rhsPlaceholder) => !lhsPlaceholder.Equals(rhsPlaceholder);
642
643         /// <summary>
644         /// Gets the hash code of this Placeholder.
645         /// </summary>
646         /// <returns>The hash code.</returns>
647         [EditorBrowsable(EditorBrowsableState.Never)]
648         public override int GetHashCode() => (Text, TextFocused, Color, FontFamily, FontStyle, PointSize, PixelSize, Ellipsis).GetHashCode();
649     }
650
651     /// <summary>
652     /// A struct to pass data of HiddenInputSettings PropertyMap. <br />
653     /// </summary>
654     /// <remarks>
655     /// The HiddenInput struct is used as an argument to SetHiddenInput and GetHiddenInput methods. <br />
656     /// See <see cref="Tizen.NUI.BaseComponents.TextField.SetHiddenInput"/> and <see cref="Tizen.NUI.BaseComponents.TextField.GetHiddenInput"/>. <br />
657     /// </remarks>
658     [EditorBrowsable(EditorBrowsableState.Never)]
659     public struct HiddenInput : IEquatable<HiddenInput>
660     {
661         /// <summary>
662         /// The mode for input text display. <br />
663         /// </summary>
664         [EditorBrowsable(EditorBrowsableState.Never)]
665         public HiddenInputModeType Mode { get; set; }
666
667         /// <summary>
668         /// All input characters are substituted by this character (if null, the default value is '*'). <br />
669         /// </summary>
670         [EditorBrowsable(EditorBrowsableState.Never)]
671         public char? SubstituteCharacter { get; set; }
672
673         /// <summary>
674         /// Length of text to show or hide, available when HideCount/ShowCount mode is used (if null, the default value is 0). <br />
675         /// </summary>
676         [EditorBrowsable(EditorBrowsableState.Never)]
677         public int? SubstituteCount { get; set; }
678
679         /// <summary>
680         /// Hide last character after this duration, available when ShowLastCharacter mode (if null, the default value is 1000). <br />
681         /// </summary>
682         [EditorBrowsable(EditorBrowsableState.Never)]
683         public int? ShowLastCharacterDuration { get; set; }
684
685         /// <summary>
686         /// Determines whether the specified object is equal to the current object.
687         /// </summary>
688         /// <param name="obj">The object to compare with the current object.</param>
689         /// <returns>true if equal HiddenInput, else false.</returns>
690         [EditorBrowsable(EditorBrowsableState.Never)]
691         public override bool Equals(object obj) => obj is HiddenInput other && this.Equals(other);
692
693         /// <summary>
694         /// Determines whether the specified object is equal to the current object.
695         /// </summary>
696         /// <param name="other">The HiddenInput to compare with the current HiddenInput.</param>
697         /// <returns>true if equal HiddenInput, else false.</returns>
698         [EditorBrowsable(EditorBrowsableState.Never)]
699         public bool Equals(HiddenInput other) => Mode == other.Mode && SubstituteCharacter == other.SubstituteCharacter &&
700          SubstituteCount == other.SubstituteCount && ShowLastCharacterDuration == other.ShowLastCharacterDuration;
701
702         /// <summary>
703         /// The == operator.
704         /// </summary>
705         /// <param name="lhsHiddenInput">HiddenInput to compare</param>
706         /// <param name="rhsHiddenInput">HiddenInput to be compared</param>
707         /// <returns>true if HiddenInputs are equal</returns>
708         [EditorBrowsable(EditorBrowsableState.Never)]
709         public static bool operator ==(HiddenInput lhsHiddenInput, HiddenInput rhsHiddenInput) => lhsHiddenInput.Equals(rhsHiddenInput);
710
711         /// <summary>
712         /// The != operator.
713         /// </summary>
714         /// <param name="lhsHiddenInput">HiddenInput to compare</param>
715         /// <param name="rhsHiddenInput">HiddenInput to be compared</param>
716         /// <returns>true if HiddenInputs are not equal</returns>
717         [EditorBrowsable(EditorBrowsableState.Never)]
718         public static bool operator !=(HiddenInput lhsHiddenInput, HiddenInput rhsHiddenInput) => !lhsHiddenInput.Equals(rhsHiddenInput);
719
720         /// <summary>
721         /// Gets the hash code of this HiddenInput.
722         /// </summary>
723         /// <returns>The hash code.</returns>
724         [EditorBrowsable(EditorBrowsableState.Never)]
725         public override int GetHashCode() => (Mode, SubstituteCharacter, SubstituteCount, ShowLastCharacterDuration).GetHashCode();
726     }
727
728     /// <summary>
729     /// A struct to pass data of SelectionHandleImageLeft, SelectionHandleImageRight, SelectionHandlePressedImageLeft, SelectionHandlePressedImageRight, SelectionHandleMarkerImageLeft and SelectionHandleMarkerImageRight PropertyMap. <br />
730     /// </summary>
731     /// <remarks>
732     /// The SelectionHandleImage struct is used as an argument to SetSelectionHandleImage, GetSelectionHandleImage methods, SetSelectionHandlePressedImage, GetSelectionHandlePressedImage, SetSelectionHandleMarkerImage and GetSelectionHandleMarkerImage. <br />
733     /// 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 />
734     /// <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 />
735     /// </remarks>
736     [EditorBrowsable(EditorBrowsableState.Never)]
737     public struct SelectionHandleImage : IEquatable<SelectionHandleImage>
738     {
739         /// <summary>
740         /// The image path to display for the left selection handle. <br />
741         /// It means the handle in the bottom-left. <br />
742         /// If the handle needs to be displayed in the top-left, this image will be vertically flipped. <br />
743         /// If null or empty string, it doesn't change the property. <br />
744         /// </summary>
745         [EditorBrowsable(EditorBrowsableState.Never)]
746         public string LeftImageUrl { get; set; }
747
748         /// <summary>
749         /// The image path to display for the right selection handle. <br />
750         /// It means the handle in the bottom-right. <br />
751         /// If the handle needs to be displayed in the top-right, this image will be vertically flipped. <br />
752         /// If null or empty string, it doesn't change the property. <br />
753         /// </summary>
754         [EditorBrowsable(EditorBrowsableState.Never)]
755         public string RightImageUrl { get; set; }
756
757         /// <summary>
758         /// Determines whether the specified object is equal to the current object.
759         /// </summary>
760         /// <param name="obj">The object to compare with the current object.</param>
761         /// <returns>true if equal SelectionHandleImage, else false.</returns>
762         [EditorBrowsable(EditorBrowsableState.Never)]
763         public override bool Equals(object obj) => obj is SelectionHandleImage other && this.Equals(other);
764
765         /// <summary>
766         /// Determines whether the specified object is equal to the current object.
767         /// </summary>
768         /// <param name="other">The SelectionHandleImage to compare with the current SelectionHandleImage.</param>
769         /// <returns>true if equal SelectionHandleImage, else false.</returns>
770         [EditorBrowsable(EditorBrowsableState.Never)]
771         public bool Equals(SelectionHandleImage other) => LeftImageUrl == other.LeftImageUrl && RightImageUrl == other.RightImageUrl;
772
773         /// <summary>
774         /// The == operator.
775         /// </summary>
776         /// <param name="lhsSelectionHandleImage">SelectionHandleImage to compare</param>
777         /// <param name="rhsSelectionHandleImage">SelectionHandleImage to be compared</param>
778         /// <returns>true if SelectionHandleImages are equal</returns>
779         [EditorBrowsable(EditorBrowsableState.Never)]
780         public static bool operator ==(SelectionHandleImage lhsSelectionHandleImage, SelectionHandleImage rhsSelectionHandleImage)
781          => lhsSelectionHandleImage.Equals(rhsSelectionHandleImage);
782
783         /// <summary>
784         /// The != operator.
785         /// </summary>
786         /// <param name="lhsSelectionHandleImage">SelectionHandleImage to compare</param>
787         /// <param name="rhsSelectionHandleImage">SelectionHandleImage to be compared</param>
788         /// <returns>true if SelectionHandleImages are not equal</returns>
789         [EditorBrowsable(EditorBrowsableState.Never)]
790         public static bool operator !=(SelectionHandleImage lhsSelectionHandleImage, SelectionHandleImage rhsSelectionHandleImage)
791          => !lhsSelectionHandleImage.Equals(rhsSelectionHandleImage);
792
793         /// <summary>
794         /// Gets the hash code of this SelectionHandleImage.
795         /// </summary>
796         /// <returns>The hash code.</returns>
797         [EditorBrowsable(EditorBrowsableState.Never)]
798         public override int GetHashCode() => (LeftImageUrl, RightImageUrl).GetHashCode();
799     }
800 }