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