b329e03c5d646fddc85e087a555503e0b9fae20d
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI.CommonUI / Attributes / PaginationAttributes.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     /// PaginationAttributes used to config the pagination represent.
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 PaginationAttributes : ViewAttributes
28     {
29         /// <summary>
30         /// Creates a new instance of a PaginationAttributes.
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 PaginationAttributes() : base() { }
36         /// <summary>
37         /// Creates a new instance of a PaginationAttributes using attributes.
38         /// </summary>
39         /// <since_tizen> 6 </since_tizen>
40         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
41         [EditorBrowsable(EditorBrowsableState.Never)]
42         public PaginationAttributes(PaginationAttributes attributes) : base(attributes)
43         {
44             if (attributes == null)
45             {
46                 return;
47             }
48
49             if (attributes.IndicatorSize != null)
50             {
51                 IndicatorSize = new Size2D(attributes.IndicatorSize.Width, attributes.IndicatorSize.Height);
52             }
53             if (attributes.IndicatorBackgroundURL != null)
54             {
55                 IndicatorBackgroundURL = attributes.IndicatorBackgroundURL.Clone() as string;
56             }
57             if (attributes.IndicatorSelectURL != null)
58             {
59                 IndicatorSelectURL = attributes.IndicatorSelectURL.Clone() as string;
60             }
61             IndicatorSpacing = attributes.IndicatorSpacing;
62         }
63
64         /// <summary>
65         /// Gets or sets the size of the indicator.
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 Size2D IndicatorSize
71         {
72             get;
73             set;
74         }
75
76         /// <summary>
77         /// Gets or sets the background resource of indicator.
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 string IndicatorBackgroundURL
83         {
84             get;
85             set;
86         }
87
88         /// <summary>
89         /// Gets or sets the resource of the select indicator.
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 string IndicatorSelectURL
95         {
96             get;
97             set;
98         }
99
100         /// <summary>
101         /// Gets or sets the space of the indicator.
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 int IndicatorSpacing
107         {
108             get;
109             set;
110         }
111
112
113         /// <summary>
114         /// Retrieves a copy of PaginationAttributes.
115         /// </summary>
116         /// <since_tizen> 6 </since_tizen>
117         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
118         [EditorBrowsable(EditorBrowsableState.Never)]
119         public override Attributes Clone()
120         {
121             return new PaginationAttributes(this);
122         }
123
124     }
125 }