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