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