31998e25cb0c87ca47f2c9ec6a23a3770500f4c0
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI.CommonUI / Attributes / LoadingAttributes.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.CommonUI
20 {
21     /// <summary>
22     /// LoadingAttributes is a class which saves Loading'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 LoadingAttributes : ViewAttributes
28     {
29         /// <summary>
30         /// Creates a new instance of a LoadingAttributes.
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 LoadingAttributes() : base() { }
36
37         /// <summary>
38         /// Creates a new instance of a LoadingAttributes with attributes.
39         /// </summary>
40         /// <param name="attributes">Create LoadingAttributes 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 LoadingAttributes(LoadingAttributes attributes) : base(attributes)
45         {
46             if(null == attributes)
47             {
48                 return;
49             }
50
51             if (null != attributes.FPS)
52             {
53                 FPS = attributes.FPS.Clone() as IntSelector;
54             }
55             if (null != attributes.LoadingSize)
56             {
57                 LoadingSize = attributes.LoadingSize;
58             }
59             if (null != attributes.ImageArray)
60             {
61                 ImageArray = attributes.ImageArray;
62             }
63         }
64
65         /// <summary>
66         /// Gets or sets loading image resource array.
67         /// </summary>
68         /// <since_tizen> 6 </since_tizen>
69         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
70         [EditorBrowsable(EditorBrowsableState.Never)]
71         public string[] ImageArray
72         {
73             get;
74             set;
75         }
76
77         /// <summary>
78         /// Gets or sets loading image size.
79         /// </summary>
80         /// <since_tizen> 6 </since_tizen>
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 Size2D LoadingSize
84         {
85             get;
86             set;
87         }
88
89         /// <summary>
90         /// Gets or sets loading frame per second.
91         /// </summary>
92         /// <since_tizen> 6 </since_tizen>
93         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
94         [EditorBrowsable(EditorBrowsableState.Never)]
95         public IntSelector FPS
96         {
97             get;
98             set;
99         }
100
101         /// <summary>
102         /// Attributes's clone function.
103         /// </summary>
104         /// <since_tizen> 6 </since_tizen>
105         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
106         [EditorBrowsable(EditorBrowsableState.Never)]
107         public override Attributes Clone()
108         {
109             return new LoadingAttributes(this);
110         }
111     }
112 }