[NUI] Add SetPlaceholder, GetPlaceholder to TextField, TextEditor
authorBowon Ryu <bowon.ryu@samsung.com>
Thu, 12 Aug 2021 10:16:21 +0000 (19:16 +0900)
committerhuiyu <35286162+huiyueun@users.noreply.github.com>
Tue, 7 Sep 2021 09:05:39 +0000 (18:05 +0900)
commitc8c7b2dac676b8aa1077361c7909f38fe9fbb617
treea5a18c2f6181530cc263bf893b2b527f704b02f6
parenta923be9e1fa12c1bcd3da298811cc8841aadafb3
[NUI] Add SetPlaceholder, GetPlaceholder to TextField, TextEditor

Add a Placeholder struct to pass data of DALi Placeholder PropertyMap.
The Placeholder struct can be used as an argument to
SetPlaceholder and GetPlaceholder methods.

// example
var placeholder = new Tizen.NUI.Text.Placeholder();
placeholder.Text = "placeholder text";
placeholder.TextFocused = "placeholder textFocused";
placeholder.Color = new Color("#45B39D");
placeholder.FontFamily = "BreezeSans";
placeholder.FontStyle = new Tizen.NUI.Text.FontStyle()
{
    Width = FontWidthType.Expanded,
    Weight = FontWeightType.ExtraLight,
    Slant = FontSlantType.Italic,
};
placeholder.PointSize = 25.0f;
//placeholder.PixelSize = 50.0f;
placeholder.Ellipsis = true;

field.SetPlaceholder(placeholder);

Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs
src/Tizen.NUI/src/public/BaseComponents/TextField.cs
src/Tizen.NUI/src/public/BaseComponents/TextUtils.cs
src/Tizen.NUI/src/public/Common/NUIConstants.cs