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