2094c5e592f274942350403175e0faed01aad6c0
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI.CommonUI / Attributes / ScrollbarAttributes.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     /// ScrollBarAttributes is a class which saves Scrollbar'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 ScrollBarAttributes : ViewAttributes
28     {
29         /// <summary>
30         /// Creates a new instance of a ScrollBarAttributes.
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 ScrollBarAttributes() : base()
36         {
37             Direction = ScrollBar.DirectionType.Horizontal;
38         }
39
40         /// <summary>
41         /// Creates a new instance of a ScrollBarAttributes with attributes.
42         /// </summary>
43         /// <param name="attributes">Create ScrollBarAttributes by attributes customized by user.</param>
44         /// <since_tizen> 6 </since_tizen>
45         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
46         [EditorBrowsable(EditorBrowsableState.Never)]
47         public ScrollBarAttributes(ScrollBarAttributes attributes) : base(attributes)
48         {
49             if(attributes == null)
50             {
51                 return;
52             }
53
54             if (attributes.TrackImageAttributes != null)
55             {
56                 TrackImageAttributes = attributes.TrackImageAttributes.Clone() as ImageAttributes;
57             }
58
59             if (attributes.ThumbImageAttributes != null)
60             {
61                 ThumbImageAttributes = attributes.ThumbImageAttributes.Clone() as ImageAttributes;
62             }
63
64             Direction = attributes.Direction;
65             Duration = attributes.Duration;
66         }
67
68         /// <summary>
69         /// Get or set track image attributes
70         /// </summary>
71         /// <since_tizen> 6 </since_tizen>
72         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
73         [EditorBrowsable(EditorBrowsableState.Never)]
74         public ImageAttributes TrackImageAttributes
75         {
76             get;
77             set;
78         }
79
80         /// <summary>
81         /// Get or set thumb image attributes
82         /// </summary>
83         /// <since_tizen> 6 </since_tizen>
84         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
85         [EditorBrowsable(EditorBrowsableState.Never)]
86         public ImageAttributes ThumbImageAttributes
87         {
88             get;
89             set;
90         }
91
92         /// <summary>
93         /// Get or set direction type
94         /// </summary>
95         /// <since_tizen> 6 </since_tizen>
96         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
97         [EditorBrowsable(EditorBrowsableState.Never)]
98         public ScrollBar.DirectionType? Direction
99         {
100             get;
101             set;
102         }
103
104         /// <summary>
105         /// Get or set duration
106         /// </summary>
107         /// <since_tizen> 6 </since_tizen>
108         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
109         [EditorBrowsable(EditorBrowsableState.Never)]
110         public uint Duration
111         {
112             get;
113             set;
114         }
115
116         /// <summary>
117         /// Attributes's clone function.
118         /// </summary>
119         /// <since_tizen> 6 </since_tizen>
120         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
121         [EditorBrowsable(EditorBrowsableState.Never)]
122         public override Attributes Clone()
123         {
124             return new ScrollBarAttributes(this);
125         }
126
127     }
128 }