1 /** Copyright (c) 2017 Samsung Electronics Co., Ltd.
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
7 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 namespace Tizen.NUI.BaseComponents
21 using System.Runtime.InteropServices;
24 /// View is the base class for all views.
26 public class View : Container
28 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
30 internal View(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.View_SWIGUpcast(cPtr), cMemoryOwn)
32 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
33 PositionUsesPivotPoint = false;
36 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
38 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
41 // From Container Base class
44 /// Adds a child view to this view.
46 /// <seealso cref="Container.Add">
48 /// <since_tizen> 4 </since_tizen>
49 public override void Add(View child)
51 NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
52 if (NDalicPINVOKE.SWIGPendingException.Pending)
53 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
57 /// Removes a child view from this View. If the view was not a child of this view, this is a no-op.
59 /// <seealso cref="Container.Remove">
61 /// <since_tizen> 4 </since_tizen>
62 public override void Remove(View child)
64 NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
65 if (NDalicPINVOKE.SWIGPendingException.Pending)
66 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
70 /// Retrieves a child view by index.
72 /// <seealso cref="Container.GetChildAt">
74 /// <since_tizen> 4 </since_tizen>
75 public override View GetChildAt(uint index)
77 IntPtr cPtr = NDalicPINVOKE.Actor_GetChildAt(swigCPtr, index);
79 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
81 if (NDalicPINVOKE.SWIGPendingException.Pending)
82 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
87 /// Retrieves the number of children held by the view.
89 /// <seealso cref="Container.GetChildCount">
91 protected override uint GetChildCount()
93 uint ret = NDalicPINVOKE.Actor_GetChildCount(swigCPtr);
94 if (NDalicPINVOKE.SWIGPendingException.Pending)
95 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
100 /// Gets the views parent.
102 /// <seealso cref="Container.GetParent()">
103 protected override Container GetParent()
106 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
108 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(cPtr);
110 if(basehandle is Layer)
112 ret = basehandle as Layer;
116 ret = basehandle as View;
119 if (NDalicPINVOKE.SWIGPendingException.Pending)
120 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
124 //This is temporal API. Currently Parent returns View but Container class has been introduced so 'View Parent' will be changed 'Container Parent' later soon, then this will be removed
125 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
126 public Container GetContainerParent()
128 return this.GetParent();
131 internal bool IsTopLevelView()
133 if(GetContainerParent() is Layer)
140 // you can override it to clean-up your own resources.
141 protected override void Dispose(DisposeTypes type)
148 if(type == DisposeTypes.Explicit)
151 //Release your own managed resources here.
152 //You should release all of your own disposable objects here.
155 //Release your own unmanaged resources here.
156 //You should not access any managed member here except static instance.
157 //because the execution order of Finalizes is non-deterministic.
159 DisConnectFromSignals();
161 if (swigCPtr.Handle != global::System.IntPtr.Zero)
166 NDalicPINVOKE.delete_View(swigCPtr);
168 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
174 private void DisConnectFromSignals()
176 // Save current CPtr.
177 global::System.Runtime.InteropServices.HandleRef currentCPtr = swigCPtr;
179 // Use BaseHandle CPtr as current might have been deleted already in derived classes.
180 swigCPtr = GetBaseHandleCPtrHandleRef;
182 if (_onRelayoutEventCallback != null)
184 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
187 if (_offWindowEventCallback != null)
189 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
192 if (_onWindowEventCallback != null)
194 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
197 if (_wheelEventCallback != null)
199 this.WheelEventSignal().Disconnect(_wheelEventCallback);
202 if (_hoverEventCallback != null)
204 this.HoveredSignal().Disconnect(_hoverEventCallback);
207 if (_touchDataCallback != null)
209 this.TouchSignal().Disconnect(_touchDataCallback);
212 if (_ResourcesLoadedCallback != null)
214 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
217 if (_offWindowEventCallback != null)
219 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
222 if (_onWindowEventCallback != null)
224 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
227 if (_wheelEventCallback != null)
229 this.WheelEventSignal().Disconnect(_wheelEventCallback);
232 if (_hoverEventCallback != null)
234 this.HoveredSignal().Disconnect(_hoverEventCallback);
237 if (_touchDataCallback != null)
239 this.TouchSignal().Disconnect(_touchDataCallback);
242 if (_onRelayoutEventCallback != null)
244 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
247 if (_keyCallback != null)
249 this.KeyEventSignal().Disconnect(_keyCallback);
252 if (_keyInputFocusLostCallback != null)
254 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
257 if (_keyInputFocusGainedCallback != null)
259 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
262 // BaseHandle CPtr is used in Registry and there is danger of deletion if we keep using it here.
263 // Restore current CPtr.
264 swigCPtr = currentCPtr;
267 private EventHandler _keyInputFocusGainedEventHandler;
268 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
269 private delegate void KeyInputFocusGainedCallbackType(IntPtr control);
270 private KeyInputFocusGainedCallbackType _keyInputFocusGainedCallback;
273 /// An event for the KeyInputFocusGained signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br>
274 /// The KeyInputFocusGained signal is emitted when the control gets the key input focus.<br>
276 /// <since_tizen> 3 </since_tizen>
277 public event EventHandler FocusGained
281 if (_keyInputFocusGainedEventHandler == null)
283 _keyInputFocusGainedCallback = OnKeyInputFocusGained;
284 this.KeyInputFocusGainedSignal().Connect(_keyInputFocusGainedCallback);
287 _keyInputFocusGainedEventHandler += value;
292 _keyInputFocusGainedEventHandler -= value;
294 if (_keyInputFocusGainedEventHandler == null && KeyInputFocusGainedSignal().Empty() == false)
296 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
301 private void OnKeyInputFocusGained(IntPtr view)
303 if (_keyInputFocusGainedEventHandler != null)
305 _keyInputFocusGainedEventHandler(this, null);
310 private EventHandler _keyInputFocusLostEventHandler;
311 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
312 private delegate void KeyInputFocusLostCallbackType(IntPtr control);
313 private KeyInputFocusLostCallbackType _keyInputFocusLostCallback;
316 /// An event for the KeyInputFocusLost signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br>
317 /// The KeyInputFocusLost signal is emitted when the control loses the key input focus.<br>
319 /// <since_tizen> 3 </since_tizen>
320 public event EventHandler FocusLost
324 if (_keyInputFocusLostEventHandler == null)
326 _keyInputFocusLostCallback = OnKeyInputFocusLost;
327 this.KeyInputFocusLostSignal().Connect(_keyInputFocusLostCallback);
330 _keyInputFocusLostEventHandler += value;
335 _keyInputFocusLostEventHandler -= value;
337 if (_keyInputFocusLostEventHandler == null && KeyInputFocusLostSignal().Empty() == false)
339 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
344 private void OnKeyInputFocusLost(IntPtr view)
346 if (_keyInputFocusLostEventHandler != null)
348 _keyInputFocusLostEventHandler(this, null);
353 /// Event arguments that passed via the KeyEvent signal.
355 public class KeyEventArgs : EventArgs
360 /// Key - is the key sent to the view.
362 /// <since_tizen> 3 </since_tizen>
376 private EventHandlerWithReturnType<object, KeyEventArgs, bool> _keyEventHandler;
377 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
378 private delegate bool KeyCallbackType(IntPtr control, IntPtr keyEvent);
379 private KeyCallbackType _keyCallback;
382 /// An event for the KeyPressed signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br>
383 /// The KeyPressed signal is emitted when the key event is received.<br>
385 /// <since_tizen> 4 </since_tizen>
386 public event EventHandlerWithReturnType<object, KeyEventArgs, bool> KeyEvent
390 if (_keyEventHandler == null)
392 _keyCallback = OnKeyEvent;
393 this.KeyEventSignal().Connect(_keyCallback);
396 _keyEventHandler += value;
401 _keyEventHandler -= value;
403 if (_keyEventHandler == null && KeyEventSignal().Empty() == false)
405 this.KeyEventSignal().Disconnect(_keyCallback);
410 private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
412 KeyEventArgs e = new KeyEventArgs();
416 e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
418 if (_keyEventHandler != null)
420 Delegate[] delegateList = _keyEventHandler.GetInvocationList();
422 // Oring the result of each callback.
423 foreach ( EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList )
425 result |= del( this, e );
432 private EventHandler _onRelayoutEventHandler;
433 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
434 private delegate void OnRelayoutEventCallbackType(IntPtr control);
435 private OnRelayoutEventCallbackType _onRelayoutEventCallback;
438 /// An event for the OnRelayout signal which can be used to subscribe or unsubscribe the event handler.<br>
439 /// The OnRelayout signal is emitted after the size has been set on the view during relayout.<br>
441 /// <since_tizen> 3 </since_tizen>
442 public event EventHandler Relayout
446 if (_onRelayoutEventHandler == null)
448 _onRelayoutEventCallback = OnRelayout;
449 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
452 _onRelayoutEventHandler += value;
457 _onRelayoutEventHandler -= value;
459 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
461 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
467 // Callback for View OnRelayout signal
468 private void OnRelayout(IntPtr data)
470 if (_onRelayoutEventHandler != null)
472 _onRelayoutEventHandler(this, null);
477 /// Event arguments that passed via the touch signal.
479 public class TouchEventArgs : EventArgs
481 private Touch _touch;
484 /// Touch - contains the information of touch points.
486 /// <since_tizen> 3 </since_tizen>
500 private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
501 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
502 private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
503 private TouchDataCallbackType _touchDataCallback;
506 /// An event for the touched signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br>
507 /// The touched signal is emitted when the touch input is received.<br>
509 /// <since_tizen> 4 </since_tizen>
510 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
514 if (_touchDataEventHandler == null)
516 _touchDataCallback = OnTouch;
517 this.TouchSignal().Connect(_touchDataCallback);
520 _touchDataEventHandler += value;
525 _touchDataEventHandler -= value;
527 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
529 this.TouchSignal().Disconnect(_touchDataCallback);
535 // Callback for View TouchSignal
536 private bool OnTouch(IntPtr view, IntPtr touchData)
538 TouchEventArgs e = new TouchEventArgs();
540 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
542 if (_touchDataEventHandler != null)
544 return _touchDataEventHandler(this, e);
551 /// Event arguments that passed via the hover signal.
553 public class HoverEventArgs : EventArgs
555 private Hover _hover;
558 /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
560 /// <since_tizen> 3 </since_tizen>
574 private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
575 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
576 private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
577 private HoverEventCallbackType _hoverEventCallback;
580 /// An event for the hovered signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br>
581 /// The hovered signal is emitted when the hover input is received.<br>
583 /// <since_tizen> 4 </since_tizen>
584 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
588 if (_hoverEventHandler == null)
590 _hoverEventCallback = OnHoverEvent;
591 this.HoveredSignal().Connect(_hoverEventCallback);
594 _hoverEventHandler += value;
599 _hoverEventHandler -= value;
601 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
603 this.HoveredSignal().Disconnect(_hoverEventCallback);
609 // Callback for View Hover signal
610 private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
612 HoverEventArgs e = new HoverEventArgs();
614 e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
616 if (_hoverEventHandler != null)
618 return _hoverEventHandler(this, e);
625 /// Event arguments that passed via the wheel signal.
627 public class WheelEventArgs : EventArgs
629 private Wheel _wheel;
632 /// WheelEvent - store a wheel rolling type: MOUSE_WHEEL or CUSTOM_WHEEL.
634 /// <since_tizen> 3 </since_tizen>
648 private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
649 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
650 private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
651 private WheelEventCallbackType _wheelEventCallback;
654 /// An event for the WheelMoved signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br>
655 /// The WheelMoved signal is emitted when the wheel event is received.<br>
657 /// <since_tizen> 4 </since_tizen>
658 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
662 if (_wheelEventHandler == null)
664 _wheelEventCallback = OnWheelEvent;
665 this.WheelEventSignal().Connect(_wheelEventCallback);
668 _wheelEventHandler += value;
673 _wheelEventHandler -= value;
675 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
677 this.WheelEventSignal().Disconnect(_wheelEventCallback);
683 // Callback for View Wheel signal
684 private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
686 WheelEventArgs e = new WheelEventArgs();
688 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
690 if (_wheelEventHandler != null)
692 return _wheelEventHandler(this, e);
698 private EventHandler _onWindowEventHandler;
699 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
700 private delegate void OnWindowEventCallbackType(IntPtr control);
701 private OnWindowEventCallbackType _onWindowEventCallback;
704 /// An event for the OnWindow signal which can be used to subscribe or unsubscribe the event handler.<br>
705 /// The OnWindow signal is emitted after the view has been connected to the window.<br>
707 /// <since_tizen> 3 </since_tizen>
708 public event EventHandler AddedToWindow
712 if (_onWindowEventHandler == null)
714 _onWindowEventCallback = OnWindow;
715 this.OnWindowSignal().Connect(_onWindowEventCallback);
718 _onWindowEventHandler += value;
723 _onWindowEventHandler -= value;
725 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
727 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
732 // Callback for View OnWindow signal
733 private void OnWindow(IntPtr data)
735 if (_onWindowEventHandler != null)
737 _onWindowEventHandler(this, null);
742 private EventHandler _offWindowEventHandler;
743 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
744 private delegate void OffWindowEventCallbackType(IntPtr control);
745 private OffWindowEventCallbackType _offWindowEventCallback;
748 /// An event for the OffWindow signal, which can be used to subscribe or unsubscribe the event handler.<br>
749 /// OffWindow signal is emitted after the view has been disconnected from the window.<br>
751 /// <since_tizen> 3 </since_tizen>
752 public event EventHandler RemovedFromWindow
756 if (_offWindowEventHandler == null)
758 _offWindowEventCallback = OffWindow;
759 this.OffWindowSignal().Connect(_offWindowEventCallback);
762 _offWindowEventHandler += value;
767 _offWindowEventHandler -= value;
769 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
771 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
776 // Callback for View OffWindow signal
777 private void OffWindow(IntPtr data)
779 if (_offWindowEventHandler != null)
781 _offWindowEventHandler(this, null);
786 /// Event arguments of visibility changed.
788 public class VisibilityChangedEventArgs : EventArgs
791 private bool _visibility;
792 private VisibilityChangeType _type;
795 /// The view, or child of view, whose visibility has changed.
797 /// <since_tizen> 3 </since_tizen>
811 /// Whether the view is now visible or not.
813 /// <since_tizen> 3 </since_tizen>
814 public bool Visibility
827 /// Whether the view's visible property has changed or a parent's.
829 /// <since_tizen> 3 </since_tizen>
830 public VisibilityChangeType Type
843 private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
844 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
845 private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
846 private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
849 /// An event for visibility change which can be used to subscribe or unsubscribe the event handler.<br>
850 /// This signal is emitted when the visible property of this or a parent view is changed.<br>
852 /// <since_tizen> 3 </since_tizen>
853 public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
857 if (_visibilityChangedEventHandler == null)
859 _visibilityChangedEventCallback = OnVisibilityChanged;
860 VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
863 _visibilityChangedEventHandler += value;
868 _visibilityChangedEventHandler -= value;
870 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
872 VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
877 // Callback for View visibility change signal
878 private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
880 VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
883 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
885 e.Visibility = visibility;
888 if (_visibilityChangedEventHandler != null)
890 _visibilityChangedEventHandler(this, e);
896 /// Event arguments of layout direction changed.
898 public class LayoutDirectionChangedEventArgs : EventArgs
901 private ViewLayoutDirectionType _type;
904 /// The view, or child of view, whose layout direction has changed.
906 /// <since_tizen> 4 </since_tizen>
920 /// Whether the view's layout direction property has changed or a parent's.
922 /// <since_tizen> 4 </since_tizen>
923 public ViewLayoutDirectionType Type
936 private EventHandler<LayoutDirectionChangedEventArgs> _layoutDirectionChangedEventHandler;
937 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
938 private delegate void LayoutDirectionChangedEventCallbackType(IntPtr data, ViewLayoutDirectionType type);
939 private LayoutDirectionChangedEventCallbackType _layoutDirectionChangedEventCallback;
942 /// Event for layout direction change which can be used to subscribe/unsubscribe the event handler.<br>
943 /// This signal is emitted when the layout direction property of this or a parent view is changed.<br>
945 /// <since_tizen> 4 </since_tizen>
946 public event EventHandler<LayoutDirectionChangedEventArgs> LayoutDirectionChanged
950 if (_layoutDirectionChangedEventHandler == null)
952 _layoutDirectionChangedEventCallback = OnLayoutDirectionChanged;
953 LayoutDirectionChangedSignal(this).Connect(_layoutDirectionChangedEventCallback);
956 _layoutDirectionChangedEventHandler += value;
961 _layoutDirectionChangedEventHandler -= value;
963 if (_layoutDirectionChangedEventHandler == null && LayoutDirectionChangedSignal(this).Empty() == false)
965 LayoutDirectionChangedSignal(this).Disconnect(_layoutDirectionChangedEventCallback);
970 // Callback for View layout direction change signal
971 private void OnLayoutDirectionChanged(IntPtr data, ViewLayoutDirectionType type)
973 LayoutDirectionChangedEventArgs e = new LayoutDirectionChangedEventArgs();
976 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
980 if (_layoutDirectionChangedEventHandler != null)
982 _layoutDirectionChangedEventHandler(this, e);
992 // Resource Ready Signal
994 private EventHandler _resourcesLoadedEventHandler;
995 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
996 private delegate void ResourcesLoadedCallbackType(IntPtr control);
997 private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
1000 /// An event for the ResourcesLoadedSignal signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br>
1001 /// This signal is emitted after all resources required by a view are loaded and ready.<br>
1003 /// <since_tizen> 4 </since_tizen>
1004 public event EventHandler ResourcesLoaded
1008 if (_resourcesLoadedEventHandler == null)
1010 _ResourcesLoadedCallback = OnResourcesLoaded;
1011 this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
1014 _resourcesLoadedEventHandler += value;
1019 _resourcesLoadedEventHandler -= value;
1021 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
1023 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
1028 private void OnResourcesLoaded(IntPtr view)
1030 if (_resourcesLoadedEventHandler != null)
1032 _resourcesLoadedEventHandler(this, null);
1036 internal IntPtr GetPtrfromView()
1038 return (IntPtr)swigCPtr;
1041 internal class Property
1043 internal static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get();
1044 internal static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get();
1045 internal static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get();
1046 internal static readonly int LEFT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
1047 internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
1048 internal static readonly int UP_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
1049 internal static readonly int DOWN_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
1050 internal static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get();
1051 internal static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get();
1052 internal static readonly int SIBLING_ORDER = NDalicManualPINVOKE.Actor_Property_SIBLING_ORDER_get();
1053 internal static readonly int OPACITY = NDalicManualPINVOKE.Actor_Property_OPACITY_get();
1054 internal static readonly int SCREEN_POSITION = NDalicManualPINVOKE.Actor_Property_SCREEN_POSITION_get();
1055 internal static readonly int POSITION_USES_ANCHOR_POINT = NDalicManualPINVOKE.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
1056 internal static readonly int PARENT_ORIGIN = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_get();
1057 internal static readonly int PARENT_ORIGIN_X = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_X_get();
1058 internal static readonly int PARENT_ORIGIN_Y = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Y_get();
1059 internal static readonly int PARENT_ORIGIN_Z = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Z_get();
1060 internal static readonly int ANCHOR_POINT = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_get();
1061 internal static readonly int ANCHOR_POINT_X = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_X_get();
1062 internal static readonly int ANCHOR_POINT_Y = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Y_get();
1063 internal static readonly int ANCHOR_POINT_Z = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Z_get();
1064 internal static readonly int SIZE = NDalicPINVOKE.Actor_Property_SIZE_get();
1065 internal static readonly int SIZE_WIDTH = NDalicPINVOKE.Actor_Property_SIZE_WIDTH_get();
1066 internal static readonly int SIZE_HEIGHT = NDalicPINVOKE.Actor_Property_SIZE_HEIGHT_get();
1067 internal static readonly int SIZE_DEPTH = NDalicPINVOKE.Actor_Property_SIZE_DEPTH_get();
1068 internal static readonly int POSITION = NDalicPINVOKE.Actor_Property_POSITION_get();
1069 internal static readonly int POSITION_X = NDalicPINVOKE.Actor_Property_POSITION_X_get();
1070 internal static readonly int POSITION_Y = NDalicPINVOKE.Actor_Property_POSITION_Y_get();
1071 internal static readonly int POSITION_Z = NDalicPINVOKE.Actor_Property_POSITION_Z_get();
1072 internal static readonly int WORLD_POSITION = NDalicPINVOKE.Actor_Property_WORLD_POSITION_get();
1073 internal static readonly int WORLD_POSITION_X = NDalicPINVOKE.Actor_Property_WORLD_POSITION_X_get();
1074 internal static readonly int WORLD_POSITION_Y = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Y_get();
1075 internal static readonly int WORLD_POSITION_Z = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Z_get();
1076 internal static readonly int ORIENTATION = NDalicPINVOKE.Actor_Property_ORIENTATION_get();
1077 internal static readonly int WORLD_ORIENTATION = NDalicPINVOKE.Actor_Property_WORLD_ORIENTATION_get();
1078 internal static readonly int SCALE = NDalicPINVOKE.Actor_Property_SCALE_get();
1079 internal static readonly int SCALE_X = NDalicPINVOKE.Actor_Property_SCALE_X_get();
1080 internal static readonly int SCALE_Y = NDalicPINVOKE.Actor_Property_SCALE_Y_get();
1081 internal static readonly int SCALE_Z = NDalicPINVOKE.Actor_Property_SCALE_Z_get();
1082 internal static readonly int WORLD_SCALE = NDalicPINVOKE.Actor_Property_WORLD_SCALE_get();
1083 internal static readonly int VISIBLE = NDalicPINVOKE.Actor_Property_VISIBLE_get();
1084 internal static readonly int WORLD_COLOR = NDalicPINVOKE.Actor_Property_WORLD_COLOR_get();
1085 internal static readonly int WORLD_MATRIX = NDalicPINVOKE.Actor_Property_WORLD_MATRIX_get();
1086 internal static readonly int NAME = NDalicPINVOKE.Actor_Property_NAME_get();
1087 internal static readonly int SENSITIVE = NDalicPINVOKE.Actor_Property_SENSITIVE_get();
1088 internal static readonly int LEAVE_REQUIRED = NDalicPINVOKE.Actor_Property_LEAVE_REQUIRED_get();
1089 internal static readonly int INHERIT_ORIENTATION = NDalicPINVOKE.Actor_Property_INHERIT_ORIENTATION_get();
1090 internal static readonly int INHERIT_SCALE = NDalicPINVOKE.Actor_Property_INHERIT_SCALE_get();
1091 internal static readonly int DRAW_MODE = NDalicPINVOKE.Actor_Property_DRAW_MODE_get();
1092 internal static readonly int SIZE_MODE_FACTOR = NDalicPINVOKE.Actor_Property_SIZE_MODE_FACTOR_get();
1093 internal static readonly int WIDTH_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_WIDTH_RESIZE_POLICY_get();
1094 internal static readonly int HEIGHT_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_HEIGHT_RESIZE_POLICY_get();
1095 internal static readonly int SIZE_SCALE_POLICY = NDalicPINVOKE.Actor_Property_SIZE_SCALE_POLICY_get();
1096 internal static readonly int WIDTH_FOR_HEIGHT = NDalicPINVOKE.Actor_Property_WIDTH_FOR_HEIGHT_get();
1097 internal static readonly int HEIGHT_FOR_WIDTH = NDalicPINVOKE.Actor_Property_HEIGHT_FOR_WIDTH_get();
1098 internal static readonly int PADDING = NDalicPINVOKE.Actor_Property_PADDING_get();
1099 internal static readonly int MINIMUM_SIZE = NDalicPINVOKE.Actor_Property_MINIMUM_SIZE_get();
1100 internal static readonly int MAXIMUM_SIZE = NDalicPINVOKE.Actor_Property_MAXIMUM_SIZE_get();
1101 internal static readonly int INHERIT_POSITION = NDalicPINVOKE.Actor_Property_INHERIT_POSITION_get();
1102 internal static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
1103 internal static readonly int INHERIT_LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_INHERIT_LAYOUT_DIRECTION_get();
1104 internal static readonly int LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_LAYOUT_DIRECTION_get();
1108 /// Describes the direction to move the focus towards.
1110 /// <since_tizen> 3 </since_tizen>
1111 public enum FocusDirection
1122 /// Creates a new instance of a view.
1124 /// <since_tizen> 3 </since_tizen>
1125 public View() : this(NDalicPINVOKE.View_New(), true)
1127 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1130 internal View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true)
1132 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1136 /// Downcasts a handle to view handle.<br>
1137 /// If handle points to a view, the downcast produces a valid handle.<br>
1138 /// If not, the returned handle is left uninitialized.<br>
1140 /// <param name="handle">A handle to an object.</param>
1141 /// <returns>A handle to a view or an uninitialized handle.</returns>
1142 [Obsolete("Please do not use! this will be deprecated, instead please use as keyword.")]
1143 public static View DownCast(BaseHandle handle)
1145 View ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as View;
1146 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1150 [Obsolete("Please do not use! this will be deprecated, instead please use as keyword.")]
1151 public static T DownCast<T>(View view) where T : View
1153 T ret = Registry.GetManagedBaseHandleFromNativePtr(view) as T;
1161 private View ConvertIdToView(uint id)
1167 View parentView = Parent as View;
1168 view = parentView.FindChildById(id);
1173 view = Window.Instance.GetRootLayer().FindChildById(id);
1179 internal void SetKeyInputFocus()
1181 NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
1182 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1186 /// Queries whether the view has a focus.
1188 /// <returns>True if this view has a focus.</returns>
1189 /// <since_tizen> 3 </since_tizen>
1190 public bool HasFocus()
1192 bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
1193 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1197 internal void ClearKeyInputFocus()
1199 NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
1200 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1203 internal PinchGestureDetector GetPinchGestureDetector()
1205 PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
1206 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1210 internal PanGestureDetector GetPanGestureDetector()
1212 PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
1213 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1217 internal TapGestureDetector GetTapGestureDetector()
1219 TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
1220 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1224 internal LongPressGestureDetector GetLongPressGestureDetector()
1226 LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
1227 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1232 /// Sets the name of the style to be applied to the view.
1234 /// <param name="styleName">A string matching a style described in a stylesheet.</param>
1235 /// <since_tizen> 3 </since_tizen>
1236 public void SetStyleName(string styleName)
1238 NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
1239 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1243 /// Retrieves the name of the style to be applied to the view (if any).
1245 /// <returns>A string matching a style, or an empty string.</returns>
1246 /// <since_tizen> 3 </since_tizen>
1247 public string GetStyleName()
1249 string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
1250 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1254 internal void SetBackgroundColor(Vector4 color)
1256 NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
1257 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1260 internal Vector4 GetBackgroundColor()
1262 Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
1263 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1267 internal void SetBackgroundImage(Image image)
1269 NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
1270 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1274 /// Clears the background.
1276 /// <since_tizen> 3 </since_tizen>
1277 public void ClearBackground()
1279 NDalicPINVOKE.View_ClearBackground(swigCPtr);
1280 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1283 internal ControlKeySignal KeyEventSignal()
1285 ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
1286 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1290 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
1292 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
1293 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1297 internal KeyInputFocusSignal KeyInputFocusLostSignal()
1299 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
1300 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1304 internal View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
1306 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1309 internal enum PropertyRange
1311 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
1312 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
1313 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
1317 /// The StyleName, type string.
1319 /// <since_tizen> 3 </since_tizen>
1320 public string StyleName
1325 GetProperty(View.Property.STYLE_NAME).Get(out temp);
1330 SetProperty(View.Property.STYLE_NAME, new Tizen.NUI.PropertyValue(value));
1335 /// The mutually exclusive with BACKGROUND_IMAGE & BACKGROUND type Vector4.
1337 /// <since_tizen> 3 </since_tizen>
1338 public Color BackgroundColor
1342 Color backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1344 Tizen.NUI.PropertyMap background = Background;
1346 background.Find(Visual.Property.Type)?.Get(out visualType);
1347 if (visualType == (int)Visual.Type.Color)
1349 background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor);
1352 return backgroundColor;
1356 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1361 /// Creates an animation to animate the background color visual. If there is no
1362 /// background visual, creates one with transparent black as it's mixColor.
1364 /// <since_tizen> 4 </since_tizen>
1365 public Animation AnimateBackgroundColor( object destinationValue,
1368 AlphaFunction.BuiltinFunctions? alphaFunction = null,
1369 object initialValue = null)
1371 Tizen.NUI.PropertyMap background = Background;
1373 if( background.Empty() )
1375 // If there is no background yet, ensure there is a transparent
1377 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1378 background = Background;
1380 return AnimateColor( "background", destinationValue, startTime, endTime, alphaFunction, initialValue );
1384 /// Creates an animation to animate the mixColor of the named visual.
1386 /// <since_tizen> 4 </since_tizen>
1387 public Animation AnimateColor( string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null )
1389 Animation animation = null;
1391 PropertyMap _animator = new PropertyMap();
1392 if( alphaFunction != null )
1394 _animator.Add("alphaFunction", new PropertyValue( AlphaFunction.BuiltinToPropertyKey(alphaFunction) ) );
1397 PropertyMap _timePeriod = new PropertyMap();
1398 _timePeriod.Add( "duration", new PropertyValue((endTime-startTime)/1000.0f) );
1399 _timePeriod.Add( "delay", new PropertyValue( startTime/1000.0f ) );
1400 _animator.Add( "timePeriod", new PropertyValue( _timePeriod ) );
1402 PropertyMap _transition = new PropertyMap();
1403 _transition.Add( "animator", new PropertyValue( _animator ) );
1404 _transition.Add( "target", new PropertyValue( targetVisual ) );
1405 _transition.Add( "property", new PropertyValue( "mixColor" ) );
1407 if( initialColor != null )
1409 PropertyValue initValue = PropertyValue.CreateFromObject( initialColor );
1410 _transition.Add( "initialValue", initValue );
1413 PropertyValue destValue = PropertyValue.CreateFromObject( destinationColor );
1414 _transition.Add( "targetValue", destValue );
1415 TransitionData _transitionData = new TransitionData( _transition );
1417 animation = new Animation( NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true );
1418 if (NDalicPINVOKE.SWIGPendingException.Pending)
1419 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1425 /// The mutually exclusive with BACKGROUND_COLOR & BACKGROUND type Map.
1427 /// <since_tizen> 3 </since_tizen>
1428 public string BackgroundImage
1432 string backgroundImage = "";
1434 Tizen.NUI.PropertyMap background = Background;
1436 background.Find(Visual.Property.Type)?.Get(out visualType);
1437 if (visualType == (int)Visual.Type.Image)
1439 background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
1442 return backgroundImage;
1446 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1450 public Tizen.NUI.PropertyMap Background
1454 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1455 GetProperty( View.Property.BACKGROUND ).Get(temp);
1460 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1466 /// The current state of the view.
1468 /// <since_tizen> 3 </since_tizen>
1474 if (GetProperty(View.Property.STATE).Get(out temp) == false)
1476 NUILog.Error("State get error!");
1482 return States.Normal;
1486 return States.Focused;
1490 return States.Disabled;
1494 return States.Normal;
1500 SetProperty(View.Property.STATE, new Tizen.NUI.PropertyValue((int)value));
1505 /// The current sub state of the view.
1507 /// <since_tizen> 3 </since_tizen>
1508 public States SubState
1513 if (GetProperty(View.Property.SUB_STATE).Get(out temp) == false)
1515 NUILog.Error("subState get error!");
1520 return States.Normal;
1522 return States.Focused;
1524 return States.Disabled;
1526 return States.Normal;
1531 string valueToString = "";
1536 valueToString = "NORMAL";
1539 case States.Focused:
1541 valueToString = "FOCUSED";
1544 case States.Disabled:
1546 valueToString = "DISABLED";
1551 valueToString = "NORMAL";
1555 SetProperty(View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
1560 /// Displays a tooltip
1562 /// <since_tizen> 3 </since_tizen>
1563 public Tizen.NUI.PropertyMap Tooltip
1567 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1568 GetProperty(View.Property.TOOLTIP).Get(temp);
1573 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1578 /// Displays a tooltip as a text.
1580 /// <since_tizen> 3 </since_tizen>
1581 public string TooltipText
1585 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1589 private int LeftFocusableViewId
1594 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
1599 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1603 private int RightFocusableViewId
1608 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
1613 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1617 private int UpFocusableViewId
1622 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
1627 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1631 private int DownFocusableViewId
1636 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
1641 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1646 /// The Child property of FlexContainer.<br>
1647 /// The proportion of the free space in the container, the flex item will receive.<br>
1648 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br>
1650 /// <since_tizen> 3 </since_tizen>
1656 GetProperty(FlexContainer.ChildProperty.FLEX).Get(out temp);
1661 SetProperty(FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue(value));
1666 /// The Child property of FlexContainer.<br>
1667 /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br>
1669 /// <since_tizen> 3 </since_tizen>
1670 public int AlignSelf
1675 GetProperty(FlexContainer.ChildProperty.ALIGN_SELF).Get(out temp);
1680 SetProperty(FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue(value));
1685 /// The Child property of FlexContainer.<br>
1686 /// The space around the flex item.<br>
1688 /// <since_tizen> 3 </since_tizen>
1689 public Vector4 FlexMargin
1693 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1694 GetProperty(FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
1699 SetProperty(FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue(value));
1704 /// The top-left cell this child occupies, if not set, the first available cell is used.
1706 /// <since_tizen> 3 </since_tizen>
1707 public Vector2 CellIndex
1711 Vector2 temp = new Vector2(0.0f, 0.0f);
1712 GetProperty(TableView.ChildProperty.CELL_INDEX).Get(temp);
1717 SetProperty(TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue(value));
1722 /// The number of rows this child occupies, if not set, the default value is 1.
1724 /// <since_tizen> 3 </since_tizen>
1725 public float RowSpan
1730 GetProperty(TableView.ChildProperty.ROW_SPAN).Get(out temp);
1735 SetProperty(TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue(value));
1740 /// The number of columns this child occupies, if not set, the default value is 1.
1742 /// <since_tizen> 3 </since_tizen>
1743 public float ColumnSpan
1748 GetProperty(TableView.ChildProperty.COLUMN_SPAN).Get(out temp);
1753 SetProperty(TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue(value));
1758 /// The horizontal alignment of this child inside the cells, if not set, the default value is 'left'.
1760 /// <since_tizen> 3 </since_tizen>
1761 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
1766 if (GetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
1768 NUILog.Error("CellHorizontalAlignment get error!");
1774 return Tizen.NUI.HorizontalAlignmentType.Left;
1776 return Tizen.NUI.HorizontalAlignmentType.Center;
1778 return Tizen.NUI.HorizontalAlignmentType.Right;
1780 return Tizen.NUI.HorizontalAlignmentType.Left;
1785 string valueToString = "";
1788 case Tizen.NUI.HorizontalAlignmentType.Left:
1790 valueToString = "left";
1793 case Tizen.NUI.HorizontalAlignmentType.Center:
1795 valueToString = "center";
1798 case Tizen.NUI.HorizontalAlignmentType.Right:
1800 valueToString = "right";
1805 valueToString = "left";
1809 SetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1814 /// The vertical alignment of this child inside the cells, if not set, the default value is 'top'.
1816 /// <since_tizen> 3 </since_tizen>
1817 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
1822 GetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
1824 NUILog.Error("CellVerticalAlignment get error!");
1830 return Tizen.NUI.VerticalAlignmentType.Top;
1832 return Tizen.NUI.VerticalAlignmentType.Center;
1834 return Tizen.NUI.VerticalAlignmentType.Bottom;
1836 return Tizen.NUI.VerticalAlignmentType.Top;
1841 string valueToString = "";
1844 case Tizen.NUI.VerticalAlignmentType.Top:
1846 valueToString = "top";
1849 case Tizen.NUI.VerticalAlignmentType.Center:
1851 valueToString = "center";
1854 case Tizen.NUI.VerticalAlignmentType.Bottom:
1856 valueToString = "bottom";
1861 valueToString = "top";
1865 SetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1870 /// The left focusable view.<br>
1871 /// This will return null if not set.<br>
1872 /// This will also return null if the specified left focusable view is not on a window.<br>
1874 /// <since_tizen> 3 </since_tizen>
1875 public View LeftFocusableView
1877 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1880 if (LeftFocusableViewId >= 0)
1882 return ConvertIdToView((uint)LeftFocusableViewId);
1888 LeftFocusableViewId = (int)value.GetId();
1893 /// The right focusable view.<br>
1894 /// This will return null if not set.<br>
1895 /// This will also return null if the specified right focusable view is not on a window.<br>
1897 /// <since_tizen> 3 </since_tizen>
1898 public View RightFocusableView
1900 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1903 if (RightFocusableViewId >= 0)
1905 return ConvertIdToView((uint)RightFocusableViewId);
1911 RightFocusableViewId = (int)value.GetId();
1916 /// The up focusable view.<br>
1917 /// This will return null if not set.<br>
1918 /// This will also return null if the specified up focusable view is not on a window.<br>
1920 /// <since_tizen> 3 </since_tizen>
1921 public View UpFocusableView
1923 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1926 if (UpFocusableViewId >= 0)
1928 return ConvertIdToView((uint)UpFocusableViewId);
1934 UpFocusableViewId = (int)value.GetId();
1939 /// The down focusable view.<br>
1940 /// This will return null if not set.<br>
1941 /// This will also return null if the specified down focusable view is not on a window.<br>
1943 /// <since_tizen> 3 </since_tizen>
1944 public View DownFocusableView
1946 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1949 if (DownFocusableViewId >= 0)
1951 return ConvertIdToView((uint)DownFocusableViewId);
1957 DownFocusableViewId = (int)value.GetId();
1962 /// Whether the view should be focusable by keyboard navigation.
1964 /// <since_tizen> 3 </since_tizen>
1965 public bool Focusable
1969 SetKeyboardFocusable(value);
1973 return IsKeyboardFocusable();
1978 /// Enumeration for describing the states of the view.
1980 /// <since_tizen> 3 </since_tizen>
1984 /// The normal state.
1988 /// The focused state.
1992 /// The disabled state.
1998 /// Retrieves the position of the view.<br>
1999 /// The coordinates are relative to the view's parent.<br>
2001 /// <since_tizen> 3 </since_tizen>
2002 public Position CurrentPosition
2006 return GetCurrentPosition();
2011 /// Sets the size of a view for the width and the height.<br>
2012 /// Geometry can be scaled to fit within this area.<br>
2013 /// This does not interfere with the view's scale factor.<br>
2014 /// The views default depth is the minimum of width and height.<br>
2016 /// <since_tizen> 3 </since_tizen>
2017 public Size2D Size2D
2021 Size temp = new Size(0.0f, 0.0f, 0.0f);
2022 GetProperty(View.Property.SIZE).Get(temp);
2023 Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
2028 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(new Size(value)));
2033 /// Retrieves the size of the view.<br>
2034 /// The coordinates are relative to the view's parent.<br>
2036 /// <since_tizen> 3 </since_tizen>
2037 public Size2D CurrentSize
2041 return GetCurrentSize();
2045 [Obsolete("Please do not use! this will be deprecated. Please use Visibility instead.")]
2055 /// Retrieves and sets the view's opacity.<br>
2057 /// <since_tizen> 3 </since_tizen>
2058 public float Opacity
2063 GetProperty(View.Property.OPACITY).Get(out temp);
2068 SetProperty(View.Property.OPACITY, new Tizen.NUI.PropertyValue(value));
2073 /// Sets the position of the view for X and Y.<br>
2074 /// By default, sets the position vector between the parent origin and the pivot point (default).<br>
2075 /// If the position inheritance is disabled, sets the world position.<br>
2077 /// <since_tizen> 3 </since_tizen>
2078 public Position2D Position2D
2082 Position temp = new Position(0.0f, 0.0f, 0.0f);
2083 GetProperty(View.Property.POSITION).Get(temp);
2084 return new Position2D(temp);
2088 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(new Position(value)));
2093 /// Retrieves the screen postion of the view.<br>
2095 /// <since_tizen> 3 </since_tizen>
2096 public Vector2 ScreenPosition
2100 Vector2 temp = new Vector2(0.0f, 0.0f);
2101 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
2107 /// Determines whether the pivot point should be used to determine the position of the view.
2108 /// This is true by default.
2110 /// <remarks>If false, then the top-left of the view is used for the position.
2111 /// Setting this to false will allow scaling or rotation around the anchor-point without affecting the view's position.
2113 /// <since_tizen> 4 </since_tizen>
2114 public bool PositionUsesPivotPoint
2119 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
2124 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
2128 [Obsolete("Please do not use! this will be deprecated")]
2129 public bool PositionUsesAnchorPoint
2134 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
2139 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
2143 internal bool FocusState
2147 return IsKeyboardFocusable();
2151 SetKeyboardFocusable(value);
2156 /// Queries whether the view is connected to the stage.<br>
2157 /// When a view is connected, it will be directly or indirectly parented to the root view.<br>
2159 /// <since_tizen> 3 </since_tizen>
2160 public bool IsOnWindow
2169 /// Gets the depth in the hierarchy for the view.
2171 /// <since_tizen> 3 </since_tizen>
2172 public int HierarchyDepth
2176 return GetHierarchyDepth();
2181 /// Sets the sibling order of the view so the depth position can be defined within the same parent.
2184 /// Note the initial value is 0.
2185 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove, and LowerBelow will override the sibling order.
2186 /// The values set by this property will likely change.
2188 /// <since_tizen> 3 </since_tizen>
2189 public int SiblingOrder
2194 GetProperty(View.Property.SIBLING_ORDER).Get(out temp);
2199 SetProperty(View.Property.SIBLING_ORDER, new Tizen.NUI.PropertyValue(value));
2204 /// Returns the natural size of the view.
2207 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
2209 [Obsolete("Please do not use! this will be deprecated, please use NaturalSize2D instead")]
2210 public Vector3 NaturalSize
2214 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2215 if (NDalicPINVOKE.SWIGPendingException.Pending)
2216 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2222 /// Returns the natural size (Size2D) of the view.
2225 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
2227 /// <since_tizen> 4 </since_tizen>
2228 public Size2D NaturalSize2D
2232 Vector3 temp = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2233 if (NDalicPINVOKE.SWIGPendingException.Pending)
2234 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2236 return new Size2D((int)temp.Width, (int)temp.Height);
2244 /// This is an asynchronous method.
2246 /// <since_tizen> 3 </since_tizen>
2256 /// This is an asynchronous method.
2257 /// If the view is hidden, then the view and its children will not be rendered.
2258 /// This is regardless of the individual visibility of the children, i.e., the view will only be rendered if all of its parents are shown.
2260 /// <since_tizen> 3 </since_tizen>
2266 internal void Raise()
2268 NDalicPINVOKE.Raise(swigCPtr);
2269 if (NDalicPINVOKE.SWIGPendingException.Pending)
2270 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2273 internal void Lower()
2275 NDalicPINVOKE.Lower(swigCPtr);
2276 if (NDalicPINVOKE.SWIGPendingException.Pending)
2277 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2281 /// Raises the view above all other views.
2284 /// Sibling order of views within the parent will be updated automatically.
2285 /// Once a raise or lower API is used, that view will then have an exclusive sibling order independent of insertion.
2287 /// <since_tizen> 3 </since_tizen>
2288 public void RaiseToTop()
2290 NDalicPINVOKE.RaiseToTop(swigCPtr);
2291 if (NDalicPINVOKE.SWIGPendingException.Pending)
2292 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2296 /// Lowers the view to the bottom of all views.
2299 /// The sibling order of views within the parent will be updated automatically.
2300 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2302 /// <since_tizen> 3 </since_tizen>
2303 public void LowerToBottom()
2305 NDalicPINVOKE.LowerToBottom(swigCPtr);
2306 if (NDalicPINVOKE.SWIGPendingException.Pending)
2307 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2311 /// Queries if all resources required by a view are loaded and ready.
2313 /// <remarks>Most resources are only loaded when the control is placed on the stage.
2315 /// <since_tizen> 4 </since_tizen>
2316 public bool IsResourceReady()
2318 bool ret = NDalicPINVOKE.IsResourceReady(swigCPtr);
2319 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2324 /// Raises the view to above the target view.
2326 /// <remarks>The sibling order of views within the parent will be updated automatically.
2327 /// Views on the level above the target view will still be shown above this view.
2328 /// Raising this view above views with the same sibling order as each other will raise this view above them.
2329 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2331 /// <param name="target">Will be raised above this view.</param>
2332 internal void RaiseAbove(View target)
2334 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
2335 if (NDalicPINVOKE.SWIGPendingException.Pending)
2336 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2340 /// Lowers the view to below the target view.
2342 /// <remarks>The sibling order of views within the parent will be updated automatically.
2343 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
2344 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2346 /// <param name="target">Will be lowered below this view.</param>
2347 internal void LowerBelow(View target)
2349 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
2350 if (NDalicPINVOKE.SWIGPendingException.Pending)
2351 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2354 internal string GetName()
2356 string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);
2357 if (NDalicPINVOKE.SWIGPendingException.Pending)
2358 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2362 internal void SetName(string name)
2364 NDalicPINVOKE.Actor_SetName(swigCPtr, name);
2365 if (NDalicPINVOKE.SWIGPendingException.Pending)
2366 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2369 internal uint GetId()
2371 uint ret = NDalicPINVOKE.Actor_GetId(swigCPtr);
2372 if (NDalicPINVOKE.SWIGPendingException.Pending)
2373 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2377 internal bool IsRoot()
2379 bool ret = NDalicPINVOKE.Actor_IsRoot(swigCPtr);
2380 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2384 internal bool OnWindow()
2386 bool ret = NDalicPINVOKE.Actor_OnStage(swigCPtr);
2387 if (NDalicPINVOKE.SWIGPendingException.Pending)
2388 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2392 internal Layer GetLayer()
2394 IntPtr cPtr = NDalicPINVOKE.Actor_GetLayer(swigCPtr);
2395 Layer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Layer;
2397 if (NDalicPINVOKE.SWIGPendingException.Pending)
2398 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2403 /// Removes a view from its parent view or layer. If a view has no parent, this method does nothing.
2405 /// <pre>The (child) view has been initialized. </pre>
2406 /// <since_tizen> 4 </since_tizen>
2407 public void Unparent()
2409 NDalicPINVOKE.Actor_Unparent(swigCPtr);
2410 if (NDalicPINVOKE.SWIGPendingException.Pending)
2411 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2415 /// Search through this view's hierarchy for a view with the given name.
2416 /// The view itself is also considered in the search.
2418 /// <pre>The view has been initialized.</pre>
2419 /// <param name="viewName">The name of the view to find.</param>
2420 /// <returns>A handle to the view if found, or an empty handle if not.</returns>
2421 /// <since_tizen> 3 </since_tizen>
2422 public View FindChildByName(string viewName)
2424 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
2426 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2428 if (NDalicPINVOKE.SWIGPendingException.Pending)
2429 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2433 internal View FindChildById(uint id)
2435 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
2437 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2439 if (NDalicPINVOKE.SWIGPendingException.Pending)
2440 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2444 internal void SetParentOrigin(Vector3 origin)
2446 NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
2447 if (NDalicPINVOKE.SWIGPendingException.Pending)
2448 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2451 internal Vector3 GetCurrentParentOrigin()
2453 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentParentOrigin(swigCPtr), true);
2454 if (NDalicPINVOKE.SWIGPendingException.Pending)
2455 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2459 internal void SetAnchorPoint(Vector3 anchorPoint)
2461 NDalicPINVOKE.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
2462 if (NDalicPINVOKE.SWIGPendingException.Pending)
2463 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2466 internal Vector3 GetCurrentAnchorPoint()
2468 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentAnchorPoint(swigCPtr), true);
2469 if (NDalicPINVOKE.SWIGPendingException.Pending)
2470 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2474 internal void SetSize(float width, float height)
2476 NDalicPINVOKE.Actor_SetSize__SWIG_0(swigCPtr, width, height);
2477 if (NDalicPINVOKE.SWIGPendingException.Pending)
2478 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2481 internal void SetSize(float width, float height, float depth)
2483 NDalicPINVOKE.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
2484 if (NDalicPINVOKE.SWIGPendingException.Pending)
2485 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2488 internal void SetSize(Vector2 size)
2490 NDalicPINVOKE.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
2491 if (NDalicPINVOKE.SWIGPendingException.Pending)
2492 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2495 internal void SetSize(Vector3 size)
2497 NDalicPINVOKE.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
2498 if (NDalicPINVOKE.SWIGPendingException.Pending)
2499 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2502 internal Vector3 GetTargetSize()
2504 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetTargetSize(swigCPtr), true);
2505 if (NDalicPINVOKE.SWIGPendingException.Pending)
2506 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2510 internal Size2D GetCurrentSize()
2512 Size ret = new Size(NDalicPINVOKE.Actor_GetCurrentSize(swigCPtr), true);
2513 if (NDalicPINVOKE.SWIGPendingException.Pending)
2514 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2515 Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
2519 internal Vector3 GetNaturalSize()
2521 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2522 if (NDalicPINVOKE.SWIGPendingException.Pending)
2523 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2527 internal void SetPosition(float x, float y)
2529 NDalicPINVOKE.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
2530 if (NDalicPINVOKE.SWIGPendingException.Pending)
2531 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2534 internal void SetPosition(float x, float y, float z)
2536 NDalicPINVOKE.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
2537 if (NDalicPINVOKE.SWIGPendingException.Pending)
2538 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2541 internal void SetPosition(Vector3 position)
2543 NDalicPINVOKE.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
2544 if (NDalicPINVOKE.SWIGPendingException.Pending)
2545 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2548 internal void SetX(float x)
2550 NDalicPINVOKE.Actor_SetX(swigCPtr, x);
2551 if (NDalicPINVOKE.SWIGPendingException.Pending)
2552 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2555 internal void SetY(float y)
2557 NDalicPINVOKE.Actor_SetY(swigCPtr, y);
2558 if (NDalicPINVOKE.SWIGPendingException.Pending)
2559 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2562 internal void SetZ(float z)
2564 NDalicPINVOKE.Actor_SetZ(swigCPtr, z);
2565 if (NDalicPINVOKE.SWIGPendingException.Pending)
2566 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2569 internal void TranslateBy(Vector3 distance)
2571 NDalicPINVOKE.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
2572 if (NDalicPINVOKE.SWIGPendingException.Pending)
2573 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2576 internal Position GetCurrentPosition()
2578 Position ret = new Position(NDalicPINVOKE.Actor_GetCurrentPosition(swigCPtr), true);
2579 if (NDalicPINVOKE.SWIGPendingException.Pending)
2580 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2584 internal Vector3 GetCurrentWorldPosition()
2586 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldPosition(swigCPtr), true);
2587 if (NDalicPINVOKE.SWIGPendingException.Pending)
2588 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2592 internal void SetInheritPosition(bool inherit)
2594 NDalicPINVOKE.Actor_SetInheritPosition(swigCPtr, inherit);
2595 if (NDalicPINVOKE.SWIGPendingException.Pending)
2596 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2599 internal bool IsPositionInherited()
2601 bool ret = NDalicPINVOKE.Actor_IsPositionInherited(swigCPtr);
2602 if (NDalicPINVOKE.SWIGPendingException.Pending)
2603 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2607 internal void SetOrientation(Degree angle, Vector3 axis)
2609 NDalicPINVOKE.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2610 if (NDalicPINVOKE.SWIGPendingException.Pending)
2611 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2614 internal void SetOrientation(Radian angle, Vector3 axis)
2616 NDalicPINVOKE.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2617 if (NDalicPINVOKE.SWIGPendingException.Pending)
2618 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2621 internal void SetOrientation(Rotation orientation)
2623 NDalicPINVOKE.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
2624 if (NDalicPINVOKE.SWIGPendingException.Pending)
2625 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2628 internal void RotateBy(Degree angle, Vector3 axis)
2630 NDalicPINVOKE.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2631 if (NDalicPINVOKE.SWIGPendingException.Pending)
2632 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2635 internal void RotateBy(Radian angle, Vector3 axis)
2637 NDalicPINVOKE.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2638 if (NDalicPINVOKE.SWIGPendingException.Pending)
2639 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2642 internal void RotateBy(Rotation relativeRotation)
2644 NDalicPINVOKE.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
2645 if (NDalicPINVOKE.SWIGPendingException.Pending)
2646 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2649 internal Rotation GetCurrentOrientation()
2651 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentOrientation(swigCPtr), true);
2652 if (NDalicPINVOKE.SWIGPendingException.Pending)
2653 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2657 internal void SetInheritOrientation(bool inherit)
2659 NDalicPINVOKE.Actor_SetInheritOrientation(swigCPtr, inherit);
2660 if (NDalicPINVOKE.SWIGPendingException.Pending)
2661 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2664 internal bool IsOrientationInherited()
2666 bool ret = NDalicPINVOKE.Actor_IsOrientationInherited(swigCPtr);
2667 if (NDalicPINVOKE.SWIGPendingException.Pending)
2668 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2672 internal Rotation GetCurrentWorldOrientation()
2674 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentWorldOrientation(swigCPtr), true);
2675 if (NDalicPINVOKE.SWIGPendingException.Pending)
2676 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2680 internal void SetScale(float scale)
2682 NDalicPINVOKE.Actor_SetScale__SWIG_0(swigCPtr, scale);
2683 if (NDalicPINVOKE.SWIGPendingException.Pending)
2684 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2687 internal void SetScale(float scaleX, float scaleY, float scaleZ)
2689 NDalicPINVOKE.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
2690 if (NDalicPINVOKE.SWIGPendingException.Pending)
2691 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2694 internal void SetScale(Vector3 scale)
2696 NDalicPINVOKE.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
2697 if (NDalicPINVOKE.SWIGPendingException.Pending)
2698 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2701 internal void ScaleBy(Vector3 relativeScale)
2703 NDalicPINVOKE.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
2704 if (NDalicPINVOKE.SWIGPendingException.Pending)
2705 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2708 internal Vector3 GetCurrentScale()
2710 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentScale(swigCPtr), true);
2711 if (NDalicPINVOKE.SWIGPendingException.Pending)
2712 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2716 internal Vector3 GetCurrentWorldScale()
2718 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldScale(swigCPtr), true);
2719 if (NDalicPINVOKE.SWIGPendingException.Pending)
2720 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2724 internal void SetInheritScale(bool inherit)
2726 NDalicPINVOKE.Actor_SetInheritScale(swigCPtr, inherit);
2727 if (NDalicPINVOKE.SWIGPendingException.Pending)
2728 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2731 internal bool IsScaleInherited()
2733 bool ret = NDalicPINVOKE.Actor_IsScaleInherited(swigCPtr);
2734 if (NDalicPINVOKE.SWIGPendingException.Pending)
2735 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2739 internal Matrix GetCurrentWorldMatrix()
2741 Matrix ret = new Matrix(NDalicPINVOKE.Actor_GetCurrentWorldMatrix(swigCPtr), true);
2742 if (NDalicPINVOKE.SWIGPendingException.Pending)
2743 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2747 internal void SetVisible(bool visible)
2749 NDalicPINVOKE.Actor_SetVisible(swigCPtr, visible);
2750 if (NDalicPINVOKE.SWIGPendingException.Pending)
2751 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2754 internal bool IsVisible()
2756 bool ret = NDalicPINVOKE.Actor_IsVisible(swigCPtr);
2757 if (NDalicPINVOKE.SWIGPendingException.Pending)
2758 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2762 internal void SetOpacity(float opacity)
2764 NDalicPINVOKE.Actor_SetOpacity(swigCPtr, opacity);
2765 if (NDalicPINVOKE.SWIGPendingException.Pending)
2766 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2769 internal float GetCurrentOpacity()
2771 float ret = NDalicPINVOKE.Actor_GetCurrentOpacity(swigCPtr);
2772 if (NDalicPINVOKE.SWIGPendingException.Pending)
2773 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2777 internal void SetColor(Vector4 color)
2779 NDalicPINVOKE.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
2780 if (NDalicPINVOKE.SWIGPendingException.Pending)
2781 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2784 internal Vector4 GetCurrentColor()
2786 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentColor(swigCPtr), true);
2787 if (NDalicPINVOKE.SWIGPendingException.Pending)
2788 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2792 internal void SetColorMode(ColorMode colorMode)
2794 NDalicPINVOKE.Actor_SetColorMode(swigCPtr, (int)colorMode);
2795 if (NDalicPINVOKE.SWIGPendingException.Pending)
2796 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2799 internal ColorMode GetColorMode()
2801 ColorMode ret = (ColorMode)NDalicPINVOKE.Actor_GetColorMode(swigCPtr);
2802 if (NDalicPINVOKE.SWIGPendingException.Pending)
2803 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2807 internal Vector4 GetCurrentWorldColor()
2809 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentWorldColor(swigCPtr), true);
2810 if (NDalicPINVOKE.SWIGPendingException.Pending)
2811 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2815 internal void SetDrawMode(DrawModeType drawMode)
2817 NDalicPINVOKE.Actor_SetDrawMode(swigCPtr, (int)drawMode);
2818 if (NDalicPINVOKE.SWIGPendingException.Pending)
2819 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2822 internal DrawModeType GetDrawMode()
2824 DrawModeType ret = (DrawModeType)NDalicPINVOKE.Actor_GetDrawMode(swigCPtr);
2825 if (NDalicPINVOKE.SWIGPendingException.Pending)
2826 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2831 /// Converts screen coordinates into the view's coordinate system using the default camera.
2833 /// <pre>The view has been initialized.</pre>
2834 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5).</remarks>
2835 /// <param name="localX">On return, the X-coordinate relative to the view.</param>
2836 /// <param name="localY">On return, the Y-coordinate relative to the view.</param>
2837 /// <param name="screenX">The screen X-coordinate.</param>
2838 /// <param name="screenY">The screen Y-coordinate.</param>
2839 /// <returns>True if the conversion succeeded.</returns>
2840 /// <since_tizen> 3 </since_tizen>
2841 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
2843 bool ret = NDalicPINVOKE.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
2844 if (NDalicPINVOKE.SWIGPendingException.Pending)
2845 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2849 internal void SetKeyboardFocusable(bool focusable)
2851 NDalicPINVOKE.Actor_SetKeyboardFocusable(swigCPtr, focusable);
2852 if (NDalicPINVOKE.SWIGPendingException.Pending)
2853 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2856 internal bool IsKeyboardFocusable()
2858 bool ret = NDalicPINVOKE.Actor_IsKeyboardFocusable(swigCPtr);
2859 if (NDalicPINVOKE.SWIGPendingException.Pending)
2860 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2864 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
2866 NDalicPINVOKE.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
2867 if (NDalicPINVOKE.SWIGPendingException.Pending)
2868 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2871 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
2873 ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.Actor_GetResizePolicy(swigCPtr, (int)dimension);
2874 if (NDalicPINVOKE.SWIGPendingException.Pending)
2875 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2880 /// Sets the relative to parent size factor of the view.<br>
2881 /// This factor is only used when ResizePolicy is set to either:
2882 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br>
2883 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br>
2885 /// <pre>The view has been initialized.</pre>
2886 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis.</param>
2887 /// <since_tizen> 3 </since_tizen>
2888 public void SetSizeModeFactor(Vector3 factor)
2890 NDalicPINVOKE.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
2891 if (NDalicPINVOKE.SWIGPendingException.Pending)
2892 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2895 internal Vector3 GetSizeModeFactor()
2897 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetSizeModeFactor(swigCPtr), true);
2898 if (NDalicPINVOKE.SWIGPendingException.Pending)
2899 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2904 /// Calculates the height of the view given a width.<br>
2905 /// The natural size is used for default calculation.<br>
2906 /// Size 0 is treated as aspect ratio 1:1.<br>
2908 /// <param name="width">The width to use.</param>
2909 /// <returns>The height based on the width.</returns>
2910 /// <since_tizen> 3 </since_tizen>
2911 public float GetHeightForWidth(float width)
2913 float ret = NDalicPINVOKE.Actor_GetHeightForWidth(swigCPtr, width);
2914 if (NDalicPINVOKE.SWIGPendingException.Pending)
2915 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2920 /// Calculates the width of the view given a height.<br>
2921 /// The natural size is used for default calculation.<br>
2922 /// Size 0 is treated as aspect ratio 1:1.<br>
2924 /// <param name="height">The height to use.</param>
2925 /// <returns>The width based on the height.</returns>
2926 /// <since_tizen> 3 </since_tizen>
2927 public float GetWidthForHeight(float height)
2929 float ret = NDalicPINVOKE.Actor_GetWidthForHeight(swigCPtr, height);
2930 if (NDalicPINVOKE.SWIGPendingException.Pending)
2931 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2935 public float GetRelayoutSize(DimensionType dimension)
2937 float ret = NDalicPINVOKE.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
2938 if (NDalicPINVOKE.SWIGPendingException.Pending)
2939 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2943 public void SetPadding(PaddingType padding)
2945 NDalicPINVOKE.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
2946 if (NDalicPINVOKE.SWIGPendingException.Pending)
2947 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2950 public void GetPadding(PaddingType paddingOut)
2952 NDalicPINVOKE.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
2953 if (NDalicPINVOKE.SWIGPendingException.Pending)
2954 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2957 internal void SetMinimumSize(Vector2 size)
2959 NDalicPINVOKE.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
2960 if (NDalicPINVOKE.SWIGPendingException.Pending)
2961 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2964 internal Vector2 GetMinimumSize()
2966 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMinimumSize(swigCPtr), true);
2967 if (NDalicPINVOKE.SWIGPendingException.Pending)
2968 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2972 internal void SetMaximumSize(Vector2 size)
2974 NDalicPINVOKE.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
2975 if (NDalicPINVOKE.SWIGPendingException.Pending)
2976 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2979 internal Vector2 GetMaximumSize()
2981 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMaximumSize(swigCPtr), true);
2982 if (NDalicPINVOKE.SWIGPendingException.Pending)
2983 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2987 internal int GetHierarchyDepth()
2989 int ret = NDalicPINVOKE.Actor_GetHierarchyDepth(swigCPtr);
2990 if (NDalicPINVOKE.SWIGPendingException.Pending)
2991 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2995 /// <since_tizen> 4 </since_tizen>
2996 public uint AddRenderer(Renderer renderer)
2998 uint ret = NDalicPINVOKE.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
2999 if (NDalicPINVOKE.SWIGPendingException.Pending)
3000 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3004 internal uint GetRendererCount()
3006 uint ret = NDalicPINVOKE.Actor_GetRendererCount(swigCPtr);
3007 if (NDalicPINVOKE.SWIGPendingException.Pending)
3008 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3012 /// <since_tizen> 4 </since_tizen>
3013 public Renderer GetRendererAt(uint index)
3015 IntPtr cPtr = NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index);
3016 Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Renderer;
3018 if (NDalicPINVOKE.SWIGPendingException.Pending)
3019 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3023 /// <since_tizen> 4 </since_tizen>
3024 public void RemoveRenderer(Renderer renderer)
3026 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
3027 if (NDalicPINVOKE.SWIGPendingException.Pending)
3028 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3031 /// <since_tizen> 4 </since_tizen>
3032 public void RemoveRenderer(uint index)
3034 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
3035 if (NDalicPINVOKE.SWIGPendingException.Pending)
3036 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3039 internal TouchDataSignal TouchSignal()
3041 TouchDataSignal ret = new TouchDataSignal(NDalicPINVOKE.Actor_TouchSignal(swigCPtr), false);
3042 if (NDalicPINVOKE.SWIGPendingException.Pending)
3043 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3047 internal HoverSignal HoveredSignal()
3049 HoverSignal ret = new HoverSignal(NDalicPINVOKE.Actor_HoveredSignal(swigCPtr), false);
3050 if (NDalicPINVOKE.SWIGPendingException.Pending)
3051 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3055 internal WheelSignal WheelEventSignal()
3057 WheelSignal ret = new WheelSignal(NDalicPINVOKE.Actor_WheelEventSignal(swigCPtr), false);
3058 if (NDalicPINVOKE.SWIGPendingException.Pending)
3059 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3063 internal ViewSignal OnWindowSignal()
3065 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnStageSignal(swigCPtr), false);
3066 if (NDalicPINVOKE.SWIGPendingException.Pending)
3067 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3071 internal ViewSignal OffWindowSignal()
3073 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OffStageSignal(swigCPtr), false);
3074 if (NDalicPINVOKE.SWIGPendingException.Pending)
3075 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3079 internal ViewSignal OnRelayoutSignal()
3081 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnRelayoutSignal(swigCPtr), false);
3082 if (NDalicPINVOKE.SWIGPendingException.Pending)
3083 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3087 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view) {
3088 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
3089 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3094 internal ViewLayoutDirectionChangedSignal LayoutDirectionChangedSignal(View view) {
3095 ViewLayoutDirectionChangedSignal ret = new ViewLayoutDirectionChangedSignal(NDalicManualPINVOKE.LayoutDirectionChangedSignal(View.getCPtr(view)), false);
3096 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3101 internal ViewSignal ResourcesLoadedSignal()
3103 ViewSignal ret = new ViewSignal(NDalicPINVOKE.ResourceReadySignal(swigCPtr), false);
3104 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3109 /// Gets or sets the origin of a view within its parent's area.<br>
3110 /// 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>
3111 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br>
3112 /// A view's position is the distance between this origin and the view's anchor-point.<br>
3114 /// <pre>The view has been initialized.</pre>
3115 /// <since_tizen> 3 </since_tizen>
3116 public Position ParentOrigin
3120 Position temp = new Position(0.0f, 0.0f, 0.0f);
3121 GetProperty(View.Property.PARENT_ORIGIN).Get(temp);
3126 SetProperty(View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue(value));
3130 internal float ParentOriginX
3135 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
3140 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
3144 internal float ParentOriginY
3149 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
3154 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
3158 internal float ParentOriginZ
3163 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
3168 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
3173 /// Gets or sets the anchor-point of a view.<br>
3174 /// 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>
3175 /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br>
3176 /// A view position is the distance between its parent-origin and this anchor-point.<br>
3177 /// A view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br>
3178 /// <pre>The view has been initialized.</pre>
3180 /// <since_tizen> 3 </since_tizen>
3181 public Position PivotPoint
3185 Position temp = new Position(0.0f, 0.0f, 0.0f);
3186 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
3191 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3195 internal float PivotPointX
3200 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
3205 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
3209 internal float PivotPointY
3214 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
3219 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
3223 internal float PivotPointZ
3228 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
3233 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
3238 /// Gets or sets the size width of the view.
3240 /// <since_tizen> 3 </since_tizen>
3241 public float SizeWidth
3246 GetProperty(View.Property.SIZE_WIDTH).Get(out temp);
3251 SetProperty(View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue(value));
3256 /// Gets or sets the size height of the view.
3258 /// <since_tizen> 3 </since_tizen>
3259 public float SizeHeight
3264 GetProperty(View.Property.SIZE_HEIGHT).Get(out temp);
3269 SetProperty(View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue(value));
3274 /// Gets or sets the position of the view.<br>
3275 /// By default, sets the position vector between the parent origin and pivot point (default).<br>
3276 /// If the position inheritance is disabled, sets the world position.<br>
3278 /// <since_tizen> 3 </since_tizen>
3279 public Position Position
3283 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3284 GetProperty(View.Property.POSITION).Get(temp);
3289 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(value));
3294 /// Gets or sets the position X of the view.
3296 /// <since_tizen> 3 </since_tizen>
3297 public float PositionX
3302 GetProperty(View.Property.POSITION_X).Get(out temp);
3307 SetProperty(View.Property.POSITION_X, new Tizen.NUI.PropertyValue(value));
3312 /// Gets or sets the position Y of the view.
3314 /// <since_tizen> 3 </since_tizen>
3315 public float PositionY
3320 GetProperty(View.Property.POSITION_Y).Get(out temp);
3325 SetProperty(View.Property.POSITION_Y, new Tizen.NUI.PropertyValue(value));
3330 /// Gets or sets the position Z of the view.
3332 /// <since_tizen> 3 </since_tizen>
3333 public float PositionZ
3338 GetProperty(View.Property.POSITION_Z).Get(out temp);
3343 SetProperty(View.Property.POSITION_Z, new Tizen.NUI.PropertyValue(value));
3348 /// Gets or sets the world position of the view.
3350 /// <since_tizen> 3 </since_tizen>
3351 public Vector3 WorldPosition
3355 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3356 GetProperty(View.Property.WORLD_POSITION).Get(temp);
3361 internal float WorldPositionX
3366 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
3371 internal float WorldPositionY
3376 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
3381 internal float WorldPositionZ
3386 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
3392 /// Gets or sets the orientation of the view.<br>
3393 /// The view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br>
3395 /// <remarks>This is an asynchronous method.</remarks>
3396 /// <since_tizen> 3 </since_tizen>
3397 public Rotation Orientation
3401 Rotation temp = new Rotation();
3402 GetProperty(View.Property.ORIENTATION).Get(temp);
3407 SetProperty(View.Property.ORIENTATION, new Tizen.NUI.PropertyValue(value));
3412 /// Gets or sets the world orientation of the view.<br>
3414 /// <since_tizen> 3 </since_tizen>
3415 public Rotation WorldOrientation
3419 Rotation temp = new Rotation();
3420 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
3426 /// Gets or sets the scale factor applied to the view.<br>
3428 /// <since_tizen> 3 </since_tizen>
3429 public Vector3 Scale
3433 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3434 GetProperty(View.Property.SCALE).Get(temp);
3439 SetProperty(View.Property.SCALE, new Tizen.NUI.PropertyValue(value));
3444 /// Gets or sets the scale X factor applied to the view.
3446 /// <since_tizen> 3 </since_tizen>
3452 GetProperty(View.Property.SCALE_X).Get(out temp);
3457 SetProperty(View.Property.SCALE_X, new Tizen.NUI.PropertyValue(value));
3462 /// Gets or sets the scale Y factor applied to the view.
3464 /// <since_tizen> 3 </since_tizen>
3470 GetProperty(View.Property.SCALE_Y).Get(out temp);
3475 SetProperty(View.Property.SCALE_Y, new Tizen.NUI.PropertyValue(value));
3480 /// Gets or sets the scale Z factor applied to the view.
3482 /// <since_tizen> 3 </since_tizen>
3488 GetProperty(View.Property.SCALE_Z).Get(out temp);
3493 SetProperty(View.Property.SCALE_Z, new Tizen.NUI.PropertyValue(value));
3498 /// Gets the world scale of the view.
3500 /// <since_tizen> 3 </since_tizen>
3501 public Vector3 WorldScale
3505 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3506 GetProperty(View.Property.WORLD_SCALE).Get(temp);
3512 /// Retrieves the visibility flag of the view.
3515 /// If the view is not visible, then the view and its children will not be rendered.
3516 /// This is regardless of the individual visibility values of the children, i.e., the view will only be rendered if all of its parents have visibility set to true.
3518 /// <since_tizen> 3 </since_tizen>
3519 public bool Visibility
3524 GetProperty(View.Property.VISIBLE).Get(out temp);
3530 /// Gets the view's world color.
3532 /// <since_tizen> 3 </since_tizen>
3533 public Vector4 WorldColor
3537 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3538 GetProperty(View.Property.WORLD_COLOR).Get(temp);
3543 internal Matrix WorldMatrix
3547 Matrix temp = new Matrix();
3548 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
3554 /// Gets or sets the view's name.
3556 /// <since_tizen> 3 </since_tizen>
3562 GetProperty(View.Property.NAME).Get(out temp);
3567 SetProperty(View.Property.NAME, new Tizen.NUI.PropertyValue(value));
3572 /// Get the number of children held by the view.
3574 /// <since_tizen> 3 </since_tizen>
3575 public new uint ChildCount
3579 return GetChildCount();
3584 /// Gets the view's ID.
3587 /// <since_tizen> 3 </since_tizen>
3597 /// Gets or sets the status of whether the view should emit touch or hover signals.
3599 /// <since_tizen> 3 </since_tizen>
3600 public bool Sensitive
3605 GetProperty(View.Property.SENSITIVE).Get(out temp);
3610 SetProperty(View.Property.SENSITIVE, new Tizen.NUI.PropertyValue(value));
3615 /// Gets or sets the status of whether the view should receive a notification when touch or hover motion events leave the boundary of the view.
3617 /// <since_tizen> 3 </since_tizen>
3618 public bool LeaveRequired
3623 GetProperty(View.Property.LEAVE_REQUIRED).Get(out temp);
3628 SetProperty(View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue(value));
3633 /// Gets or sets the status of whether a child view inherits it's parent's orientation.
3635 /// <since_tizen> 3 </since_tizen>
3636 public bool InheritOrientation
3641 GetProperty(View.Property.INHERIT_ORIENTATION).Get(out temp);
3646 SetProperty(View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue(value));
3651 /// Gets or sets the status of whether a child view inherits it's parent's scale.
3653 /// <since_tizen> 3 </since_tizen>
3654 public bool InheritScale
3659 GetProperty(View.Property.INHERIT_SCALE).Get(out temp);
3664 SetProperty(View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue(value));
3669 /// Gets or sets the status of how the view and its children should be drawn.<br>
3670 /// Not all views are renderable, but DrawMode can be inherited from any view.<br>
3671 /// 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>
3672 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br>
3673 /// Overlay views are drawn in a separate pass, after all non-overlay views within the layer.<br>
3674 /// For overlay views, the drawing order is with respect to tree levels of views, and depth-testing will not be used.<br>
3676 /// <since_tizen> 3 </since_tizen>
3677 public DrawModeType DrawMode
3682 if (GetProperty(View.Property.DRAW_MODE).Get(out temp) == false)
3684 NUILog.Error("DrawMode get error!");
3689 return DrawModeType.Normal;
3691 return DrawModeType.Overlay2D;
3693 return DrawModeType.Stencil;
3695 return DrawModeType.Normal;
3700 SetProperty(View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)value));
3705 /// Gets or sets the relative to parent size factor of the view.<br>
3706 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br>
3707 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br>
3709 /// <since_tizen> 3 </since_tizen>
3710 public Vector3 SizeModeFactor
3714 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3715 GetProperty(View.Property.SIZE_MODE_FACTOR).Get(temp);
3720 SetProperty(View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue(value));
3725 /// Gets or sets the width resize policy to be used.
3727 /// <since_tizen> 3 </since_tizen>
3728 public ResizePolicyType WidthResizePolicy
3733 if (GetProperty(View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
3735 NUILog.Error("WidthResizePolicy get error!");
3740 return ResizePolicyType.Fixed;
3741 case "USE_NATURAL_SIZE":
3742 return ResizePolicyType.UseNaturalSize;
3743 case "FILL_TO_PARENT":
3744 return ResizePolicyType.FillToParent;
3745 case "SIZE_RELATIVE_TO_PARENT":
3746 return ResizePolicyType.SizeRelativeToParent;
3747 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3748 return ResizePolicyType.SizeFixedOffsetFromParent;
3749 case "FIT_TO_CHILDREN":
3750 return ResizePolicyType.FitToChildren;
3751 case "DIMENSION_DEPENDENCY":
3752 return ResizePolicyType.DimensionDependency;
3753 case "USE_ASSIGNED_SIZE":
3754 return ResizePolicyType.UseAssignedSize;
3756 return ResizePolicyType.Fixed;
3761 SetProperty(View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3766 /// Gets or sets the height resize policy to be used.
3768 /// <since_tizen> 3 </since_tizen>
3769 public ResizePolicyType HeightResizePolicy
3774 if (GetProperty(View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
3776 NUILog.Error("HeightResizePolicy get error!");
3781 return ResizePolicyType.Fixed;
3782 case "USE_NATURAL_SIZE":
3783 return ResizePolicyType.UseNaturalSize;
3784 case "FILL_TO_PARENT":
3785 return ResizePolicyType.FillToParent;
3786 case "SIZE_RELATIVE_TO_PARENT":
3787 return ResizePolicyType.SizeRelativeToParent;
3788 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3789 return ResizePolicyType.SizeFixedOffsetFromParent;
3790 case "FIT_TO_CHILDREN":
3791 return ResizePolicyType.FitToChildren;
3792 case "DIMENSION_DEPENDENCY":
3793 return ResizePolicyType.DimensionDependency;
3794 case "USE_ASSIGNED_SIZE":
3795 return ResizePolicyType.UseAssignedSize;
3797 return ResizePolicyType.Fixed;
3802 SetProperty(View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3807 /// Gets or sets the policy to use when setting size with size negotiation.<br>
3808 /// Defaults to SizeScalePolicyType.UseSizeSet.<br>
3810 /// <since_tizen> 3 </since_tizen>
3811 public SizeScalePolicyType SizeScalePolicy
3816 if (GetProperty(View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
3818 NUILog.Error("SizeScalePolicy get error!");
3822 case "USE_SIZE_SET":
3823 return SizeScalePolicyType.UseSizeSet;
3824 case "FIT_WITH_ASPECT_RATIO":
3825 return SizeScalePolicyType.FitWithAspectRatio;
3826 case "FILL_WITH_ASPECT_RATIO":
3827 return SizeScalePolicyType.FillWithAspectRatio;
3829 return SizeScalePolicyType.UseSizeSet;
3834 string valueToString = "";
3837 case SizeScalePolicyType.UseSizeSet:
3839 valueToString = "USE_SIZE_SET";
3842 case SizeScalePolicyType.FitWithAspectRatio:
3844 valueToString = "FIT_WITH_ASPECT_RATIO";
3847 case SizeScalePolicyType.FillWithAspectRatio:
3849 valueToString = "FILL_WITH_ASPECT_RATIO";
3854 valueToString = "USE_SIZE_SET";
3858 SetProperty(View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
3863 /// Gets or sets the status of whether the width size is dependent on the height size.
3865 /// <since_tizen> 3 </since_tizen>
3866 public bool WidthForHeight
3871 GetProperty(View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
3876 SetProperty(View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue(value));
3881 /// Gets or sets the status of whether the height size is dependent on the width size.
3883 /// <since_tizen> 3 </since_tizen>
3884 public bool HeightForWidth
3889 GetProperty(View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
3894 SetProperty(View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue(value));
3899 /// Gets or sets the padding for use in layout.
3901 /// <since_tizen> 3 </since_tizen>
3902 public Vector4 Padding
3906 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3907 GetProperty(View.Property.PADDING).Get(temp);
3912 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
3917 /// Gets or sets the minimum size the view can be assigned in size negotiation.
3919 /// <since_tizen> 3 </since_tizen>
3920 public Size2D MinimumSize
3924 Size2D temp = new Size2D(0, 0);
3925 GetProperty(View.Property.MINIMUM_SIZE).Get(temp);
3930 SetProperty(View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3935 /// Gets or sets the maximum size the view can be assigned in size negotiation.
3937 /// <since_tizen> 3 </since_tizen>
3938 public Size2D MaximumSize
3942 Size2D temp = new Size2D(0, 0);
3943 GetProperty(View.Property.MAXIMUM_SIZE).Get(temp);
3948 SetProperty(View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3953 /// Gets or sets whether a child view inherits it's parent's position.<br>
3954 /// Default is to inherit.<br>
3955 /// 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>
3957 /// <since_tizen> 3 </since_tizen>
3958 public bool InheritPosition
3963 GetProperty(View.Property.INHERIT_POSITION).Get(out temp);
3968 SetProperty(View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue(value));
3973 /// Gets or sets the clipping behavior (mode) of it's children.
3975 /// <since_tizen> 3 </since_tizen>
3976 public ClippingModeType ClippingMode
3981 if (GetProperty(View.Property.CLIPPING_MODE).Get(out temp) == false)
3983 NUILog.Error("ClippingMode get error!");
3988 return ClippingModeType.Disabled;
3989 case "CLIP_CHILDREN":
3990 return ClippingModeType.ClipChildren;
3992 return ClippingModeType.Disabled;
3997 SetProperty(View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)value));
4002 /// Gets the number of renderers held by the view.
4004 /// <since_tizen> 4 </since_tizen>
4005 public uint RendererCount
4009 return GetRendererCount();
4016 [Obsolete("Please do not use! this will be deprecated")]
4017 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> Touched
4021 if (_touchDataEventHandler == null)
4023 _touchDataCallback = OnTouch;
4024 this.TouchSignal().Connect(_touchDataCallback);
4027 _touchDataEventHandler += value;
4032 _touchDataEventHandler -= value;
4034 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
4036 this.TouchSignal().Disconnect(_touchDataCallback);
4042 [Obsolete("Please do not use! this will be deprecated")]
4043 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> Hovered
4047 if (_hoverEventHandler == null)
4049 _hoverEventCallback = OnHoverEvent;
4050 this.HoveredSignal().Connect(_hoverEventCallback);
4053 _hoverEventHandler += value;
4058 _hoverEventHandler -= value;
4060 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
4062 this.HoveredSignal().Disconnect(_hoverEventCallback);
4068 [Obsolete("Please do not use! this will be deprecated")]
4069 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelMoved
4073 if (_wheelEventHandler == null)
4075 _wheelEventCallback = OnWheelEvent;
4076 this.WheelEventSignal().Connect(_wheelEventCallback);
4079 _wheelEventHandler += value;
4084 _wheelEventHandler -= value;
4086 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
4088 this.WheelEventSignal().Disconnect(_wheelEventCallback);
4094 [Obsolete("Please do not use! this will be deprecated")]
4095 public Position AnchorPoint
4099 Position temp = new Position(0.0f, 0.0f, 0.0f);
4100 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
4105 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
4109 [Obsolete("Please do not use! this will be deprecated, please use Size2D instead")]
4114 Size temp = new Size(0.0f, 0.0f, 0.0f);
4115 GetProperty(View.Property.SIZE).Get(temp);
4120 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(value));
4124 [Obsolete("Please do not use! this will be deprecated")]
4125 public event EventHandler OnWindowEvent
4129 if (_onWindowEventHandler == null)
4131 _onWindowEventCallback = OnWindow;
4132 this.OnWindowSignal().Connect(_onWindowEventCallback);
4135 _onWindowEventHandler += value;
4140 _onWindowEventHandler -= value;
4142 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
4144 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
4149 [Obsolete("Please do not use! this will be deprecated")]
4150 public event EventHandler OffWindowEvent
4154 if (_offWindowEventHandler == null)
4156 _offWindowEventCallback = OffWindow;
4157 this.OffWindowSignal().Connect(_offWindowEventCallback);
4160 _offWindowEventHandler += value;
4165 _offWindowEventHandler -= value;
4167 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
4169 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
4174 [Obsolete("Please do not use! this will be deprecated")]
4175 public event EventHandler OnRelayoutEvent
4179 if (_onRelayoutEventHandler == null)
4181 _onRelayoutEventCallback = OnRelayout;
4182 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
4185 _onRelayoutEventHandler += value;
4190 _onRelayoutEventHandler -= value;
4192 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
4194 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
4200 //"Please DO NOT use! This will be deprecated! Please use 'Container GetParent() for derived class' instead!"
4201 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
4202 public new View Parent
4207 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
4209 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(cPtr);
4211 if (basehandle is Layer)
4213 ret = new View(cPtr, false);
4217 ret = basehandle as View;
4220 if (NDalicPINVOKE.SWIGPendingException.Pending)
4221 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4227 /// Gets/Sets whether inherit parent's the layout Direction.
4229 /// <since_tizen> 4 </since_tizen>
4230 public bool InheritLayoutDirection
4235 GetProperty(View.Property.INHERIT_LAYOUT_DIRECTION).Get(out temp);
4240 SetProperty(View.Property.INHERIT_LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue(value));
4245 /// Gets/Sets the layout Direction.
4247 /// <since_tizen> 4 </since_tizen>
4248 public ViewLayoutDirectionType LayoutDirection
4253 if (GetProperty(View.Property.LAYOUT_DIRECTION).Get(out temp) == false)
4255 NUILog.Error("LAYOUT_DIRECTION get error!");
4257 return (ViewLayoutDirectionType)temp;
4261 SetProperty(View.Property.LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((int)value));
4267 /// The View layout Direction type.
4269 /// <since_tizen> 4 </since_tizen>
4270 public enum ViewLayoutDirectionType