[NUI] Interops for accessibility (#2277)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / BaseComponents / ViewPublicMethods.cs
1 /*
2  * Copyright(c) 2020 Samsung Electronics Co., Ltd.
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  *
16  */
17
18 using System;
19 using System.ComponentModel;
20 using System.Reflection;
21 using System.Runtime.InteropServices;
22 using Tizen.NUI.Binding;
23
24 namespace Tizen.NUI.BaseComponents
25 {
26     /// <summary>
27     /// View is the base class for all views.
28     /// </summary>
29     /// <since_tizen> 3 </since_tizen>
30     public partial class View
31     {
32         /// <summary>
33         /// Perform an action on a visual registered to this view. <br />
34         /// Visuals will have actions. This API is used to perform one of these actions with the given attributes.
35         /// </summary>
36         /// <param name="propertyIndexOfVisual">The Property index of the visual.</param>
37         /// <param name="propertyIndexOfActionId">The action to perform. See Visual to find the supported actions.</param>
38         /// <param name="attributes">Optional attributes for the action.</param>
39         /// <since_tizen> 5 </since_tizen>
40         public void DoAction(int propertyIndexOfVisual, int propertyIndexOfActionId, PropertyValue attributes)
41         {
42             Interop.View.DoAction(SwigCPtr, propertyIndexOfVisual, propertyIndexOfActionId, PropertyValue.getCPtr(attributes));
43             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
44         }
45
46         /// <summary>
47         /// Creates an animation to animate the background color visual. If there is no
48         /// background visual, creates one with transparent black as it's mixColor.
49         /// </summary>
50         /// <since_tizen> 3 </since_tizen>
51         public Animation AnimateBackgroundColor(object destinationValue,
52                                                  int startTime,
53                                                  int endTime,
54                                                  AlphaFunction.BuiltinFunctions? alphaFunction = null,
55                                                  object initialValue = null)
56         {
57             Tizen.NUI.PropertyMap background = Background;
58
59             if (background.Empty())
60             {
61                 // If there is no background yet, ensure there is a transparent
62                 // color visual
63                 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
64                 background = Background;
65             }
66             return AnimateColor("background", destinationValue, startTime, endTime, alphaFunction, initialValue);
67         }
68
69         /// <summary>
70         /// Creates an animation to animate the mixColor of the named visual.
71         /// </summary>
72         /// <since_tizen> 3 </since_tizen>
73         public Animation AnimateColor(string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null)
74         {
75             Animation animation = null;
76             using (PropertyMap animator = new PropertyMap())
77             using (PropertyMap timePeriod = new PropertyMap())
78             using (PropertyValue pvDuration = new PropertyValue((endTime - startTime) / 1000.0f))
79             using (PropertyValue pvDelay = new PropertyValue(startTime / 1000.0f))
80             using (PropertyMap transition = new PropertyMap())
81             using (PropertyValue pvTarget = new PropertyValue(targetVisual))
82             using (PropertyValue pvProperty = new PropertyValue("mixColor"))
83             using (PropertyValue destValue = PropertyValue.CreateFromObject(destinationColor))
84             {
85                 if (alphaFunction != null)
86                 {
87                     using (PropertyValue pvAlpha = new PropertyValue(AlphaFunction.BuiltinToPropertyKey(alphaFunction)))
88                     {
89                         animator.Add("alphaFunction", pvAlpha);
90                     }
91                 }
92
93                 timePeriod.Add("duration", pvDuration);
94                 timePeriod.Add("delay", pvDelay);
95                 using (PropertyValue pvTimePeriod = new PropertyValue(timePeriod))
96                 {
97                     animator.Add("timePeriod", pvTimePeriod);
98                 }
99                 using (PropertyValue pvAnimator = new PropertyValue(animator))
100                 {
101                     transition.Add("animator", pvAnimator);
102                 }
103                 transition.Add("target", pvTarget);
104                 transition.Add("property", pvProperty);
105
106                 if (initialColor != null)
107                 {
108                     using (PropertyValue initValue = PropertyValue.CreateFromObject(initialColor))
109                     {
110                         transition.Add("initialValue", initValue);
111                     }
112                 }
113
114                 transition.Add("targetValue", destValue);
115                 using (TransitionData transitionData = new TransitionData(transition))
116                 {
117                     animation = new Animation(Interop.View.CreateTransition(SwigCPtr, TransitionData.getCPtr(transitionData)), true);
118                 }
119                 if (NDalicPINVOKE.SWIGPendingException.Pending)
120                     throw NDalicPINVOKE.SWIGPendingException.Retrieve();
121             }
122             return animation;
123         }
124
125         // From Container Base class
126         /// <summary>
127         /// Adds a child view to this view.
128         /// </summary>
129         /// <seealso cref="Container.Add" />
130         /// <since_tizen> 4 </since_tizen>
131         public override void Add(View child)
132         {
133             bool hasLayout = (layout != null);
134
135             if (null == child)
136             {
137                 Tizen.Log.Fatal("NUI", "Child is null");
138                 return;
139             }
140
141             Container oldParent = child.GetParent();
142             if (oldParent != this)
143             {
144                 // If child already has a parent then re-parent child
145                 if (oldParent != null)
146                 {
147                     if (child.Layout != null)
148                     {
149                         child.Layout.SetReplaceFlag();
150                     }
151                     oldParent.Remove(child);
152                 }
153                 child.InternalParent = this;
154
155                 Interop.Actor.Add(SwigCPtr, View.getCPtr(child));
156
157                 if (NDalicPINVOKE.SWIGPendingException.Pending)
158                     throw NDalicPINVOKE.SWIGPendingException.Retrieve();
159                 Children.Add(child);
160
161                 if (ChildAdded != null)
162                 {
163                     ChildAddedEventArgs e = new ChildAddedEventArgs
164                     {
165                         Added = child
166                     };
167                     ChildAdded(this, e);
168                 }
169                 BindableObject.SetInheritedBindingContext(child, this?.BindingContext);
170             }
171         }
172
173         /// <summary>
174         /// Removes a child view from this View. If the view was not a child of this view, this is a no-op.
175         /// </summary>
176         /// <seealso cref="Container.Remove" />
177         /// <since_tizen> 4 </since_tizen>
178         /// <exception cref="InvalidOperationException">Thrown when deleting a view that is not a child of this view</exception>
179         public override void Remove(View child)
180         {
181             if (child == null || child.GetParent() == null) // Early out if child null.
182                 return;
183
184             if (child.GetParent() != this)
185             {
186                 //throw new System.InvalidOperationException("You have deleted a view that is not a child of this view.");
187                 Tizen.Log.Error("NUI", "You have deleted a view that is not a child of this view.");
188             }
189
190             bool hasLayout = (layout != null);
191
192             // If View has a layout then do a deferred child removal
193             // Actual child removal is performed by the layouting system so
194             // transitions can be completed.
195             if (hasLayout)
196             {
197                 (layout as LayoutGroup)?.RemoveChildFromLayoutGroup(child);
198             }
199
200             RemoveChild(child);
201         }
202
203         /// <summary>
204         /// Retrieves a child view by index.
205         /// </summary>
206         /// <seealso cref="Container.GetChildAt" />
207         /// <since_tizen> 4 </since_tizen>
208         public override View GetChildAt(uint index)
209         {
210             if (index < Children.Count)
211             {
212                 return Children[Convert.ToInt32(index)];
213             }
214             else
215             {
216                 return null;
217             }
218         }
219
220         /// <summary>
221         /// Retrieves the number of children held by the view.
222         /// </summary>
223         /// <seealso cref="Container.GetChildCount" />
224         /// <since_tizen> 4 </since_tizen>
225         [Obsolete("Deprecated in API9, will be removed in API11. Please use ChildCount property instead!")]
226         public override uint GetChildCount()
227         {
228             return Convert.ToUInt32(Children.Count);
229         }
230
231         /// <summary>
232         /// Gets the views parent.
233         /// </summary>
234         /// <seealso cref="Container.GetParent()" />
235         /// <since_tizen> 4 </since_tizen>
236         public override Container GetParent()
237         {
238             return this.InternalParent as Container;
239         }
240
241         /// <summary>
242         /// Queries whether the view has a focus.
243         /// </summary>
244         /// <returns>True if this view has a focus.</returns>
245         /// <since_tizen> 3 </since_tizen>
246         public bool HasFocus()
247         {
248             bool ret = false;
249             if (SwigCPtr.Handle != global::System.IntPtr.Zero)
250             {
251                 ret = Interop.View.HasKeyInputFocus(SwigCPtr);
252                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
253             }
254             else
255             {
256                 Tizen.Log.Error("NUI", "swigCPtr of view is aleady disposed.");
257             }
258             return ret;
259         }
260
261         /// <summary>
262         /// Sets the name of the style to be applied to the view.
263         /// </summary>
264         /// <param name="styleName">A string matching a style described in a stylesheet.</param>
265         /// <since_tizen> 3 </since_tizen>
266         [Obsolete("Deprecated in API9, will be removed in API11. Please use StyleName property instead!")]
267         public void SetStyleName(string styleName)
268         {
269             Interop.View.SetStyleName(SwigCPtr, styleName);
270             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
271         }
272
273         /// <summary>
274         /// Retrieves the name of the style to be applied to the view (if any).
275         /// </summary>
276         /// <returns>A string matching a style, or an empty string.</returns>
277         /// <since_tizen> 3 </since_tizen>
278         [Obsolete("Deprecated in API9, will be removed in API11. Please use StyleName property instead!")]
279         public string GetStyleName()
280         {
281             string ret = Interop.View.GetStyleName(SwigCPtr);
282             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
283             return ret;
284         }
285
286         /// <summary>
287         /// Clears the background.
288         /// </summary>
289         /// <since_tizen> 3 </since_tizen>
290         public void ClearBackground()
291         {
292             Interop.View.ClearBackground(SwigCPtr);
293             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
294         }
295
296         /// <summary>
297         /// Shows the view.
298         /// </summary>
299         /// <remarks>
300         /// This is an asynchronous method.
301         /// </remarks>
302         /// <since_tizen> 3 </since_tizen>
303         public void Show()
304         {
305             if (AccessibilityCalculateStates().Get(AccessibilityState.Modal))
306                 AddPopup();
307
308             SetVisible(true);
309         }
310
311         /// <summary>
312         /// Hides the view.
313         /// </summary>
314         /// <remarks>
315         /// This is an asynchronous method.
316         /// If the view is hidden, then the view and its children will not be rendered.
317         /// This is regardless of the individual visibility of the children, i.e., the view will only be rendered if all of its parents are shown.
318         /// </remarks>
319         /// <since_tizen> 3 </since_tizen>
320         public void Hide()
321         {
322             SetVisible(false);
323
324             if (AccessibilityCalculateStates().Get(AccessibilityState.Modal))
325                 RemovePopup();
326         }
327
328         /// <summary>
329         /// Raises the view above all other views.
330         /// </summary>
331         /// <remarks>
332         /// Sibling order of views within the parent will be updated automatically.
333         /// Once a raise or lower API is used, that view will then have an exclusive sibling order independent of insertion.
334         /// </remarks>
335         /// <since_tizen> 3 </since_tizen>
336         public void RaiseToTop()
337         {
338             var parentChildren = GetParent()?.Children;
339
340             if (parentChildren != null)
341             {
342                 parentChildren.Remove(this);
343                 parentChildren.Add(this);
344
345                 LayoutGroup layout = Layout as LayoutGroup;
346                 layout?.ChangeLayoutSiblingOrder(parentChildren.Count - 1);
347
348                 Interop.NDalic.RaiseToTop(SwigCPtr);
349                 if (NDalicPINVOKE.SWIGPendingException.Pending)
350                     throw NDalicPINVOKE.SWIGPendingException.Retrieve();
351             }
352
353         }
354
355         /// <summary>
356         /// Lowers the view to the bottom of all views.
357         /// </summary>
358         /// <remarks>
359         /// The sibling order of views within the parent will be updated automatically.
360         /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
361         /// </remarks>
362         /// <since_tizen> 3 </since_tizen>
363         public void LowerToBottom()
364         {
365             var parentChildren = GetParent()?.Children;
366
367             if (parentChildren != null)
368             {
369                 parentChildren.Remove(this);
370                 parentChildren.Insert(0, this);
371
372                 LayoutGroup layout = Layout as LayoutGroup;
373                 layout?.ChangeLayoutSiblingOrder(0);
374
375                 Interop.NDalic.LowerToBottom(SwigCPtr);
376                 if (NDalicPINVOKE.SWIGPendingException.Pending)
377                     throw NDalicPINVOKE.SWIGPendingException.Retrieve();
378             }
379         }
380
381         /// <summary>
382         /// Queries if all resources required by a view are loaded and ready.
383         /// </summary>
384         /// <remarks>Most resources are only loaded when the control is placed on the stage.
385         /// </remarks>
386         /// <since_tizen> 3 </since_tizen>
387         public bool IsResourceReady()
388         {
389             bool ret = Interop.View.IsResourceReady(SwigCPtr);
390             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
391             return ret;
392         }
393
394         /// <summary>
395         /// Gets the parent layer of this view.If a view has no parent, this method does not do anything.
396         /// </summary>
397         /// <pre>The view has been initialized. </pre>
398         /// <returns>The parent layer of view </returns>
399         /// <since_tizen> 5 </since_tizen>
400         public Layer GetLayer()
401         {
402             //to fix memory leak issue, match the handle count with native side.
403             IntPtr cPtr = Interop.Actor.GetLayer(SwigCPtr);
404             Layer ret = this.GetInstanceSafely<Layer>(cPtr);
405             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
406             return ret;
407         }
408
409         /// <summary>
410         /// Removes a view from its parent view or layer. If a view has no parent, this method does nothing.
411         /// </summary>
412         /// <pre>The (child) view has been initialized. </pre>
413         /// <since_tizen> 4 </since_tizen>
414         public void Unparent()
415         {
416             GetParent()?.Remove(this);
417         }
418
419         /// <summary>
420         /// Search through this view's hierarchy for a view with the given name.
421         /// The view itself is also considered in the search.
422         /// </summary>
423         /// <pre>The view has been initialized.</pre>
424         /// <param name="viewName">The name of the view to find.</param>
425         /// <returns>A handle to the view if found, or an empty handle if not.</returns>
426         /// <since_tizen> 3 </since_tizen>
427         public View FindChildByName(string viewName)
428         {
429             //to fix memory leak issue, match the handle count with native side.
430             IntPtr cPtr = Interop.Actor.FindChildByName(SwigCPtr, viewName);
431             View ret = this.GetInstanceSafely<View>(cPtr);
432             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
433             return ret;
434         }
435
436         /// <summary>
437         /// Converts screen coordinates into the view's coordinate system using the default camera.
438         /// </summary>
439         /// <pre>The view has been initialized.</pre>
440         /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5).</remarks>
441         /// <param name="localX">On return, the X-coordinate relative to the view.</param>
442         /// <param name="localY">On return, the Y-coordinate relative to the view.</param>
443         /// <param name="screenX">The screen X-coordinate.</param>
444         /// <param name="screenY">The screen Y-coordinate.</param>
445         /// <returns>True if the conversion succeeded.</returns>
446         /// <since_tizen> 3 </since_tizen>
447         public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
448         {
449             bool ret = Interop.Actor.ScreenToLocal(SwigCPtr, out localX, out localY, screenX, screenY);
450             if (NDalicPINVOKE.SWIGPendingException.Pending)
451                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
452             return ret;
453         }
454
455         /// <summary>
456         /// Sets the relative to parent size factor of the view.<br />
457         /// This factor is only used when ResizePolicy is set to either:
458         /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br />
459         /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br />
460         /// </summary>
461         /// <pre>The view has been initialized.</pre>
462         /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis.</param>
463         /// <since_tizen> 3 </since_tizen>
464         public void SetSizeModeFactor(Vector3 factor)
465         {
466             Interop.Actor.SetSizeModeFactor(SwigCPtr, Vector3.getCPtr(factor));
467             if (NDalicPINVOKE.SWIGPendingException.Pending)
468                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
469         }
470         /// <summary>
471         /// Calculates the height of the view given a width.<br />
472         /// The natural size is used for default calculation.<br />
473         /// Size 0 is treated as aspect ratio 1:1.<br />
474         /// </summary>
475         /// <param name="width">The width to use.</param>
476         /// <returns>The height based on the width.</returns>
477         /// <since_tizen> 3 </since_tizen>
478         [Obsolete("Deprecated in API9, will be removed in API11. Please use HeightForWidth property instead!")]
479         public float GetHeightForWidth(float width)
480         {
481             float ret = Interop.Actor.GetHeightForWidth(SwigCPtr, width);
482             if (NDalicPINVOKE.SWIGPendingException.Pending)
483                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
484             return ret;
485         }
486
487         /// <summary>
488         /// Calculates the width of the view given a height.<br />
489         /// The natural size is used for default calculation.<br />
490         /// Size 0 is treated as aspect ratio 1:1.<br />
491         /// </summary>
492         /// <param name="height">The height to use.</param>
493         /// <returns>The width based on the height.</returns>
494         /// <since_tizen> 3 </since_tizen>
495         [Obsolete("Deprecated in API9, will be removed in API11. Please use WidthForHeight property instead!")]
496         public float GetWidthForHeight(float height)
497         {
498             float ret = Interop.Actor.GetWidthForHeight(SwigCPtr, height);
499             if (NDalicPINVOKE.SWIGPendingException.Pending)
500                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
501             return ret;
502         }
503
504         /// <summary>
505         /// Return the amount of size allocated for relayout.
506         /// </summary>
507         /// <param name="dimension">The dimension to retrieve.</param>
508         /// <returns>Return the size.</returns>
509         /// <since_tizen> 3 </since_tizen>
510         public float GetRelayoutSize(DimensionType dimension)
511         {
512             float ret = Interop.Actor.GetRelayoutSize(SwigCPtr, (int)dimension);
513             if (NDalicPINVOKE.SWIGPendingException.Pending)
514                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
515             return ret;
516         }
517
518         /// <summary>
519         /// Set the padding for the view.
520         /// </summary>
521         /// <param name="padding">Padding for the view.</param>
522         /// <since_tizen> 3 </since_tizen>
523         // [Obsolete("Deprecated in API9, will be removed in API11. Please use Padding property instead!")]
524         public void SetPadding(PaddingType padding)
525         {
526             Interop.Actor.SetPadding(SwigCPtr, PaddingType.getCPtr(padding));
527             if (NDalicPINVOKE.SWIGPendingException.Pending)
528                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
529         }
530
531         /// <summary>
532         /// Return the value of padding for the view.
533         /// </summary>
534         /// <param name="paddingOut">the value of padding for the view</param>
535         /// <since_tizen> 3 </since_tizen>
536         [Obsolete("Deprecated in API9, will be removed in API11. Please use Padding property instead!")]
537         public void GetPadding(PaddingType paddingOut)
538         {
539             Interop.Actor.GetPadding(SwigCPtr, PaddingType.getCPtr(paddingOut));
540             if (NDalicPINVOKE.SWIGPendingException.Pending)
541                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
542         }
543
544         /// <since_tizen> 3 </since_tizen>
545         public uint AddRenderer(Renderer renderer)
546         {
547             uint ret = Interop.Actor.AddRenderer(SwigCPtr, Renderer.getCPtr(renderer));
548             if (NDalicPINVOKE.SWIGPendingException.Pending)
549                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
550             return ret;
551         }
552
553         /// <since_tizen> 3 </since_tizen>
554         public Renderer GetRendererAt(uint index)
555         {
556             //to fix memory leak issue, match the handle count with native side.
557             IntPtr cPtr = Interop.Actor.GetRendererAt(SwigCPtr, index);
558             HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
559             Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Renderer;
560             if (cPtr != null && ret == null)
561             {
562                 ret = new Renderer(cPtr, false);
563                 if (NDalicPINVOKE.SWIGPendingException.Pending)
564                     throw NDalicPINVOKE.SWIGPendingException.Retrieve();
565                 return ret;
566             }
567             Interop.BaseHandle.DeleteBaseHandle(CPtr);
568             CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
569
570             if (NDalicPINVOKE.SWIGPendingException.Pending)
571                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
572             return ret;
573         }
574
575         /// <since_tizen> 3 </since_tizen>
576         public void RemoveRenderer(Renderer renderer)
577         {
578             Interop.Actor.RemoveRenderer(SwigCPtr, Renderer.getCPtr(renderer));
579             if (NDalicPINVOKE.SWIGPendingException.Pending)
580                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
581         }
582
583         /// <since_tizen> 3 </since_tizen>
584         public void RemoveRenderer(uint index)
585         {
586             Interop.Actor.RemoveRenderer(SwigCPtr, index);
587             if (NDalicPINVOKE.SWIGPendingException.Pending)
588                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
589         }
590
591         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
592         [EditorBrowsable(EditorBrowsableState.Never)]
593         public void RotateBy(Degree angle, Vector3 axis)
594         {
595             Interop.ActorInternal.RotateByDegree(SwigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
596             if (NDalicPINVOKE.SWIGPendingException.Pending)
597                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
598         }
599
600         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
601         [EditorBrowsable(EditorBrowsableState.Never)]
602         public void RotateBy(Radian angle, Vector3 axis)
603         {
604             Interop.ActorInternal.RotateByRadian(SwigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
605             if (NDalicPINVOKE.SWIGPendingException.Pending)
606                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
607         }
608
609         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
610         [EditorBrowsable(EditorBrowsableState.Never)]
611         public void RotateBy(Rotation relativeRotation)
612         {
613             Interop.ActorInternal.RotateByQuaternion(SwigCPtr, Rotation.getCPtr(relativeRotation));
614             if (NDalicPINVOKE.SWIGPendingException.Pending)
615                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
616         }
617
618         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
619         [EditorBrowsable(EditorBrowsableState.Never)]
620         public void ScaleBy(Vector3 relativeScale)
621         {
622             Interop.ActorInternal.ScaleBy(SwigCPtr, Vector3.getCPtr(relativeScale));
623             if (NDalicPINVOKE.SWIGPendingException.Pending)
624                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
625         }
626
627         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
628         [EditorBrowsable(EditorBrowsableState.Never)]
629         public void SetColorMode(ColorMode colorMode)
630         {
631             Interop.ActorInternal.SetColorMode(SwigCPtr, (int)colorMode);
632             if (NDalicPINVOKE.SWIGPendingException.Pending)
633                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
634         }
635
636
637
638         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
639         [EditorBrowsable(EditorBrowsableState.Never)]
640         public Transition GetTransition(string transitionName)
641         {
642             Transition trans = null;
643             transDictionary.TryGetValue(transitionName, out trans);
644             return trans;
645         }
646
647         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
648         [EditorBrowsable(EditorBrowsableState.Never)]
649         public void ObjectDump()
650         {
651             if (0 == Children.Count)
652             {
653                 Type type = this.GetType();
654                 PropertyInfo[] properties = type.GetProperties(BindingFlags.Public | BindingFlags.Instance);
655                 foreach (var property in properties)
656                 {
657                     if (null != property && property.CanRead)
658                     {
659                         Tizen.Log.Fatal("NUI", $"{type.Name} {property.Name} ({property.PropertyType.Name}): {property.GetValueString(this, property.PropertyType)}");
660                     }
661                 }
662                 return;
663             }
664
665             foreach (View view in Children)
666             {
667                 view.ObjectDump();
668             }
669         }
670
671         /// <summary>
672         /// Search through this View's hierarchy for a View with the given unique ID.
673         /// The View itself is also considered in the search.
674         /// </summary>
675         /// <param name="id">The ID of the View to find</param>
676         /// <returns>A View if found or a null if not</returns>
677         [EditorBrowsable(EditorBrowsableState.Never)]
678         public View FindChildByID(uint id)
679         {
680             IntPtr cPtr = Interop.Actor.FindChildById(SwigCPtr, id);
681             View ret = this.GetInstanceSafely<View>(cPtr);
682             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
683             return ret;
684         }
685
686     }
687 }