/* * 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 { /// /// ButtonAttributes is a class which saves Button'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 ButtonAttributes : ViewAttributes { /// /// Creates a new instance of a ButtonAttributes. /// /// 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 ButtonAttributes() : base() { } /// /// Creates a new instance of a ButtonAttributes with attributes. /// /// Create ButtonAttributes 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 ButtonAttributes(ButtonAttributes attributes) : base(attributes) { if(attributes == null) { return; } IsSelectable = attributes.IsSelectable; IconRelativeOrientation = attributes.IconRelativeOrientation; if (attributes.ShadowImageAttributes != null) { ShadowImageAttributes = attributes.ShadowImageAttributes.Clone() as ImageAttributes; } if (attributes.BackgroundImageAttributes != null) { BackgroundImageAttributes = attributes.BackgroundImageAttributes.Clone() as ImageAttributes; } if (attributes.OverlayImageAttributes != null) { OverlayImageAttributes = attributes.OverlayImageAttributes.Clone() as ImageAttributes; } if (attributes.TextAttributes != null) { TextAttributes = attributes.TextAttributes.Clone() as TextAttributes; } if (attributes.IconAttributes != null) { IconAttributes = attributes.IconAttributes.Clone() as ImageAttributes; } } /// /// Shadow image's 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 ShadowImageAttributes { get; set; } /// /// Background image's 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 BackgroundImageAttributes { get; set; } /// /// Overlay image's 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 OverlayImageAttributes { get; set; } /// /// Text's 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 TextAttributes { get; set; } /// /// Icon's 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 IconAttributes { get; set; } /// /// Flag to decide button can be selected or not. /// /// 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 bool? IsSelectable { get; set; } /// /// Icon relative orientation. /// /// 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 Button.IconOrientation? IconRelativeOrientation { 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 ButtonAttributes(this); } } }