-/** Copyright (c) 2017 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.
-*
-*/
+/*
+ * Copyright(c) 2017 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.
+ *
+ */
extern alias TizenSystemSettings;
using TizenSystemSettings.Tizen.System;
using System;
using System.Globalization;
+using System.ComponentModel;
namespace Tizen.NUI.BaseComponents
{
/// <summary>
- /// A control which renders a short text string.<br>
- /// Text labels are lightweight, non-editable, and do not respond to the user input.<br>
+ /// A control which renders a short text string.<br />
+ /// Text labels are lightweight, non-editable, and do not respond to the user input.<br />
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public class TextLabel : View
{
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
/// <summary>
/// Dispose.
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
protected override void Dispose(DisposeTypes type)
{
if (disposed)
internal static readonly int AUTO_SCROLL_LOOP_DELAY = NDalicManualPINVOKE.TextLabel_Property_AUTO_SCROLL_LOOP_DELAY_get();
internal static readonly int LINE_COUNT = NDalicManualPINVOKE.TextLabel_Property_LINE_COUNT_get();
internal static readonly int LINE_WRAP_MODE = NDalicManualPINVOKE.TextLabel_Property_LINE_WRAP_MODE_get();
- internal static readonly int TEXT_COLOR_ANIMATABLE = NDalicPINVOKE.TextLabel_Property_TEXT_COLOR_ANIMATABLE_get();
}
/// <summary>
/// Creates the TextLabel control.
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public TextLabel() : this(NDalicPINVOKE.TextLabel_New__SWIG_0(), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
/// Creates the TextLabel control.
/// </summary>
/// <param name="text">The text to display</param>
+ /// <since_tizen> 3 </since_tizen>
public TextLabel(string text) : this(NDalicPINVOKE.TextLabel_New__SWIG_1(text), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
-
- [Obsolete("Please do not use! this will be deprecated")]
+ /// <summary>
+ /// Downcasts a handle to textLabel handle
+ /// </summary>
+ /// <param name="handle"></param>
+ /// <returns></returns>
+ /// <since_tizen> 3 </since_tizen>
+ /// Please do not use! this will be deprecated!
+ /// Instead please use as keyword.
+ [Obsolete("Please DO NOT use! This will be deprecated, instead please USE as keyword.")]
+ [EditorBrowsable(EditorBrowsableState.Never)]
public new static TextLabel DownCast(BaseHandle handle)
{
TextLabel ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as TextLabel;
return ret;
}
/// <summary>
- /// The TranslatableText property.<br>
- /// The text can set the SID value.<br>
+ /// The TranslatableText property.<br />
+ /// The text can set the SID value.<br />
/// </summary>
/// <exception cref='ArgumentNullException'>
/// ResourceManager about multilingual is null.
/// </exception>
+ /// <since_tizen> 4 </since_tizen>
public string TranslatableText
{
get
}
/// <summary>
- /// The Text property.<br>
- /// The text to display in the UTF-8 format.<br>
+ /// The Text property.<br />
+ /// The text to display in the UTF-8 format.<br />
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public string Text
{
get
}
/// <summary>
- /// The FontFamily property.<br>
- /// The requested font family to use.<br>
+ /// The FontFamily property.<br />
+ /// The requested font family to use.<br />
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public string FontFamily
{
get
}
/// <summary>
- /// The FontStyle property.<br>
- /// The requested font style to use.<br>
+ /// The FontStyle property.<br />
+ /// The requested font style to use.<br />
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public PropertyMap FontStyle
{
get
}
/// <summary>
- /// The PointSize property.<br>
- /// The size of font in points.<br>
+ /// The PointSize property.<br />
+ /// The size of font in points.<br />
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public float PointSize
{
get
}
/// <summary>
- /// The MultiLine property.<br>
- /// The single-line or multi-line layout option.<br>
+ /// The MultiLine property.<br />
+ /// The single-line or multi-line layout option.<br />
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public bool MultiLine
{
get
}
/// <summary>
- /// The HorizontalAlignment property.<br>
- /// The line horizontal alignment.<br>
+ /// The HorizontalAlignment property.<br />
+ /// The line horizontal alignment.<br />
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public HorizontalAlignment HorizontalAlignment
{
get
}
/// <summary>
- /// The VerticalAlignment property.<br>
- /// The line vertical alignment.<br>
+ /// The VerticalAlignment property.<br />
+ /// The line vertical alignment.<br />
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public VerticalAlignment VerticalAlignment
{
get
}
/// <summary>
- /// The TextColor property.<br>
- /// The color of the text.<br>
+ /// The TextColor property.<br />
+ /// The color of the text.<br />
+ /// Animation framework can be used to change the color of the text when not using mark up.<br />
+ /// Cannot animate the color when text is auto scrolling.<br />
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public Color TextColor
{
get
}
/// <summary>
- /// The ShadowOffset property.<br>
- /// The drop shadow offset 0 indicates no shadow.<br>
+ /// The ShadowOffset property.<br />
+ /// The drop shadow offset 0 indicates no shadow.<br />
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public Vector2 ShadowOffset
{
get
}
/// <summary>
- /// The ShadowColor property.<br>
- /// The color of a drop shadow.<br>
+ /// The ShadowColor property.<br />
+ /// The color of a drop shadow.<br />
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public Vector4 ShadowColor
{
get
}
/// <summary>
- /// The UnderlineEnabled property.<br>
- /// The underline enabled flag.<br>
+ /// The UnderlineEnabled property.<br />
+ /// The underline enabled flag.<br />
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public bool UnderlineEnabled
{
get
}
/// <summary>
- /// The UnderlineColor property.<br>
- /// Overrides the underline height from font metrics.<br>
+ /// The UnderlineColor property.<br />
+ /// Overrides the underline height from font metrics.<br />
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public Vector4 UnderlineColor
{
get
}
/// <summary>
- /// The UnderlineHeight property.<br>
- /// Overrides the underline height from font metrics.<br>
+ /// The UnderlineHeight property.<br />
+ /// Overrides the underline height from font metrics.<br />
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public float UnderlineHeight
{
get
}
/// <summary>
- /// The EnableMarkup property.<br>
- /// Whether the mark-up processing is enabled.<br>
+ /// The EnableMarkup property.<br />
+ /// Whether the mark-up processing is enabled.<br />
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public bool EnableMarkup
{
get
}
/// <summary>
- /// The EnableAutoScroll property.<br>
- /// Starts or stops auto scrolling.<br>
+ /// The EnableAutoScroll property.<br />
+ /// Starts or stops auto scrolling.<br />
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public bool EnableAutoScroll
{
get
}
/// <summary>
- /// The AutoScrollSpeed property.<br>
- /// Sets the speed of scrolling in pixels per second.<br>
+ /// The AutoScrollSpeed property.<br />
+ /// Sets the speed of scrolling in pixels per second.<br />
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public int AutoScrollSpeed
{
get
}
/// <summary>
- /// The AutoScrollLoopCount property.<br>
- /// Number of complete loops when scrolling enabled.<br>
+ /// The AutoScrollLoopCount property.<br />
+ /// Number of complete loops when scrolling enabled.<br />
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public int AutoScrollLoopCount
{
get
}
/// <summary>
- /// The AutoScrollGap property.<br>
- /// Gap before scrolling wraps.<br>
+ /// The AutoScrollGap property.<br />
+ /// Gap before scrolling wraps.<br />
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public float AutoScrollGap
{
get
}
/// <summary>
- /// The LineSpacing property.<br>
- /// The default extra space between lines in points.<br>
+ /// The LineSpacing property.<br />
+ /// The default extra space between lines in points.<br />
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public float LineSpacing
{
get
}
/// <summary>
- /// The Underline property.<br>
- /// The default underline parameters.<br>
+ /// The Underline property.<br />
+ /// The default underline parameters.<br />
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public PropertyMap Underline
{
get
}
/// <summary>
- /// The Shadow property.<br>
- /// The default shadow parameters.<br>
+ /// The Shadow property.<br />
+ /// The default shadow parameters.<br />
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public PropertyMap Shadow
{
get
}
/// <summary>
- /// The Emboss property.<br>
- /// The default emboss parameters.<br>
+ /// The Emboss property.<br />
+ /// The default emboss parameters.<br />
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public string Emboss
{
get
}
/// <summary>
- /// The Outline property.<br>
- /// The default outline parameters.<br>
+ /// The Outline property.<br />
+ /// The default outline parameters.<br />
/// </summary>
- public string Outline
+ /// <since_tizen> 3 </since_tizen>
+ public PropertyMap Outline
{
get
{
- string temp;
- GetProperty(TextLabel.Property.OUTLINE).Get(out temp);
+ PropertyMap temp = new PropertyMap();
+ GetProperty(TextLabel.Property.OUTLINE).Get(temp);
return temp;
}
set
}
/// <summary>
- /// The PixelSize property.<br>
- /// The size of font in pixels.<br>
+ /// The PixelSize property.<br />
+ /// The size of font in pixels.<br />
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public float PixelSize
{
get
}
/// <summary>
- /// The Ellipsis property.<br>
- /// Enable or disable the ellipsis.<br>
+ /// The Ellipsis property.<br />
+ /// Enable or disable the ellipsis.<br />
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public bool Ellipsis
{
get
}
/// <summary>
- /// The AutoScrollLoopDelay property.<br>
- /// Do something.<br>
+ /// The AutoScrollLoopDelay property.<br />
+ /// Do something.<br />
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public float AutoScrollLoopDelay
{
get
}
/// <summary>
- /// The AutoScrollStopMode property.<br>
- /// Do something.<br>
+ /// The AutoScrollStopMode property.<br />
+ /// Do something.<br />
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public AutoScrollStopMode AutoScrollStopMode
{
get
}
/// <summary>
- /// The TextColorAnimatable property.<br>
- /// The color of the text that can be animatated.<br>
- /// Animation framework can be used to change the color of the text when not using mark up.<br>
- /// Not possible when text is auto scrolling. <br>
- /// </summary>
- public Color TextColorAnimatable
- {
- get
- {
- Color animatableColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
- GetProperty(TextLabel.Property.TEXT_COLOR_ANIMATABLE).Get(animatableColor);
- return animatableColor;
- }
- set
- {
- SetProperty(TextLabel.Property.TEXT_COLOR_ANIMATABLE, new Tizen.NUI.PropertyValue(value));
- }
- }
-
/// The line count of the text.
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public int LineCount
{
get
}
/// <summary>
- /// The LineWrapMode property.<br>
- /// line wrap mode when the text lines over layout width.<br>
+ /// The LineWrapMode property.<br />
+ /// line wrap mode when the text lines over layout width.<br />
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public LineWrapMode LineWrapMode
{
get
{
- string temp;
+ int temp;
if(GetProperty(TextLabel.Property.LINE_WRAP_MODE).Get(out temp) == false)
{
NUILog.Error("LineWrapMode get error!");
}
- switch (temp)
- {
- case "WRAP_MODE_WORD":
- return LineWrapMode.Word;
- case "WRAP_MODE_CHARACTER":
- return LineWrapMode.Character;
- default:
- return LineWrapMode.Word;
- }
+ return (LineWrapMode)temp;
}
set
{
- string temp = "";
- switch (value)
- {
- case LineWrapMode.Word:
- {
- temp = "WRAP_MODE_WORD";
- break;
- }
- case LineWrapMode.Character:
- {
- temp = "WRAP_MODE_CHARACTER";
- break;
- }
- }
- SetProperty(TextLabel.Property.LINE_WRAP_MODE, new Tizen.NUI.PropertyValue(temp));
+ SetProperty(TextLabel.Property.LINE_WRAP_MODE, new Tizen.NUI.PropertyValue((int)value));
}
}
}
-}
+}
\ No newline at end of file