2 * Copyright(c) 2019 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 using System.ComponentModel;
19 namespace Tizen.NUI.Components
22 /// The Text Attributes class.
24 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
25 [EditorBrowsable(EditorBrowsableState.Never)]
26 public class TextAttributes : ViewAttributes
29 /// Construct TextAttributes.
31 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
32 [EditorBrowsable(EditorBrowsableState.Never)]
33 public TextAttributes() : base() { }
35 /// Construct with specified attribute.
37 /// <param name="attributes">The specified TextAttributes.</param>
38 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
39 [EditorBrowsable(EditorBrowsableState.Never)]
40 public TextAttributes(TextAttributes attributes) : base(attributes)
42 if(attributes == null)
46 if (attributes.Text != null)
48 Text = attributes.Text.Clone() as StringSelector;
51 if (attributes.TranslatableText != null)
53 TranslatableText = attributes.TranslatableText.Clone() as StringSelector;
56 if (attributes.MultiLine != null)
58 MultiLine = attributes.MultiLine;
61 if (attributes.HorizontalAlignment != null)
63 HorizontalAlignment = attributes.HorizontalAlignment;
66 if (attributes.VerticalAlignment != null)
68 VerticalAlignment = attributes.VerticalAlignment;
71 if (attributes.EnableMarkup != null)
73 EnableMarkup = attributes.EnableMarkup;
76 if (attributes.EnableAutoScroll != null)
78 EnableAutoScroll = attributes.EnableAutoScroll;
81 if (attributes.AutoScrollSpeed != null)
83 AutoScrollSpeed = attributes.AutoScrollSpeed;
86 if (attributes.AutoScrollLoopCount != null)
88 AutoScrollLoopCount = attributes.AutoScrollLoopCount;
91 if (attributes.AutoScrollGap != null)
93 AutoScrollGap = attributes.AutoScrollGap;
96 if (attributes.AutoScrollLoopDelay != null)
98 AutoScrollLoopDelay = attributes.AutoScrollLoopDelay;
101 if (attributes.AutoScrollStopMode != null)
103 AutoScrollStopMode = attributes.AutoScrollStopMode;
106 if (attributes.LineSpacing != null)
108 LineSpacing = attributes.LineSpacing;
111 if (attributes.TextColor != null)
113 TextColor = attributes.TextColor.Clone() as ColorSelector;
116 if (attributes.FontFamily != null)
118 FontFamily = attributes.FontFamily;
121 if (attributes.PointSize != null)
123 PointSize = attributes.PointSize.Clone() as FloatSelector;
126 if (attributes.ShadowOffset != null)
128 ShadowOffset = attributes.ShadowOffset.Clone() as Vector2Selector;
131 if (attributes.ShadowColor != null)
133 ShadowColor = attributes.ShadowColor.Clone() as ColorSelector;
136 if (attributes.OutstrokeColor != null)
138 OutstrokeColor = attributes.OutstrokeColor.Clone() as ColorSelector;
140 if (attributes.OutstrokeThickness != null)
142 OutstrokeThickness = attributes.OutstrokeThickness.Clone() as IntSelector;
148 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
149 [EditorBrowsable(EditorBrowsableState.Never)]
150 public StringSelector Text
156 /// The TranslatableText property
158 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
159 [EditorBrowsable(EditorBrowsableState.Never)]
160 public StringSelector TranslatableText
166 /// TextLabel MultiLine
168 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
169 [EditorBrowsable(EditorBrowsableState.Never)]
170 public bool? MultiLine
176 /// TextLabel HorizontalAlignment
178 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
179 [EditorBrowsable(EditorBrowsableState.Never)]
180 public HorizontalAlignment? HorizontalAlignment
186 /// TextLabel VerticalAlignment
188 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
189 [EditorBrowsable(EditorBrowsableState.Never)]
190 public VerticalAlignment? VerticalAlignment
196 /// TextLabel EnableMarkup
198 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
199 [EditorBrowsable(EditorBrowsableState.Never)]
200 public bool? EnableMarkup
206 /// TextLabel EnableAutoScroll
208 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
209 [EditorBrowsable(EditorBrowsableState.Never)]
210 public bool? EnableAutoScroll
216 /// TextLabel AutoScrollSpeed
218 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
219 [EditorBrowsable(EditorBrowsableState.Never)]
220 public int? AutoScrollSpeed
226 /// TextLabel AutoScrollLoopCount
228 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
229 [EditorBrowsable(EditorBrowsableState.Never)]
230 public int? AutoScrollLoopCount
236 /// TextLabel AutoScrollGap
238 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
239 [EditorBrowsable(EditorBrowsableState.Never)]
240 public float? AutoScrollGap
246 /// TextLabel AutoScrollLoopDelay
248 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
249 [EditorBrowsable(EditorBrowsableState.Never)]
250 public float? AutoScrollLoopDelay
256 /// TextLabel AutoScrollStopMode
258 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
259 [EditorBrowsable(EditorBrowsableState.Never)]
260 public AutoScrollStopMode? AutoScrollStopMode
266 /// TextLabel LineSpacing
268 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
269 [EditorBrowsable(EditorBrowsableState.Never)]
270 public float? LineSpacing
276 /// TextLabel TextColor
278 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
279 [EditorBrowsable(EditorBrowsableState.Never)]
280 public ColorSelector TextColor
286 /// TextLabel FontFamily
288 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
289 [EditorBrowsable(EditorBrowsableState.Never)]
290 public string FontFamily
296 /// TextLabel PointSize
298 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
299 [EditorBrowsable(EditorBrowsableState.Never)]
300 public FloatSelector PointSize
306 /// TextLabel ShadowOffset
308 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
309 [EditorBrowsable(EditorBrowsableState.Never)]
310 public Vector2Selector ShadowOffset
316 /// TextLabel ShadowColor
318 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
319 [EditorBrowsable(EditorBrowsableState.Never)]
320 public ColorSelector ShadowColor
326 /// TextLabel OutstrokeColor
328 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
329 [EditorBrowsable(EditorBrowsableState.Never)]
330 public ColorSelector OutstrokeColor
336 /// TextLabel OutstrokeThickness
338 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
339 [EditorBrowsable(EditorBrowsableState.Never)]
340 public IntSelector OutstrokeThickness
346 /// Attributes's clone function.
348 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
349 [EditorBrowsable(EditorBrowsableState.Never)]
350 public override Attributes Clone()
352 return new TextAttributes(this);