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