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