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