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