[NUI] Add ScrollEnabled property to ScrollableBase (#1298)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI.Components / Controls / InputField.cs
1 /*
2  * Copyright(c) 2019 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 using System;
18 using Tizen.NUI.BaseComponents;
19 using System.ComponentModel;
20
21 namespace Tizen.NUI.Components
22 {
23     /// <summary>
24     /// InputField is a editable input compoment
25     /// </summary>
26     /// <since_tizen> 6 </since_tizen>
27     /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
28     [EditorBrowsable(EditorBrowsableState.Never)]
29     public class InputField : Control
30     {
31         // the background image
32         private ImageView bgImage = null;
33         // the textField
34         private TextField textField = null;
35         // the attributes of the inputField
36         private InputFieldStyle inputFieldAttrs = null;
37         // the flag indicate should relayout the textField in base class
38         private bool relayoutTextField = true;
39
40         static InputField() { }
41
42         /// <summary>
43         /// Initializes a new instance of the InputField class.
44         /// </summary>
45         /// <since_tizen> 6 </since_tizen>
46         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
47         [EditorBrowsable(EditorBrowsableState.Never)]
48         public InputField() : base()
49         {
50             Initialize();
51         }
52
53         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
54         [EditorBrowsable(EditorBrowsableState.Never)]
55         public InputField(string style) : base(style)
56         {
57             Initialize();
58         }
59
60         /// <summary>
61         /// Initializes a new instance of the InputField class.
62         /// </summary>
63         /// <param name="attributes">Create Header by attributes customized by user.</param>
64         /// <since_tizen> 6 </since_tizen>
65         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
66         [EditorBrowsable(EditorBrowsableState.Never)]
67         public InputField(InputFieldStyle attributes) : base(attributes)
68         {
69             Initialize();
70         }
71
72         /// <summary>
73         /// Gets or sets the property for the enabled state.
74         /// </summary>
75         /// <since_tizen> 6 </since_tizen>
76         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
77         [EditorBrowsable(EditorBrowsableState.Never)]
78         public bool StateEnabled
79         {
80             get
81             {
82                 return Sensitive;
83             }
84             set
85             {
86                 Sensitive = value;
87             }
88         }
89
90         /// <summary>
91         /// Gets or sets the property for the text content.
92         /// </summary>
93         /// <since_tizen> 6 </since_tizen>
94         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
95         [EditorBrowsable(EditorBrowsableState.Never)]
96         public string Text
97         {
98             get
99             {
100                 return textField?.Text;
101             }
102             set
103             {
104                 if (null != textField) textField.Text = value;
105             }
106         }
107
108         /// <summary>
109         /// Gets or sets the property for the hint text.
110         /// </summary>
111         /// <since_tizen> 6 </since_tizen>
112         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
113         [EditorBrowsable(EditorBrowsableState.Never)]
114         public string HintText
115         {
116             get
117             {
118                 return textField?.PlaceholderText;
119             }
120             set
121             {
122                 if (null != textField) textField.PlaceholderText = value;
123             }
124         }
125
126         /// <summary>
127         /// Gets or sets the property for the color of the input text.
128         /// </summary>
129         /// <since_tizen> 6 </since_tizen>
130         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
131         [EditorBrowsable(EditorBrowsableState.Never)]
132         public Color TextColor
133         {
134             get
135             {
136                 return textField?.TextColor;
137             }
138             set
139             {
140                 CreateTextFieldAttributes();
141                 if (null != inputFieldAttrs?.InputBoxAttributes)
142                 {
143                     inputFieldAttrs.InputBoxAttributes.TextColor = value;
144                     if (null != textField) textField.TextColor = value;
145                 }
146             }
147         }
148
149         /// <summary>
150         /// Gets or sets text color.
151         /// </summary>
152         /// <since_tizen> 6 </since_tizen>
153         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
154         [EditorBrowsable(EditorBrowsableState.Never)]
155         public Color HintTextColor
156         {
157             get
158             {
159                 return textField?.PlaceholderTextColor;
160             }
161             set
162             {
163                 CreateTextFieldAttributes();
164                 if (null != inputFieldAttrs?.InputBoxAttributes && null != value)
165                 {
166                     Vector4 color = new Vector4(value.R, value.G, value.B, value.A);
167                     inputFieldAttrs.InputBoxAttributes.PlaceholderTextColor = color;
168                     if (null != textField) textField.PlaceholderTextColor = color;
169                 }
170             }
171         }
172
173         /// <summary>
174         /// Gets or sets primary cursor color.
175         /// </summary>
176         /// <since_tizen> 6 </since_tizen>
177         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
178         [EditorBrowsable(EditorBrowsableState.Never)]
179         public Color PrimaryCursorColor
180         {
181             get
182             {
183                 return textField?.PrimaryCursorColor;
184             }
185             set
186             {
187                 CreateTextFieldAttributes();
188                 if (null != inputFieldAttrs?.InputBoxAttributes && null != value)
189                 {
190                     Vector4 color = new Vector4(value.R, value.G, value.B, value.A);
191                     inputFieldAttrs.InputBoxAttributes.PrimaryCursorColor = color;
192                     if (null != textField) textField.PrimaryCursorColor = color;
193                 }
194             }
195         }
196
197         /// <summary>
198         /// Gets or sets font family of text.
199         /// </summary>
200         /// <since_tizen> 6 </since_tizen>
201         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
202         [EditorBrowsable(EditorBrowsableState.Never)]
203         public string FontFamily
204         {
205             get
206             {
207                 return textField?.FontFamily;
208             }
209             set
210             {
211                 CreateTextFieldAttributes();
212                 if (null != inputFieldAttrs?.InputBoxAttributes)
213                 {
214                     inputFieldAttrs.InputBoxAttributes.FontFamily = value;
215                     if (null != textField) textField.FontFamily = value;
216                 }
217             }
218         }
219
220         /// <summary>
221         /// Gets or sets enable cursor blink.
222         /// </summary>
223         /// <since_tizen> 6 </since_tizen>
224         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
225         [EditorBrowsable(EditorBrowsableState.Never)]
226         public bool EnableCursorBlink
227         {
228             get
229             {
230                 return textField?.EnableCursorBlink ?? false;
231             }
232             set
233             {
234                 CreateTextFieldAttributes();
235                 if (null != inputFieldAttrs.InputBoxAttributes)
236                 {
237                     inputFieldAttrs.InputBoxAttributes.EnableCursorBlink = value;
238                     if (null != textField) textField.EnableCursorBlink = value;
239                 }
240             }
241         }
242
243         /// <summary>
244         /// Gets or sets enable selection.
245         /// </summary>
246         /// <since_tizen> 6 </since_tizen>
247         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
248         [EditorBrowsable(EditorBrowsableState.Never)]
249         public bool EnableSelection
250         {
251             get
252             {
253                 return textField?.EnableSelection ?? false;
254             }
255             set
256             {
257                 CreateTextFieldAttributes();
258                 if (null != inputFieldAttrs?.InputBoxAttributes)
259                 {
260                     inputFieldAttrs.InputBoxAttributes.EnableSelection = value;
261                     if (null != textField) textField.EnableSelection = value;
262                 }
263             }
264         }
265
266         /// <summary>
267         /// Gets or sets cursor width.
268         /// </summary>
269         /// <since_tizen> 6 </since_tizen>
270         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
271         [EditorBrowsable(EditorBrowsableState.Never)]
272         public int CursorWidth
273         {
274             get
275             {
276                 return textField?.CursorWidth ?? 0;
277             }
278             set
279             {
280                 CreateTextFieldAttributes();
281                 if (null != inputFieldAttrs.InputBoxAttributes)
282                 {
283                     inputFieldAttrs.InputBoxAttributes.CursorWidth = value;
284                     if (null != textField) textField.CursorWidth = value;
285                 }
286             }
287         }
288
289         /// <summary>
290         /// Gets or sets if enable ellipsis.
291         /// </summary>
292         /// <since_tizen> 6 </since_tizen>
293         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
294         [EditorBrowsable(EditorBrowsableState.Never)]
295         public bool EnableEllipsis
296         {
297             get
298             {
299                 return textField?.Ellipsis ?? false;
300             }
301             set
302             {
303                 CreateTextFieldAttributes();
304                 if (null != inputFieldAttrs.InputBoxAttributes)
305                 {
306                     inputFieldAttrs.InputBoxAttributes.Ellipsis = value;
307                     if (null != textField) textField.Ellipsis = value;
308                 }
309             }
310         }
311
312         /// <summary>
313         /// Gets or sets background image's resource url of input field.
314         /// </summary>
315         /// <since_tizen> 6 </since_tizen>
316         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
317         [EditorBrowsable(EditorBrowsableState.Never)]
318         public string BackgroundImageURL
319         {
320             get
321             {
322                 return inputFieldAttrs?.BackgroundImageAttributes?.ResourceUrl?.All;
323             }
324             set
325             {
326                 CreateBackgroundAttributes();
327                 if (null != inputFieldAttrs?.BackgroundImageAttributes)
328                 {
329                     inputFieldAttrs.BackgroundImageAttributes.ResourceUrl = value;
330                     RelayoutRequest();
331                 }
332             }
333         }
334
335         /// <summary>
336         /// Background image's border in Button.
337         /// </summary>
338         /// <since_tizen> 6 </since_tizen>
339         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
340         [EditorBrowsable(EditorBrowsableState.Never)]
341         public new Rectangle BackgroundImageBorder
342         {
343             get
344             {
345                 return inputFieldAttrs?.BackgroundImageAttributes?.Border?.All;
346             }
347             set
348             {
349                 CreateBackgroundAttributes();
350                 if (null != inputFieldAttrs?.BackgroundImageAttributes)
351                 {
352                     inputFieldAttrs.BackgroundImageAttributes.Border = value;
353                     RelayoutRequest();
354                 }
355             }
356         }
357
358         /// <summary>
359         /// Gets and Sets Space.
360         /// </summary>
361         public int Space
362         {
363             get
364             {
365                 return inputFieldAttrs?.Space ?? 0;
366             }
367             set
368             {
369                 if (null != inputFieldAttrs)
370                 {
371                     inputFieldAttrs.Space = value;
372                     RelayoutRequest();
373                 }
374             }
375         }
376
377         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
378         [EditorBrowsable(EditorBrowsableState.Never)]
379         public override void ApplyStyle(ViewStyle viewStyle)
380         {
381             base.ApplyStyle(viewStyle);
382
383             InputFieldStyle inputFieldStyle = viewStyle as InputFieldStyle;
384
385             if (null != inputFieldStyle.BackgroundImageAttributes)
386             {
387                 if (null == bgImage)
388                 {
389                     bgImage = new ImageView()
390                     {
391                         WidthResizePolicy = ResizePolicyType.FillToParent,
392                         HeightResizePolicy = ResizePolicyType.FillToParent,
393                     };
394
395                     this.Add(bgImage);
396                 }
397                 bgImage.ApplyStyle(inputFieldStyle.BackgroundImageAttributes);
398             }
399             if (null != inputFieldStyle.InputBoxAttributes)
400             {
401                 if (null == textField)
402                 {
403                     textField = new TextField()
404                     {
405                         WidthResizePolicy = ResizePolicyType.Fixed,
406                         HeightResizePolicy = ResizePolicyType.Fixed,
407                         ParentOrigin = Tizen.NUI.ParentOrigin.CenterLeft,
408                         PivotPoint = Tizen.NUI.PivotPoint.CenterLeft,
409                         PositionUsesPivotPoint = true,
410                     };
411                     this.Add(textField);
412                     textField.FocusGained += OnTextFieldFocusGained;
413                     textField.FocusLost += OnTextFieldFocusLost;
414                     textField.TextChanged += OnTextFieldTextChanged;
415                     textField.KeyEvent += OnTextFieldKeyEvent;
416                 }
417                 textField.ApplyStyle(inputFieldStyle.InputBoxAttributes);
418             }
419         }
420
421         /// <summary>
422         /// Get Input Field attribues.
423         /// </summary>
424         /// <since_tizen> 6 </since_tizen>
425         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
426         [EditorBrowsable(EditorBrowsableState.Never)]
427         protected override ViewStyle GetViewStyle()
428         {
429             return new InputFieldStyle();
430         }
431
432         /// <summary>
433         /// Dispose Input Field and all children on it.
434         /// </summary>
435         /// <param name="type">Dispose type.</param>
436         /// <since_tizen> 6 </since_tizen>
437         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
438         [EditorBrowsable(EditorBrowsableState.Never)]
439         protected override void Dispose(DisposeTypes type)
440         {
441             if (disposed)
442             {
443                 return;
444             }
445             if (type == DisposeTypes.Explicit)
446             {
447                 if (bgImage != null)
448                 {
449                     this.Remove(bgImage);
450                     bgImage.Dispose();
451                     bgImage = null;
452                 }
453                 if (null != textField)
454                 {
455                     textField.FocusGained -= OnTextFieldFocusGained;
456                     textField.FocusLost -= OnTextFieldFocusLost;
457                     textField.TextChanged -= OnTextFieldTextChanged;
458                     textField.KeyEvent -= OnTextFieldKeyEvent;
459                     this.Remove(textField);
460                     textField.Dispose();
461                     textField = null;
462                 }
463             }
464
465             base.Dispose(type);
466         }
467
468         /// <summary>
469         /// Update Input Field by attributes.
470         /// </summary>
471         /// <since_tizen> 6 </since_tizen>
472         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
473         [EditorBrowsable(EditorBrowsableState.Never)]
474         protected override void OnUpdate()
475         {
476             RelayoutComponent();
477             OnLayoutDirectionChanged();
478         }
479
480         /// <summary>
481         /// Theme change callback when theme is changed, this callback will be trigger.
482         /// </summary>
483         /// <since_tizen> 6 </since_tizen>
484         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
485         [EditorBrowsable(EditorBrowsableState.Never)]
486         protected override void OnThemeChangedEvent(object sender, StyleManager.ThemeChangeEventArgs e)
487         {
488             InputFieldStyle tempStyle = StyleManager.Instance.GetViewStyle(style) as InputFieldStyle;
489             if (tempStyle != null)
490             {
491                 Style.CopyFrom(tempStyle);
492                 RelayoutRequest();
493             }
494         }
495
496         /// <summary>
497         /// Theme change callback when text field focus is gained, this callback will be trigger.
498         /// </summary>
499         /// <since_tizen> 6 </since_tizen>
500         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
501         [EditorBrowsable(EditorBrowsableState.Never)]
502         protected virtual void OnTextFieldFocusGained(object source, EventArgs e)
503         {
504         }
505
506         /// <summary>
507         /// Theme change callback when text field is lost, this callback will be trigger.
508         /// </summary>
509         /// <since_tizen> 6 </since_tizen>
510         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
511         [EditorBrowsable(EditorBrowsableState.Never)]
512         protected virtual void OnTextFieldFocusLost(object source, EventArgs e)
513         {
514         }
515
516         /// <summary>
517         /// Theme change callback when text field's text is changed, this callback will be trigger.
518         /// </summary>
519         /// <since_tizen> 6 </since_tizen>
520         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
521         [EditorBrowsable(EditorBrowsableState.Never)]
522         protected virtual void OnTextFieldTextChanged(object sender, TextField.TextChangedEventArgs e)
523         {
524         }
525
526         /// <summary>
527         /// Theme change callback when text field have a key event, this callback will be trigger.
528         /// </summary>
529         /// <since_tizen> 6 </since_tizen>
530         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
531         [EditorBrowsable(EditorBrowsableState.Never)]
532         protected virtual bool OnTextFieldKeyEvent(object source, KeyEventArgs e)
533         {
534             return false;
535         }
536
537         /// <summary>
538         /// Set the text field 2D size
539         /// </summary>
540         /// <param name="w">Input Field' width.</param>
541         /// <param name="h">Input Field' height.</param>
542         /// <since_tizen> 6 </since_tizen>
543         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
544         [EditorBrowsable(EditorBrowsableState.Never)]
545         protected void SetTextFieldSize2D(int w, int h)
546         {
547             if (textField != null)
548             {
549                 textField.Size2D = new Size2D(w, h);
550             }
551         }
552
553         /// <summary>
554         /// Set the text field X pose
555         /// </summary>
556         /// <param name="x">Input Field' X.</param>
557         /// <since_tizen> 6 </since_tizen>
558         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
559         [EditorBrowsable(EditorBrowsableState.Never)]
560         protected void SetTextFieldPosX(int x)
561         {
562             if (textField != null)
563             {
564                 textField.PositionX = x;
565             }
566         }
567
568         /// <summary>
569         /// Set the text field  text color
570         /// </summary>
571         /// <param name="color">Input Field' color.</param>
572         /// <since_tizen> 6 </since_tizen>
573         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
574         [EditorBrowsable(EditorBrowsableState.Never)]
575         protected void SetTextFieldTextColor(Color color)
576         {
577             if (textField != null)
578             {
579                 textField.TextColor = color;
580             }
581         }
582
583         /// <summary>
584         /// Set the text field relayout flag
585         /// </summary>
586         /// <param name="value">relayout text field' value.</param>
587         /// <since_tizen> 6 </since_tizen>
588         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
589         [EditorBrowsable(EditorBrowsableState.Never)]
590         protected void RelayoutTextField(bool value)
591         {
592             relayoutTextField = value;
593         }
594
595         private void Initialize()
596         {
597             inputFieldAttrs = Style as InputFieldStyle;
598             if (null == inputFieldAttrs)
599             {
600                 throw new Exception("Fail to get the InputField attributes.");
601             }
602
603             if (null == bgImage)
604             {
605                 bgImage = new ImageView()
606                 {
607                     WidthResizePolicy = ResizePolicyType.FillToParent,
608                     HeightResizePolicy = ResizePolicyType.FillToParent,
609                 };
610
611                 this.Add(bgImage);
612             }
613             if (null == textField)
614             {
615                 textField = new TextField()
616                 {
617                     WidthResizePolicy = ResizePolicyType.Fixed,
618                     HeightResizePolicy = ResizePolicyType.Fixed,
619                     ParentOrigin = Tizen.NUI.ParentOrigin.CenterLeft,
620                     PivotPoint = Tizen.NUI.PivotPoint.CenterLeft,
621                     PositionUsesPivotPoint = true,
622                 };
623                 this.Add(textField);
624                 textField.FocusGained += OnTextFieldFocusGained;
625                 textField.FocusLost += OnTextFieldFocusLost;
626                 textField.TextChanged += OnTextFieldTextChanged;
627                 textField.KeyEvent += OnTextFieldKeyEvent;
628             }
629         }
630
631         private void OnLayoutDirectionChanged()
632         {
633             if (inputFieldAttrs == null) return;
634             if (textField != null)
635             {
636                 if (LayoutDirection == ViewLayoutDirectionType.LTR)
637                 {
638                     if(inputFieldAttrs.InputBoxAttributes != null)
639                     {
640                         inputFieldAttrs.InputBoxAttributes.HorizontalAlignment = HorizontalAlignment.Begin;
641                         inputFieldAttrs.InputBoxAttributes.ParentOrigin = Tizen.NUI.ParentOrigin.CenterLeft;
642                         inputFieldAttrs.InputBoxAttributes.PivotPoint = Tizen.NUI.PivotPoint.CenterLeft;
643                         inputFieldAttrs.InputBoxAttributes.PositionUsesPivotPoint = true;
644                     }
645                     textField.HorizontalAlignment = HorizontalAlignment.Begin;
646                     textField.ParentOrigin = Tizen.NUI.ParentOrigin.CenterLeft;
647                     textField.PivotPoint = Tizen.NUI.PivotPoint.CenterLeft;
648                     textField.PositionUsesPivotPoint = true;
649                 }
650                 else //ViewLayoutDirectionType.RTL
651                 {
652                     if (inputFieldAttrs.InputBoxAttributes != null)
653                     {
654                         inputFieldAttrs.InputBoxAttributes.HorizontalAlignment = HorizontalAlignment.End;
655                         inputFieldAttrs.InputBoxAttributes.ParentOrigin = Tizen.NUI.ParentOrigin.CenterRight;
656                         inputFieldAttrs.InputBoxAttributes.PivotPoint = Tizen.NUI.PivotPoint.CenterRight;
657                     }
658                     textField.HorizontalAlignment = HorizontalAlignment.End;
659                     textField.ParentOrigin = Tizen.NUI.ParentOrigin.CenterRight;
660                     textField.PivotPoint = Tizen.NUI.PivotPoint.CenterRight;
661                     textField.PositionUsesPivotPoint = true;
662                 }
663             }
664         }
665
666         private void RelayoutComponent()
667         {
668             if (!relayoutTextField)
669             {
670                 return;
671             }
672             int space = inputFieldAttrs.Space ?? 0;
673
674             if (textField != null)
675             {
676                 textField.Size2D = new Size2D(this.Size2D.Width - space * 2, this.Size2D.Height);
677                 textField.PositionX = space;
678             }
679         }
680
681         private void CreateBackgroundAttributes()
682         {
683             if (null == inputFieldAttrs.BackgroundImageAttributes)
684             {
685                 inputFieldAttrs.BackgroundImageAttributes = new ImageViewStyle();
686             }
687         }
688
689         private void CreateTextFieldAttributes()
690         {
691             if (null == inputFieldAttrs.InputBoxAttributes)
692             {
693                 inputFieldAttrs.InputBoxAttributes = new TextFieldStyle();
694             }
695         }
696     }
697 }