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