[NUI] Sync with dalihub (#969)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI.Components / Attributes / ImageAttributes.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     /// The image view attributes class.
23     /// </summary>
24     /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
25     [EditorBrowsable(EditorBrowsableState.Never)]
26     public class ImageAttributes : ViewAttributes
27     {
28         /// <summary>
29         /// Construct ImageAttributes.
30         /// </summary>
31         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
32         [EditorBrowsable(EditorBrowsableState.Never)]
33         public ImageAttributes() : base() { }
34         /// <summary>
35         /// Construct with specified attribute.
36         /// </summary>
37         /// <param name="attributes">The specified ImageAttributes.</param>
38         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
39         [EditorBrowsable(EditorBrowsableState.Never)]
40         public ImageAttributes(ImageAttributes attributes) : base(attributes)
41         {
42             if (attributes == null)
43             {
44                 return;
45             }
46
47             if (attributes.ResourceURL != null)
48             {
49                 ResourceURL = attributes.ResourceURL.Clone() as StringSelector;
50             }
51
52             if (attributes.Border != null)
53             {
54                 Border = attributes.Border.Clone() as RectangleSelector;
55             }
56         }
57         /// <summary>
58         /// Image URL.
59         /// </summary>
60         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
61         [EditorBrowsable(EditorBrowsableState.Never)]
62         public StringSelector ResourceURL
63         {
64             get;
65             set;
66         }
67         /// <summary>
68         /// Image border.
69         /// </summary>
70         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
71         [EditorBrowsable(EditorBrowsableState.Never)]
72         public RectangleSelector Border
73         {
74             get;
75             set;
76         }
77         /// <summary>
78         /// Attributes's clone function.
79         /// </summary>
80         /// <returns> Return the attributes clone.</returns>
81         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
82         [EditorBrowsable(EditorBrowsableState.Never)]
83         public override Attributes Clone()
84         {
85             return new ImageAttributes(this);
86         }
87
88     }
89 }