/*
* 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
{
///
/// The Text Attributes class.
///
/// 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 TextAttributes : ViewAttributes
{
///
/// Construct TextAttributes.
///
/// 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() : base() { }
///
/// Construct with specified attribute.
///
/// The specified TextAttributes.
/// 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 attributes) : base(attributes)
{
if(attributes == null)
{
return;
}
if (attributes.Text != null)
{
Text = attributes.Text.Clone() as StringSelector;
}
if (attributes.TranslatableText != null)
{
TranslatableText = attributes.TranslatableText.Clone() as StringSelector;
}
if (attributes.MultiLine != null)
{
MultiLine = attributes.MultiLine;
}
if (attributes.HorizontalAlignment != null)
{
HorizontalAlignment = attributes.HorizontalAlignment;
}
if (attributes.VerticalAlignment != null)
{
VerticalAlignment = attributes.VerticalAlignment;
}
if (attributes.EnableMarkup != null)
{
EnableMarkup = attributes.EnableMarkup;
}
if (attributes.EnableAutoScroll != null)
{
EnableAutoScroll = attributes.EnableAutoScroll;
}
if (attributes.AutoScrollSpeed != null)
{
AutoScrollSpeed = attributes.AutoScrollSpeed;
}
if (attributes.AutoScrollLoopCount != null)
{
AutoScrollLoopCount = attributes.AutoScrollLoopCount;
}
if (attributes.AutoScrollGap != null)
{
AutoScrollGap = attributes.AutoScrollGap;
}
if (attributes.AutoScrollLoopDelay != null)
{
AutoScrollLoopDelay = attributes.AutoScrollLoopDelay;
}
if (attributes.AutoScrollStopMode != null)
{
AutoScrollStopMode = attributes.AutoScrollStopMode;
}
if (attributes.LineSpacing != null)
{
LineSpacing = attributes.LineSpacing;
}
if (attributes.TextColor != null)
{
TextColor = attributes.TextColor.Clone() as ColorSelector;
}
if (attributes.FontFamily != null)
{
FontFamily = attributes.FontFamily;
}
if (attributes.PointSize != null)
{
PointSize = attributes.PointSize.Clone() as FloatSelector;
}
if (attributes.ShadowOffset != null)
{
ShadowOffset = attributes.ShadowOffset.Clone() as Vector2Selector;
}
if (attributes.ShadowColor != null)
{
ShadowColor = attributes.ShadowColor.Clone() as ColorSelector;
}
if (attributes.OutstrokeColor != null)
{
OutstrokeColor = attributes.OutstrokeColor.Clone() as ColorSelector;
}
if (attributes.OutstrokeThickness != null)
{
OutstrokeThickness = attributes.OutstrokeThickness.Clone() as IntSelector;
}
}
///
/// TextLabel Text
///
/// 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 StringSelector Text
{
get;
set;
}
///
/// The TranslatableText property
///
/// 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 StringSelector TranslatableText
{
get;
set;
}
///
/// TextLabel MultiLine
///
/// 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? MultiLine
{
get;
set;
}
///
/// TextLabel HorizontalAlignment
///
/// 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 HorizontalAlignment? HorizontalAlignment
{
get;
set;
}
///
/// TextLabel VerticalAlignment
///
/// 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 VerticalAlignment? VerticalAlignment
{
get;
set;
}
///
/// TextLabel EnableMarkup
///
/// 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? EnableMarkup
{
get;
set;
}
///
/// TextLabel EnableAutoScroll
///
/// 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? EnableAutoScroll
{
get;
set;
}
///
/// TextLabel AutoScrollSpeed
///
/// 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 int? AutoScrollSpeed
{
get;
set;
}
///
/// TextLabel AutoScrollLoopCount
///
/// 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 int? AutoScrollLoopCount
{
get;
set;
}
///
/// TextLabel AutoScrollGap
///
/// 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 float? AutoScrollGap
{
get;
set;
}
///
/// TextLabel AutoScrollLoopDelay
///
/// 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 float? AutoScrollLoopDelay
{
get;
set;
}
///
/// TextLabel AutoScrollStopMode
///
/// 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 AutoScrollStopMode? AutoScrollStopMode
{
get;
set;
}
///
/// TextLabel LineSpacing
///
/// 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 float? LineSpacing
{
get;
set;
}
///
/// TextLabel TextColor
///
/// 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 ColorSelector TextColor
{
get;
set;
}
///
/// TextLabel FontFamily
///
/// 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 string FontFamily
{
get;
set;
}
///
/// TextLabel PointSize
///
/// 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 FloatSelector PointSize
{
get;
set;
}
///
/// TextLabel ShadowOffset
///
/// 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 Vector2Selector ShadowOffset
{
get;
set;
}
///
/// TextLabel ShadowColor
///
/// 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 ColorSelector ShadowColor
{
get;
set;
}
///
/// TextLabel OutstrokeColor
///
/// 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 ColorSelector OutstrokeColor
{
get;
set;
}
///
/// TextLabel OutstrokeThickness
///
/// 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 IntSelector OutstrokeThickness
{
get;
set;
}
///
/// Attributes's clone function.
///
/// 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 TextAttributes(this);
}
}
}