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