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