2 * Copyright(c) 2020 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.
18 extern alias TizenSystemSettings;
19 using TizenSystemSettings.Tizen.System;
21 using System.ComponentModel;
23 namespace Tizen.NUI.BaseComponents
26 /// Class with the text and style parameters to be rendered into a pixel buffer.
28 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
29 [EditorBrowsable(EditorBrowsableState.Never)]
30 public class RendererParameters : Disposable
32 internal RendererParameters(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
39 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
41 Interop.RendererParameters.DeleteRendererParameters(swigCPtr);
45 /// Construct RendererParameters
47 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
48 [EditorBrowsable(EditorBrowsableState.Never)]
49 public RendererParameters() : this(Interop.RendererParameters.NewRendererParameters(), true)
51 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
55 /// The text to be rendered
57 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
58 [EditorBrowsable(EditorBrowsableState.Never)]
63 Interop.RendererParameters.TextSet(SwigCPtr, value);
64 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
68 string ret = Interop.RendererParameters.TextGet(SwigCPtr);
69 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
75 /// The horizontal alignment: one of HorizontalAlignment.
77 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
78 [EditorBrowsable(EditorBrowsableState.Never)]
79 public HorizontalAlignment HorizontalAlignment
83 string alignment = "begin";
86 case HorizontalAlignment.Begin:
91 case HorizontalAlignment.Center:
96 case HorizontalAlignment.End:
106 Interop.RendererParameters.HorizontalAlignmentSet(SwigCPtr, alignment);
107 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
111 string ret = Interop.RendererParameters.HorizontalAlignmentGet(SwigCPtr);
112 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
113 HorizontalAlignment alignment = HorizontalAlignment.Begin;
118 alignment = HorizontalAlignment.Begin;
123 alignment = HorizontalAlignment.Center;
128 alignment = HorizontalAlignment.End;
141 /// The vertical alignment: one of VerticalAlignment.
143 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
144 [EditorBrowsable(EditorBrowsableState.Never)]
145 public VerticalAlignment VerticalAlignment
149 string alignment = "top";
152 case VerticalAlignment.Top:
157 case VerticalAlignment.Center:
159 alignment = "center";
162 case VerticalAlignment.Bottom:
164 alignment = "bottom";
172 Interop.RendererParameters.VerticalAlignmentSet(SwigCPtr, alignment);
173 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
177 string ret = Interop.RendererParameters.VerticalAlignmentGet(SwigCPtr);
178 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
179 VerticalAlignment alignment = VerticalAlignment.Top;
184 alignment = VerticalAlignment.Top;
189 alignment = VerticalAlignment.Center;
194 alignment = VerticalAlignment.Bottom;
207 /// The font's family.
209 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
210 [EditorBrowsable(EditorBrowsableState.Never)]
211 public string FontFamily
215 Interop.RendererParameters.FontFamilySet(SwigCPtr, value);
216 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
220 string ret = Interop.RendererParameters.FontFamilyGet(SwigCPtr);
221 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
227 /// The font's weight: one of {"thin", "ultraLight", "extraLight", "light", "demiLight", "semiLight", "book", "normal", "regular", "medium", "demiBold", "semiBold", "bold", "ultraBold", "extraBold", "black", "heavy", "extraBlack"}.
229 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
230 [EditorBrowsable(EditorBrowsableState.Never)]
231 public string FontWeight
235 Interop.RendererParameters.FontWeightSet(SwigCPtr, value);
236 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
240 string ret = Interop.RendererParameters.FontWeightGet(SwigCPtr);
241 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
247 /// The font's width: one of {"ultraCondensed", "extraCondensed", "condensed", "semiCondensed", "normal", "semiExpanded", "expanded", "extraExpanded", "ultraExpanded"}.
249 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
250 [EditorBrowsable(EditorBrowsableState.Never)]
251 public string FontWidth
255 Interop.RendererParameters.FontWidthSet(SwigCPtr, value);
256 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
260 string ret = Interop.RendererParameters.FontWidthGet(SwigCPtr);
261 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
267 /// The font's slant. one of {"normal", "roman", "italic", "oblique"}
269 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
270 [EditorBrowsable(EditorBrowsableState.Never)]
271 public string FontSlant
275 Interop.RendererParameters.FontSlantSet(SwigCPtr, value);
276 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
280 string ret = Interop.RendererParameters.FontSlantGet(SwigCPtr);
281 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
287 /// The type of layout: one of TextLayout {"singleLine", "multiLine", "circular"}
289 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
290 [EditorBrowsable(EditorBrowsableState.Never)]
291 public TextLayout Layout
295 string textLayout = "singleLine";
298 case TextLayout.SingleLine:
300 textLayout = "singleLine";
303 case TextLayout.MultiLine:
305 textLayout = "multiLine";
308 case TextLayout.Circular:
310 textLayout = "circular";
318 Interop.RendererParameters.LayoutSet(SwigCPtr, textLayout);
319 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
323 string ret = Interop.RendererParameters.LayoutGet(SwigCPtr);
324 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
325 TextLayout textLayout = TextLayout.SingleLine;
330 textLayout = TextLayout.SingleLine;
335 textLayout = TextLayout.MultiLine;
340 textLayout = TextLayout.Circular;
353 /// The text alignment within the arc: one of CircularAlignment. The @p horizontalAlignment and @p verticalAlignment can be used to align the text within the text area.
355 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
356 [EditorBrowsable(EditorBrowsableState.Never)]
357 public CircularAlignment CircularAlignment
361 string alignment = "begin";
364 case CircularAlignment.Begin:
369 case CircularAlignment.Center:
371 alignment = "center";
374 case CircularAlignment.End:
384 Interop.RendererParameters.CircularAlignmentSet(SwigCPtr, alignment);
385 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
389 string ret = Interop.RendererParameters.CircularAlignmentGet(SwigCPtr);
390 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
391 CircularAlignment alignment = CircularAlignment.Begin;
396 alignment = CircularAlignment.Begin;
401 alignment = CircularAlignment.Center;
406 alignment = CircularAlignment.End;
419 /// The default text's color. Default is white.
421 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
422 [EditorBrowsable(EditorBrowsableState.Never)]
423 public Vector4 TextColor
427 Interop.RendererParameters.TextColorSet(SwigCPtr, Vector4.getCPtr(value));
428 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
432 Vector4 ret = new Vector4(Interop.RendererParameters.TextColorGet(SwigCPtr), true);
433 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
439 /// The font's size (in points).
441 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
442 [EditorBrowsable(EditorBrowsableState.Never)]
443 public float FontSize
447 Interop.RendererParameters.FontSizeSet(SwigCPtr, value);
448 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
452 float ret = Interop.RendererParameters.FontSizeGet(SwigCPtr);
453 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
459 /// The width in pixels of the boundaries where the text is going to be laid-out.
461 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
462 [EditorBrowsable(EditorBrowsableState.Never)]
463 public uint TextWidth
467 Interop.RendererParameters.TextWidthSet(SwigCPtr, value);
468 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
472 uint ret = Interop.RendererParameters.TextWidthGet(SwigCPtr);
473 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
479 /// The height in pixels of the boundaries where the text is going to be laid-out.
481 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
482 [EditorBrowsable(EditorBrowsableState.Never)]
483 public uint TextHeight
487 Interop.RendererParameters.TextHeightSet(SwigCPtr, value);
488 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
492 uint ret = Interop.RendererParameters.TextHeightGet(SwigCPtr);
493 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
499 /// The radius in pixels of the circular text.
501 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
502 [EditorBrowsable(EditorBrowsableState.Never)]
507 Interop.RendererParameters.RadiusSet(SwigCPtr, value);
508 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
512 uint ret = Interop.RendererParameters.RadiusGet(SwigCPtr);
513 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
519 /// The begin angle in degrees of the text area on the circle. The top of the circle is 0°, the right side 90°, the bottom 180° and the left 270°.
521 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
522 [EditorBrowsable(EditorBrowsableState.Never)]
523 public float BeginAngle
527 Interop.RendererParameters.BeginAngleSet(SwigCPtr, value);
528 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
532 float ret = Interop.RendererParameters.BeginAngleGet(SwigCPtr);
533 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
539 /// The increment angle in degrees of the text area on the circle. The @p incrementAngle defines a direction. If positive, the text will be laid out clockwise.
541 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
542 [EditorBrowsable(EditorBrowsableState.Never)]
543 public float IncrementAngle
547 Interop.RendererParameters.IncrementAngleSet(SwigCPtr, value);
548 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
552 float ret = Interop.RendererParameters.IncrementAngleGet(SwigCPtr);
553 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
559 /// Whether the ellipsis layout option is enabled.
561 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
562 [EditorBrowsable(EditorBrowsableState.Never)]
563 public bool EllipsisEnabled
567 Interop.RendererParameters.EllipsisEnabledSet(SwigCPtr, value);
568 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
572 bool ret = Interop.RendererParameters.EllipsisEnabledGet(SwigCPtr);
573 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
579 /// Whether the mark-up processor is enabled.
581 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
582 [EditorBrowsable(EditorBrowsableState.Never)]
583 public bool MarkupEnabled
587 Interop.RendererParameters.MarkupEnabledSet(SwigCPtr, value);
588 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
592 bool ret = Interop.RendererParameters.MarkupEnabledGet(SwigCPtr);
593 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
599 /// Whether a default color has been set.
601 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
602 [EditorBrowsable(EditorBrowsableState.Never)]
603 public bool IsTextColorSet
607 Interop.RendererParameters.IsTextColorSetSet(SwigCPtr, value);
608 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
612 bool ret = Interop.RendererParameters.IsTextColorSetGet(SwigCPtr);
613 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
619 /// Minimum size of line.
621 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
622 [EditorBrowsable(EditorBrowsableState.Never)]
623 public float MinLineSize
627 Interop.RendererParameters.MinLineSizeSet(SwigCPtr, value);
628 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
632 float ret = Interop.RendererParameters.MinLineSizeGet(SwigCPtr);
633 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
639 /// Padding of TextLabel.
641 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
642 [EditorBrowsable(EditorBrowsableState.Never)]
643 public Extents Padding
647 Interop.RendererParameters.PaddingSet(SwigCPtr, Extents.getCPtr(value));
648 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
652 Extents ret = new Extents(Interop.RendererParameters.PaddingGet(SwigCPtr), true);
653 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
661 /// Class with info of the embedded items layout.
663 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
664 [EditorBrowsable(EditorBrowsableState.Never)]
665 public class EmbeddedItemInfo : Disposable
668 internal EmbeddedItemInfo(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
675 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
677 Interop.EmbeddedItemInfo.DeleteEmbeddedItemInfo(swigCPtr);
681 /// Construct EmbeddedItemInfo
683 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
684 [EditorBrowsable(EditorBrowsableState.Never)]
685 public EmbeddedItemInfo() : this(Interop.EmbeddedItemInfo.NewEmbeddedItemInfo(), true)
687 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
691 /// Index to the character within the string.
693 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
694 [EditorBrowsable(EditorBrowsableState.Never)]
695 public uint CharacterIndex
699 Interop.EmbeddedItemInfo.CharacterIndexSet(SwigCPtr, value);
700 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
704 uint ret = Interop.EmbeddedItemInfo.CharacterIndexGet(SwigCPtr);
705 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
711 /// Index to the glyph
713 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
714 [EditorBrowsable(EditorBrowsableState.Never)]
715 public uint GlyphIndex
719 Interop.EmbeddedItemInfo.GlyphIndexSet(SwigCPtr, value);
720 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
724 uint ret = Interop.EmbeddedItemInfo.GlyphIndexGet(SwigCPtr);
725 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
731 /// The layout position within the buffer (top, left corner).
733 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
734 [EditorBrowsable(EditorBrowsableState.Never)]
735 public Vector2 Position
739 Interop.EmbeddedItemInfo.PositionSet(SwigCPtr, Vector2.getCPtr(value));
740 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
744 Vector2 ret = new Vector2(Interop.EmbeddedItemInfo.PositionGet(SwigCPtr), SwigCMemOwn);
745 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
751 /// The size within the buffer of the embedded item.
753 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
754 [EditorBrowsable(EditorBrowsableState.Never)]
759 Interop.EmbeddedItemInfo.SizeSet(SwigCPtr, Size.getCPtr(value));
760 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
764 Size ret = new Size(Interop.EmbeddedItemInfo.SizeGet(SwigCPtr), SwigCMemOwn);
765 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
771 /// The rotated size within the buffer of the embedded item.
773 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
774 [EditorBrowsable(EditorBrowsableState.Never)]
775 public Size RotatedSize
779 Interop.EmbeddedItemInfo.RotatedSizeSet(SwigCPtr, Size.getCPtr(value));
780 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
784 Size ret = new Size(Interop.EmbeddedItemInfo.RotatedSizeGet(SwigCPtr), SwigCMemOwn);
785 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
791 /// Rotation angle of the pixel buffer in degrees.
793 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
794 [EditorBrowsable(EditorBrowsableState.Never)]
799 Interop.EmbeddedItemInfo.AngleSet(SwigCPtr, Degree.getCPtr(value));
800 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
804 Degree ret = new Degree(Interop.EmbeddedItemInfo.AngleGet(SwigCPtr), SwigCMemOwn);
805 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
811 /// Whether the color of the image is multiplied by the color of the text.
813 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
814 [EditorBrowsable(EditorBrowsableState.Never)]
815 public Tizen.NUI.ColorBlendingMode ColorBlendingMode
819 Interop.EmbeddedItemInfo.ColorBlendingModeSet(SwigCPtr, value);
820 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
824 Tizen.NUI.ColorBlendingMode ret = Interop.EmbeddedItemInfo.ColorBlendingModeGet(SwigCPtr);
825 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
832 /// Class with the parameters needed to build a shadow for the given pixel buffer.
834 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
835 [EditorBrowsable(EditorBrowsableState.Never)]
836 public class ShadowParameters : Disposable
839 internal ShadowParameters(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
846 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
848 Interop.ShadowParameters.DeleteShadowParameters(swigCPtr);
852 /// Construct ShadowParameters
854 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
855 [EditorBrowsable(EditorBrowsableState.Never)]
856 public ShadowParameters() : this(Interop.ShadowParameters.NewShadowParameters(), true)
858 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
862 /// The input pixel buffer used to create the shadow.
864 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
865 [EditorBrowsable(EditorBrowsableState.Never)]
866 public PixelBuffer Input
870 Interop.ShadowParameters.InputSet(SwigCPtr, PixelBuffer.getCPtr(value));
871 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
875 PixelBuffer ret = new PixelBuffer(Interop.ShadowParameters.InputGet(SwigCPtr), true);
876 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
882 /// The color of the text.
884 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
885 [EditorBrowsable(EditorBrowsableState.Never)]
886 public Vector4 TextColor
890 Interop.ShadowParameters.TextColorSet(SwigCPtr, Vector4.getCPtr(value));
891 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
895 Vector4 ret = new Vector4(Interop.ShadowParameters.TextColorGet(SwigCPtr), true);
896 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
902 /// The color of the shadow.
904 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
905 [EditorBrowsable(EditorBrowsableState.Never)]
910 Interop.ShadowParameters.ColorSet(SwigCPtr, Vector4.getCPtr(value));
911 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
915 Vector4 ret = new Vector4(Interop.ShadowParameters.ColorGet(SwigCPtr), true);
916 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
922 /// The offset of the shadow.
924 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
925 [EditorBrowsable(EditorBrowsableState.Never)]
926 public Vector2 Offset
930 Interop.ShadowParameters.OffsetSet(SwigCPtr, Vector2.getCPtr(value));
931 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
935 Vector2 ret = new Vector2(Interop.ShadowParameters.OffsetGet(SwigCPtr), true);
936 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
942 /// Whether to blend the shadow.
944 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
945 [EditorBrowsable(EditorBrowsableState.Never)]
946 public bool blendShadow
950 Interop.ShadowParameters.BlendShadowSet(SwigCPtr, value);
951 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
955 bool ret = Interop.ShadowParameters.BlendShadowGet(SwigCPtr);
956 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
964 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
965 [EditorBrowsable(EditorBrowsableState.Never)]
966 public static partial class TextUtils
969 /// Renders text into a pixel buffer.
970 /// @note: Can process a mark-up string.
971 /// @note: It does the font selection, RTL reordering, shaping and layouting.
972 /// @note: The width of the pixel buffer may be different to the given @e textWidth
973 /// due to some padding pixels added.
975 /// The text is laid-out for the given size @e (textWidth,textHeight).
976 /// If the @e multiLineEnabled option is enabled, the text will wrap in lines.
977 /// If the @e ellipsisEnabled option is enabled, the text will be ellided if
978 /// there is no more space for new lines.
980 /// It won't be rendered the parts of the text exceeding the boundaries of
981 /// the given width and height.
983 /// If the given @e textHeight is zero, a big enough pixel buffer will be created
984 /// to render the full text.
986 /// If the given @e textWidth is zero, the 'natural size' of the text will be
987 /// used to create the pixel buffer to render the full text.
989 /// If the radius is not zero, the text will be laid-out following a circular path.
990 /// In that case the text is laid-out in a single line.
992 /// If the mark-up string contains embedded items, the @p embeddedItemLayout vector
993 /// contains the layout info of each embedded item.
995 /// <param name="textParameters">The text and style options.</param>
996 /// <param name="embeddedItemLayout">The layout info of the embedded items</param>
997 /// <returns>A pixel buffer with the text rendered on it.</returns>
998 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
999 [EditorBrowsable(EditorBrowsableState.Never)]
1000 public static PixelBuffer Render(RendererParameters textParameters, ref EmbeddedItemInfo[] embeddedItemLayout)
1004 global::System.IntPtr returnItem = IntPtr.Zero;
1005 PixelBuffer ret = new PixelBuffer(Interop.TextUtils.Render(RendererParameters.getCPtr(textParameters), ref returnItem, ref count, ref length), true);
1007 embeddedItemLayout = new EmbeddedItemInfo[count];
1008 for (int i = 0; i < count; i++)
1010 IntPtr p = new IntPtr((returnItem.ToInt32() + i * length));
1011 embeddedItemLayout[i] = new EmbeddedItemInfo(p, false);
1013 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1018 /// Creates a shadow for the text given in the input pixel buffer.
1019 /// The function returns a RGBA8888 pixel buffer with the text and its shadow rendered on it.
1021 /// The pixel format of the @e input pixel buffer could be an A8 or an RGBA8888. If it's
1022 /// an A8 pixel buffer, it uses the given @e textColor to give color to the text. Otherwise
1023 /// it uses the color of the @e input pixel buffer.
1025 /// <param name="shadowParameters">The parameters needed to create the text's shadow.</param>
1026 /// <returns>A pixel buffer with the text and the shadow rendered on it.</returns>
1027 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
1028 [EditorBrowsable(EditorBrowsableState.Never)]
1029 public static PixelBuffer CreateShadow(ShadowParameters shadowParameters)
1031 PixelBuffer ret = new PixelBuffer(Interop.TextUtils.CreateShadow(ShadowParameters.getCPtr(shadowParameters)), true);
1032 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1037 /// Converts a @p pixelBuffer with pixel format A8 to RGBA8888 using the given @p color.
1038 /// @note Does nothing if the @p pixelBuffer is not A8.
1040 /// <param name="pixelBuffer">The pixel buffer with pixel format A8</param>
1041 /// <param name="color">The color used to convert to RGBA8888</param>
1042 /// <param name="multiplyByAlpha">multiplyByAlpha Whether to multiply the @p color with the alpha value of the @p pixel @p buffer.</param>
1043 /// <returns>The pixel buffer converted to RGBA8888.</returns>
1044 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
1045 [EditorBrowsable(EditorBrowsableState.Never)]
1046 public static PixelBuffer ConvertToRgba8888(PixelBuffer pixelBuffer, Vector4 color, bool multiplyByAlpha)
1048 PixelBuffer ret = new PixelBuffer(Interop.TextUtils.ConvertToRgba8888(PixelBuffer.getCPtr(pixelBuffer), Vector4.getCPtr(color), multiplyByAlpha), true);
1049 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1054 /// Updates the @p dst pixel buffer with the data from @p src pixel buffer.
1055 /// @note Both pixel buffers must have the same pixel format. Does nothing if both pixel format are different.
1056 /// @note The function does nothing if the @p src pixel buffer doesn't fit into the @p dst pixel buffer.
1058 /// The @p src pixel buffer could be blended with the @p dst pixel buffer if @p blend is set to @e true.
1060 /// <param name="src">The pixel buffer from where the data is read.</param>
1061 /// <param name="dst">The pixel buffer where the data is written.</param>
1062 /// <param name="x">The top left corner's X within the destination pixel buffer.</param>
1063 /// <param name="y">The top left corner's y within the destination pixel buffer.</param>
1064 /// <param name="blend">Whether to blend the source pixel buffer with the destination pixel buffer as background.</param>
1065 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
1066 [EditorBrowsable(EditorBrowsableState.Never)]
1067 public static void UpdateBuffer(PixelBuffer src, PixelBuffer dst, uint x, uint y, bool blend)
1069 Interop.TextUtils.UpdateBuffer(PixelBuffer.getCPtr(src), PixelBuffer.getCPtr(dst), x, y, blend);
1070 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1074 /// Splits the text in pages of the size given in @p textParameters
1075 /// @note The returned indices are indices to utf32 characters. The input text is encoded in utf8.
1076 /// <returns> An array with the indices of the last character of each page </returns>
1078 [EditorBrowsable(EditorBrowsableState.Never)]
1079 public static Tizen.NUI.PropertyArray GetLastCharacterIndex(RendererParameters textParameters)
1081 Tizen.NUI.PropertyArray ret = new Tizen.NUI.PropertyArray(Interop.TextUtils.GetLastCharacterIndex(RendererParameters.getCPtr(textParameters)), true);
1082 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1087 private const float FontSizeScaleSmall = 0.8f;
1088 private const float FontSizeScaleNormal = 1.0f;
1089 private const float FontSizeScaleLarge = 1.5f;
1090 private const float FontSizeScaleHuge = 1.9f;
1091 private const float FontSizeScaleGiant = 2.5f;
1092 #elif PROFILE_WEARABLE
1093 // The following values from 'system-settings/libutil/sstu.c'
1094 private const float FontSizeScaleSmall = 0.9f;
1095 private const float FontSizeScaleNormal = 1.0f;
1096 private const float FontSizeScaleLarge = 1.1f;
1097 private const float FontSizeScaleHuge = 1.9f;
1098 private const float FontSizeScaleGiant = 2.5f;
1099 #else // PROFILE_MOBILE and etc
1100 // The following values from 'system-settings/libutil/sstu.c'
1101 private const float FontSizeScaleSmall = 0.8f;
1102 private const float FontSizeScaleNormal = 1.0f;
1103 private const float FontSizeScaleLarge = 1.5f;
1104 private const float FontSizeScaleHuge = 1.9f;
1105 private const float FontSizeScaleGiant = 2.5f;
1109 /// It returns a float value according to SystemSettingsFontSize.
1110 /// The returned value can be used for FontSizeScale property.
1111 /// <param name="systemSettingsFontSize">The SystemSettingsFontSize enum value.</param>
1112 /// <returns> A float value for FontSizeScale property. </returns>
1114 [EditorBrowsable(EditorBrowsableState.Never)]
1115 public static float GetFontSizeScale(SystemSettingsFontSize systemSettingsFontSize)
1117 float ret = FontSizeScaleNormal;
1119 switch (systemSettingsFontSize)
1121 case SystemSettingsFontSize.Small:
1122 ret = FontSizeScaleSmall;
1124 case SystemSettingsFontSize.Normal:
1125 ret = FontSizeScaleNormal;
1127 case SystemSettingsFontSize.Large:
1128 ret = FontSizeScaleLarge;
1130 case SystemSettingsFontSize.Huge:
1131 ret = FontSizeScaleHuge;
1133 case SystemSettingsFontSize.Giant:
1134 ret = FontSizeScaleGiant;
1142 /// Copy the previously selected text into the clipboard and return the copied value.
1144 /// <param name="textEditor">The textEditor control from which the text is copied.</param>
1145 /// <returns>The copied text.</returns>
1146 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
1147 [EditorBrowsable(EditorBrowsableState.Never)]
1148 public static string CopyToClipboard(TextEditor textEditor)
1150 string copiedText = Interop.TextEditor.CopyText(textEditor.SwigCPtr);
1151 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1156 /// Copy the previously selected text into the clipboard and return the copied value.
1158 /// <param name="textField">The textField control from which the text is copied.</param>
1159 /// <returns>The copied text.</returns>
1160 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
1161 [EditorBrowsable(EditorBrowsableState.Never)]
1162 public static string CopyToClipboard(TextField textField)
1164 string copiedText = Interop.TextField.CopyText(textField.SwigCPtr);
1165 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1170 /// Cut the previously selected text from the text control and into the clipboard and return the cut value.
1172 /// <param name="textEditor">The textEditor control from which the text is cut.</param>
1173 /// <returns>The cut text.</returns>
1174 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
1175 [EditorBrowsable(EditorBrowsableState.Never)]
1176 public static string CutToClipboard(TextEditor textEditor)
1178 string cutText = Interop.TextEditor.CutText(textEditor.SwigCPtr);
1179 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1184 /// Cut the previously selected text from the text control and into the clipboard and return the cut value.
1186 /// <param name="textField">The textField control from which the text is cut.</param>
1187 /// <returns>The cut text.</returns>
1188 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
1189 [EditorBrowsable(EditorBrowsableState.Never)]
1190 public static string CutToClipboard(TextField textField)
1192 string cutText = Interop.TextField.CutText(textField.SwigCPtr);
1193 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1198 /// Paste the most recently copied/cut text from the clipboard and into the text control.
1200 /// <param name="textEditor">The textEditor control into which the text is pasted.</param>
1201 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
1202 [EditorBrowsable(EditorBrowsableState.Never)]
1203 public static void PasteTo(TextEditor textEditor)
1205 Interop.TextEditor.PasteText(textEditor.SwigCPtr);
1206 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1210 /// Paste the most recently copied/cut text from the clipboard and into the text control.
1212 /// <param name="textField">The textField control into which the text is pasted.</param>
1213 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
1214 [EditorBrowsable(EditorBrowsableState.Never)]
1215 public static void PasteTo(TextField textField)
1217 Interop.TextField.PasteText(textField.SwigCPtr);
1218 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();