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