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