ea4e2168bca17f10b899391de4835a8cb77e9a3a
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI.Components / Attributes / InputFieldAttributes.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.ComponentModel;
18
19 namespace Tizen.NUI.Components
20 {
21     /// <summary>
22     /// InputFieldAttributes is a class which saves InputField's ux data.
23     /// </summary>
24     /// <since_tizen> 6 </since_tizen>
25     /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
26     [EditorBrowsable(EditorBrowsableState.Never)]
27     public class InputFieldAttributes : ViewAttributes
28     {
29         /// <summary>
30         /// Creates a new instance of a InputFieldAttributes.
31         /// </summary>
32         /// <since_tizen> 6 </since_tizen>
33         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
34         [EditorBrowsable(EditorBrowsableState.Never)]
35         public InputFieldAttributes() : base() { }
36
37         /// <summary>
38         /// Creates a new instance of a InputFieldAttributes with attributes.
39         /// </summary>
40         /// <param name="attrs">Create InputFieldAttributes by attributes customized by user.</param>
41         /// <since_tizen> 6 </since_tizen>
42         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
43         [EditorBrowsable(EditorBrowsableState.Never)]
44         public InputFieldAttributes(InputFieldAttributes attrs) : base(attrs)
45         {
46             if (null == attrs)
47             {
48                 return;
49             }
50             if (null != attrs.BackgroundImageAttributes)
51             {
52                 BackgroundImageAttributes = attrs.BackgroundImageAttributes.Clone() as ImageAttributes;
53             }
54             if (null != attrs.InputBoxAttributes)
55             {
56                 InputBoxAttributes = attrs.InputBoxAttributes.Clone() as TextFieldAttributes;
57             }
58             if (null != attrs.Space)
59             {
60                 Space = attrs.Space;
61             }
62         }
63
64         /// <summary>
65         /// Gets or sets background image attributes of input field.
66         /// </summary>
67         /// <since_tizen> 6 </since_tizen>
68         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
69         [EditorBrowsable(EditorBrowsableState.Never)]
70         public ImageAttributes BackgroundImageAttributes
71         {
72             get;
73             set;
74         }
75
76         /// <summary>
77         /// Gets or sets input box attributes of input field.
78         /// </summary>
79         /// <since_tizen> 6 </since_tizen>
80         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
81         [EditorBrowsable(EditorBrowsableState.Never)]
82         public TextFieldAttributes InputBoxAttributes
83         {
84             get;
85             set;
86         }
87
88         /// <summary>
89         /// Gets or sets space.
90         /// </summary>
91         /// <since_tizen> 6 </since_tizen>
92         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
93         [EditorBrowsable(EditorBrowsableState.Never)]
94         public int? Space
95         {
96             get;
97             set;
98         } 
99
100         /// <summary>
101         /// Attributes's clone function.
102         /// </summary>
103         /// <since_tizen> 6 </since_tizen>
104         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
105         [EditorBrowsable(EditorBrowsableState.Never)]
106         public override Attributes Clone()
107         {
108             return new InputFieldAttributes(this);
109         }
110     }
111 }