[ACR-564] deprecate unused API
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI.Wearable / src / public / WearableStyle / CircularScrollbarStyle.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 using Tizen.NUI.Components;
19 using Tizen.NUI.Binding;
20 using System;
21
22 namespace Tizen.NUI.Wearable
23 {
24     /// <summary>
25     /// CircularScrollbarStyle is a class which saves CircularScrollbar's ux data.
26     /// </summary>
27     [Obsolete("This has been deprecated in API12")]
28     [EditorBrowsable(EditorBrowsableState.Never)]
29     public class CircularScrollbarStyle : ControlStyle
30     {
31         #region Fields
32
33         /// <summary>Bindable property of Thickness</summary>
34         [EditorBrowsable(EditorBrowsableState.Never)]
35         public static readonly BindableProperty ThicknessProperty = BindableProperty.Create(nameof(Thickness), typeof(float?), typeof(CircularScrollbarStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
36         {
37             ((CircularScrollbarStyle)bindable).thickness = (float?)newValue;
38         },
39         defaultValueCreator: (bindable) =>
40         {
41             return ((CircularScrollbarStyle)bindable).thickness;
42         });
43
44         /// <summary>Bindable property of TrackSweepAngle</summary>
45         [EditorBrowsable(EditorBrowsableState.Never)]
46         public static readonly BindableProperty TrackSweepAngleProperty = BindableProperty.Create(nameof(TrackSweepAngle), typeof(float?), typeof(CircularScrollbarStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
47         {
48             ((CircularScrollbarStyle)bindable).trackSweepAngle = (float?)newValue;
49         },
50         defaultValueCreator: (bindable) =>
51         {
52             return ((CircularScrollbarStyle)bindable).trackSweepAngle;
53         });
54
55         /// <summary>Bindable property of TrackColor</summary>
56         [EditorBrowsable(EditorBrowsableState.Never)]
57         public static readonly BindableProperty TrackColorProperty = BindableProperty.Create(nameof(TrackColor), typeof(Color), typeof(CircularScrollbarStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
58         {
59             ((CircularScrollbarStyle)bindable).trackColor = newValue == null ? null : new Color((Color)newValue);
60         },
61         defaultValueCreator: (bindable) =>
62         {
63             return ((CircularScrollbarStyle)bindable).trackColor;
64         });
65
66         /// <summary>Bindable property of ThumbColor</summary>
67         [EditorBrowsable(EditorBrowsableState.Never)]
68         public static readonly BindableProperty ThumbColorProperty = BindableProperty.Create(nameof(ThumbColor), typeof(Color), typeof(CircularScrollbarStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
69         {
70             ((CircularScrollbarStyle)bindable).thumbColor = newValue == null ? null : new Color((Color)newValue);
71         },
72         defaultValueCreator: (bindable) =>
73         {
74             return ((CircularScrollbarStyle)bindable).thumbColor;
75         });
76
77         private float? thickness;
78         private float? trackSweepAngle;
79         private Color trackColor;
80         private Color thumbColor;
81
82         #endregion Fields
83
84
85         #region Constructors
86
87         /// <summary>
88         /// Creates a new instance of a CircularScrollbarStyle.
89         /// </summary>
90         [Obsolete("This has been deprecated in API12")]
91         [EditorBrowsable(EditorBrowsableState.Never)]
92         public CircularScrollbarStyle() : base()
93         {
94         }
95
96         /// <summary>
97         /// Copy constructor.
98         /// </summary>
99         /// <param name="style">Create ScrollbarStyle by style customized by user.</param>
100         [Obsolete("This has been deprecated in API12")]
101         [EditorBrowsable(EditorBrowsableState.Never)]
102         public CircularScrollbarStyle(CircularScrollbarStyle style) : base(style)
103         {
104         }
105
106         /// <summary>
107         /// Static constructor to initialize bindable properties when loading.
108         /// </summary>
109         static CircularScrollbarStyle()
110         {
111         }
112
113         #endregion Constructors
114
115
116         #region Properties
117
118         /// <summary>
119         /// The thickness of the scrollbar and track.
120         /// </summary>
121         [Obsolete("This has been deprecated in API12")]
122         [EditorBrowsable(EditorBrowsableState.Never)]
123         public float? Thickness
124         {
125             get => (float?)GetValue(ThicknessProperty);
126             set => SetValue(ThicknessProperty, value);
127         }
128
129         /// <summary>
130         /// The sweep angle of track area in degrees.
131         /// </summary>
132         /// <remarks>
133         /// Values below 6 degrees are treated as 6 degrees.
134         /// Values exceeding 180 degrees are treated as 180 degrees.
135         /// </remarks>
136         [Obsolete("This has been deprecated in API12")]
137         [EditorBrowsable(EditorBrowsableState.Never)]
138         public float? TrackSweepAngle
139         {
140             get => (float?)GetValue(TrackSweepAngleProperty);
141             set => SetValue(TrackSweepAngleProperty, value);
142         }
143
144         /// <summary>
145         /// The color of the track part.
146         /// </summary>
147         [Obsolete("This has been deprecated in API12")]
148         [EditorBrowsable(EditorBrowsableState.Never)]
149         public Color TrackColor
150         {
151             get => (Color)GetValue(TrackColorProperty);
152             set => SetValue(TrackColorProperty, value);
153         }
154
155         /// <summary>
156         /// The color of the thumb part.
157         /// </summary>
158         [Obsolete("This has been deprecated in API12")]
159         [EditorBrowsable(EditorBrowsableState.Never)]
160         public Color ThumbColor
161         {
162             get => (Color)GetValue(ThumbColorProperty);
163             set => SetValue(ThumbColorProperty, value);
164         }
165
166         #endregion Properties
167     }
168 }