/// A class containing frame informations for a LottieAnimationView.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public class LottieFrameInfo : ISelectorItem
+ public class LottieFrameInfo : ICloneable
{
/// <summary>
/// Creates a new instance with a playing range.
+++ /dev/null
-/*
- * Copyright(c) 2020 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
-{
- /// <summary>
- /// An interface for the Selector and the Selector item.
- /// Selector item class should implement this.
- /// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public interface ISelectorItem
- {
- /// <summary>
- /// Deep copy.
- /// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
- object Clone();
- }
-}
/// <summary>
/// Selector class, which is related by Control State, it is base class for other Selector.
/// </summary>
+ /// <typeparam name="T">The property type of the selector. if it's reference type, it should be of type <see cref="ICloneable"/> that implement deep copy in <see cref="ICloneable.Clone"/>.</typeparam>
/// <since_tizen> 6 </since_tizen>
/// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
public class Selector<T> : StateValueCollection<T>
{
- private readonly bool isSelectorItem = typeof(ISelectorItem).IsAssignableFrom(typeof(T));
-
+ private readonly bool isCloneable = typeof(ICloneable).IsAssignableFrom(typeof(T));
/// <since_tizen> 6 </since_tizen>
/// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
public static implicit operator Selector<T>(T value)
[EditorBrowsable(EditorBrowsableState.Never)]
public Selector(T value) : this()
{
- All = isSelectorItem ? (T)((ISelectorItem)value)?.Clone() : value;
+ All = isCloneable ? (T)((ICloneable)value)?.Clone() : value;
}
/// Copy constructor
{
Clear();
- if (isSelectorItem)
+ if (isCloneable)
{
- All = (T)((ISelectorItem)other.All)?.Clone();
+ All = (T)((ICloneable)other.All)?.Clone();
foreach (var item in other.StateValueList)
{
- AddWithoutCheck(new StateValuePair<T>(item.State, (T)((ISelectorItem)item.Value)?.Clone()));
+ AddWithoutCheck(new StateValuePair<T>(item.State, (T)((ICloneable)item.Value)?.Clone()));
}
}
else
/// The Color class.
/// </summary>
[Tizen.NUI.Binding.TypeConverter(typeof(ColorTypeConverter))]
- public class Color : Disposable, ISelectorItem
+ public class Color : Disposable, ICloneable
{
/// <summary>
/// Gets the black colored Color class.
* limitations under the License.
*
*/
+using System;
using System.ComponentModel;
using Tizen.NUI.Binding;
/// </summary>
/// <since_tizen> 4 </since_tizen>
[Binding.TypeConverter(typeof(ExtentsTypeConverter))]
- public class Extents : Disposable, ISelectorItem
+ public class Extents : Disposable, ICloneable
{
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Tizen.NUI.Binding.TypeConverter(typeof(PositionTypeConverter))]
- public class Position : Disposable, ISelectorItem
+ public class Position : Disposable, ICloneable
{
/// <summary>
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Tizen.NUI.Binding.TypeConverter(typeof(Position2DTypeConverter))]
- public class Position2D : Disposable, ISelectorItem
+ public class Position2D : Disposable, ICloneable
{
private Position2DChangedCallback callback = null;
* limitations under the License.
*
*/
+using System;
using System.ComponentModel;
using Tizen.NUI.Binding;
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Binding.TypeConverter(typeof(RectangleTypeConverter))]
- public class Rectangle : Disposable, ISelectorItem
+ public class Rectangle : Disposable, ICloneable
{
/// <summary>
/// The constructor.
/// </summary>
/// <since_tizen> 5 </since_tizen>
[Tizen.NUI.Binding.TypeConverter(typeof(SizeTypeConverter))]
- public class Size : Disposable, ISelectorItem
+ public class Size : Disposable, ICloneable
{
/// <summary>
* limitations under the License.
*
*/
+using System;
using System.ComponentModel;
using Tizen.NUI.Binding;
-using System.ComponentModel;
namespace Tizen.NUI
{
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Tizen.NUI.Binding.TypeConverter(typeof(Size2DTypeConverter))]
- public class Size2D : Disposable, ISelectorItem
+ public class Size2D : Disposable, ICloneable
{
private Size2DChangedCallback callback = null;
* limitations under the License.
*
*/
+using System;
using System.ComponentModel;
using Tizen.NUI.Binding;
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Binding.TypeConverter(typeof(Vector2TypeConverter))]
- public class Vector2 : Disposable, ISelectorItem
+ public class Vector2 : Disposable, ICloneable
{
/// <summary>
* limitations under the License.
*
*/
+using System;
using System.ComponentModel;
using Tizen.NUI.Binding;
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Binding.TypeConverter(typeof(Vector3TypeConverter))]
- public class Vector3 : Disposable, ISelectorItem
+ public class Vector3 : Disposable, ICloneable
{
/// <summary>
/// The constructor.
* limitations under the License.
*
*/
+using System;
using System.ComponentModel;
using Tizen.NUI.Binding;
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Binding.TypeConverter(typeof(Vector4TypeConverter))]
- public class Vector4 : Disposable, ISelectorItem
+ public class Vector4 : Disposable, ICloneable
{
/// <summary>
/// The Shadow composed of image for View
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public class ImageShadow : ShadowBase, ISelectorItem
+ public class ImageShadow : ShadowBase, ICloneable
{
private static readonly Rectangle noBorder = new Rectangle();
/// Represents a shadow with color and blur radius for a View.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public class Shadow : ShadowBase, ISelectorItem
+ public class Shadow : ShadowBase, ICloneable
{
private static readonly Color noColor = new Color(0, 0, 0, 0);
/// The Text Shadow for TextLabel.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public class TextShadow : ISelectorItem
+ public class TextShadow : ICloneable
{
private readonly PropertyMap propertyMap = null;