/*
* 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
{
///
/// PopupAttributes is a class which saves Popup'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 PopupAttributes : ViewAttributes
{
///
/// Creates a new instance of a PopupAttributes.
///
/// 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 PopupAttributes() : base() { }
///
/// Creates a new instance of a PopupAttributes with attributes.
///
/// Create PopupAttributes 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 PopupAttributes(PopupAttributes attributes) : base(attributes)
{
if (attributes.ShadowImageAttributes != null)
{
ShadowImageAttributes = attributes.ShadowImageAttributes.Clone() as ImageAttributes;
}
if (attributes.BackgroundImageAttributes != null)
{
BackgroundImageAttributes = attributes.BackgroundImageAttributes.Clone() as ImageAttributes;
}
if (attributes.TitleTextAttributes != null)
{
TitleTextAttributes = attributes.TitleTextAttributes.Clone() as TextAttributes;
}
if (attributes.ButtonAttributes != null)
{
ButtonAttributes = attributes.ButtonAttributes.Clone() as ButtonAttributes;
}
if(attributes.ShadowOffset != null)
{
ShadowOffset = new Vector4(attributes.ShadowOffset.W, attributes.ShadowOffset.X, attributes.ShadowOffset.Y, attributes.ShadowOffset.Z);
}
}
///
/// 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;
}
///
/// Title 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 TitleTextAttributes
{
get;
set;
}
///
/// Shadow offset.
///
/// 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 Vector4 ShadowOffset
{
get;
set;
}
///
/// Popup button'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 ButtonAttributes ButtonAttributes
{
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 PopupAttributes(this);
}
}
}