2 * Copyright(c) 2019 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 using System.ComponentModel;
19 namespace Tizen.NUI.CommonUI
22 /// SliderAttributes is a class which saves Slider's ux data.
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 SliderAttributes : ViewAttributes
30 /// Creates a new instance of a SliderAttributes.
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 SliderAttributes() : base()
37 IndicatorType = Slider.IndicatorType.None;
41 /// Creates a new instance of a SliderAttributes with attributes.
43 /// <param name="attributes">Create SliderAttributes 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 SliderAttributes(SliderAttributes attributes) : base(attributes)
49 if(attributes == null)
53 if (attributes.BackgroundTrackAttributes != null)
55 BackgroundTrackAttributes = attributes.BackgroundTrackAttributes.Clone() as ImageAttributes;
57 if (attributes.SlidedTrackAttributes != null)
59 SlidedTrackAttributes = attributes.SlidedTrackAttributes.Clone() as ImageAttributes;
61 if (attributes.ThumbBackgroundAttributes != null)
63 ThumbBackgroundAttributes = attributes.ThumbBackgroundAttributes.Clone() as ImageAttributes;
65 if (attributes.ThumbAttributes != null)
67 ThumbAttributes = attributes.ThumbAttributes.Clone() as ImageAttributes;
69 if (attributes.LowIndicatorImageAttributes != null)
71 LowIndicatorImageAttributes = attributes.LowIndicatorImageAttributes.Clone() as ImageAttributes;
73 if (attributes.HighIndicatorImageAttributes != null)
75 HighIndicatorImageAttributes = attributes.HighIndicatorImageAttributes.Clone() as ImageAttributes;
77 if (attributes.LowIndicatorTextAttributes != null)
79 LowIndicatorTextAttributes = attributes.LowIndicatorTextAttributes.Clone() as TextAttributes;
81 if (attributes.HighIndicatorTextAttributes != null)
83 HighIndicatorTextAttributes = attributes.HighIndicatorTextAttributes.Clone() as TextAttributes;
85 if (attributes.TrackThickness != null)
87 TrackThickness = attributes.TrackThickness;
89 if (attributes.SpaceBetweenTrackAndIndicator != null)
91 SpaceBetweenTrackAndIndicator = attributes.SpaceBetweenTrackAndIndicator;
93 IndicatorType = attributes.IndicatorType;
97 /// Get or set background track attributes
99 /// <since_tizen> 6 </since_tizen>
100 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
101 [EditorBrowsable(EditorBrowsableState.Never)]
102 public ImageAttributes BackgroundTrackAttributes
109 /// Get or set slided track attributes
111 /// <since_tizen> 6 </since_tizen>
112 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
113 [EditorBrowsable(EditorBrowsableState.Never)]
114 public ImageAttributes SlidedTrackAttributes
121 /// Get or set thumb attributes
123 /// <since_tizen> 6 </since_tizen>
124 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
125 [EditorBrowsable(EditorBrowsableState.Never)]
126 public ImageAttributes ThumbAttributes
133 /// Get or set thumb background attributes
135 /// <since_tizen> 6 </since_tizen>
136 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
137 [EditorBrowsable(EditorBrowsableState.Never)]
138 public ImageAttributes ThumbBackgroundAttributes
145 /// Get or set low indicator image attributes
147 /// <since_tizen> 6 </since_tizen>
148 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
149 [EditorBrowsable(EditorBrowsableState.Never)]
150 public ImageAttributes LowIndicatorImageAttributes
157 /// Get or set high indicator image attributes
159 /// <since_tizen> 6 </since_tizen>
160 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
161 [EditorBrowsable(EditorBrowsableState.Never)]
162 public ImageAttributes HighIndicatorImageAttributes
169 /// Get or low indicator text attributes
171 /// <since_tizen> 6 </since_tizen>
172 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
173 [EditorBrowsable(EditorBrowsableState.Never)]
174 public TextAttributes LowIndicatorTextAttributes
181 /// Get or set high indicator text attributes
183 /// <since_tizen> 6 </since_tizen>
184 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
185 [EditorBrowsable(EditorBrowsableState.Never)]
186 public TextAttributes HighIndicatorTextAttributes
193 /// Get or set track thickness
195 /// <since_tizen> 6 </since_tizen>
196 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
197 [EditorBrowsable(EditorBrowsableState.Never)]
198 public uint? TrackThickness
205 /// Get or set space between track and indicator
207 /// <since_tizen> 6 </since_tizen>
208 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
209 [EditorBrowsable(EditorBrowsableState.Never)]
210 public uint? SpaceBetweenTrackAndIndicator
217 /// Get or set Indicator type
219 /// <since_tizen> 6 </since_tizen>
220 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
221 [EditorBrowsable(EditorBrowsableState.Never)]
222 public Slider.IndicatorType IndicatorType
229 /// Attributes's clone function.
231 /// <since_tizen> 6 </since_tizen>
232 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
233 [EditorBrowsable(EditorBrowsableState.Never)]
234 public override Attributes Clone()
236 return new SliderAttributes(this);