Revert "[NUI] Make GetParent() protected (#165)" (#194)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / BaseComponents / View.cs
1 /*
2  * Copyright(c) 2017 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 using System;
18 using System.ComponentModel;
19 using System.Runtime.InteropServices;
20
21 namespace Tizen.NUI.BaseComponents
22 {
23     /// <summary>
24     /// View is the base class for all views.
25     /// </summary>
26     /// <since_tizen> 3 </since_tizen>
27     public class View : Container
28     {
29         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
30
31
32         internal View(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.View_SWIGUpcast(cPtr), cMemoryOwn)
33         {
34             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
35             if (HasBody())
36             {
37                 PositionUsesPivotPoint = false;
38             }
39         }
40
41         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
42         {
43             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
44         }
45
46         // From Container Base class
47
48         /// <summary>
49         /// Adds a child view to this view.
50         /// </summary>
51         /// <seealso cref="Container.Add" />
52         /// <since_tizen> 4 </since_tizen>
53         public override void Add(View child)
54         {
55             Container oldParent = child.Parent;
56             if(oldParent != this)
57             {
58                 if (oldParent != null)
59                 {
60                     oldParent.Remove(child);
61                 }
62                 NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
63                 if (NDalicPINVOKE.SWIGPendingException.Pending)
64                     throw NDalicPINVOKE.SWIGPendingException.Retrieve();
65                 Children.Add(child);
66             }
67         }
68
69         /// <summary>
70         /// Removes a child view from this View. If the view was not a child of this view, this is a no-op.
71         /// </summary>
72         /// <seealso cref="Container.Remove" />
73         /// <since_tizen> 4 </since_tizen>
74         public override void Remove(View child)
75         {
76             NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
77             if (NDalicPINVOKE.SWIGPendingException.Pending)
78                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
79
80             Children.Remove(child);
81         }
82
83         /// <summary>
84         /// Retrieves a child view by index.
85         /// </summary>
86         /// <seealso cref="Container.GetChildAt" />
87         /// <since_tizen> 4 </since_tizen>
88         public override View GetChildAt(uint index)
89         {
90             if (index < Children.Count)
91             {
92                 return Children[Convert.ToInt32(index)];
93             }
94             else
95             {
96                 return null;
97             }
98         }
99
100         /// <summary>
101         /// Retrieves the number of children held by the view.
102         /// </summary>
103         /// <seealso cref="Container.GetChildCount" />
104         /// <since_tizen> 4 </since_tizen>
105         public override uint GetChildCount()
106         {
107             return Convert.ToUInt32(Children.Count);
108         }
109
110         /// <summary>
111         /// Gets the views parent.
112         /// </summary>
113         /// <seealso cref="Container.GetParent()" />
114         /// <since_tizen> 4 </since_tizen>
115         public override Container GetParent()
116         {
117             //to fix memory leak issue, match the handle count with native side.
118             IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
119             HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
120             BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
121             NDalicPINVOKE.delete_BaseHandle(CPtr);
122             CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
123
124             if (NDalicPINVOKE.SWIGPendingException.Pending)
125                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
126
127             return basehandle as Container;
128         }
129
130         internal bool IsTopLevelView()
131         {
132             if (GetParent() is Layer)
133             {
134                 return true;
135             }
136             return false;
137         }
138
139         /// <summary>
140         /// you can override it to clean-up your own resources.
141         /// </summary>
142         /// <param name="type">DisposeTypes</param>
143         /// <since_tizen> 3 </since_tizen>
144         protected override void Dispose(DisposeTypes type)
145         {
146             if (disposed)
147             {
148                 return;
149             }
150
151             if (type == DisposeTypes.Explicit)
152             {
153                 //Called by User
154                 //Release your own managed resources here.
155                 //You should release all of your own disposable objects here.
156             }
157
158             //Release your own unmanaged resources here.
159             //You should not access any managed member here except static instance.
160             //because the execution order of Finalizes is non-deterministic.
161             if (this != null)
162             {
163                 DisConnectFromSignals();
164             }
165
166             if (swigCPtr.Handle != global::System.IntPtr.Zero)
167             {
168                 if (swigCMemOwn)
169                 {
170                     swigCMemOwn = false;
171                     NDalicPINVOKE.delete_View(swigCPtr);
172                 }
173                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
174             }
175
176             base.Dispose(type);
177
178         }
179
180         private void DisConnectFromSignals()
181         {
182             // Save current CPtr.
183             global::System.Runtime.InteropServices.HandleRef currentCPtr = swigCPtr;
184
185             // Use BaseHandle CPtr as current might have been deleted already in derived classes.
186             swigCPtr = GetBaseHandleCPtrHandleRef;
187
188             if (_onRelayoutEventCallback != null)
189             {
190                 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
191             }
192
193             if (_offWindowEventCallback != null)
194             {
195                 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
196             }
197
198             if (_onWindowEventCallback != null)
199             {
200                 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
201             }
202
203             if (_wheelEventCallback != null)
204             {
205                 this.WheelEventSignal().Disconnect(_wheelEventCallback);
206             }
207
208             if (_hoverEventCallback != null)
209             {
210                 this.HoveredSignal().Disconnect(_hoverEventCallback);
211             }
212
213             if (_touchDataCallback != null)
214             {
215                 this.TouchSignal().Disconnect(_touchDataCallback);
216             }
217
218             if (_ResourcesLoadedCallback != null)
219             {
220                 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
221             }
222
223             if (_offWindowEventCallback != null)
224             {
225                 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
226             }
227
228             if (_onWindowEventCallback != null)
229             {
230                 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
231             }
232
233             if (_wheelEventCallback != null)
234             {
235                 this.WheelEventSignal().Disconnect(_wheelEventCallback);
236             }
237
238             if (_hoverEventCallback != null)
239             {
240                 this.HoveredSignal().Disconnect(_hoverEventCallback);
241             }
242
243             if (_touchDataCallback != null)
244             {
245                 this.TouchSignal().Disconnect(_touchDataCallback);
246             }
247
248             if (_onRelayoutEventCallback != null)
249             {
250                 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
251             }
252
253             if (_keyCallback != null)
254             {
255                 this.KeyEventSignal().Disconnect(_keyCallback);
256             }
257
258             if (_keyInputFocusLostCallback != null)
259             {
260                 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
261             }
262
263             if (_keyInputFocusGainedCallback != null)
264             {
265                 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
266             }
267
268             // BaseHandle CPtr is used in Registry and there is danger of deletion if we keep using it here.
269             // Restore current CPtr.
270             swigCPtr = currentCPtr;
271         }
272
273         private EventHandler _keyInputFocusGainedEventHandler;
274         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
275         private delegate void KeyInputFocusGainedCallbackType(IntPtr control);
276         private KeyInputFocusGainedCallbackType _keyInputFocusGainedCallback;
277
278         /// <summary>
279         /// An event for the KeyInputFocusGained signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
280         /// The KeyInputFocusGained signal is emitted when the control gets the key input focus.<br />
281         /// </summary>
282         /// <since_tizen> 3 </since_tizen>
283         public event EventHandler FocusGained
284         {
285             add
286             {
287                 if (_keyInputFocusGainedEventHandler == null)
288                 {
289                     _keyInputFocusGainedCallback = OnKeyInputFocusGained;
290                     this.KeyInputFocusGainedSignal().Connect(_keyInputFocusGainedCallback);
291                 }
292
293                 _keyInputFocusGainedEventHandler += value;
294             }
295
296             remove
297             {
298                 _keyInputFocusGainedEventHandler -= value;
299
300                 if (_keyInputFocusGainedEventHandler == null && KeyInputFocusGainedSignal().Empty() == false)
301                 {
302                     this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
303                 }
304             }
305         }
306
307         private void OnKeyInputFocusGained(IntPtr view)
308         {
309             if (_keyInputFocusGainedEventHandler != null)
310             {
311                 _keyInputFocusGainedEventHandler(this, null);
312             }
313         }
314
315
316         private EventHandler _keyInputFocusLostEventHandler;
317         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
318         private delegate void KeyInputFocusLostCallbackType(IntPtr control);
319         private KeyInputFocusLostCallbackType _keyInputFocusLostCallback;
320
321         /// <summary>
322         /// An event for the KeyInputFocusLost signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
323         /// The KeyInputFocusLost signal is emitted when the control loses the key input focus.<br />
324         /// </summary>
325         /// <since_tizen> 3 </since_tizen>
326         public event EventHandler FocusLost
327         {
328             add
329             {
330                 if (_keyInputFocusLostEventHandler == null)
331                 {
332                     _keyInputFocusLostCallback = OnKeyInputFocusLost;
333                     this.KeyInputFocusLostSignal().Connect(_keyInputFocusLostCallback);
334                 }
335
336                 _keyInputFocusLostEventHandler += value;
337             }
338
339             remove
340             {
341                 _keyInputFocusLostEventHandler -= value;
342
343                 if (_keyInputFocusLostEventHandler == null && KeyInputFocusLostSignal().Empty() == false)
344                 {
345                     this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
346                 }
347             }
348         }
349
350         private void OnKeyInputFocusLost(IntPtr view)
351         {
352             if (_keyInputFocusLostEventHandler != null)
353             {
354                 _keyInputFocusLostEventHandler(this, null);
355             }
356         }
357
358         /// <summary>
359         /// Event arguments that passed via the KeyEvent signal.
360         /// </summary>
361         /// <since_tizen> 3 </since_tizen>
362         public class KeyEventArgs : EventArgs
363         {
364             private Key _key;
365
366             /// <summary>
367             /// Key - is the key sent to the view.
368             /// </summary>
369             /// <since_tizen> 3 </since_tizen>
370             public Key Key
371             {
372                 get
373                 {
374                     return _key;
375                 }
376                 set
377                 {
378                     _key = value;
379                 }
380             }
381         }
382
383         private EventHandlerWithReturnType<object, KeyEventArgs, bool> _keyEventHandler;
384         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
385         private delegate bool KeyCallbackType(IntPtr control, IntPtr keyEvent);
386         private KeyCallbackType _keyCallback;
387
388         /// <summary>
389         /// An event for the KeyPressed signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
390         /// The KeyPressed signal is emitted when the key event is received.<br />
391         /// </summary>
392         /// <since_tizen> 3 </since_tizen>
393         public event EventHandlerWithReturnType<object, KeyEventArgs, bool> KeyEvent
394         {
395             add
396             {
397                 if (_keyEventHandler == null)
398                 {
399                     _keyCallback = OnKeyEvent;
400                     this.KeyEventSignal().Connect(_keyCallback);
401                 }
402
403                 _keyEventHandler += value;
404             }
405
406             remove
407             {
408                 _keyEventHandler -= value;
409
410                 if (_keyEventHandler == null && KeyEventSignal().Empty() == false)
411                 {
412                     this.KeyEventSignal().Disconnect(_keyCallback);
413                 }
414             }
415         }
416
417         private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
418         {
419             if (keyEvent == global::System.IntPtr.Zero)
420             {
421                 NUILog.Error("keyEvent should not be null!");
422                 return true;
423             }
424
425             KeyEventArgs e = new KeyEventArgs();
426
427             bool result = false;
428
429             e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
430
431             if (_keyEventHandler != null)
432             {
433                 Delegate[] delegateList = _keyEventHandler.GetInvocationList();
434
435                 // Oring the result of each callback.
436                 foreach (EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList)
437                 {
438                     result |= del(this, e);
439                 }
440             }
441
442             return result;
443         }
444
445         private EventHandler _onRelayoutEventHandler;
446         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
447         private delegate void OnRelayoutEventCallbackType(IntPtr control);
448         private OnRelayoutEventCallbackType _onRelayoutEventCallback;
449
450         /// <summary>
451         /// An event for the OnRelayout signal which can be used to subscribe or unsubscribe the event handler.<br />
452         /// The OnRelayout signal is emitted after the size has been set on the view during relayout.<br />
453         /// </summary>
454         /// <since_tizen> 3 </since_tizen>
455         public event EventHandler Relayout
456         {
457             add
458             {
459                 if (_onRelayoutEventHandler == null)
460                 {
461                     _onRelayoutEventCallback = OnRelayout;
462                     this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
463                 }
464
465                 _onRelayoutEventHandler += value;
466             }
467
468             remove
469             {
470                 _onRelayoutEventHandler -= value;
471
472                 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
473                 {
474                     this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
475                 }
476
477             }
478         }
479
480         // Callback for View OnRelayout signal
481         private void OnRelayout(IntPtr data)
482         {
483             if (_onRelayoutEventHandler != null)
484             {
485                 _onRelayoutEventHandler(this, null);
486             }
487         }
488
489         /// <summary>
490         /// Event arguments that passed via the touch signal.
491         /// </summary>
492         /// <since_tizen> 3 </since_tizen>
493         public class TouchEventArgs : EventArgs
494         {
495             private Touch _touch;
496
497             /// <summary>
498             /// Touch - contains the information of touch points.
499             /// </summary>
500             /// <since_tizen> 3 </since_tizen>
501             public Touch Touch
502             {
503                 get
504                 {
505                     return _touch;
506                 }
507                 set
508                 {
509                     _touch = value;
510                 }
511             }
512         }
513
514         private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
515         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
516         private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
517         private TouchDataCallbackType _touchDataCallback;
518
519         /// <summary>
520         /// An event for the touched signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
521         /// The touched signal is emitted when the touch input is received.<br />
522         /// </summary>
523         /// <since_tizen> 3 </since_tizen>
524         public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
525         {
526             add
527             {
528                 if (_touchDataEventHandler == null)
529                 {
530                     _touchDataCallback = OnTouch;
531                     this.TouchSignal().Connect(_touchDataCallback);
532                 }
533
534                 _touchDataEventHandler += value;
535             }
536
537             remove
538             {
539                 _touchDataEventHandler -= value;
540
541                 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
542                 {
543                     this.TouchSignal().Disconnect(_touchDataCallback);
544                 }
545
546             }
547         }
548
549         // Callback for View TouchSignal
550         private bool OnTouch(IntPtr view, IntPtr touchData)
551         {
552             if (touchData == global::System.IntPtr.Zero)
553             {
554                 NUILog.Error("touchData should not be null!");
555                 return true;
556             }
557
558             TouchEventArgs e = new TouchEventArgs();
559
560             e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
561
562             if (_touchDataEventHandler != null)
563             {
564                 return _touchDataEventHandler(this, e);
565             }
566             return false;
567         }
568
569
570         /// <summary>
571         /// Event arguments that passed via the hover signal.
572         /// </summary>
573         /// <since_tizen> 3 </since_tizen>
574         public class HoverEventArgs : EventArgs
575         {
576             private Hover _hover;
577
578             /// <summary>
579             /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
580             /// </summary>
581             /// <since_tizen> 3 </since_tizen>
582             public Hover Hover
583             {
584                 get
585                 {
586                     return _hover;
587                 }
588                 set
589                 {
590                     _hover = value;
591                 }
592             }
593         }
594
595         private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
596         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
597         private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
598         private HoverEventCallbackType _hoverEventCallback;
599
600         /// <summary>
601         /// An event for the hovered signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
602         /// The hovered signal is emitted when the hover input is received.<br />
603         /// </summary>
604         /// <since_tizen> 3 </since_tizen>
605         public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
606         {
607             add
608             {
609                 if (_hoverEventHandler == null)
610                 {
611                     _hoverEventCallback = OnHoverEvent;
612                     this.HoveredSignal().Connect(_hoverEventCallback);
613                 }
614
615                 _hoverEventHandler += value;
616             }
617
618             remove
619             {
620                 _hoverEventHandler -= value;
621
622                 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
623                 {
624                     this.HoveredSignal().Disconnect(_hoverEventCallback);
625                 }
626
627             }
628         }
629
630         // Callback for View Hover signal
631         private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
632         {
633             if (hoverEvent == global::System.IntPtr.Zero)
634             {
635                 NUILog.Error("hoverEvent should not be null!");
636                 return true;
637             }
638
639             HoverEventArgs e = new HoverEventArgs();
640
641             e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
642
643             if (_hoverEventHandler != null)
644             {
645                 return _hoverEventHandler(this, e);
646             }
647             return false;
648         }
649
650
651         /// <summary>
652         /// Event arguments that passed via the wheel signal.
653         /// </summary>
654         /// <since_tizen> 3 </since_tizen>
655         public class WheelEventArgs : EventArgs
656         {
657             private Wheel _wheel;
658
659             /// <summary>
660             /// WheelEvent - store a wheel rolling type: MOUSE_WHEEL or CUSTOM_WHEEL.
661             /// </summary>
662             /// <since_tizen> 3 </since_tizen>
663             public Wheel Wheel
664             {
665                 get
666                 {
667                     return _wheel;
668                 }
669                 set
670                 {
671                     _wheel = value;
672                 }
673             }
674         }
675
676         private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
677         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
678         private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
679         private WheelEventCallbackType _wheelEventCallback;
680
681         /// <summary>
682         /// An event for the WheelMoved signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
683         /// The WheelMoved signal is emitted when the wheel event is received.<br />
684         /// </summary>
685         /// <since_tizen> 3 </since_tizen>
686         public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
687         {
688             add
689             {
690                 if (_wheelEventHandler == null)
691                 {
692                     _wheelEventCallback = OnWheelEvent;
693                     this.WheelEventSignal().Connect(_wheelEventCallback);
694                 }
695
696                 _wheelEventHandler += value;
697             }
698
699             remove
700             {
701                 _wheelEventHandler -= value;
702
703                 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
704                 {
705                     this.WheelEventSignal().Disconnect(_wheelEventCallback);
706                 }
707
708             }
709         }
710
711         // Callback for View Wheel signal
712         private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
713         {
714             if (wheelEvent == global::System.IntPtr.Zero)
715             {
716                 NUILog.Error("wheelEvent should not be null!");
717                 return true;
718             }
719
720             WheelEventArgs e = new WheelEventArgs();
721
722             e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
723
724             if (_wheelEventHandler != null)
725             {
726                 return _wheelEventHandler(this, e);
727             }
728             return false;
729         }
730
731
732         private EventHandler _onWindowEventHandler;
733         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
734         private delegate void OnWindowEventCallbackType(IntPtr control);
735         private OnWindowEventCallbackType _onWindowEventCallback;
736
737         /// <summary>
738         /// An event for the OnWindow signal which can be used to subscribe or unsubscribe the event handler.<br />
739         /// The OnWindow signal is emitted after the view has been connected to the window.<br />
740         /// </summary>
741         /// <since_tizen> 3 </since_tizen>
742         public event EventHandler AddedToWindow
743         {
744             add
745             {
746                 if (_onWindowEventHandler == null)
747                 {
748                     _onWindowEventCallback = OnWindow;
749                     this.OnWindowSignal().Connect(_onWindowEventCallback);
750                 }
751
752                 _onWindowEventHandler += value;
753             }
754
755             remove
756             {
757                 _onWindowEventHandler -= value;
758
759                 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
760                 {
761                     this.OnWindowSignal().Disconnect(_onWindowEventCallback);
762                 }
763             }
764         }
765
766         // Callback for View OnWindow signal
767         private void OnWindow(IntPtr data)
768         {
769             if (_onWindowEventHandler != null)
770             {
771                 _onWindowEventHandler(this, null);
772             }
773         }
774
775
776         private EventHandler _offWindowEventHandler;
777         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
778         private delegate void OffWindowEventCallbackType(IntPtr control);
779         private OffWindowEventCallbackType _offWindowEventCallback;
780
781         /// <summary>
782         /// An event for the OffWindow signal, which can be used to subscribe or unsubscribe the event handler.<br />
783         /// OffWindow signal is emitted after the view has been disconnected from the window.<br />
784         /// </summary>
785         /// <since_tizen> 3 </since_tizen>
786         public event EventHandler RemovedFromWindow
787         {
788             add
789             {
790                 if (_offWindowEventHandler == null)
791                 {
792                     _offWindowEventCallback = OffWindow;
793                     this.OffWindowSignal().Connect(_offWindowEventCallback);
794                 }
795
796                 _offWindowEventHandler += value;
797             }
798
799             remove
800             {
801                 _offWindowEventHandler -= value;
802
803                 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
804                 {
805                     this.OffWindowSignal().Disconnect(_offWindowEventCallback);
806                 }
807             }
808         }
809
810         // Callback for View OffWindow signal
811         private void OffWindow(IntPtr data)
812         {
813             if (_offWindowEventHandler != null)
814             {
815                 _offWindowEventHandler(this, null);
816             }
817         }
818
819         /// <summary>
820         /// Event arguments of visibility changed.
821         /// </summary>
822         /// <since_tizen> 3 </since_tizen>
823         public class VisibilityChangedEventArgs : EventArgs
824         {
825             private View _view;
826             private bool _visibility;
827             private VisibilityChangeType _type;
828
829             /// <summary>
830             /// The view, or child of view, whose visibility has changed.
831             /// </summary>
832             /// <since_tizen> 3 </since_tizen>
833             public View View
834             {
835                 get
836                 {
837                     return _view;
838                 }
839                 set
840                 {
841                     _view = value;
842                 }
843             }
844
845             /// <summary>
846             /// Whether the view is now visible or not.
847             /// </summary>
848             /// <since_tizen> 3 </since_tizen>
849             public bool Visibility
850             {
851                 get
852                 {
853                     return _visibility;
854                 }
855                 set
856                 {
857                     _visibility = value;
858                 }
859             }
860
861             /// <summary>
862             /// Whether the view's visible property has changed or a parent's.
863             /// </summary>
864             /// <since_tizen> 3 </since_tizen>
865             public VisibilityChangeType Type
866             {
867                 get
868                 {
869                     return _type;
870                 }
871                 set
872                 {
873                     _type = value;
874                 }
875             }
876         }
877
878         private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
879         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
880         private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
881         private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
882
883         /// <summary>
884         /// An event for visibility change which can be used to subscribe or unsubscribe the event handler.<br />
885         /// This signal is emitted when the visible property of this or a parent view is changed.<br />
886         /// </summary>
887         /// <since_tizen> 3 </since_tizen>
888         public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
889         {
890             add
891             {
892                 if (_visibilityChangedEventHandler == null)
893                 {
894                     _visibilityChangedEventCallback = OnVisibilityChanged;
895                     VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
896                 }
897
898                 _visibilityChangedEventHandler += value;
899             }
900
901             remove
902             {
903                 _visibilityChangedEventHandler -= value;
904
905                 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
906                 {
907                     VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
908                 }
909             }
910         }
911
912         // Callback for View visibility change signal
913         private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
914         {
915             VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
916             if (data != null)
917             {
918                 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
919             }
920             e.Visibility = visibility;
921             e.Type = type;
922
923             if (_visibilityChangedEventHandler != null)
924             {
925                 _visibilityChangedEventHandler(this, e);
926             }
927         }
928
929
930         /// <summary>
931         /// Event arguments of layout direction changed.
932         /// </summary>
933         /// <since_tizen> 4 </since_tizen>
934         public class LayoutDirectionChangedEventArgs : EventArgs
935         {
936             private View _view;
937             private ViewLayoutDirectionType _type;
938
939             /// <summary>
940             /// The view, or child of view, whose layout direction has changed.
941             /// </summary>
942             /// <since_tizen> 4 </since_tizen>
943             public View View
944             {
945                 get
946                 {
947                     return _view;
948                 }
949                 set
950                 {
951                     _view = value;
952                 }
953             }
954
955             /// <summary>
956             /// Whether the view's layout direction property has changed or a parent's.
957             /// </summary>
958             /// <since_tizen> 4 </since_tizen>
959             public ViewLayoutDirectionType Type
960             {
961                 get
962                 {
963                     return _type;
964                 }
965                 set
966                 {
967                     _type = value;
968                 }
969             }
970         }
971
972         private EventHandler<LayoutDirectionChangedEventArgs> _layoutDirectionChangedEventHandler;
973         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
974         private delegate void LayoutDirectionChangedEventCallbackType(IntPtr data, ViewLayoutDirectionType type);
975         private LayoutDirectionChangedEventCallbackType _layoutDirectionChangedEventCallback;
976
977         /// <summary>
978         /// Event for layout direction change which can be used to subscribe/unsubscribe the event handler.<br />
979         /// This signal is emitted when the layout direction property of this or a parent view is changed.<br />
980         /// </summary>
981         /// <since_tizen> 4 </since_tizen>
982         public event EventHandler<LayoutDirectionChangedEventArgs> LayoutDirectionChanged
983         {
984             add
985             {
986                 if (_layoutDirectionChangedEventHandler == null)
987                 {
988                     _layoutDirectionChangedEventCallback = OnLayoutDirectionChanged;
989                     LayoutDirectionChangedSignal(this).Connect(_layoutDirectionChangedEventCallback);
990                 }
991
992                 _layoutDirectionChangedEventHandler += value;
993             }
994
995             remove
996             {
997                 _layoutDirectionChangedEventHandler -= value;
998
999                 if (_layoutDirectionChangedEventHandler == null && LayoutDirectionChangedSignal(this).Empty() == false)
1000                 {
1001                     LayoutDirectionChangedSignal(this).Disconnect(_layoutDirectionChangedEventCallback);
1002                 }
1003             }
1004         }
1005
1006         // Callback for View layout direction change signal
1007         private void OnLayoutDirectionChanged(IntPtr data, ViewLayoutDirectionType type)
1008         {
1009             LayoutDirectionChangedEventArgs e = new LayoutDirectionChangedEventArgs();
1010             if (data != null)
1011             {
1012                 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
1013             }
1014             e.Type = type;
1015
1016             if (_layoutDirectionChangedEventHandler != null)
1017             {
1018                 _layoutDirectionChangedEventHandler(this, e);
1019             }
1020         }
1021
1022
1023
1024
1025
1026
1027
1028         // Resource Ready Signal
1029
1030         private EventHandler _resourcesLoadedEventHandler;
1031         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1032         private delegate void ResourcesLoadedCallbackType(IntPtr control);
1033         private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
1034
1035         /// <summary>
1036         /// An event for the ResourcesLoadedSignal signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1037         /// This signal is emitted after all resources required by a view are loaded and ready.<br />
1038         /// </summary>
1039         /// <since_tizen> 3 </since_tizen>
1040         public event EventHandler ResourcesLoaded
1041         {
1042             add
1043             {
1044                 if (_resourcesLoadedEventHandler == null)
1045                 {
1046                     _ResourcesLoadedCallback = OnResourcesLoaded;
1047                     this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
1048                 }
1049
1050                 _resourcesLoadedEventHandler += value;
1051             }
1052
1053             remove
1054             {
1055                 _resourcesLoadedEventHandler -= value;
1056
1057                 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
1058                 {
1059                     this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
1060                 }
1061             }
1062         }
1063
1064         private void OnResourcesLoaded(IntPtr view)
1065         {
1066             if (_resourcesLoadedEventHandler != null)
1067             {
1068                 _resourcesLoadedEventHandler(this, null);
1069             }
1070         }
1071
1072         internal IntPtr GetPtrfromView()
1073         {
1074             return (IntPtr)swigCPtr;
1075         }
1076
1077         internal class Property
1078         {
1079             internal static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get();
1080             internal static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get();
1081             internal static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get();
1082             internal static readonly int LEFT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
1083             internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
1084             internal static readonly int UP_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
1085             internal static readonly int DOWN_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
1086             internal static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get();
1087             internal static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get();
1088             internal static readonly int SIBLING_ORDER = NDalicManualPINVOKE.Actor_Property_SIBLING_ORDER_get();
1089             internal static readonly int OPACITY = NDalicManualPINVOKE.Actor_Property_OPACITY_get();
1090             internal static readonly int SCREEN_POSITION = NDalicManualPINVOKE.Actor_Property_SCREEN_POSITION_get();
1091             internal static readonly int POSITION_USES_ANCHOR_POINT = NDalicManualPINVOKE.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
1092             internal static readonly int PARENT_ORIGIN = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_get();
1093             internal static readonly int PARENT_ORIGIN_X = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_X_get();
1094             internal static readonly int PARENT_ORIGIN_Y = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Y_get();
1095             internal static readonly int PARENT_ORIGIN_Z = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Z_get();
1096             internal static readonly int ANCHOR_POINT = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_get();
1097             internal static readonly int ANCHOR_POINT_X = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_X_get();
1098             internal static readonly int ANCHOR_POINT_Y = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Y_get();
1099             internal static readonly int ANCHOR_POINT_Z = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Z_get();
1100             internal static readonly int SIZE = NDalicPINVOKE.Actor_Property_SIZE_get();
1101             internal static readonly int SIZE_WIDTH = NDalicPINVOKE.Actor_Property_SIZE_WIDTH_get();
1102             internal static readonly int SIZE_HEIGHT = NDalicPINVOKE.Actor_Property_SIZE_HEIGHT_get();
1103             internal static readonly int SIZE_DEPTH = NDalicPINVOKE.Actor_Property_SIZE_DEPTH_get();
1104             internal static readonly int POSITION = NDalicPINVOKE.Actor_Property_POSITION_get();
1105             internal static readonly int POSITION_X = NDalicPINVOKE.Actor_Property_POSITION_X_get();
1106             internal static readonly int POSITION_Y = NDalicPINVOKE.Actor_Property_POSITION_Y_get();
1107             internal static readonly int POSITION_Z = NDalicPINVOKE.Actor_Property_POSITION_Z_get();
1108             internal static readonly int WORLD_POSITION = NDalicPINVOKE.Actor_Property_WORLD_POSITION_get();
1109             internal static readonly int WORLD_POSITION_X = NDalicPINVOKE.Actor_Property_WORLD_POSITION_X_get();
1110             internal static readonly int WORLD_POSITION_Y = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Y_get();
1111             internal static readonly int WORLD_POSITION_Z = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Z_get();
1112             internal static readonly int ORIENTATION = NDalicPINVOKE.Actor_Property_ORIENTATION_get();
1113             internal static readonly int WORLD_ORIENTATION = NDalicPINVOKE.Actor_Property_WORLD_ORIENTATION_get();
1114             internal static readonly int SCALE = NDalicPINVOKE.Actor_Property_SCALE_get();
1115             internal static readonly int SCALE_X = NDalicPINVOKE.Actor_Property_SCALE_X_get();
1116             internal static readonly int SCALE_Y = NDalicPINVOKE.Actor_Property_SCALE_Y_get();
1117             internal static readonly int SCALE_Z = NDalicPINVOKE.Actor_Property_SCALE_Z_get();
1118             internal static readonly int WORLD_SCALE = NDalicPINVOKE.Actor_Property_WORLD_SCALE_get();
1119             internal static readonly int VISIBLE = NDalicPINVOKE.Actor_Property_VISIBLE_get();
1120             internal static readonly int WORLD_COLOR = NDalicPINVOKE.Actor_Property_WORLD_COLOR_get();
1121             internal static readonly int WORLD_MATRIX = NDalicPINVOKE.Actor_Property_WORLD_MATRIX_get();
1122             internal static readonly int NAME = NDalicPINVOKE.Actor_Property_NAME_get();
1123             internal static readonly int SENSITIVE = NDalicPINVOKE.Actor_Property_SENSITIVE_get();
1124             internal static readonly int LEAVE_REQUIRED = NDalicPINVOKE.Actor_Property_LEAVE_REQUIRED_get();
1125             internal static readonly int INHERIT_ORIENTATION = NDalicPINVOKE.Actor_Property_INHERIT_ORIENTATION_get();
1126             internal static readonly int INHERIT_SCALE = NDalicPINVOKE.Actor_Property_INHERIT_SCALE_get();
1127             internal static readonly int DRAW_MODE = NDalicPINVOKE.Actor_Property_DRAW_MODE_get();
1128             internal static readonly int SIZE_MODE_FACTOR = NDalicPINVOKE.Actor_Property_SIZE_MODE_FACTOR_get();
1129             internal static readonly int WIDTH_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_WIDTH_RESIZE_POLICY_get();
1130             internal static readonly int HEIGHT_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_HEIGHT_RESIZE_POLICY_get();
1131             internal static readonly int SIZE_SCALE_POLICY = NDalicPINVOKE.Actor_Property_SIZE_SCALE_POLICY_get();
1132             internal static readonly int WIDTH_FOR_HEIGHT = NDalicPINVOKE.Actor_Property_WIDTH_FOR_HEIGHT_get();
1133             internal static readonly int HEIGHT_FOR_WIDTH = NDalicPINVOKE.Actor_Property_HEIGHT_FOR_WIDTH_get();
1134             internal static readonly int MINIMUM_SIZE = NDalicPINVOKE.Actor_Property_MINIMUM_SIZE_get();
1135             internal static readonly int MAXIMUM_SIZE = NDalicPINVOKE.Actor_Property_MAXIMUM_SIZE_get();
1136             internal static readonly int INHERIT_POSITION = NDalicPINVOKE.Actor_Property_INHERIT_POSITION_get();
1137             internal static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
1138             internal static readonly int INHERIT_LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_INHERIT_LAYOUT_DIRECTION_get();
1139             internal static readonly int LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_LAYOUT_DIRECTION_get();
1140             internal static readonly int MARGIN = NDalicPINVOKE.View_Property_MARGIN_get();
1141             internal static readonly int PADDING = NDalicPINVOKE.View_Property_PADDING_get();
1142         }
1143
1144         /// <summary>
1145         /// Describes the direction to move the focus towards.
1146         /// </summary>
1147         /// <since_tizen> 3 </since_tizen>
1148         public enum FocusDirection
1149         {
1150             /// <summary>
1151             /// Move keyboard focus towards the left direction.
1152             /// </summary>
1153             /// <since_tizen> 3 </since_tizen>
1154             Left,
1155             /// <summary>
1156             /// Move keyboard focus towards the right direction.
1157             /// </summary>
1158             /// <since_tizen> 3 </since_tizen>
1159             Right,
1160             /// <summary>
1161             /// Move keyboard focus towards the up direction.
1162             /// </summary>
1163             /// <since_tizen> 3 </since_tizen>
1164             Up,
1165             /// <summary>
1166             /// Move keyboard focus towards the down direction.
1167             /// </summary>
1168             /// <since_tizen> 3 </since_tizen>
1169             Down,
1170             /// <summary>
1171             /// Move keyboard focus towards the previous page direction.
1172             /// </summary>
1173             /// <since_tizen> 3 </since_tizen>
1174             PageUp,
1175             /// <summary>
1176             /// Move keyboard focus towards the next page direction.
1177             /// </summary>
1178             /// <since_tizen> 3 </since_tizen>
1179             PageDown
1180         }
1181
1182         /// <summary>
1183         /// Creates a new instance of a view.
1184         /// </summary>
1185         /// <since_tizen> 3 </since_tizen>
1186         public View() : this(NDalicPINVOKE.View_New(), true)
1187         {
1188             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1189
1190         }
1191         internal View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true)
1192         {
1193             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1194         }
1195
1196         private View ConvertIdToView(uint id)
1197         {
1198             View view = null;
1199             if (GetParent() is View)
1200             {
1201                 View parentView = GetParent() as View;
1202                 view = parentView.FindChildById(id);
1203             }
1204
1205             if (!view)
1206             {
1207                 view = Window.Instance.GetRootLayer().FindChildById(id);
1208             }
1209
1210             return view;
1211         }
1212
1213         internal void SetKeyInputFocus()
1214         {
1215             NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
1216             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1217         }
1218
1219         /// <summary>
1220         /// Queries whether the view has a focus.
1221         /// </summary>
1222         /// <returns>True if this view has a focus.</returns>
1223         /// <since_tizen> 3 </since_tizen>
1224         public bool HasFocus()
1225         {
1226             bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
1227             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1228             return ret;
1229         }
1230
1231         internal void ClearKeyInputFocus()
1232         {
1233             NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
1234             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1235         }
1236
1237         internal PinchGestureDetector GetPinchGestureDetector()
1238         {
1239             PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
1240             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1241             return ret;
1242         }
1243
1244         internal PanGestureDetector GetPanGestureDetector()
1245         {
1246             PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
1247             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1248             return ret;
1249         }
1250
1251         internal TapGestureDetector GetTapGestureDetector()
1252         {
1253             TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
1254             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1255             return ret;
1256         }
1257
1258         internal LongPressGestureDetector GetLongPressGestureDetector()
1259         {
1260             LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
1261             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1262             return ret;
1263         }
1264
1265         /// <summary>
1266         /// Sets the name of the style to be applied to the view.
1267         /// </summary>
1268         /// <param name="styleName">A string matching a style described in a stylesheet.</param>
1269         /// <since_tizen> 3 </since_tizen>
1270         public void SetStyleName(string styleName)
1271         {
1272             NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
1273             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1274         }
1275
1276         /// <summary>
1277         /// Retrieves the name of the style to be applied to the view (if any).
1278         /// </summary>
1279         /// <returns>A string matching a style, or an empty string.</returns>
1280         /// <since_tizen> 3 </since_tizen>
1281         public string GetStyleName()
1282         {
1283             string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
1284             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1285             return ret;
1286         }
1287
1288         internal void SetBackgroundColor(Vector4 color)
1289         {
1290             NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
1291             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1292         }
1293
1294         internal Vector4 GetBackgroundColor()
1295         {
1296             Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
1297             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1298             return ret;
1299         }
1300
1301         internal void SetBackgroundImage(Image image)
1302         {
1303             NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
1304             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1305         }
1306
1307         /// <summary>
1308         /// Clears the background.
1309         /// </summary>
1310         /// <since_tizen> 3 </since_tizen>
1311         public void ClearBackground()
1312         {
1313             NDalicPINVOKE.View_ClearBackground(swigCPtr);
1314             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1315         }
1316
1317         internal ControlKeySignal KeyEventSignal()
1318         {
1319             ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
1320             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1321             return ret;
1322         }
1323
1324         internal KeyInputFocusSignal KeyInputFocusGainedSignal()
1325         {
1326             KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
1327             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1328             return ret;
1329         }
1330
1331         internal KeyInputFocusSignal KeyInputFocusLostSignal()
1332         {
1333             KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
1334             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1335             return ret;
1336         }
1337
1338         internal View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
1339         {
1340             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1341         }
1342
1343         internal enum PropertyRange
1344         {
1345             PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
1346             CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
1347             CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
1348         }
1349
1350         /// <summary>
1351         /// The StyleName, type string.
1352         /// </summary>
1353         /// <since_tizen> 3 </since_tizen>
1354         public string StyleName
1355         {
1356             get
1357             {
1358                 string temp;
1359                 GetProperty(View.Property.STYLE_NAME).Get(out temp);
1360                 return temp;
1361             }
1362             set
1363             {
1364                 SetProperty(View.Property.STYLE_NAME, new Tizen.NUI.PropertyValue(value));
1365             }
1366         }
1367
1368         /// <summary>
1369         /// The mutually exclusive with BACKGROUND_IMAGE and BACKGROUND type Vector4.
1370         /// </summary>
1371         /// <since_tizen> 3 </since_tizen>
1372         public Color BackgroundColor
1373         {
1374             get
1375             {
1376                 Color backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1377
1378                 Tizen.NUI.PropertyMap background = Background;
1379                 int visualType = 0;
1380                 background.Find(Visual.Property.Type)?.Get(out visualType);
1381                 if (visualType == (int)Visual.Type.Color)
1382                 {
1383                     background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor);
1384                 }
1385
1386                 return backgroundColor;
1387             }
1388             set
1389             {
1390                 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1391             }
1392         }
1393
1394         /// <summary>
1395         /// Creates an animation to animate the background color visual. If there is no
1396         /// background visual, creates one with transparent black as it's mixColor.
1397         /// </summary>
1398         /// <since_tizen> 3 </since_tizen>
1399         public Animation AnimateBackgroundColor(object destinationValue,
1400                                                  int startTime,
1401                                                  int endTime,
1402                                                  AlphaFunction.BuiltinFunctions? alphaFunction = null,
1403                                                  object initialValue = null)
1404         {
1405             Tizen.NUI.PropertyMap background = Background;
1406
1407             if (background.Empty())
1408             {
1409                 // If there is no background yet, ensure there is a transparent
1410                 // color visual
1411                 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1412                 background = Background;
1413             }
1414             return AnimateColor("background", destinationValue, startTime, endTime, alphaFunction, initialValue);
1415         }
1416
1417         /// <summary>
1418         /// Creates an animation to animate the mixColor of the named visual.
1419         /// </summary>
1420         /// <since_tizen> 3 </since_tizen>
1421         public Animation AnimateColor(string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null)
1422         {
1423             Animation animation = null;
1424             {
1425                 PropertyMap _animator = new PropertyMap();
1426                 if (alphaFunction != null)
1427                 {
1428                     _animator.Add("alphaFunction", new PropertyValue(AlphaFunction.BuiltinToPropertyKey(alphaFunction)));
1429                 }
1430
1431                 PropertyMap _timePeriod = new PropertyMap();
1432                 _timePeriod.Add("duration", new PropertyValue((endTime - startTime) / 1000.0f));
1433                 _timePeriod.Add("delay", new PropertyValue(startTime / 1000.0f));
1434                 _animator.Add("timePeriod", new PropertyValue(_timePeriod));
1435
1436                 PropertyMap _transition = new PropertyMap();
1437                 _transition.Add("animator", new PropertyValue(_animator));
1438                 _transition.Add("target", new PropertyValue(targetVisual));
1439                 _transition.Add("property", new PropertyValue("mixColor"));
1440
1441                 if (initialColor != null)
1442                 {
1443                     PropertyValue initValue = PropertyValue.CreateFromObject(initialColor);
1444                     _transition.Add("initialValue", initValue);
1445                 }
1446
1447                 PropertyValue destValue = PropertyValue.CreateFromObject(destinationColor);
1448                 _transition.Add("targetValue", destValue);
1449                 TransitionData _transitionData = new TransitionData(_transition);
1450
1451                 animation = new Animation(NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true);
1452                 if (NDalicPINVOKE.SWIGPendingException.Pending)
1453                     throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1454             }
1455             return animation;
1456         }
1457
1458         /// <summary>
1459         /// The mutually exclusive with BACKGROUND_COLOR and BACKGROUND type Map.
1460         /// </summary>
1461         /// <since_tizen> 3 </since_tizen>
1462         public string BackgroundImage
1463         {
1464             get
1465             {
1466                 string backgroundImage = "";
1467
1468                 Tizen.NUI.PropertyMap background = Background;
1469                 int visualType = 0;
1470                 background.Find(Visual.Property.Type)?.Get(out visualType);
1471                 if (visualType == (int)Visual.Type.Image)
1472                 {
1473                     background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
1474                 }
1475
1476                 return backgroundImage;
1477             }
1478             set
1479             {
1480                 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1481             }
1482         }
1483
1484         /// <summary>
1485         /// The background of view.
1486         /// </summary>
1487         /// <since_tizen> 3 </since_tizen>
1488         public Tizen.NUI.PropertyMap Background
1489         {
1490             get
1491             {
1492                 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1493                 GetProperty(View.Property.BACKGROUND).Get(temp);
1494                 return temp;
1495             }
1496             set
1497             {
1498                 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1499             }
1500         }
1501
1502
1503         /// <summary>
1504         /// The current state of the view.
1505         /// </summary>
1506         /// <since_tizen> 3 </since_tizen>
1507         public States State
1508         {
1509             get
1510             {
1511                 int temp = 0;
1512                 if (GetProperty(View.Property.STATE).Get(out temp) == false)
1513                 {
1514                     NUILog.Error("State get error!");
1515                 }
1516                 switch (temp)
1517                 {
1518                     case 0:
1519                         {
1520                             return States.Normal;
1521                         }
1522                     case 1:
1523                         {
1524                             return States.Focused;
1525                         }
1526                     case 2:
1527                         {
1528                             return States.Disabled;
1529                         }
1530                     default:
1531                         {
1532                             return States.Normal;
1533                         }
1534                 }
1535             }
1536             set
1537             {
1538                 SetProperty(View.Property.STATE, new Tizen.NUI.PropertyValue((int)value));
1539             }
1540         }
1541
1542         /// <summary>
1543         /// The current sub state of the view.
1544         /// </summary>
1545         /// <since_tizen> 3 </since_tizen>
1546         public States SubState
1547         {
1548             get
1549             {
1550                 string temp;
1551                 if (GetProperty(View.Property.SUB_STATE).Get(out temp) == false)
1552                 {
1553                     NUILog.Error("subState get error!");
1554                 }
1555                 switch (temp)
1556                 {
1557                     case "NORMAL":
1558                         return States.Normal;
1559                     case "FOCUSED":
1560                         return States.Focused;
1561                     case "DISABLED":
1562                         return States.Disabled;
1563                     default:
1564                         return States.Normal;
1565                 }
1566             }
1567             set
1568             {
1569                 string valueToString = "";
1570                 switch (value)
1571                 {
1572                     case States.Normal:
1573                         {
1574                             valueToString = "NORMAL";
1575                             break;
1576                         }
1577                     case States.Focused:
1578                         {
1579                             valueToString = "FOCUSED";
1580                             break;
1581                         }
1582                     case States.Disabled:
1583                         {
1584                             valueToString = "DISABLED";
1585                             break;
1586                         }
1587                     default:
1588                         {
1589                             valueToString = "NORMAL";
1590                             break;
1591                         }
1592                 }
1593                 SetProperty(View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
1594             }
1595         }
1596
1597         /// <summary>
1598         /// Displays a tooltip
1599         /// </summary>
1600         /// <since_tizen> 3 </since_tizen>
1601         public Tizen.NUI.PropertyMap Tooltip
1602         {
1603             get
1604             {
1605                 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1606                 GetProperty(View.Property.TOOLTIP).Get(temp);
1607                 return temp;
1608             }
1609             set
1610             {
1611                 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1612             }
1613         }
1614
1615         /// <summary>
1616         /// Displays a tooltip as a text.
1617         /// </summary>
1618         /// <since_tizen> 3 </since_tizen>
1619         public string TooltipText
1620         {
1621             set
1622             {
1623                 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1624             }
1625         }
1626
1627         private int LeftFocusableViewId
1628         {
1629             get
1630             {
1631                 int temp = 0;
1632                 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
1633                 return temp;
1634             }
1635             set
1636             {
1637                 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1638             }
1639         }
1640
1641         private int RightFocusableViewId
1642         {
1643             get
1644             {
1645                 int temp = 0;
1646                 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
1647                 return temp;
1648             }
1649             set
1650             {
1651                 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1652             }
1653         }
1654
1655         private int UpFocusableViewId
1656         {
1657             get
1658             {
1659                 int temp = 0;
1660                 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
1661                 return temp;
1662             }
1663             set
1664             {
1665                 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1666             }
1667         }
1668
1669         private int DownFocusableViewId
1670         {
1671             get
1672             {
1673                 int temp = 0;
1674                 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
1675                 return temp;
1676             }
1677             set
1678             {
1679                 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1680             }
1681         }
1682
1683         /// <summary>
1684         /// The Child property of FlexContainer.<br />
1685         /// The proportion of the free space in the container, the flex item will receive.<br />
1686         /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br />
1687         /// </summary>
1688         /// <since_tizen> 3 </since_tizen>
1689         public float Flex
1690         {
1691             get
1692             {
1693                 float temp = 0.0f;
1694                 GetProperty(FlexContainer.ChildProperty.FLEX).Get(out temp);
1695                 return temp;
1696             }
1697             set
1698             {
1699                 SetProperty(FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue(value));
1700             }
1701         }
1702
1703         /// <summary>
1704         /// The Child property of FlexContainer.<br />
1705         /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br />
1706         /// </summary>
1707         /// <since_tizen> 3 </since_tizen>
1708         public int AlignSelf
1709         {
1710             get
1711             {
1712                 int temp = 0;
1713                 GetProperty(FlexContainer.ChildProperty.ALIGN_SELF).Get(out temp);
1714                 return temp;
1715             }
1716             set
1717             {
1718                 SetProperty(FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue(value));
1719             }
1720         }
1721
1722         /// <summary>
1723         /// The Child property of FlexContainer.<br />
1724         /// The space around the flex item.<br />
1725         /// </summary>
1726         /// <since_tizen> 3 </since_tizen>
1727         public Vector4 FlexMargin
1728         {
1729             get
1730             {
1731                 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1732                 GetProperty(FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
1733                 return temp;
1734             }
1735             set
1736             {
1737                 SetProperty(FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue(value));
1738             }
1739         }
1740
1741         /// <summary>
1742         /// The top-left cell this child occupies, if not set, the first available cell is used.
1743         /// </summary>
1744         /// <since_tizen> 3 </since_tizen>
1745         public Vector2 CellIndex
1746         {
1747             get
1748             {
1749                 Vector2 temp = new Vector2(0.0f, 0.0f);
1750                 GetProperty(TableView.ChildProperty.CELL_INDEX).Get(temp);
1751                 return temp;
1752             }
1753             set
1754             {
1755                 SetProperty(TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue(value));
1756             }
1757         }
1758
1759         /// <summary>
1760         /// The number of rows this child occupies, if not set, the default value is 1.
1761         /// </summary>
1762         /// <since_tizen> 3 </since_tizen>
1763         public float RowSpan
1764         {
1765             get
1766             {
1767                 float temp = 0.0f;
1768                 GetProperty(TableView.ChildProperty.ROW_SPAN).Get(out temp);
1769                 return temp;
1770             }
1771             set
1772             {
1773                 SetProperty(TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue(value));
1774             }
1775         }
1776
1777         /// <summary>
1778         /// The number of columns this child occupies, if not set, the default value is 1.
1779         /// </summary>
1780         /// <since_tizen> 3 </since_tizen>
1781         public float ColumnSpan
1782         {
1783             get
1784             {
1785                 float temp = 0.0f;
1786                 GetProperty(TableView.ChildProperty.COLUMN_SPAN).Get(out temp);
1787                 return temp;
1788             }
1789             set
1790             {
1791                 SetProperty(TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue(value));
1792             }
1793         }
1794
1795         /// <summary>
1796         /// The horizontal alignment of this child inside the cells, if not set, the default value is 'left'.
1797         /// </summary>
1798         /// <since_tizen> 3 </since_tizen>
1799         public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
1800         {
1801             get
1802             {
1803                 string temp;
1804                 if (GetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
1805                 {
1806                     NUILog.Error("CellHorizontalAlignment get error!");
1807                 }
1808
1809                 switch (temp)
1810                 {
1811                     case "left":
1812                         return Tizen.NUI.HorizontalAlignmentType.Left;
1813                     case "center":
1814                         return Tizen.NUI.HorizontalAlignmentType.Center;
1815                     case "right":
1816                         return Tizen.NUI.HorizontalAlignmentType.Right;
1817                     default:
1818                         return Tizen.NUI.HorizontalAlignmentType.Left;
1819                 }
1820             }
1821             set
1822             {
1823                 string valueToString = "";
1824                 switch (value)
1825                 {
1826                     case Tizen.NUI.HorizontalAlignmentType.Left:
1827                         {
1828                             valueToString = "left";
1829                             break;
1830                         }
1831                     case Tizen.NUI.HorizontalAlignmentType.Center:
1832                         {
1833                             valueToString = "center";
1834                             break;
1835                         }
1836                     case Tizen.NUI.HorizontalAlignmentType.Right:
1837                         {
1838                             valueToString = "right";
1839                             break;
1840                         }
1841                     default:
1842                         {
1843                             valueToString = "left";
1844                             break;
1845                         }
1846                 }
1847                 SetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1848             }
1849         }
1850
1851         /// <summary>
1852         /// The vertical alignment of this child inside the cells, if not set, the default value is 'top'.
1853         /// </summary>
1854         /// <since_tizen> 3 </since_tizen>
1855         public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
1856         {
1857             get
1858             {
1859                 string temp;
1860                 GetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
1861                 {
1862                     NUILog.Error("CellVerticalAlignment get error!");
1863                 }
1864
1865                 switch (temp)
1866                 {
1867                     case "top":
1868                         return Tizen.NUI.VerticalAlignmentType.Top;
1869                     case "center":
1870                         return Tizen.NUI.VerticalAlignmentType.Center;
1871                     case "bottom":
1872                         return Tizen.NUI.VerticalAlignmentType.Bottom;
1873                     default:
1874                         return Tizen.NUI.VerticalAlignmentType.Top;
1875                 }
1876             }
1877             set
1878             {
1879                 string valueToString = "";
1880                 switch (value)
1881                 {
1882                     case Tizen.NUI.VerticalAlignmentType.Top:
1883                         {
1884                             valueToString = "top";
1885                             break;
1886                         }
1887                     case Tizen.NUI.VerticalAlignmentType.Center:
1888                         {
1889                             valueToString = "center";
1890                             break;
1891                         }
1892                     case Tizen.NUI.VerticalAlignmentType.Bottom:
1893                         {
1894                             valueToString = "bottom";
1895                             break;
1896                         }
1897                     default:
1898                         {
1899                             valueToString = "top";
1900                             break;
1901                         }
1902                 }
1903                 SetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1904             }
1905         }
1906
1907         /// <summary>
1908         /// The left focusable view.<br />
1909         /// This will return null if not set.<br />
1910         /// This will also return null if the specified left focusable view is not on a window.<br />
1911         /// </summary>
1912         /// <since_tizen> 3 </since_tizen>
1913         public View LeftFocusableView
1914         {
1915             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1916             get
1917             {
1918                 if (LeftFocusableViewId >= 0)
1919                 {
1920                     return ConvertIdToView((uint)LeftFocusableViewId);
1921                 }
1922                 return null;
1923             }
1924             set
1925             {
1926                 if (value)
1927                 {
1928                     LeftFocusableViewId = (int)value.GetId();
1929                 }
1930                 else
1931                 {
1932                     LeftFocusableViewId = -1;
1933                 }
1934             }
1935         }
1936
1937         /// <summary>
1938         /// The right focusable view.<br />
1939         /// This will return null if not set.<br />
1940         /// This will also return null if the specified right focusable view is not on a window.<br />
1941         /// </summary>
1942         /// <since_tizen> 3 </since_tizen>
1943         public View RightFocusableView
1944         {
1945             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1946             get
1947             {
1948                 if (RightFocusableViewId >= 0)
1949                 {
1950                     return ConvertIdToView((uint)RightFocusableViewId);
1951                 }
1952                 return null;
1953             }
1954             set
1955             {
1956                 if (value)
1957                 {
1958                     RightFocusableViewId = (int)value.GetId();
1959                 }
1960                 else
1961                 {
1962                     RightFocusableViewId = -1;
1963                 }
1964             }
1965         }
1966
1967         /// <summary>
1968         /// The up focusable view.<br />
1969         /// This will return null if not set.<br />
1970         /// This will also return null if the specified up focusable view is not on a window.<br />
1971         /// </summary>
1972         /// <since_tizen> 3 </since_tizen>
1973         public View UpFocusableView
1974         {
1975             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1976             get
1977             {
1978                 if (UpFocusableViewId >= 0)
1979                 {
1980                     return ConvertIdToView((uint)UpFocusableViewId);
1981                 }
1982                 return null;
1983             }
1984             set
1985             {
1986                 if (value)
1987                 {
1988                     UpFocusableViewId = (int)value.GetId();
1989                 }
1990                 else
1991                 {
1992                     UpFocusableViewId = -1;
1993                 }
1994             }
1995         }
1996
1997         /// <summary>
1998         /// The down focusable view.<br />
1999         /// This will return null if not set.<br />
2000         /// This will also return null if the specified down focusable view is not on a window.<br />
2001         /// </summary>
2002         /// <since_tizen> 3 </since_tizen>
2003         public View DownFocusableView
2004         {
2005             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2006             get
2007             {
2008                 if (DownFocusableViewId >= 0)
2009                 {
2010                     return ConvertIdToView((uint)DownFocusableViewId);
2011                 }
2012                 return null;
2013             }
2014             set
2015             {
2016                 if (value)
2017                 {
2018                     DownFocusableViewId = (int)value.GetId();
2019                 }
2020                 else
2021                 {
2022                     DownFocusableViewId = -1;
2023                 }
2024             }
2025         }
2026
2027         /// <summary>
2028         /// Whether the view should be focusable by keyboard navigation.
2029         /// </summary>
2030         /// <since_tizen> 3 </since_tizen>
2031         public bool Focusable
2032         {
2033             set
2034             {
2035                 SetKeyboardFocusable(value);
2036             }
2037             get
2038             {
2039                 return IsKeyboardFocusable();
2040             }
2041         }
2042
2043         /// <summary>
2044         /// Enumeration for describing the states of the view.
2045         /// </summary>
2046         /// <since_tizen> 3 </since_tizen>
2047         public enum States
2048         {
2049             /// <summary>
2050             /// The normal state.
2051             /// </summary>
2052             Normal,
2053             /// <summary>
2054             /// The focused state.
2055             /// </summary>
2056             Focused,
2057             /// <summary>
2058             /// The disabled state.
2059             /// </summary>
2060             Disabled
2061         }
2062
2063         /// <summary>
2064         ///  Retrieves the position of the view.<br />
2065         ///  The coordinates are relative to the view's parent.<br />
2066         /// </summary>
2067         /// <since_tizen> 3 </since_tizen>
2068         public Position CurrentPosition
2069         {
2070             get
2071             {
2072                 return GetCurrentPosition();
2073             }
2074         }
2075
2076         /// <summary>
2077         /// Sets the size of a view for the width and the height.<br />
2078         /// Geometry can be scaled to fit within this area.<br />
2079         /// This does not interfere with the view's scale factor.<br />
2080         /// The views default depth is the minimum of width and height.<br />
2081         /// </summary>
2082         /// <since_tizen> 3 </since_tizen>
2083         public Size2D Size2D
2084         {
2085             get
2086             {
2087                 Size temp = new Size(0.0f, 0.0f, 0.0f);
2088                 GetProperty(View.Property.SIZE).Get(temp);
2089                 Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
2090                 return size;
2091             }
2092             set
2093             {
2094                 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(new Size(value)));
2095             }
2096         }
2097
2098         /// <summary>
2099         ///  Retrieves the size of the view.<br />
2100         ///  The coordinates are relative to the view's parent.<br />
2101         /// </summary>
2102         /// <since_tizen> 3 </since_tizen>
2103         public Size2D CurrentSize
2104         {
2105             get
2106             {
2107                 return GetCurrentSize();
2108             }
2109         }
2110
2111         /// <summary>
2112         /// Retrieves and sets the view's opacity.<br />
2113         /// </summary>
2114         /// <since_tizen> 3 </since_tizen>
2115         public float Opacity
2116         {
2117             get
2118             {
2119                 float temp = 0.0f;
2120                 GetProperty(View.Property.OPACITY).Get(out temp);
2121                 return temp;
2122             }
2123             set
2124             {
2125                 SetProperty(View.Property.OPACITY, new Tizen.NUI.PropertyValue(value));
2126             }
2127         }
2128
2129         /// <summary>
2130         /// Sets the position of the view for X and Y.<br />
2131         /// By default, sets the position vector between the parent origin and the pivot point (default).<br />
2132         /// If the position inheritance is disabled, sets the world position.<br />
2133         /// </summary>
2134         /// <since_tizen> 3 </since_tizen>
2135         public Position2D Position2D
2136         {
2137             get
2138             {
2139                 Position temp = new Position(0.0f, 0.0f, 0.0f);
2140                 GetProperty(View.Property.POSITION).Get(temp);
2141                 return new Position2D(temp);
2142             }
2143             set
2144             {
2145                 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(new Position(value)));
2146             }
2147         }
2148
2149         /// <summary>
2150         /// Retrieves the screen postion of the view.<br />
2151         /// </summary>
2152         /// <since_tizen> 3 </since_tizen>
2153         public Vector2 ScreenPosition
2154         {
2155             get
2156             {
2157                 Vector2 temp = new Vector2(0.0f, 0.0f);
2158                 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
2159                 return temp;
2160             }
2161         }
2162
2163         /// <summary>
2164         /// Determines whether the pivot point should be used to determine the position of the view.
2165         /// This is true by default.
2166         /// </summary>
2167         /// <remarks>If false, then the top-left of the view is used for the position.
2168         /// Setting this to false will allow scaling or rotation around the anchor-point without affecting the view's position.
2169         /// </remarks>
2170         /// <since_tizen> 3 </since_tizen>
2171         public bool PositionUsesPivotPoint
2172         {
2173             get
2174             {
2175                 bool temp = false;
2176                 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
2177                 return temp;
2178             }
2179             set
2180             {
2181                 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
2182             }
2183         }
2184
2185         /// <summary>
2186         /// Please do not use! this will be deprecated.
2187         /// </summary>
2188         /// Please do not use! this will be deprecated!
2189         /// Instead please use PositionUsesPivotPoint.
2190         /// <since_tizen> 3 </since_tizen>
2191         [Obsolete("Please do not use! This will be deprecated! Please use PositionUsesPivotPoint instead! " +
2192             "Like: " +
2193             "View view = new View(); " +
2194             "view.PivotPoint = PivotPoint.Center; " +
2195             "view.PositionUsesPivotPoint = true;")]
2196         [EditorBrowsable(EditorBrowsableState.Never)]
2197         public bool PositionUsesAnchorPoint
2198         {
2199             get
2200             {
2201                 bool temp = false;
2202                 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
2203                 return temp;
2204             }
2205             set
2206             {
2207                 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
2208             }
2209         }
2210
2211         internal bool FocusState
2212         {
2213             get
2214             {
2215                 return IsKeyboardFocusable();
2216             }
2217             set
2218             {
2219                 SetKeyboardFocusable(value);
2220             }
2221         }
2222
2223         /// <summary>
2224         /// Queries whether the view is connected to the stage.<br />
2225         /// When a view is connected, it will be directly or indirectly parented to the root view.<br />
2226         /// </summary>
2227         /// <since_tizen> 3 </since_tizen>
2228         public bool IsOnWindow
2229         {
2230             get
2231             {
2232                 return OnWindow();
2233             }
2234         }
2235
2236         /// <summary>
2237         /// Gets the depth in the hierarchy for the view.
2238         /// </summary>
2239         /// <since_tizen> 3 </since_tizen>
2240         public int HierarchyDepth
2241         {
2242             get
2243             {
2244                 return GetHierarchyDepth();
2245             }
2246         }
2247
2248         /// <summary>
2249         /// Sets the sibling order of the view so the depth position can be defined within the same parent.
2250         /// </summary>
2251         /// <remarks>
2252         /// Note the initial value is 0. SiblingOrder should be bigger than 0 or equal to 0.
2253         /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove, and LowerBelow will override the sibling order.
2254         /// The values set by this property will likely change.
2255         /// </remarks>
2256         /// <since_tizen> 3 </since_tizen>
2257         public int SiblingOrder
2258         {
2259             get
2260             {
2261                 var parentChildren = GetParent()?.Children;
2262                 int currentOrder = 0;
2263                 if (parentChildren != null)
2264                 {
2265                     currentOrder = parentChildren.IndexOf(this);
2266
2267                     if (currentOrder < 0)
2268                     {
2269                         return 0;
2270                     }
2271                     else if (currentOrder < parentChildren.Count)
2272                     {
2273                         return currentOrder;
2274                     }
2275                 }
2276
2277                 return 0;
2278             }
2279             set
2280             {
2281                 if(value < 0)
2282                 {
2283                     NUILog.Error("SiblingOrder should be bigger than 0 or equal to 0.");
2284                     return;
2285                 }
2286                 var siblings = GetParent()?.Children;
2287                 if (siblings != null)
2288                 {
2289                     int currentOrder = siblings.IndexOf(this);
2290                     if (value != currentOrder)
2291                     {
2292                         if (value == 0)
2293                         {
2294                             LowerToBottom();
2295                         }
2296                         else if (value < siblings.Count - 1)
2297                         {
2298                             if (value > currentOrder)
2299                             {
2300                                 RaiseAbove(siblings[value]);
2301                             }
2302                             else
2303                             {
2304                                 LowerBelow(siblings[value]);
2305                             }
2306                         }
2307                         else
2308                         {
2309                             RaiseToTop();
2310                         }
2311                     }
2312                 }
2313             }
2314         }
2315
2316         /// <summary>
2317         /// Returns the natural size of the view.
2318         /// </summary>
2319         /// <remarks>
2320         /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
2321         /// </remarks>
2322         /// /// Please do not use! this will be deprecated!
2323         /// Instead please use NaturalSize2D.
2324         /// <since_tizen> 3 </since_tizen>
2325         [Obsolete("Please do not use! This will be deprecated! Please use NaturalSize2D instead! " +
2326             "Like: " +
2327             "TextLabel label = new TextLabel(\"Hello World!\"); " +
2328             "Size2D size = label.NaturalSize2D;")]
2329         [EditorBrowsable(EditorBrowsableState.Never)]
2330         public Vector3 NaturalSize
2331         {
2332             get
2333             {
2334                 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2335                 if (NDalicPINVOKE.SWIGPendingException.Pending)
2336                     throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2337                 return ret;
2338             }
2339         }
2340
2341         /// <summary>
2342         /// Returns the natural size (Size2D) of the view.
2343         /// </summary>
2344         /// <remarks>
2345         /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
2346         /// </remarks>
2347         /// <since_tizen> 4 </since_tizen>
2348         public Size2D NaturalSize2D
2349         {
2350             get
2351             {
2352                 Vector3 temp = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2353                 if (NDalicPINVOKE.SWIGPendingException.Pending)
2354                     throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2355
2356                 return new Size2D((int)temp.Width, (int)temp.Height);
2357             }
2358         }
2359
2360         /// <summary>
2361         /// Shows the view.
2362         /// </summary>
2363         /// <remarks>
2364         /// This is an asynchronous method.
2365         /// </remarks>
2366         /// <since_tizen> 3 </since_tizen>
2367         public void Show()
2368         {
2369             SetVisible(true);
2370         }
2371
2372         /// <summary>
2373         /// Hides the view.
2374         /// </summary>
2375         /// <remarks>
2376         /// This is an asynchronous method.
2377         /// If the view is hidden, then the view and its children will not be rendered.
2378         /// 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.
2379         /// </remarks>
2380         /// <since_tizen> 3 </since_tizen>
2381         public void Hide()
2382         {
2383             SetVisible(false);
2384         }
2385
2386         internal void Raise()
2387         {
2388             var parentChildren = GetParent()?.Children;
2389
2390             if (parentChildren != null)
2391             {
2392                 int currentIndex = parentChildren.IndexOf(this);
2393
2394                 // If the view is not already the last item in the list.
2395                 if (currentIndex >= 0 && currentIndex < parentChildren.Count -1)
2396                 {
2397                     View temp = parentChildren[currentIndex + 1];
2398                     parentChildren[currentIndex + 1] = this;
2399                     parentChildren[currentIndex] = temp;
2400
2401                     NDalicPINVOKE.Raise(swigCPtr);
2402                     if (NDalicPINVOKE.SWIGPendingException.Pending)
2403                         throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2404                 }
2405             }
2406
2407         }
2408
2409         internal void Lower()
2410         {
2411             var parentChildren = GetParent()?.Children;
2412
2413             if (parentChildren != null)
2414             {
2415                 int currentIndex = parentChildren.IndexOf(this);
2416
2417                 // If the view is not already the first item in the list.
2418                 if (currentIndex > 0 && currentIndex < parentChildren.Count)
2419                 {
2420                     View temp = parentChildren[currentIndex - 1];
2421                     parentChildren[currentIndex - 1] = this;
2422                     parentChildren[currentIndex] = temp;
2423
2424                     NDalicPINVOKE.Lower(swigCPtr);
2425                     if (NDalicPINVOKE.SWIGPendingException.Pending)
2426                         throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2427                 }
2428             }
2429         }
2430
2431         /// <summary>
2432         /// Raises the view above all other views.
2433         /// </summary>
2434         /// <remarks>
2435         /// Sibling order of views within the parent will be updated automatically.
2436         /// Once a raise or lower API is used, that view will then have an exclusive sibling order independent of insertion.
2437         /// </remarks>
2438         /// <since_tizen> 3 </since_tizen>
2439         public void RaiseToTop()
2440         {
2441             var parentChildren = GetParent()?.Children;
2442
2443             if (parentChildren != null)
2444             {
2445                 parentChildren.Remove(this);
2446                 parentChildren.Add(this);
2447
2448                 NDalicPINVOKE.RaiseToTop(swigCPtr);
2449                 if (NDalicPINVOKE.SWIGPendingException.Pending)
2450                     throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2451             }
2452
2453         }
2454
2455         /// <summary>
2456         /// Lowers the view to the bottom of all views.
2457         /// </summary>
2458         /// <remarks>
2459         /// The sibling order of views within the parent will be updated automatically.
2460         /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2461         /// </remarks>
2462         /// <since_tizen> 3 </since_tizen>
2463         public void LowerToBottom()
2464         {
2465             var parentChildren = GetParent()?.Children;
2466
2467             if (parentChildren != null)
2468             {
2469                 parentChildren.Remove(this);
2470                 parentChildren.Insert(0, this);
2471
2472                 NDalicPINVOKE.LowerToBottom(swigCPtr);
2473                 if (NDalicPINVOKE.SWIGPendingException.Pending)
2474                     throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2475             }
2476         }
2477
2478         /// <summary>
2479         /// Queries if all resources required by a view are loaded and ready.
2480         /// </summary>
2481         /// <remarks>Most resources are only loaded when the control is placed on the stage.
2482         /// </remarks>
2483         /// <since_tizen> 3 </since_tizen>
2484         public bool IsResourceReady()
2485         {
2486             bool ret = NDalicPINVOKE.IsResourceReady(swigCPtr);
2487             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2488             return ret;
2489         }
2490
2491         /// <summary>
2492         /// Raises the view to above the target view.
2493         /// </summary>
2494         /// <remarks>The sibling order of views within the parent will be updated automatically.
2495         /// Views on the level above the target view will still be shown above this view.
2496         /// Raising this view above views with the same sibling order as each other will raise this view above them.
2497         /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2498         /// </remarks>
2499         /// <param name="target">Will be raised above this view.</param>
2500         internal void RaiseAbove(View target)
2501         {
2502             var parentChildren = GetParent()?.Children;
2503
2504             if (parentChildren != null)
2505             {
2506                 int currentIndex = parentChildren.IndexOf(this);
2507                 int targetIndex = parentChildren.IndexOf(target);
2508
2509                 if(currentIndex < 0 || targetIndex < 0 ||
2510                     currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
2511                 {
2512                     NUILog.Error("index should be bigger than 0 and less than children of layer count");
2513                     return;
2514                 }
2515                 // If the currentIndex is less than the target index and the target has the same parent.
2516                 if (currentIndex < targetIndex)
2517                 {
2518                     parentChildren.Remove(this);
2519                     parentChildren.Insert(targetIndex, this);
2520
2521                     NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
2522                     if (NDalicPINVOKE.SWIGPendingException.Pending)
2523                         throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2524                 }
2525             }
2526
2527         }
2528
2529         /// <summary>
2530         /// Lowers the view to below the target view.
2531         /// </summary>
2532         /// <remarks>The sibling order of views within the parent will be updated automatically.
2533         /// Lowering this view below views with the same sibling order as each other will lower this view above them.
2534         /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2535         /// </remarks>
2536         /// <param name="target">Will be lowered below this view.</param>
2537         internal void LowerBelow(View target)
2538         {
2539             var parentChildren = GetParent()?.Children;
2540
2541             if (parentChildren != null)
2542             {
2543                 int currentIndex = parentChildren.IndexOf(this);
2544                 int targetIndex = parentChildren.IndexOf(target);
2545                 if(currentIndex < 0 || targetIndex < 0 ||
2546                    currentIndex >= parentChildren.Count ||targetIndex >= parentChildren.Count)
2547                 {
2548                     NUILog.Error("index should be bigger than 0 and less than children of layer count");
2549                     return;
2550                 }
2551
2552                 // If the currentIndex is not already the 0th index and the target has the same parent.
2553                 if ((currentIndex != 0) && (targetIndex != -1) &&
2554                     (currentIndex > targetIndex))
2555                 {
2556                     parentChildren.Remove(this);
2557                     parentChildren.Insert(targetIndex, this);
2558
2559                     NDalicPINVOKE.LowerBelow(swigCPtr, View.getCPtr(target));
2560                     if (NDalicPINVOKE.SWIGPendingException.Pending)
2561                         throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2562                 }
2563             }
2564
2565         }
2566
2567         internal string GetName()
2568         {
2569             string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);
2570             if (NDalicPINVOKE.SWIGPendingException.Pending)
2571                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2572             return ret;
2573         }
2574
2575         internal void SetName(string name)
2576         {
2577             NDalicPINVOKE.Actor_SetName(swigCPtr, name);
2578             if (NDalicPINVOKE.SWIGPendingException.Pending)
2579                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2580         }
2581
2582         internal uint GetId()
2583         {
2584             uint ret = NDalicPINVOKE.Actor_GetId(swigCPtr);
2585             if (NDalicPINVOKE.SWIGPendingException.Pending)
2586                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2587             return ret;
2588         }
2589
2590         internal bool IsRoot()
2591         {
2592             bool ret = NDalicPINVOKE.Actor_IsRoot(swigCPtr);
2593             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2594             return ret;
2595         }
2596
2597         internal bool OnWindow()
2598         {
2599             bool ret = NDalicPINVOKE.Actor_OnStage(swigCPtr);
2600             if (NDalicPINVOKE.SWIGPendingException.Pending)
2601                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2602             return ret;
2603         }
2604
2605         /// <summary>
2606         /// Gets the parent layer of this view.If a view has no parent, this method does nothing.
2607         /// </summary>
2608         /// <pre>The view has been initialized. </pre>
2609         /// <returns>the parent layer of view </returns>
2610         /// <since_tizen> 5 </since_tizen>
2611         public Layer GetLayer()
2612         {
2613             //to fix memory leak issue, match the handle count with native side.
2614             IntPtr cPtr = NDalicPINVOKE.Actor_GetLayer(swigCPtr);
2615             HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
2616             Layer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Layer;
2617             NDalicPINVOKE.delete_BaseHandle(CPtr);
2618             CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
2619
2620             if (NDalicPINVOKE.SWIGPendingException.Pending)
2621                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2622             return ret;
2623         }
2624
2625         /// <summary>
2626         /// Removes a view from its parent view or layer. If a view has no parent, this method does nothing.
2627         /// </summary>
2628         /// <pre>The (child) view has been initialized. </pre>
2629         /// <since_tizen> 4 </since_tizen>
2630         public void Unparent()
2631         {
2632             GetParent()?.Remove(this);
2633         }
2634
2635         /// <summary>
2636         /// Search through this view's hierarchy for a view with the given name.
2637         /// The view itself is also considered in the search.
2638         /// </summary>
2639         /// <pre>The view has been initialized.</pre>
2640         /// <param name="viewName">The name of the view to find.</param>
2641         /// <returns>A handle to the view if found, or an empty handle if not.</returns>
2642         /// <since_tizen> 3 </since_tizen>
2643         public View FindChildByName(string viewName)
2644         {
2645             //to fix memory leak issue, match the handle count with native side.
2646             IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
2647             HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
2648             View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
2649             NDalicPINVOKE.delete_BaseHandle(CPtr);
2650             CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
2651
2652             if (NDalicPINVOKE.SWIGPendingException.Pending)
2653                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2654             return ret;
2655         }
2656
2657         internal View FindChildById(uint id)
2658         {
2659             //to fix memory leak issue, match the handle count with native side.
2660             IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
2661             HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
2662             View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
2663             NDalicPINVOKE.delete_BaseHandle(CPtr);
2664             CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
2665
2666             if (NDalicPINVOKE.SWIGPendingException.Pending)
2667                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2668             return ret;
2669         }
2670
2671         internal void SetParentOrigin(Vector3 origin)
2672         {
2673             NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
2674             if (NDalicPINVOKE.SWIGPendingException.Pending)
2675                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2676         }
2677
2678         internal Vector3 GetCurrentParentOrigin()
2679         {
2680             Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentParentOrigin(swigCPtr), true);
2681             if (NDalicPINVOKE.SWIGPendingException.Pending)
2682                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2683             return ret;
2684         }
2685
2686         internal void SetAnchorPoint(Vector3 anchorPoint)
2687         {
2688             NDalicPINVOKE.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
2689             if (NDalicPINVOKE.SWIGPendingException.Pending)
2690                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2691         }
2692
2693         internal Vector3 GetCurrentAnchorPoint()
2694         {
2695             Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentAnchorPoint(swigCPtr), true);
2696             if (NDalicPINVOKE.SWIGPendingException.Pending)
2697                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2698             return ret;
2699         }
2700
2701         internal void SetSize(float width, float height)
2702         {
2703             NDalicPINVOKE.Actor_SetSize__SWIG_0(swigCPtr, width, height);
2704             if (NDalicPINVOKE.SWIGPendingException.Pending)
2705                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2706         }
2707
2708         internal void SetSize(float width, float height, float depth)
2709         {
2710             NDalicPINVOKE.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
2711             if (NDalicPINVOKE.SWIGPendingException.Pending)
2712                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2713         }
2714
2715         internal void SetSize(Vector2 size)
2716         {
2717             NDalicPINVOKE.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
2718             if (NDalicPINVOKE.SWIGPendingException.Pending)
2719                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2720         }
2721
2722         internal void SetSize(Vector3 size)
2723         {
2724             NDalicPINVOKE.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
2725             if (NDalicPINVOKE.SWIGPendingException.Pending)
2726                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2727         }
2728
2729         internal Vector3 GetTargetSize()
2730         {
2731             Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetTargetSize(swigCPtr), true);
2732             if (NDalicPINVOKE.SWIGPendingException.Pending)
2733                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2734             return ret;
2735         }
2736
2737         internal Size2D GetCurrentSize()
2738         {
2739             Size ret = new Size(NDalicPINVOKE.Actor_GetCurrentSize(swigCPtr), true);
2740             if (NDalicPINVOKE.SWIGPendingException.Pending)
2741                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2742             Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
2743             return size;
2744         }
2745
2746         internal Vector3 GetNaturalSize()
2747         {
2748             Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2749             if (NDalicPINVOKE.SWIGPendingException.Pending)
2750                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2751             return ret;
2752         }
2753
2754         internal void SetPosition(float x, float y)
2755         {
2756             NDalicPINVOKE.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
2757             if (NDalicPINVOKE.SWIGPendingException.Pending)
2758                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2759         }
2760
2761         internal void SetPosition(float x, float y, float z)
2762         {
2763             NDalicPINVOKE.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
2764             if (NDalicPINVOKE.SWIGPendingException.Pending)
2765                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2766         }
2767
2768         internal void SetPosition(Vector3 position)
2769         {
2770             NDalicPINVOKE.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
2771             if (NDalicPINVOKE.SWIGPendingException.Pending)
2772                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2773         }
2774
2775         internal void SetX(float x)
2776         {
2777             NDalicPINVOKE.Actor_SetX(swigCPtr, x);
2778             if (NDalicPINVOKE.SWIGPendingException.Pending)
2779                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2780         }
2781
2782         internal void SetY(float y)
2783         {
2784             NDalicPINVOKE.Actor_SetY(swigCPtr, y);
2785             if (NDalicPINVOKE.SWIGPendingException.Pending)
2786                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2787         }
2788
2789         internal void SetZ(float z)
2790         {
2791             NDalicPINVOKE.Actor_SetZ(swigCPtr, z);
2792             if (NDalicPINVOKE.SWIGPendingException.Pending)
2793                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2794         }
2795
2796         internal void TranslateBy(Vector3 distance)
2797         {
2798             NDalicPINVOKE.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
2799             if (NDalicPINVOKE.SWIGPendingException.Pending)
2800                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2801         }
2802
2803         internal Position GetCurrentPosition()
2804         {
2805             Position ret = new Position(NDalicPINVOKE.Actor_GetCurrentPosition(swigCPtr), true);
2806             if (NDalicPINVOKE.SWIGPendingException.Pending)
2807                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2808             return ret;
2809         }
2810
2811         internal Vector3 GetCurrentWorldPosition()
2812         {
2813             Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldPosition(swigCPtr), true);
2814             if (NDalicPINVOKE.SWIGPendingException.Pending)
2815                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2816             return ret;
2817         }
2818
2819         internal void SetInheritPosition(bool inherit)
2820         {
2821             NDalicPINVOKE.Actor_SetInheritPosition(swigCPtr, inherit);
2822             if (NDalicPINVOKE.SWIGPendingException.Pending)
2823                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2824         }
2825
2826         internal bool IsPositionInherited()
2827         {
2828             bool ret = NDalicPINVOKE.Actor_IsPositionInherited(swigCPtr);
2829             if (NDalicPINVOKE.SWIGPendingException.Pending)
2830                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2831             return ret;
2832         }
2833
2834         internal void SetOrientation(Degree angle, Vector3 axis)
2835         {
2836             NDalicPINVOKE.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2837             if (NDalicPINVOKE.SWIGPendingException.Pending)
2838                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2839         }
2840
2841         internal void SetOrientation(Radian angle, Vector3 axis)
2842         {
2843             NDalicPINVOKE.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2844             if (NDalicPINVOKE.SWIGPendingException.Pending)
2845                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2846         }
2847
2848         internal void SetOrientation(Rotation orientation)
2849         {
2850             NDalicPINVOKE.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
2851             if (NDalicPINVOKE.SWIGPendingException.Pending)
2852                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2853         }
2854
2855         internal void RotateBy(Degree angle, Vector3 axis)
2856         {
2857             NDalicPINVOKE.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2858             if (NDalicPINVOKE.SWIGPendingException.Pending)
2859                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2860         }
2861
2862         internal void RotateBy(Radian angle, Vector3 axis)
2863         {
2864             NDalicPINVOKE.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2865             if (NDalicPINVOKE.SWIGPendingException.Pending)
2866                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2867         }
2868
2869         internal void RotateBy(Rotation relativeRotation)
2870         {
2871             NDalicPINVOKE.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
2872             if (NDalicPINVOKE.SWIGPendingException.Pending)
2873                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2874         }
2875
2876         internal Rotation GetCurrentOrientation()
2877         {
2878             Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentOrientation(swigCPtr), true);
2879             if (NDalicPINVOKE.SWIGPendingException.Pending)
2880                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2881             return ret;
2882         }
2883
2884         internal void SetInheritOrientation(bool inherit)
2885         {
2886             NDalicPINVOKE.Actor_SetInheritOrientation(swigCPtr, inherit);
2887             if (NDalicPINVOKE.SWIGPendingException.Pending)
2888                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2889         }
2890
2891         internal bool IsOrientationInherited()
2892         {
2893             bool ret = NDalicPINVOKE.Actor_IsOrientationInherited(swigCPtr);
2894             if (NDalicPINVOKE.SWIGPendingException.Pending)
2895                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2896             return ret;
2897         }
2898
2899         internal Rotation GetCurrentWorldOrientation()
2900         {
2901             Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentWorldOrientation(swigCPtr), true);
2902             if (NDalicPINVOKE.SWIGPendingException.Pending)
2903                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2904             return ret;
2905         }
2906
2907         internal void SetScale(float scale)
2908         {
2909             NDalicPINVOKE.Actor_SetScale__SWIG_0(swigCPtr, scale);
2910             if (NDalicPINVOKE.SWIGPendingException.Pending)
2911                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2912         }
2913
2914         internal void SetScale(float scaleX, float scaleY, float scaleZ)
2915         {
2916             NDalicPINVOKE.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
2917             if (NDalicPINVOKE.SWIGPendingException.Pending)
2918                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2919         }
2920
2921         internal void SetScale(Vector3 scale)
2922         {
2923             NDalicPINVOKE.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
2924             if (NDalicPINVOKE.SWIGPendingException.Pending)
2925                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2926         }
2927
2928         internal void ScaleBy(Vector3 relativeScale)
2929         {
2930             NDalicPINVOKE.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
2931             if (NDalicPINVOKE.SWIGPendingException.Pending)
2932                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2933         }
2934
2935         internal Vector3 GetCurrentScale()
2936         {
2937             Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentScale(swigCPtr), true);
2938             if (NDalicPINVOKE.SWIGPendingException.Pending)
2939                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2940             return ret;
2941         }
2942
2943         internal Vector3 GetCurrentWorldScale()
2944         {
2945             Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldScale(swigCPtr), true);
2946             if (NDalicPINVOKE.SWIGPendingException.Pending)
2947                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2948             return ret;
2949         }
2950
2951         internal void SetInheritScale(bool inherit)
2952         {
2953             NDalicPINVOKE.Actor_SetInheritScale(swigCPtr, inherit);
2954             if (NDalicPINVOKE.SWIGPendingException.Pending)
2955                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2956         }
2957
2958         internal bool IsScaleInherited()
2959         {
2960             bool ret = NDalicPINVOKE.Actor_IsScaleInherited(swigCPtr);
2961             if (NDalicPINVOKE.SWIGPendingException.Pending)
2962                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2963             return ret;
2964         }
2965
2966         internal Matrix GetCurrentWorldMatrix()
2967         {
2968             Matrix ret = new Matrix(NDalicPINVOKE.Actor_GetCurrentWorldMatrix(swigCPtr), true);
2969             if (NDalicPINVOKE.SWIGPendingException.Pending)
2970                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2971             return ret;
2972         }
2973
2974         internal void SetVisible(bool visible)
2975         {
2976             NDalicPINVOKE.Actor_SetVisible(swigCPtr, visible);
2977             if (NDalicPINVOKE.SWIGPendingException.Pending)
2978                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2979         }
2980
2981         internal bool IsVisible()
2982         {
2983             bool ret = NDalicPINVOKE.Actor_IsVisible(swigCPtr);
2984             if (NDalicPINVOKE.SWIGPendingException.Pending)
2985                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2986             return ret;
2987         }
2988
2989         internal void SetOpacity(float opacity)
2990         {
2991             NDalicPINVOKE.Actor_SetOpacity(swigCPtr, opacity);
2992             if (NDalicPINVOKE.SWIGPendingException.Pending)
2993                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2994         }
2995
2996         internal float GetCurrentOpacity()
2997         {
2998             float ret = NDalicPINVOKE.Actor_GetCurrentOpacity(swigCPtr);
2999             if (NDalicPINVOKE.SWIGPendingException.Pending)
3000                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3001             return ret;
3002         }
3003
3004         internal void SetColor(Vector4 color)
3005         {
3006             NDalicPINVOKE.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
3007             if (NDalicPINVOKE.SWIGPendingException.Pending)
3008                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3009         }
3010
3011         internal Vector4 GetCurrentColor()
3012         {
3013             Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentColor(swigCPtr), true);
3014             if (NDalicPINVOKE.SWIGPendingException.Pending)
3015                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3016             return ret;
3017         }
3018
3019         internal void SetColorMode(ColorMode colorMode)
3020         {
3021             NDalicPINVOKE.Actor_SetColorMode(swigCPtr, (int)colorMode);
3022             if (NDalicPINVOKE.SWIGPendingException.Pending)
3023                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3024         }
3025
3026         internal ColorMode GetColorMode()
3027         {
3028             ColorMode ret = (ColorMode)NDalicPINVOKE.Actor_GetColorMode(swigCPtr);
3029             if (NDalicPINVOKE.SWIGPendingException.Pending)
3030                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3031             return ret;
3032         }
3033
3034         internal Vector4 GetCurrentWorldColor()
3035         {
3036             Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentWorldColor(swigCPtr), true);
3037             if (NDalicPINVOKE.SWIGPendingException.Pending)
3038                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3039             return ret;
3040         }
3041
3042         internal void SetDrawMode(DrawModeType drawMode)
3043         {
3044             NDalicPINVOKE.Actor_SetDrawMode(swigCPtr, (int)drawMode);
3045             if (NDalicPINVOKE.SWIGPendingException.Pending)
3046                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3047         }
3048
3049         internal DrawModeType GetDrawMode()
3050         {
3051             DrawModeType ret = (DrawModeType)NDalicPINVOKE.Actor_GetDrawMode(swigCPtr);
3052             if (NDalicPINVOKE.SWIGPendingException.Pending)
3053                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3054             return ret;
3055         }
3056
3057         /// <summary>
3058         /// Converts screen coordinates into the view's coordinate system using the default camera.
3059         /// </summary>
3060         /// <pre>The view has been initialized.</pre>
3061         /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5).</remarks>
3062         /// <param name="localX">On return, the X-coordinate relative to the view.</param>
3063         /// <param name="localY">On return, the Y-coordinate relative to the view.</param>
3064         /// <param name="screenX">The screen X-coordinate.</param>
3065         /// <param name="screenY">The screen Y-coordinate.</param>
3066         /// <returns>True if the conversion succeeded.</returns>
3067         /// <since_tizen> 3 </since_tizen>
3068         public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
3069         {
3070             bool ret = NDalicPINVOKE.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
3071             if (NDalicPINVOKE.SWIGPendingException.Pending)
3072                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3073             return ret;
3074         }
3075
3076         internal void SetKeyboardFocusable(bool focusable)
3077         {
3078             NDalicPINVOKE.Actor_SetKeyboardFocusable(swigCPtr, focusable);
3079             if (NDalicPINVOKE.SWIGPendingException.Pending)
3080                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3081         }
3082
3083         internal bool IsKeyboardFocusable()
3084         {
3085             bool ret = NDalicPINVOKE.Actor_IsKeyboardFocusable(swigCPtr);
3086             if (NDalicPINVOKE.SWIGPendingException.Pending)
3087                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3088             return ret;
3089         }
3090
3091         internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
3092         {
3093             NDalicPINVOKE.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
3094             if (NDalicPINVOKE.SWIGPendingException.Pending)
3095                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3096         }
3097
3098         internal ResizePolicyType GetResizePolicy(DimensionType dimension)
3099         {
3100             ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.Actor_GetResizePolicy(swigCPtr, (int)dimension);
3101             if (NDalicPINVOKE.SWIGPendingException.Pending)
3102                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3103             return ret;
3104         }
3105
3106         /// <summary>
3107         /// Sets the relative to parent size factor of the view.<br />
3108         /// This factor is only used when ResizePolicy is set to either:
3109         /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br />
3110         /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br />
3111         /// </summary>
3112         /// <pre>The view has been initialized.</pre>
3113         /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis.</param>
3114         /// <since_tizen> 3 </since_tizen>
3115         public void SetSizeModeFactor(Vector3 factor)
3116         {
3117             NDalicPINVOKE.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
3118             if (NDalicPINVOKE.SWIGPendingException.Pending)
3119                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3120         }
3121
3122         internal Vector3 GetSizeModeFactor()
3123         {
3124             Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetSizeModeFactor(swigCPtr), true);
3125             if (NDalicPINVOKE.SWIGPendingException.Pending)
3126                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3127             return ret;
3128         }
3129
3130         /// <summary>
3131         /// Calculates the height of the view given a width.<br />
3132         /// The natural size is used for default calculation.<br />
3133         /// Size 0 is treated as aspect ratio 1:1.<br />
3134         /// </summary>
3135         /// <param name="width">The width to use.</param>
3136         /// <returns>The height based on the width.</returns>
3137         /// <since_tizen> 3 </since_tizen>
3138         public float GetHeightForWidth(float width)
3139         {
3140             float ret = NDalicPINVOKE.Actor_GetHeightForWidth(swigCPtr, width);
3141             if (NDalicPINVOKE.SWIGPendingException.Pending)
3142                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3143             return ret;
3144         }
3145
3146         /// <summary>
3147         /// Calculates the width of the view given a height.<br />
3148         /// The natural size is used for default calculation.<br />
3149         /// Size 0 is treated as aspect ratio 1:1.<br />
3150         /// </summary>
3151         /// <param name="height">The height to use.</param>
3152         /// <returns>The width based on the height.</returns>
3153         /// <since_tizen> 3 </since_tizen>
3154         public float GetWidthForHeight(float height)
3155         {
3156             float ret = NDalicPINVOKE.Actor_GetWidthForHeight(swigCPtr, height);
3157             if (NDalicPINVOKE.SWIGPendingException.Pending)
3158                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3159             return ret;
3160         }
3161
3162         /// <summary>
3163         /// Return the amount of size allocated for relayout.
3164         /// </summary>
3165         /// <param name="dimension">The dimension to retrieve.</param>
3166         /// <returns>Return the size.</returns>
3167         /// <since_tizen> 3 </since_tizen>
3168         public float GetRelayoutSize(DimensionType dimension)
3169         {
3170             float ret = NDalicPINVOKE.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
3171             if (NDalicPINVOKE.SWIGPendingException.Pending)
3172                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3173             return ret;
3174         }
3175
3176         /// <summary>
3177         /// Set the padding for the view.
3178         /// </summary>
3179         /// <param name="padding">Padding for the view.</param>
3180         /// <since_tizen> 3 </since_tizen>
3181         public void SetPadding(PaddingType padding)
3182         {
3183             NDalicPINVOKE.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
3184             if (NDalicPINVOKE.SWIGPendingException.Pending)
3185                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3186         }
3187
3188         /// <summary>
3189         /// Return the value of padding for the view.
3190         /// </summary>
3191         /// <param name="paddingOut">the value of padding for the view</param>
3192         /// <since_tizen> 3 </since_tizen>
3193         public void GetPadding(PaddingType paddingOut)
3194         {
3195             NDalicPINVOKE.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
3196             if (NDalicPINVOKE.SWIGPendingException.Pending)
3197                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3198         }
3199
3200         internal void SetMinimumSize(Vector2 size)
3201         {
3202             NDalicPINVOKE.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
3203             if (NDalicPINVOKE.SWIGPendingException.Pending)
3204                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3205         }
3206
3207         internal Vector2 GetMinimumSize()
3208         {
3209             Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMinimumSize(swigCPtr), true);
3210             if (NDalicPINVOKE.SWIGPendingException.Pending)
3211                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3212             return ret;
3213         }
3214
3215         internal void SetMaximumSize(Vector2 size)
3216         {
3217             NDalicPINVOKE.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
3218             if (NDalicPINVOKE.SWIGPendingException.Pending)
3219                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3220         }
3221
3222         internal Vector2 GetMaximumSize()
3223         {
3224             Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMaximumSize(swigCPtr), true);
3225             if (NDalicPINVOKE.SWIGPendingException.Pending)
3226                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3227             return ret;
3228         }
3229
3230         internal int GetHierarchyDepth()
3231         {
3232             int ret = NDalicPINVOKE.Actor_GetHierarchyDepth(swigCPtr);
3233             if (NDalicPINVOKE.SWIGPendingException.Pending)
3234                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3235             return ret;
3236         }
3237
3238         /// <since_tizen> 3 </since_tizen>
3239         public uint AddRenderer(Renderer renderer)
3240         {
3241             uint ret = NDalicPINVOKE.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
3242             if (NDalicPINVOKE.SWIGPendingException.Pending)
3243                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3244             return ret;
3245         }
3246
3247         internal uint GetRendererCount()
3248         {
3249             uint ret = NDalicPINVOKE.Actor_GetRendererCount(swigCPtr);
3250             if (NDalicPINVOKE.SWIGPendingException.Pending)
3251                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3252             return ret;
3253         }
3254
3255         /// <since_tizen> 3 </since_tizen>
3256         public Renderer GetRendererAt(uint index)
3257         {
3258             //to fix memory leak issue, match the handle count with native side.
3259             IntPtr cPtr = NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index);
3260             HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3261             Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Renderer;
3262             NDalicPINVOKE.delete_BaseHandle(CPtr);
3263             CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3264
3265             if (NDalicPINVOKE.SWIGPendingException.Pending)
3266                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3267             return ret;
3268         }
3269
3270         /// <since_tizen> 3 </since_tizen>
3271         public void RemoveRenderer(Renderer renderer)
3272         {
3273             NDalicPINVOKE.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
3274             if (NDalicPINVOKE.SWIGPendingException.Pending)
3275                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3276         }
3277
3278         /// <since_tizen> 3 </since_tizen>
3279         public void RemoveRenderer(uint index)
3280         {
3281             NDalicPINVOKE.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
3282             if (NDalicPINVOKE.SWIGPendingException.Pending)
3283                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3284         }
3285
3286         internal TouchDataSignal TouchSignal()
3287         {
3288             TouchDataSignal ret = new TouchDataSignal(NDalicPINVOKE.Actor_TouchSignal(swigCPtr), false);
3289             if (NDalicPINVOKE.SWIGPendingException.Pending)
3290                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3291             return ret;
3292         }
3293
3294         internal HoverSignal HoveredSignal()
3295         {
3296             HoverSignal ret = new HoverSignal(NDalicPINVOKE.Actor_HoveredSignal(swigCPtr), false);
3297             if (NDalicPINVOKE.SWIGPendingException.Pending)
3298                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3299             return ret;
3300         }
3301
3302         internal WheelSignal WheelEventSignal()
3303         {
3304             WheelSignal ret = new WheelSignal(NDalicPINVOKE.Actor_WheelEventSignal(swigCPtr), false);
3305             if (NDalicPINVOKE.SWIGPendingException.Pending)
3306                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3307             return ret;
3308         }
3309
3310         internal ViewSignal OnWindowSignal()
3311         {
3312             ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnStageSignal(swigCPtr), false);
3313             if (NDalicPINVOKE.SWIGPendingException.Pending)
3314                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3315             return ret;
3316         }
3317
3318         internal ViewSignal OffWindowSignal()
3319         {
3320             ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OffStageSignal(swigCPtr), false);
3321             if (NDalicPINVOKE.SWIGPendingException.Pending)
3322                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3323             return ret;
3324         }
3325
3326         internal ViewSignal OnRelayoutSignal()
3327         {
3328             ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnRelayoutSignal(swigCPtr), false);
3329             if (NDalicPINVOKE.SWIGPendingException.Pending)
3330                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3331             return ret;
3332         }
3333
3334         internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view)
3335         {
3336             ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
3337             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3338             return ret;
3339         }
3340
3341
3342         internal ViewLayoutDirectionChangedSignal LayoutDirectionChangedSignal(View view)
3343         {
3344             ViewLayoutDirectionChangedSignal ret = new ViewLayoutDirectionChangedSignal(NDalicManualPINVOKE.LayoutDirectionChangedSignal(View.getCPtr(view)), false);
3345             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3346             return ret;
3347         }
3348
3349
3350         internal ViewSignal ResourcesLoadedSignal()
3351         {
3352             ViewSignal ret = new ViewSignal(NDalicPINVOKE.ResourceReadySignal(swigCPtr), false);
3353             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3354             return ret;
3355         }
3356
3357         /// <summary>
3358         /// Gets or sets the origin of a view within its parent's area.<br />
3359         /// This is expressed in unit coordinates, such that (0.0, 0.0, 0.5) is the top-left corner of the parent, and (1.0, 1.0, 0.5) is the bottom-right corner.<br />
3360         /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br />
3361         /// A view's position is the distance between this origin and the view's anchor-point.<br />
3362         /// </summary>
3363         /// <pre>The view has been initialized.</pre>
3364         /// <since_tizen> 3 </since_tizen>
3365         public Position ParentOrigin
3366         {
3367             get
3368             {
3369                 Position temp = new Position(0.0f, 0.0f, 0.0f);
3370                 GetProperty(View.Property.PARENT_ORIGIN).Get(temp);
3371                 return temp;
3372             }
3373             set
3374             {
3375                 SetProperty(View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue(value));
3376             }
3377         }
3378
3379         internal float ParentOriginX
3380         {
3381             get
3382             {
3383                 float temp = 0.0f;
3384                 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
3385                 return temp;
3386             }
3387             set
3388             {
3389                 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
3390             }
3391         }
3392
3393         internal float ParentOriginY
3394         {
3395             get
3396             {
3397                 float temp = 0.0f;
3398                 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
3399                 return temp;
3400             }
3401             set
3402             {
3403                 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
3404             }
3405         }
3406
3407         internal float ParentOriginZ
3408         {
3409             get
3410             {
3411                 float temp = 0.0f;
3412                 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
3413                 return temp;
3414             }
3415             set
3416             {
3417                 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
3418             }
3419         }
3420
3421         /// <summary>
3422         /// Gets or sets the anchor-point of a view.<br />
3423         /// This is expressed in unit coordinates, such that (0.0, 0.0, 0.5) is the top-left corner of the view, and (1.0, 1.0, 0.5) is the bottom-right corner.<br />
3424         /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br />
3425         /// A view position is the distance between its parent-origin and this anchor-point.<br />
3426         /// A view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br />
3427         /// <pre>The view has been initialized.</pre>
3428         /// </summary>
3429         /// <since_tizen> 3 </since_tizen>
3430         public Position PivotPoint
3431         {
3432             get
3433             {
3434                 Position temp = new Position(0.0f, 0.0f, 0.0f);
3435                 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
3436                 return temp;
3437             }
3438             set
3439             {
3440                 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3441             }
3442         }
3443
3444         internal float PivotPointX
3445         {
3446             get
3447             {
3448                 float temp = 0.0f;
3449                 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
3450                 return temp;
3451             }
3452             set
3453             {
3454                 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
3455             }
3456         }
3457
3458         internal float PivotPointY
3459         {
3460             get
3461             {
3462                 float temp = 0.0f;
3463                 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
3464                 return temp;
3465             }
3466             set
3467             {
3468                 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
3469             }
3470         }
3471
3472         internal float PivotPointZ
3473         {
3474             get
3475             {
3476                 float temp = 0.0f;
3477                 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
3478                 return temp;
3479             }
3480             set
3481             {
3482                 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
3483             }
3484         }
3485
3486         /// <summary>
3487         /// Gets or sets the size width of the view.
3488         /// </summary>
3489         /// <since_tizen> 3 </since_tizen>
3490         public float SizeWidth
3491         {
3492             get
3493             {
3494                 float temp = 0.0f;
3495                 GetProperty(View.Property.SIZE_WIDTH).Get(out temp);
3496                 return temp;
3497             }
3498             set
3499             {
3500                 SetProperty(View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue(value));
3501             }
3502         }
3503
3504         /// <summary>
3505         /// Gets or sets the size height of the view.
3506         /// </summary>
3507         /// <since_tizen> 3 </since_tizen>
3508         public float SizeHeight
3509         {
3510             get
3511             {
3512                 float temp = 0.0f;
3513                 GetProperty(View.Property.SIZE_HEIGHT).Get(out temp);
3514                 return temp;
3515             }
3516             set
3517             {
3518                 SetProperty(View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue(value));
3519             }
3520         }
3521
3522         /// <summary>
3523         /// Gets or sets the position of the view.<br />
3524         /// By default, sets the position vector between the parent origin and pivot point (default).<br />
3525         /// If the position inheritance is disabled, sets the world position.<br />
3526         /// </summary>
3527         /// <since_tizen> 3 </since_tizen>
3528         public Position Position
3529         {
3530             get
3531             {
3532                 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3533                 GetProperty(View.Property.POSITION).Get(temp);
3534                 return temp;
3535             }
3536             set
3537             {
3538                 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(value));
3539             }
3540         }
3541
3542         /// <summary>
3543         /// Gets or sets the position X of the view.
3544         /// </summary>
3545         /// <since_tizen> 3 </since_tizen>
3546         public float PositionX
3547         {
3548             get
3549             {
3550                 float temp = 0.0f;
3551                 GetProperty(View.Property.POSITION_X).Get(out temp);
3552                 return temp;
3553             }
3554             set
3555             {
3556                 SetProperty(View.Property.POSITION_X, new Tizen.NUI.PropertyValue(value));
3557             }
3558         }
3559
3560         /// <summary>
3561         /// Gets or sets the position Y of the view.
3562         /// </summary>
3563         /// <since_tizen> 3 </since_tizen>
3564         public float PositionY
3565         {
3566             get
3567             {
3568                 float temp = 0.0f;
3569                 GetProperty(View.Property.POSITION_Y).Get(out temp);
3570                 return temp;
3571             }
3572             set
3573             {
3574                 SetProperty(View.Property.POSITION_Y, new Tizen.NUI.PropertyValue(value));
3575             }
3576         }
3577
3578         /// <summary>
3579         /// Gets or sets the position Z of the view.
3580         /// </summary>
3581         /// <since_tizen> 3 </since_tizen>
3582         public float PositionZ
3583         {
3584             get
3585             {
3586                 float temp = 0.0f;
3587                 GetProperty(View.Property.POSITION_Z).Get(out temp);
3588                 return temp;
3589             }
3590             set
3591             {
3592                 SetProperty(View.Property.POSITION_Z, new Tizen.NUI.PropertyValue(value));
3593             }
3594         }
3595
3596         /// <summary>
3597         /// Gets or sets the world position of the view.
3598         /// </summary>
3599         /// <since_tizen> 3 </since_tizen>
3600         public Vector3 WorldPosition
3601         {
3602             get
3603             {
3604                 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3605                 GetProperty(View.Property.WORLD_POSITION).Get(temp);
3606                 return temp;
3607             }
3608         }
3609
3610         internal float WorldPositionX
3611         {
3612             get
3613             {
3614                 float temp = 0.0f;
3615                 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
3616                 return temp;
3617             }
3618         }
3619
3620         internal float WorldPositionY
3621         {
3622             get
3623             {
3624                 float temp = 0.0f;
3625                 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
3626                 return temp;
3627             }
3628         }
3629
3630         internal float WorldPositionZ
3631         {
3632             get
3633             {
3634                 float temp = 0.0f;
3635                 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
3636                 return temp;
3637             }
3638         }
3639
3640         /// <summary>
3641         /// Gets or sets the orientation of the view.<br />
3642         /// The view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br />
3643         /// </summary>
3644         /// <remarks>This is an asynchronous method.</remarks>
3645         /// <since_tizen> 3 </since_tizen>
3646         public Rotation Orientation
3647         {
3648             get
3649             {
3650                 Rotation temp = new Rotation();
3651                 GetProperty(View.Property.ORIENTATION).Get(temp);
3652                 return temp;
3653             }
3654             set
3655             {
3656                 SetProperty(View.Property.ORIENTATION, new Tizen.NUI.PropertyValue(value));
3657             }
3658         }
3659
3660         /// <summary>
3661         /// Gets or sets the world orientation of the view.<br />
3662         /// </summary>
3663         /// <since_tizen> 3 </since_tizen>
3664         public Rotation WorldOrientation
3665         {
3666             get
3667             {
3668                 Rotation temp = new Rotation();
3669                 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
3670                 return temp;
3671             }
3672         }
3673
3674         /// <summary>
3675         /// Gets or sets the scale factor applied to the view.<br />
3676         /// </summary>
3677         /// <since_tizen> 3 </since_tizen>
3678         public Vector3 Scale
3679         {
3680             get
3681             {
3682                 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3683                 GetProperty(View.Property.SCALE).Get(temp);
3684                 return temp;
3685             }
3686             set
3687             {
3688                 SetProperty(View.Property.SCALE, new Tizen.NUI.PropertyValue(value));
3689             }
3690         }
3691
3692         /// <summary>
3693         /// Gets or sets the scale X factor applied to the view.
3694         /// </summary>
3695         /// <since_tizen> 3 </since_tizen>
3696         public float ScaleX
3697         {
3698             get
3699             {
3700                 float temp = 0.0f;
3701                 GetProperty(View.Property.SCALE_X).Get(out temp);
3702                 return temp;
3703             }
3704             set
3705             {
3706                 SetProperty(View.Property.SCALE_X, new Tizen.NUI.PropertyValue(value));
3707             }
3708         }
3709
3710         /// <summary>
3711         /// Gets or sets the scale Y factor applied to the view.
3712         /// </summary>
3713         /// <since_tizen> 3 </since_tizen>
3714         public float ScaleY
3715         {
3716             get
3717             {
3718                 float temp = 0.0f;
3719                 GetProperty(View.Property.SCALE_Y).Get(out temp);
3720                 return temp;
3721             }
3722             set
3723             {
3724                 SetProperty(View.Property.SCALE_Y, new Tizen.NUI.PropertyValue(value));
3725             }
3726         }
3727
3728         /// <summary>
3729         /// Gets or sets the scale Z factor applied to the view.
3730         /// </summary>
3731         /// <since_tizen> 3 </since_tizen>
3732         public float ScaleZ
3733         {
3734             get
3735             {
3736                 float temp = 0.0f;
3737                 GetProperty(View.Property.SCALE_Z).Get(out temp);
3738                 return temp;
3739             }
3740             set
3741             {
3742                 SetProperty(View.Property.SCALE_Z, new Tizen.NUI.PropertyValue(value));
3743             }
3744         }
3745
3746         /// <summary>
3747         /// Gets the world scale of the view.
3748         /// </summary>
3749         /// <since_tizen> 3 </since_tizen>
3750         public Vector3 WorldScale
3751         {
3752             get
3753             {
3754                 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3755                 GetProperty(View.Property.WORLD_SCALE).Get(temp);
3756                 return temp;
3757             }
3758         }
3759
3760         /// <summary>
3761         /// Retrieves the visibility flag of the view.
3762         /// </summary>
3763         /// <remarks>
3764         /// If the view is not visible, then the view and its children will not be rendered.
3765         /// This is regardless of the individual visibility values of the children, i.e., the view will only be rendered if all of its parents have visibility set to true.
3766         /// </remarks>
3767         /// <since_tizen> 3 </since_tizen>
3768         public bool Visibility
3769         {
3770             get
3771             {
3772                 bool temp = false;
3773                 GetProperty(View.Property.VISIBLE).Get(out temp);
3774                 return temp;
3775             }
3776         }
3777
3778         /// <summary>
3779         /// Gets the view's world color.
3780         /// </summary>
3781         /// <since_tizen> 3 </since_tizen>
3782         public Vector4 WorldColor
3783         {
3784             get
3785             {
3786                 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3787                 GetProperty(View.Property.WORLD_COLOR).Get(temp);
3788                 return temp;
3789             }
3790         }
3791
3792         internal Matrix WorldMatrix
3793         {
3794             get
3795             {
3796                 Matrix temp = new Matrix();
3797                 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
3798                 return temp;
3799             }
3800         }
3801
3802         /// <summary>
3803         /// Gets or sets the view's name.
3804         /// </summary>
3805         /// <since_tizen> 3 </since_tizen>
3806         public string Name
3807         {
3808             get
3809             {
3810                 string temp;
3811                 GetProperty(View.Property.NAME).Get(out temp);
3812                 return temp;
3813             }
3814             set
3815             {
3816                 SetProperty(View.Property.NAME, new Tizen.NUI.PropertyValue(value));
3817             }
3818         }
3819
3820         /// <summary>
3821         /// Get the number of children held by the view.
3822         /// </summary>
3823         /// <since_tizen> 3 </since_tizen>
3824         public new uint ChildCount
3825         {
3826             get
3827             {
3828                 return GetChildCount();
3829             }
3830         }
3831
3832         /// <summary>
3833         /// Gets the view's ID.
3834         /// Readonly
3835         /// </summary>
3836         /// <since_tizen> 3 </since_tizen>
3837         public uint ID
3838         {
3839             get
3840             {
3841                 return GetId();
3842             }
3843         }
3844
3845         /// <summary>
3846         /// Gets or sets the status of whether the view should emit touch or hover signals.
3847         /// </summary>
3848         /// <since_tizen> 3 </since_tizen>
3849         public bool Sensitive
3850         {
3851             get
3852             {
3853                 bool temp = false;
3854                 GetProperty(View.Property.SENSITIVE).Get(out temp);
3855                 return temp;
3856             }
3857             set
3858             {
3859                 SetProperty(View.Property.SENSITIVE, new Tizen.NUI.PropertyValue(value));
3860             }
3861         }
3862
3863         /// <summary>
3864         /// Gets or sets the status of whether the view should receive a notification when touch or hover motion events leave the boundary of the view.
3865         /// </summary>
3866         /// <since_tizen> 3 </since_tizen>
3867         public bool LeaveRequired
3868         {
3869             get
3870             {
3871                 bool temp = false;
3872                 GetProperty(View.Property.LEAVE_REQUIRED).Get(out temp);
3873                 return temp;
3874             }
3875             set
3876             {
3877                 SetProperty(View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue(value));
3878             }
3879         }
3880
3881         /// <summary>
3882         /// Gets or sets the status of whether a child view inherits it's parent's orientation.
3883         /// </summary>
3884         /// <since_tizen> 3 </since_tizen>
3885         public bool InheritOrientation
3886         {
3887             get
3888             {
3889                 bool temp = false;
3890                 GetProperty(View.Property.INHERIT_ORIENTATION).Get(out temp);
3891                 return temp;
3892             }
3893             set
3894             {
3895                 SetProperty(View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue(value));
3896             }
3897         }
3898
3899         /// <summary>
3900         /// Gets or sets the status of whether a child view inherits it's parent's scale.
3901         /// </summary>
3902         /// <since_tizen> 3 </since_tizen>
3903         public bool InheritScale
3904         {
3905             get
3906             {
3907                 bool temp = false;
3908                 GetProperty(View.Property.INHERIT_SCALE).Get(out temp);
3909                 return temp;
3910             }
3911             set
3912             {
3913                 SetProperty(View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue(value));
3914             }
3915         }
3916
3917         /// <summary>
3918         /// Gets or sets the status of how the view and its children should be drawn.<br />
3919         /// Not all views are renderable, but DrawMode can be inherited from any view.<br />
3920         /// If an object is in a 3D layer, it will be depth-tested against other objects in the world, i.e., it may be obscured if other objects are in front.<br />
3921         /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br />
3922         /// Overlay views are drawn in a separate pass, after all non-overlay views within the layer.<br />
3923         /// For overlay views, the drawing order is with respect to tree levels of views, and depth-testing will not be used.<br />
3924         /// </summary>
3925         /// <since_tizen> 3 </since_tizen>
3926         public DrawModeType DrawMode
3927         {
3928             get
3929             {
3930                 string temp;
3931                 if (GetProperty(View.Property.DRAW_MODE).Get(out temp) == false)
3932                 {
3933                     NUILog.Error("DrawMode get error!");
3934                 }
3935                 switch (temp)
3936                 {
3937                     case "NORMAL":
3938                         return DrawModeType.Normal;
3939                     case "OVERLAY_2D":
3940                         return DrawModeType.Overlay2D;
3941                     case "STENCIL":
3942                         return DrawModeType.Stencil;
3943                     default:
3944                         return DrawModeType.Normal;
3945                 }
3946             }
3947             set
3948             {
3949                 SetProperty(View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)value));
3950             }
3951         }
3952
3953         /// <summary>
3954         /// Gets or sets the relative to parent size factor of the view.<br />
3955         /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br />
3956         /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br />
3957         /// </summary>
3958         /// <since_tizen> 3 </since_tizen>
3959         public Vector3 SizeModeFactor
3960         {
3961             get
3962             {
3963                 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3964                 GetProperty(View.Property.SIZE_MODE_FACTOR).Get(temp);
3965                 return temp;
3966             }
3967             set
3968             {
3969                 SetProperty(View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue(value));
3970             }
3971         }
3972
3973         /// <summary>
3974         /// Gets or sets the width resize policy to be used.
3975         /// </summary>
3976         /// <since_tizen> 3 </since_tizen>
3977         public ResizePolicyType WidthResizePolicy
3978         {
3979             get
3980             {
3981                 string temp;
3982                 if (GetProperty(View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
3983                 {
3984                     NUILog.Error("WidthResizePolicy get error!");
3985                 }
3986                 switch (temp)
3987                 {
3988                     case "FIXED":
3989                         return ResizePolicyType.Fixed;
3990                     case "USE_NATURAL_SIZE":
3991                         return ResizePolicyType.UseNaturalSize;
3992                     case "FILL_TO_PARENT":
3993                         return ResizePolicyType.FillToParent;
3994                     case "SIZE_RELATIVE_TO_PARENT":
3995                         return ResizePolicyType.SizeRelativeToParent;
3996                     case "SIZE_FIXED_OFFSET_FROM_PARENT":
3997                         return ResizePolicyType.SizeFixedOffsetFromParent;
3998                     case "FIT_TO_CHILDREN":
3999                         return ResizePolicyType.FitToChildren;
4000                     case "DIMENSION_DEPENDENCY":
4001                         return ResizePolicyType.DimensionDependency;
4002                     case "USE_ASSIGNED_SIZE":
4003                         return ResizePolicyType.UseAssignedSize;
4004                     default:
4005                         return ResizePolicyType.Fixed;
4006                 }
4007             }
4008             set
4009             {
4010                 SetProperty(View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
4011             }
4012         }
4013
4014         /// <summary>
4015         /// Gets or sets the height resize policy to be used.
4016         /// </summary>
4017         /// <since_tizen> 3 </since_tizen>
4018         public ResizePolicyType HeightResizePolicy
4019         {
4020             get
4021             {
4022                 string temp;
4023                 if (GetProperty(View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
4024                 {
4025                     NUILog.Error("HeightResizePolicy get error!");
4026                 }
4027                 switch (temp)
4028                 {
4029                     case "FIXED":
4030                         return ResizePolicyType.Fixed;
4031                     case "USE_NATURAL_SIZE":
4032                         return ResizePolicyType.UseNaturalSize;
4033                     case "FILL_TO_PARENT":
4034                         return ResizePolicyType.FillToParent;
4035                     case "SIZE_RELATIVE_TO_PARENT":
4036                         return ResizePolicyType.SizeRelativeToParent;
4037                     case "SIZE_FIXED_OFFSET_FROM_PARENT":
4038                         return ResizePolicyType.SizeFixedOffsetFromParent;
4039                     case "FIT_TO_CHILDREN":
4040                         return ResizePolicyType.FitToChildren;
4041                     case "DIMENSION_DEPENDENCY":
4042                         return ResizePolicyType.DimensionDependency;
4043                     case "USE_ASSIGNED_SIZE":
4044                         return ResizePolicyType.UseAssignedSize;
4045                     default:
4046                         return ResizePolicyType.Fixed;
4047                 }
4048             }
4049             set
4050             {
4051                 SetProperty(View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
4052             }
4053         }
4054
4055         /// <summary>
4056         /// Gets or sets the policy to use when setting size with size negotiation.<br />
4057         /// Defaults to SizeScalePolicyType.UseSizeSet.<br />
4058         /// </summary>
4059         /// <since_tizen> 3 </since_tizen>
4060         public SizeScalePolicyType SizeScalePolicy
4061         {
4062             get
4063             {
4064                 string temp;
4065                 if (GetProperty(View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
4066                 {
4067                     NUILog.Error("SizeScalePolicy get error!");
4068                 }
4069                 switch (temp)
4070                 {
4071                     case "USE_SIZE_SET":
4072                         return SizeScalePolicyType.UseSizeSet;
4073                     case "FIT_WITH_ASPECT_RATIO":
4074                         return SizeScalePolicyType.FitWithAspectRatio;
4075                     case "FILL_WITH_ASPECT_RATIO":
4076                         return SizeScalePolicyType.FillWithAspectRatio;
4077                     default:
4078                         return SizeScalePolicyType.UseSizeSet;
4079                 }
4080             }
4081             set
4082             {
4083                 string valueToString = "";
4084                 switch (value)
4085                 {
4086                     case SizeScalePolicyType.UseSizeSet:
4087                         {
4088                             valueToString = "USE_SIZE_SET";
4089                             break;
4090                         }
4091                     case SizeScalePolicyType.FitWithAspectRatio:
4092                         {
4093                             valueToString = "FIT_WITH_ASPECT_RATIO";
4094                             break;
4095                         }
4096                     case SizeScalePolicyType.FillWithAspectRatio:
4097                         {
4098                             valueToString = "FILL_WITH_ASPECT_RATIO";
4099                             break;
4100                         }
4101                     default:
4102                         {
4103                             valueToString = "USE_SIZE_SET";
4104                             break;
4105                         }
4106                 }
4107                 SetProperty(View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
4108             }
4109         }
4110
4111         /// <summary>
4112         ///  Gets or sets the status of whether the width size is dependent on the height size.
4113         /// </summary>
4114         /// <since_tizen> 3 </since_tizen>
4115         public bool WidthForHeight
4116         {
4117             get
4118             {
4119                 bool temp = false;
4120                 GetProperty(View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
4121                 return temp;
4122             }
4123             set
4124             {
4125                 SetProperty(View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue(value));
4126             }
4127         }
4128
4129         /// <summary>
4130         /// Gets or sets the status of whether the height size is dependent on the width size.
4131         /// </summary>
4132         /// <since_tizen> 3 </since_tizen>
4133         public bool HeightForWidth
4134         {
4135             get
4136             {
4137                 bool temp = false;
4138                 GetProperty(View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
4139                 return temp;
4140             }
4141             set
4142             {
4143                 SetProperty(View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue(value));
4144             }
4145         }
4146
4147         /// <summary>
4148         /// Gets or sets the padding for use in layout.
4149         /// </summary>
4150         /// <since_tizen> 5 </since_tizen>
4151         public Extents Padding
4152         {
4153             get
4154             {
4155                 Extents temp = new Extents(0, 0, 0, 0);
4156                 GetProperty(View.Property.PADDING).Get(temp);
4157                 return temp;
4158             }
4159             set
4160             {
4161                 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
4162             }
4163         }
4164
4165         /// <summary>
4166         /// Gets or sets the minimum size the view can be assigned in size negotiation.
4167         /// </summary>
4168         /// <since_tizen> 3 </since_tizen>
4169         public Size2D MinimumSize
4170         {
4171             get
4172             {
4173                 Size2D temp = new Size2D(0, 0);
4174                 GetProperty(View.Property.MINIMUM_SIZE).Get(temp);
4175                 return temp;
4176             }
4177             set
4178             {
4179                 SetProperty(View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
4180             }
4181         }
4182
4183         /// <summary>
4184         /// Gets or sets the maximum size the view can be assigned in size negotiation.
4185         /// </summary>
4186         /// <since_tizen> 3 </since_tizen>
4187         public Size2D MaximumSize
4188         {
4189             get
4190             {
4191                 Size2D temp = new Size2D(0, 0);
4192                 GetProperty(View.Property.MAXIMUM_SIZE).Get(temp);
4193                 return temp;
4194             }
4195             set
4196             {
4197                 SetProperty(View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
4198             }
4199         }
4200
4201         /// <summary>
4202         /// Gets or sets whether a child view inherits it's parent's position.<br />
4203         /// Default is to inherit.<br />
4204         /// Switching this off means that using position sets the view's world position, i.e., translates from the world origin (0,0,0) to the pivot point of the view.<br />
4205         /// </summary>
4206         /// <since_tizen> 3 </since_tizen>
4207         public bool InheritPosition
4208         {
4209             get
4210             {
4211                 bool temp = false;
4212                 GetProperty(View.Property.INHERIT_POSITION).Get(out temp);
4213                 return temp;
4214             }
4215             set
4216             {
4217                 SetProperty(View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue(value));
4218             }
4219         }
4220
4221         /// <summary>
4222         /// Gets or sets the clipping behavior (mode) of it's children.
4223         /// </summary>
4224         /// <since_tizen> 3 </since_tizen>
4225         public ClippingModeType ClippingMode
4226         {
4227             get
4228             {
4229                 string temp;
4230                 if (GetProperty(View.Property.CLIPPING_MODE).Get(out temp) == false)
4231                 {
4232                     NUILog.Error("ClippingMode get error!");
4233                 }
4234                 switch (temp)
4235                 {
4236                     case "DISABLED":
4237                         return ClippingModeType.Disabled;
4238                     case "CLIP_CHILDREN":
4239                         return ClippingModeType.ClipChildren;
4240                     case "CLIP_TO_BOUNDING_BOX":
4241                         return ClippingModeType.ClipToBoundingBox;
4242                     default:
4243                         return ClippingModeType.Disabled;
4244                 }
4245             }
4246             set
4247             {
4248                 SetProperty(View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)value));
4249             }
4250         }
4251
4252         /// <summary>
4253         /// Gets the number of renderers held by the view.
4254         /// </summary>
4255         /// <since_tizen> 3 </since_tizen>
4256         public uint RendererCount
4257         {
4258             get
4259             {
4260                 return GetRendererCount();
4261             }
4262         }
4263
4264         /// <summary>
4265         /// [Obsolete("Please do not use! this will be deprecated")]
4266         /// </summary>
4267         /// <since_tizen> 3 </since_tizen>
4268         /// Please do not use! this will be deprecated!
4269         /// Instead please use PivotPoint.
4270         [Obsolete("Please do not use! This will be deprecated! Please use PivotPoint instead! " +
4271             "Like: " +
4272             "View view = new View(); " +
4273             "view.PivotPoint = PivotPoint.Center; " +
4274             "view.PositionUsesPivotPoint = true;")]
4275         [EditorBrowsable(EditorBrowsableState.Never)]
4276         public Position AnchorPoint
4277         {
4278             get
4279             {
4280                 Position temp = new Position(0.0f, 0.0f, 0.0f);
4281                 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
4282                 return temp;
4283             }
4284             set
4285             {
4286                 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
4287             }
4288         }
4289
4290         /// <summary>
4291         /// [Obsolete("Please do not use! this will be deprecated")]
4292         /// </summary>
4293         /// <since_tizen> 3 </since_tizen>
4294         [Obsolete("Please do not use! This will be deprecated! Please use Size2D instead! " +
4295             "Like: " +
4296             "View view = new View(); " +
4297             "view.Size2D = new Size2D(100, 100);")]
4298         [EditorBrowsable(EditorBrowsableState.Never)]
4299         public Size Size
4300         {
4301             get
4302             {
4303                 Size temp = new Size(0.0f, 0.0f, 0.0f);
4304                 GetProperty(View.Property.SIZE).Get(temp);
4305                 return temp;
4306             }
4307             set
4308             {
4309                 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(value));
4310             }
4311         }
4312
4313         /// <summary>
4314         /// "Please DO NOT use! This will be deprecated! Please use 'Container GetParent() for derived class' instead!"
4315         /// </summary>
4316         /// <since_tizen> 3 </since_tizen>
4317         [Obsolete("Please do not use! This will be deprecated! Please use 'Container GetParent() for derived class' instead! " +
4318             "Like: " +
4319             "Container parent =  view.GetParent(); " +
4320             "View view = parent as View;")]
4321         [EditorBrowsable(EditorBrowsableState.Never)]
4322         public new View Parent
4323         {
4324             get
4325             {
4326                 View ret;
4327                 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
4328                 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4329                 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
4330
4331                 if (basehandle is Layer layer)
4332                 {
4333                     ret = new View(Layer.getCPtr(layer).Handle, false);
4334                     NUILog.Error("This Parent property is deprecated, shoud do not be used");
4335                 }
4336                 else
4337                 {
4338                     ret = basehandle as View;
4339                 }
4340
4341                 NDalicPINVOKE.delete_BaseHandle(CPtr);
4342                 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4343
4344                 if (NDalicPINVOKE.SWIGPendingException.Pending)
4345                     throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4346                 return ret;
4347             }
4348         }
4349
4350         /// <summary>
4351         /// Gets/Sets whether inherit parent's the layout Direction.
4352         /// </summary>
4353         /// <since_tizen> 4 </since_tizen>
4354         public bool InheritLayoutDirection
4355         {
4356             get
4357             {
4358                 bool temp = false;
4359                 GetProperty(View.Property.INHERIT_LAYOUT_DIRECTION).Get(out temp);
4360                 return temp;
4361             }
4362             set
4363             {
4364                 SetProperty(View.Property.INHERIT_LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue(value));
4365             }
4366         }
4367
4368         /// <summary>
4369         /// Gets/Sets the layout Direction.
4370         /// </summary>
4371         /// <since_tizen> 4 </since_tizen>
4372         public ViewLayoutDirectionType LayoutDirection
4373         {
4374             get
4375             {
4376                 int temp;
4377                 if (GetProperty(View.Property.LAYOUT_DIRECTION).Get(out temp) == false)
4378                 {
4379                     NUILog.Error("LAYOUT_DIRECTION get error!");
4380                 }
4381                 return (ViewLayoutDirectionType)temp;
4382             }
4383             set
4384             {
4385                 SetProperty(View.Property.LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((int)value));
4386             }
4387         }
4388
4389         /// <summary>
4390         /// Gets or sets the Margin for use in layout.
4391         /// </summary>
4392         /// <since_tizen> 4 </since_tizen>
4393         public Extents Margin
4394         {
4395             get
4396             {
4397                 Extents temp = new Extents(0, 0, 0, 0);
4398                 GetProperty(View.Property.MARGIN).Get(temp);
4399                 return temp;
4400             }
4401             set
4402             {
4403                 SetProperty(View.Property.MARGIN, new Tizen.NUI.PropertyValue(value));
4404             }
4405         }
4406
4407         /// <summary>
4408         /// [Obsolete("Please do not use! this will be deprecated")]
4409         /// </summary>
4410         /// Please do not use! this will be deprecated!
4411         /// Instead please use Padding.
4412         /// <since_tizen> 4 </since_tizen>
4413         [Obsolete("Please do not use! this will be deprecated, instead please use Padding.")]
4414         [EditorBrowsable(EditorBrowsableState.Never)]
4415         public Extents PaddingEX
4416         {
4417             get
4418             {
4419                 Extents temp = new Extents(0, 0, 0, 0);
4420                 GetProperty(View.Property.PADDING).Get(temp);
4421                 return temp;
4422             }
4423             set
4424             {
4425                 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
4426             }
4427         }
4428
4429         /// <summary>
4430         /// Perform an action on a visual registered to this view. <br />
4431         /// Visuals will have actions, this API is used to perform one of these actions with the given attributes.
4432         /// </summary>
4433         /// <param name="propertyIndexOfVisual">The Property index of the visual.</param>
4434         /// <param name="propertyIndexOfActionId">The action to perform.  See Visual to find supported actions.</param>
4435         /// <param name="attributes">Optional attributes for the action.</param>
4436         /// <since_tizen> 5 </since_tizen>
4437         public void DoAction(int propertyIndexOfVisual, int propertyIndexOfActionId, PropertyValue attributes)
4438         {
4439             NDalicManualPINVOKE.View_DoAction(swigCPtr, propertyIndexOfVisual, propertyIndexOfActionId, PropertyValue.getCPtr(attributes));
4440             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4441         }
4442
4443     }
4444
4445     /// <summary>
4446     /// The View layout Direction type.
4447     /// </summary>
4448     /// <since_tizen> 4 </since_tizen>
4449     public enum ViewLayoutDirectionType
4450     {
4451         /// <summary>
4452         /// Left to right.
4453         /// </summary>
4454         /// <since_tizen> 4 </since_tizen>
4455         LTR,
4456         /// <summary>
4457         /// Right to left.
4458         /// </summary>
4459         /// <since_tizen> 4 </since_tizen>
4460         RTL
4461     }
4462 }