/* * Copyright(c) 2019 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ using System.ComponentModel; namespace Tizen.NUI.Components { /// /// SliderAttributes is a class which saves Slider's ux data. /// /// 6 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public class SliderAttributes : ViewAttributes { /// /// Creates a new instance of a SliderAttributes. /// /// 6 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public SliderAttributes() : base() { IndicatorType = Slider.IndicatorType.None; } /// /// Creates a new instance of a SliderAttributes with attributes. /// /// Create SliderAttributes by attributes customized by user. /// 6 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public SliderAttributes(SliderAttributes attributes) : base(attributes) { if(attributes == null) { return; } if (attributes.BackgroundTrackAttributes != null) { BackgroundTrackAttributes = attributes.BackgroundTrackAttributes.Clone() as ImageAttributes; } if (attributes.SlidedTrackAttributes != null) { SlidedTrackAttributes = attributes.SlidedTrackAttributes.Clone() as ImageAttributes; } if (attributes.ThumbBackgroundAttributes != null) { ThumbBackgroundAttributes = attributes.ThumbBackgroundAttributes.Clone() as ImageAttributes; } if (attributes.ThumbAttributes != null) { ThumbAttributes = attributes.ThumbAttributes.Clone() as ImageAttributes; } if (attributes.LowIndicatorImageAttributes != null) { LowIndicatorImageAttributes = attributes.LowIndicatorImageAttributes.Clone() as ImageAttributes; } if (attributes.HighIndicatorImageAttributes != null) { HighIndicatorImageAttributes = attributes.HighIndicatorImageAttributes.Clone() as ImageAttributes; } if (attributes.LowIndicatorTextAttributes != null) { LowIndicatorTextAttributes = attributes.LowIndicatorTextAttributes.Clone() as TextAttributes; } if (attributes.HighIndicatorTextAttributes != null) { HighIndicatorTextAttributes = attributes.HighIndicatorTextAttributes.Clone() as TextAttributes; } if (attributes.TrackThickness != null) { TrackThickness = attributes.TrackThickness; } if (attributes.SpaceBetweenTrackAndIndicator != null) { SpaceBetweenTrackAndIndicator = attributes.SpaceBetweenTrackAndIndicator; } IndicatorType = attributes.IndicatorType; } /// /// Get or set background track attributes /// /// 6 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public ImageAttributes BackgroundTrackAttributes { get; set; } /// /// Get or set slided track attributes /// /// 6 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public ImageAttributes SlidedTrackAttributes { get; set; } /// /// Get or set thumb attributes /// /// 6 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public ImageAttributes ThumbAttributes { get; set; } /// /// Get or set thumb background attributes /// /// 6 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public ImageAttributes ThumbBackgroundAttributes { get; set; } /// /// Get or set low indicator image attributes /// /// 6 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public ImageAttributes LowIndicatorImageAttributes { get; set; } /// /// Get or set high indicator image attributes /// /// 6 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public ImageAttributes HighIndicatorImageAttributes { get; set; } /// /// Get or low indicator text attributes /// /// 6 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public TextAttributes LowIndicatorTextAttributes { get; set; } /// /// Get or set high indicator text attributes /// /// 6 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public TextAttributes HighIndicatorTextAttributes { get; set; } /// /// Get or set track thickness /// /// 6 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public uint? TrackThickness { get; set; } /// /// Get or set space between track and indicator /// /// 6 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public uint? SpaceBetweenTrackAndIndicator { get; set; } /// /// Get or set Indicator type /// /// 6 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public Slider.IndicatorType IndicatorType { get; set; } /// /// Attributes's clone function. /// /// 6 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public override Attributes Clone() { return new SliderAttributes(this); } } }