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;
26 /// View is the base class for all views.
28 public class View : Animatable //CustomActor => Animatable
30 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
32 internal View(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.View_SWIGUpcast(cPtr), cMemoryOwn)
34 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
35 PositionUsesPivotPoint = false;
38 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
40 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
43 // you can override it to clean-up your own resources.
44 protected override void Dispose(DisposeTypes type)
51 if(type == DisposeTypes.Explicit)
54 //Release your own managed resources here.
55 //You should release all of your own disposable objects here.
58 //Release your own unmanaged resources here.
59 //You should not access any managed member here except static instance.
60 //because the execution order of Finalizes is non-deterministic.
62 if (_onRelayoutEventCallback != null)
64 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
67 if (_offWindowEventCallback != null)
69 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
72 if (_onWindowEventCallback != null)
74 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
77 if (_wheelEventCallback != null)
79 this.WheelEventSignal().Disconnect(_wheelEventCallback);
82 if (_hoverEventCallback != null)
84 this.HoveredSignal().Disconnect(_hoverEventCallback);
87 if (_touchDataCallback != null)
89 this.TouchSignal().Disconnect(_touchDataCallback);
92 if (_ResourcesLoadedCallback != null)
94 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
97 if (_offWindowEventCallback != null)
99 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
102 if (_onWindowEventCallback != null)
104 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
107 if (_wheelEventCallback != null)
109 this.WheelEventSignal().Disconnect(_wheelEventCallback);
112 if (_hoverEventCallback != null)
114 this.HoveredSignal().Disconnect(_hoverEventCallback);
117 if (_touchDataCallback != null)
119 this.TouchSignal().Disconnect(_touchDataCallback);
122 if (_onRelayoutEventCallback != null)
124 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
127 if (_keyCallback != null)
129 this.KeyEventSignal().Disconnect(_keyCallback);
132 if (_keyInputFocusLostCallback != null)
134 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
137 if (_keyInputFocusGainedCallback != null)
139 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
142 if (swigCPtr.Handle != global::System.IntPtr.Zero)
147 NDalicPINVOKE.delete_View(swigCPtr);
149 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
155 private EventHandler _keyInputFocusGainedEventHandler;
156 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
157 private delegate void KeyInputFocusGainedCallbackType(IntPtr control);
158 private KeyInputFocusGainedCallbackType _keyInputFocusGainedCallback;
161 /// Event for KeyInputFocusGained signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
162 /// KeyInputFocusGained signal is emitted when the control gets Key Input Focus.<br>
164 public event EventHandler FocusGained
168 if (_keyInputFocusGainedEventHandler == null)
170 _keyInputFocusGainedCallback = OnKeyInputFocusGained;
171 this.KeyInputFocusGainedSignal().Connect(_keyInputFocusGainedCallback);
174 _keyInputFocusGainedEventHandler += value;
179 _keyInputFocusGainedEventHandler -= value;
181 if (_keyInputFocusGainedEventHandler == null && KeyInputFocusGainedSignal().Empty() == false)
183 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
188 private void OnKeyInputFocusGained(IntPtr view)
190 if (_keyInputFocusGainedEventHandler != null)
192 _keyInputFocusGainedEventHandler(this, null);
197 private EventHandler _keyInputFocusLostEventHandler;
198 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
199 private delegate void KeyInputFocusLostCallbackType(IntPtr control);
200 private KeyInputFocusLostCallbackType _keyInputFocusLostCallback;
203 /// Event for KeyInputFocusLost signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
204 /// KeyInputFocusLost signal is emitted when the control loses Key Input Focus.<br>
206 public event EventHandler FocusLost
210 if (_keyInputFocusLostEventHandler == null)
212 _keyInputFocusLostCallback = OnKeyInputFocusLost;
213 this.KeyInputFocusLostSignal().Connect(_keyInputFocusLostCallback);
216 _keyInputFocusLostEventHandler += value;
221 _keyInputFocusLostEventHandler -= value;
223 if (_keyInputFocusLostEventHandler == null && KeyInputFocusLostSignal().Empty() == false)
225 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
230 private void OnKeyInputFocusLost(IntPtr view)
232 if (_keyInputFocusLostEventHandler != null)
234 _keyInputFocusLostEventHandler(this, null);
239 /// Event arguments that passed via KeyEvent signal.
241 public class KeyEventArgs : EventArgs
246 /// Key - is the key sent to the View.
261 private EventHandlerWithReturnType<object, KeyEventArgs, bool> _keyEventHandler;
262 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
263 private delegate bool KeyCallbackType(IntPtr control, IntPtr keyEvent);
264 private KeyCallbackType _keyCallback;
267 /// Event for KeyPressed signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
268 /// KeyPressed signal is emitted when key event is received.<br>
270 public event EventHandlerWithReturnType<object, KeyEventArgs, bool> KeyEvent
274 if (_keyEventHandler == null)
276 _keyCallback = OnKeyEvent;
277 this.KeyEventSignal().Connect(_keyCallback);
280 _keyEventHandler += value;
285 _keyEventHandler -= value;
287 if (_keyEventHandler == null && KeyEventSignal().Empty() == false)
289 this.KeyEventSignal().Disconnect(_keyCallback);
294 private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
296 KeyEventArgs e = new KeyEventArgs();
298 e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
300 if (_keyEventHandler != null)
302 return _keyEventHandler(this, e);
308 private EventHandler _onRelayoutEventHandler;
309 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
310 private delegate void OnRelayoutEventCallbackType(IntPtr control);
311 private OnRelayoutEventCallbackType _onRelayoutEventCallback;
314 /// Event for OnRelayout signal which can be used to subscribe/unsubscribe the event handler.<br>
315 /// OnRelayout signal is emitted after the size has been set on the view during relayout.<br>
317 public event EventHandler Relayout
321 if (_onRelayoutEventHandler == null)
323 _onRelayoutEventCallback = OnRelayout;
324 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
327 _onRelayoutEventHandler += value;
332 _onRelayoutEventHandler -= value;
334 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
336 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
342 // Callback for View OnRelayout signal
343 private void OnRelayout(IntPtr data)
345 if (_onRelayoutEventHandler != null)
347 _onRelayoutEventHandler(this, null);
352 /// Event arguments that passed via Touch signal.
354 public class TouchEventArgs : EventArgs
356 private Touch _touch;
359 /// Touch - contains the information of touch points
374 private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
375 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
376 private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
377 private TouchDataCallbackType _touchDataCallback;
380 /// Event for Touched signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
381 /// Touched signal is emitted when touch input is received.<br>
383 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
387 if (_touchDataEventHandler == null)
389 _touchDataCallback = OnTouch;
390 this.TouchSignal().Connect(_touchDataCallback);
393 _touchDataEventHandler += value;
398 _touchDataEventHandler -= value;
400 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
402 this.TouchSignal().Disconnect(_touchDataCallback);
408 // Callback for View TouchSignal
409 private bool OnTouch(IntPtr view, IntPtr touchData)
411 TouchEventArgs e = new TouchEventArgs();
413 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
415 if (_touchDataEventHandler != null)
417 return _touchDataEventHandler(this, e);
424 /// Event arguments that passed via Hover signal.
426 public class HoverEventArgs : EventArgs
428 private Hover _hover;
431 /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
446 private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
447 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
448 private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
449 private HoverEventCallbackType _hoverEventCallback;
452 /// Event for Hovered signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
453 /// Hovered signal is emitted when hover input is received.<br>
455 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
459 if (_hoverEventHandler == null)
461 _hoverEventCallback = OnHoverEvent;
462 this.HoveredSignal().Connect(_hoverEventCallback);
465 _hoverEventHandler += value;
470 _hoverEventHandler -= value;
472 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
474 this.HoveredSignal().Disconnect(_hoverEventCallback);
480 // Callback for View Hover signal
481 private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
483 HoverEventArgs e = new HoverEventArgs();
485 e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
487 if (_hoverEventHandler != null)
489 return _hoverEventHandler(this, e);
496 /// Event arguments that passed via Wheel signal.
498 public class WheelEventArgs : EventArgs
500 private Wheel _wheel;
503 /// WheelEvent - store a wheel rolling type : MOUSE_WHEEL or CUSTOM_WHEEL
518 private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
519 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
520 private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
521 private WheelEventCallbackType _wheelEventCallback;
524 /// Event for WheelMoved signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
525 /// WheelMoved signal is emitted when wheel event is received.<br>
527 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
531 if (_wheelEventHandler == null)
533 _wheelEventCallback = OnWheelEvent;
534 this.WheelEventSignal().Connect(_wheelEventCallback);
537 _wheelEventHandler += value;
542 _wheelEventHandler -= value;
544 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
546 this.WheelEventSignal().Disconnect(_wheelEventCallback);
552 // Callback for View Wheel signal
553 private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
555 WheelEventArgs e = new WheelEventArgs();
557 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
559 if (_wheelEventHandler != null)
561 return _wheelEventHandler(this, e);
567 private EventHandler _onWindowEventHandler;
568 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
569 private delegate void OnWindowEventCallbackType(IntPtr control);
570 private OnWindowEventCallbackType _onWindowEventCallback;
573 /// Event for OnWindow signal which can be used to subscribe/unsubscribe the event handler.<br>
574 /// OnWindow signal is emitted after the view has been connected to the Window.<br>
576 public event EventHandler AddedToWindow
580 if (_onWindowEventHandler == null)
582 _onWindowEventCallback = OnWindow;
583 this.OnWindowSignal().Connect(_onWindowEventCallback);
586 _onWindowEventHandler += value;
591 _onWindowEventHandler -= value;
593 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
595 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
600 // Callback for View OnWindow signal
601 private void OnWindow(IntPtr data)
603 if (_onWindowEventHandler != null)
605 _onWindowEventHandler(this, null);
610 private EventHandler _offWindowEventHandler;
611 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
612 private delegate void OffWindowEventCallbackType(IntPtr control);
613 private OffWindowEventCallbackType _offWindowEventCallback;
616 /// Event for OffWindow signal which can be used to subscribe/unsubscribe the event handler.<br>
617 /// OffWindow signal is emitted after the view has been disconnected from the Window.<br>
619 public event EventHandler RemovedFromWindow
623 if (_offWindowEventHandler == null)
625 _offWindowEventCallback = OffWindow;
626 this.OffWindowSignal().Connect(_offWindowEventCallback);
629 _offWindowEventHandler += value;
634 _offWindowEventHandler -= value;
636 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
638 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
643 // Callback for View OffWindow signal
644 private void OffWindow(IntPtr data)
646 if (_offWindowEventHandler != null)
648 _offWindowEventHandler(this, null);
653 /// Event arguments of visibility changed.
655 public class VisibilityChangedEventArgs : EventArgs
658 private bool _visibility;
659 private VisibilityChangeType _type;
662 /// The view, or child of view, whose visibility has changed.
677 /// Whether the view is now visible or not.
679 public bool Visibility
692 /// Whether the view's visible property has changed or a parent's.
694 public VisibilityChangeType Type
707 private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
708 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
709 private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
710 private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
713 /// Event for visibility change which can be used to subscribe/unsubscribe the event handler.<br>
714 /// This signal is emitted when the visible property of this or a parent view is changed.<br>
716 public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
720 if (_visibilityChangedEventHandler == null)
722 _visibilityChangedEventCallback = OnVisibilityChanged;
723 VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
726 _visibilityChangedEventHandler += value;
731 _visibilityChangedEventHandler -= value;
733 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
735 VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
740 // Callback for View visibility change signal
741 private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
743 VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
746 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
748 e.Visibility = visibility;
751 if (_visibilityChangedEventHandler != null)
753 _visibilityChangedEventHandler(this, e);
757 // Resource Ready Signal
759 private EventHandler _resourcesLoadedEventHandler;
760 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
761 private delegate void ResourcesLoadedCallbackType(IntPtr control);
762 private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
765 /// Event for ResourcesLoadedSignal signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
766 /// This signal is emitted after all resources required by a View are loaded and ready.<br>
768 public event EventHandler ResourcesLoaded
772 if (_resourcesLoadedEventHandler == null)
774 _ResourcesLoadedCallback = OnResourcesLoaded;
775 this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
778 _resourcesLoadedEventHandler += value;
783 _resourcesLoadedEventHandler -= value;
785 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
787 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
792 private void OnResourcesLoaded(IntPtr view)
794 if (_resourcesLoadedEventHandler != null)
796 _resourcesLoadedEventHandler(this, null);
800 internal IntPtr GetPtrfromView()
802 return (IntPtr)swigCPtr;
805 internal class Property
807 internal static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get();
808 internal static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get();
809 internal static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get();
810 internal static readonly int LEFT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
811 internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
812 internal static readonly int UP_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
813 internal static readonly int DOWN_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
814 internal static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get();
815 internal static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get();
816 internal static readonly int SIBLING_ORDER = NDalicManualPINVOKE.Actor_Property_SIBLING_ORDER_get();
817 internal static readonly int OPACITY = NDalicManualPINVOKE.Actor_Property_OPACITY_get();
818 internal static readonly int SCREEN_POSITION = NDalicManualPINVOKE.Actor_Property_SCREEN_POSITION_get();
819 internal static readonly int POSITION_USES_ANCHOR_POINT = NDalicManualPINVOKE.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
820 internal static readonly int PARENT_ORIGIN = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_get();
821 internal static readonly int PARENT_ORIGIN_X = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_X_get();
822 internal static readonly int PARENT_ORIGIN_Y = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Y_get();
823 internal static readonly int PARENT_ORIGIN_Z = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Z_get();
824 internal static readonly int ANCHOR_POINT = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_get();
825 internal static readonly int ANCHOR_POINT_X = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_X_get();
826 internal static readonly int ANCHOR_POINT_Y = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Y_get();
827 internal static readonly int ANCHOR_POINT_Z = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Z_get();
828 internal static readonly int SIZE = NDalicPINVOKE.Actor_Property_SIZE_get();
829 internal static readonly int SIZE_WIDTH = NDalicPINVOKE.Actor_Property_SIZE_WIDTH_get();
830 internal static readonly int SIZE_HEIGHT = NDalicPINVOKE.Actor_Property_SIZE_HEIGHT_get();
831 internal static readonly int SIZE_DEPTH = NDalicPINVOKE.Actor_Property_SIZE_DEPTH_get();
832 internal static readonly int POSITION = NDalicPINVOKE.Actor_Property_POSITION_get();
833 internal static readonly int POSITION_X = NDalicPINVOKE.Actor_Property_POSITION_X_get();
834 internal static readonly int POSITION_Y = NDalicPINVOKE.Actor_Property_POSITION_Y_get();
835 internal static readonly int POSITION_Z = NDalicPINVOKE.Actor_Property_POSITION_Z_get();
836 internal static readonly int WORLD_POSITION = NDalicPINVOKE.Actor_Property_WORLD_POSITION_get();
837 internal static readonly int WORLD_POSITION_X = NDalicPINVOKE.Actor_Property_WORLD_POSITION_X_get();
838 internal static readonly int WORLD_POSITION_Y = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Y_get();
839 internal static readonly int WORLD_POSITION_Z = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Z_get();
840 internal static readonly int ORIENTATION = NDalicPINVOKE.Actor_Property_ORIENTATION_get();
841 internal static readonly int WORLD_ORIENTATION = NDalicPINVOKE.Actor_Property_WORLD_ORIENTATION_get();
842 internal static readonly int SCALE = NDalicPINVOKE.Actor_Property_SCALE_get();
843 internal static readonly int SCALE_X = NDalicPINVOKE.Actor_Property_SCALE_X_get();
844 internal static readonly int SCALE_Y = NDalicPINVOKE.Actor_Property_SCALE_Y_get();
845 internal static readonly int SCALE_Z = NDalicPINVOKE.Actor_Property_SCALE_Z_get();
846 internal static readonly int WORLD_SCALE = NDalicPINVOKE.Actor_Property_WORLD_SCALE_get();
847 internal static readonly int VISIBLE = NDalicPINVOKE.Actor_Property_VISIBLE_get();
848 internal static readonly int WORLD_COLOR = NDalicPINVOKE.Actor_Property_WORLD_COLOR_get();
849 internal static readonly int WORLD_MATRIX = NDalicPINVOKE.Actor_Property_WORLD_MATRIX_get();
850 internal static readonly int NAME = NDalicPINVOKE.Actor_Property_NAME_get();
851 internal static readonly int SENSITIVE = NDalicPINVOKE.Actor_Property_SENSITIVE_get();
852 internal static readonly int LEAVE_REQUIRED = NDalicPINVOKE.Actor_Property_LEAVE_REQUIRED_get();
853 internal static readonly int INHERIT_ORIENTATION = NDalicPINVOKE.Actor_Property_INHERIT_ORIENTATION_get();
854 internal static readonly int INHERIT_SCALE = NDalicPINVOKE.Actor_Property_INHERIT_SCALE_get();
855 internal static readonly int DRAW_MODE = NDalicPINVOKE.Actor_Property_DRAW_MODE_get();
856 internal static readonly int SIZE_MODE_FACTOR = NDalicPINVOKE.Actor_Property_SIZE_MODE_FACTOR_get();
857 internal static readonly int WIDTH_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_WIDTH_RESIZE_POLICY_get();
858 internal static readonly int HEIGHT_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_HEIGHT_RESIZE_POLICY_get();
859 internal static readonly int SIZE_SCALE_POLICY = NDalicPINVOKE.Actor_Property_SIZE_SCALE_POLICY_get();
860 internal static readonly int WIDTH_FOR_HEIGHT = NDalicPINVOKE.Actor_Property_WIDTH_FOR_HEIGHT_get();
861 internal static readonly int HEIGHT_FOR_WIDTH = NDalicPINVOKE.Actor_Property_HEIGHT_FOR_WIDTH_get();
862 internal static readonly int PADDING = NDalicPINVOKE.Actor_Property_PADDING_get();
863 internal static readonly int MINIMUM_SIZE = NDalicPINVOKE.Actor_Property_MINIMUM_SIZE_get();
864 internal static readonly int MAXIMUM_SIZE = NDalicPINVOKE.Actor_Property_MAXIMUM_SIZE_get();
865 internal static readonly int INHERIT_POSITION = NDalicPINVOKE.Actor_Property_INHERIT_POSITION_get();
866 internal static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
870 /// Describes the direction to move the focus towards.
872 public enum FocusDirection
883 /// Creates a new instance of a View.
885 public View() : this(NDalicPINVOKE.View_New(), true)
887 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
890 internal View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true)
892 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
896 /// Downcasts a handle to View handle.<br>
897 /// If handle points to a View, the downcast produces valid handle.<br>
898 /// If not, the returned handle is left uninitialized.<br>
900 /// <param name="handle">Handle to an object</param>
901 /// <returns>A handle to a View or an uninitialized handle</returns>
902 [Obsolete("Please do not use! this will be deprecated, instead please us as keyword.")]
903 public new static View DownCast(BaseHandle handle)
905 View ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as View;
906 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
910 [Obsolete("Please do not use! this will be deprecated, instead please us as keyword.")]
911 public static T DownCast<T>(View view) where T : View
913 T ret = Registry.GetManagedBaseHandleFromNativePtr(view) as T;
921 private View ConvertIdToView(uint id)
927 view = Parent.FindChildById(id);
932 view = Window.Instance.GetRootLayer().FindChildById(id);
938 internal void SetKeyInputFocus()
940 NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
941 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
945 /// Quries whether the view has focus.
947 /// <returns>true if this view has focus</returns>
948 public bool HasFocus()
950 bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
951 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
955 internal void ClearKeyInputFocus()
957 NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
958 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
961 internal PinchGestureDetector GetPinchGestureDetector()
963 PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
964 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
968 internal PanGestureDetector GetPanGestureDetector()
970 PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
971 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
975 internal TapGestureDetector GetTapGestureDetector()
977 TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
978 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
982 internal LongPressGestureDetector GetLongPressGestureDetector()
984 LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
985 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
990 /// Sets the name of the style to be applied to the view.
992 /// <param name="styleName">A string matching a style described in a stylesheet</param>
993 public void SetStyleName(string styleName)
995 NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
996 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1000 /// Retrieves the name of the style to be applied to the view (if any).
1002 /// <returns>A string matching a style, or an empty string</returns>
1003 public string GetStyleName()
1005 string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
1006 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1010 internal void SetBackgroundColor(Vector4 color)
1012 NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
1013 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1016 internal Vector4 GetBackgroundColor()
1018 Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
1019 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1023 internal void SetBackgroundImage(Image image)
1025 NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
1026 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1030 /// Clears the background.
1032 public void ClearBackground()
1034 NDalicPINVOKE.View_ClearBackground(swigCPtr);
1035 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1038 internal ControlKeySignal KeyEventSignal()
1040 ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
1041 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1045 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
1047 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
1048 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1052 internal KeyInputFocusSignal KeyInputFocusLostSignal()
1054 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
1055 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1059 internal View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
1061 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1064 internal enum PropertyRange
1066 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
1067 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
1068 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
1072 /// styleName, type string.
1074 public string StyleName
1079 GetProperty(View.Property.STYLE_NAME).Get(out temp);
1084 SetProperty(View.Property.STYLE_NAME, new Tizen.NUI.PropertyValue(value));
1089 /// mutually exclusive with BACKGROUND_IMAGE & BACKGROUND, type Vector4.
1091 public Color BackgroundColor
1095 Color backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1097 Tizen.NUI.PropertyMap background = Background;
1099 background.Find(Visual.Property.Type)?.Get(out visualType);
1100 if (visualType == (int)Visual.Type.Color)
1102 background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor);
1105 return backgroundColor;
1109 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1114 /// Create an Animation to animate the background color visual. If there is no
1115 /// background visual, creates one with transparent black as it's mixColor.
1117 public Animation AnimateBackgroundColor( object destinationValue,
1120 AlphaFunction.BuiltinFunctions? alphaFunction = null,
1121 object initialValue = null)
1123 Tizen.NUI.PropertyMap background = Background;
1125 if( background.Empty() )
1127 // If there is no background yet, ensure there is a transparent
1129 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1130 background = Background;
1132 return AnimateColor( "background", destinationValue, startTime, endTime, alphaFunction, initialValue );
1136 /// Create an Animation to animate the mixColor of the named visual.
1138 public Animation AnimateColor( string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null )
1140 Animation animation = null;
1142 PropertyMap _animator = new PropertyMap();
1143 if( alphaFunction != null )
1145 _animator.Add("alphaFunction", new PropertyValue( AlphaFunction.BuiltinToPropertyKey(alphaFunction) ) );
1148 PropertyMap _timePeriod = new PropertyMap();
1149 _timePeriod.Add( "duration", new PropertyValue((endTime-startTime)/1000.0f) );
1150 _timePeriod.Add( "delay", new PropertyValue( startTime/1000.0f ) );
1151 _animator.Add( "timePeriod", new PropertyValue( _timePeriod ) );
1153 PropertyMap _transition = new PropertyMap();
1154 _transition.Add( "animator", new PropertyValue( _animator ) );
1155 _transition.Add( "target", new PropertyValue( targetVisual ) );
1156 _transition.Add( "property", new PropertyValue( "mixColor" ) );
1158 if( initialColor != null )
1160 PropertyValue initValue = PropertyValue.CreateFromObject( initialColor );
1161 _transition.Add( "initialValue", initValue );
1164 PropertyValue destValue = PropertyValue.CreateFromObject( destinationColor );
1165 _transition.Add( "targetValue", destValue );
1166 TransitionData _transitionData = new TransitionData( _transition );
1168 animation = new Animation( NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true );
1169 if (NDalicPINVOKE.SWIGPendingException.Pending)
1170 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1176 /// mutually exclusive with BACKGROUND_COLOR & BACKGROUND, type Map.
1178 public string BackgroundImage
1182 string backgroundImage = "";
1184 Tizen.NUI.PropertyMap background = Background;
1186 background.Find(Visual.Property.Type)?.Get(out visualType);
1187 if (visualType == (int)Visual.Type.Image)
1189 background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
1192 return backgroundImage;
1196 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1200 public Tizen.NUI.PropertyMap Background
1204 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1205 GetProperty( View.Property.BACKGROUND ).Get(temp);
1210 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1216 /// The current state of the view.
1223 if (GetProperty(View.Property.STATE).Get(out temp) == false)
1225 NUILog.Error("State get error!");
1231 return States.Normal;
1235 return States.Focused;
1239 return States.Disabled;
1243 return States.Normal;
1249 SetProperty(View.Property.STATE, new Tizen.NUI.PropertyValue((int)value));
1254 /// The current sub state of the view.
1256 public States SubState
1261 if (GetProperty(View.Property.SUB_STATE).Get(out temp) == false)
1263 NUILog.Error("subState get error!");
1268 return States.Normal;
1270 return States.Focused;
1272 return States.Disabled;
1274 return States.Normal;
1279 string valueToString = "";
1284 valueToString = "NORMAL";
1287 case States.Focused:
1289 valueToString = "FOCUSED";
1292 case States.Disabled:
1294 valueToString = "DISABLED";
1299 valueToString = "NORMAL";
1303 SetProperty(View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
1308 /// Displays a tooltip
1310 public Tizen.NUI.PropertyMap Tooltip
1314 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1315 GetProperty(View.Property.TOOLTIP).Get(temp);
1320 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1325 /// Displays a tooltip as Text
1327 public string TooltipText
1331 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1335 private int LeftFocusableViewId
1340 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
1345 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1349 private int RightFocusableViewId
1354 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
1359 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1363 private int UpFocusableViewId
1368 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
1373 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1377 private int DownFocusableViewId
1382 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
1387 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1392 /// Child Property of FlexContainer.<br>
1393 /// The proportion of the free space in the container the flex item will receive.<br>
1394 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br>
1401 GetProperty(FlexContainer.ChildProperty.FLEX).Get(out temp);
1406 SetProperty(FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue(value));
1411 /// Child Property of FlexContainer.<br>
1412 /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br>
1414 public int AlignSelf
1419 GetProperty(FlexContainer.ChildProperty.ALIGN_SELF).Get(out temp);
1424 SetProperty(FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue(value));
1429 /// Child Property of FlexContainer.<br>
1430 /// The space around the flex item.<br>
1432 public Vector4 FlexMargin
1436 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1437 GetProperty(FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
1442 SetProperty(FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue(value));
1447 /// The top-left cell this child occupies, if not set, the first available cell is used
1449 public Vector2 CellIndex
1453 Vector2 temp = new Vector2(0.0f, 0.0f);
1454 GetProperty(TableView.ChildProperty.CELL_INDEX).Get(temp);
1459 SetProperty(TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue(value));
1464 /// The number of rows this child occupies, if not set, default value is 1
1466 public float RowSpan
1471 GetProperty(TableView.ChildProperty.ROW_SPAN).Get(out temp);
1476 SetProperty(TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue(value));
1481 /// The number of columns this child occupies, if not set, default value is 1
1483 public float ColumnSpan
1488 GetProperty(TableView.ChildProperty.COLUMN_SPAN).Get(out temp);
1493 SetProperty(TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue(value));
1498 /// The horizontal alignment of this child inside the cells, if not set, default value is 'left'
1500 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
1505 if (GetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
1507 NUILog.Error("CellHorizontalAlignment get error!");
1513 return Tizen.NUI.HorizontalAlignmentType.Left;
1515 return Tizen.NUI.HorizontalAlignmentType.Center;
1517 return Tizen.NUI.HorizontalAlignmentType.Right;
1519 return Tizen.NUI.HorizontalAlignmentType.Left;
1524 string valueToString = "";
1527 case Tizen.NUI.HorizontalAlignmentType.Left:
1529 valueToString = "left";
1532 case Tizen.NUI.HorizontalAlignmentType.Center:
1534 valueToString = "center";
1537 case Tizen.NUI.HorizontalAlignmentType.Right:
1539 valueToString = "right";
1544 valueToString = "left";
1548 SetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1553 /// The vertical alignment of this child inside the cells, if not set, default value is 'top'
1555 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
1560 GetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
1562 NUILog.Error("CellVerticalAlignment get error!");
1568 return Tizen.NUI.VerticalAlignmentType.Top;
1570 return Tizen.NUI.VerticalAlignmentType.Center;
1572 return Tizen.NUI.VerticalAlignmentType.Bottom;
1574 return Tizen.NUI.VerticalAlignmentType.Top;
1579 string valueToString = "";
1582 case Tizen.NUI.VerticalAlignmentType.Top:
1584 valueToString = "top";
1587 case Tizen.NUI.VerticalAlignmentType.Center:
1589 valueToString = "center";
1592 case Tizen.NUI.VerticalAlignmentType.Bottom:
1594 valueToString = "bottom";
1599 valueToString = "top";
1603 SetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1608 /// The left focusable view.<br>
1609 /// This will return NULL if not set.<br>
1610 /// This will also return NULL if the specified left focusable view is not on Window.<br>
1612 public View LeftFocusableView
1614 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1617 if (LeftFocusableViewId >= 0)
1619 return ConvertIdToView((uint)LeftFocusableViewId);
1625 LeftFocusableViewId = (int)value.GetId();
1630 /// The right focusable view.<br>
1631 /// This will return NULL if not set.<br>
1632 /// This will also return NULL if the specified right focusable view is not on Window.<br>
1634 public View RightFocusableView
1636 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1639 if (RightFocusableViewId >= 0)
1641 return ConvertIdToView((uint)RightFocusableViewId);
1647 RightFocusableViewId = (int)value.GetId();
1652 /// The up focusable view.<br>
1653 /// This will return NULL if not set.<br>
1654 /// This will also return NULL if the specified up focusable view is not on Window.<br>
1656 public View UpFocusableView
1658 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1661 if (UpFocusableViewId >= 0)
1663 return ConvertIdToView((uint)UpFocusableViewId);
1669 UpFocusableViewId = (int)value.GetId();
1674 /// The down focusable view.<br>
1675 /// This will return NULL if not set.<br>
1676 /// This will also return NULL if the specified down focusable view is not on Window.<br>
1678 public View DownFocusableView
1680 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1683 if (DownFocusableViewId >= 0)
1685 return ConvertIdToView((uint)DownFocusableViewId);
1691 DownFocusableViewId = (int)value.GetId();
1696 /// whether the view should be focusable by keyboard navigation.
1698 public bool Focusable
1702 SetKeyboardFocusable(value);
1706 return IsKeyboardFocusable();
1711 /// Enumeration for describing the states of view.
1730 /// Retrieves the position of the View.<br>
1731 /// The coordinates are relative to the View's parent.<br>
1733 public Position CurrentPosition
1737 return GetCurrentPosition();
1742 /// Sets the size of an view for width and height.<br>
1743 /// Geometry can be scaled to fit within this area.<br>
1744 /// This does not interfere with the views scale factor.<br>
1745 /// The views default depth is the minimum of width & height.<br>
1747 public Size2D Size2D
1751 Size temp = new Size(0.0f, 0.0f, 0.0f);
1752 GetProperty(View.Property.SIZE).Get(temp);
1753 Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
1758 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(new Size(value)));
1763 /// Retrieves the size of the View.<br>
1764 /// The coordinates are relative to the View's parent.<br>
1766 public Size2D CurrentSize
1770 return GetCurrentSize();
1775 /// Retrieves the view's parent.<br>
1785 public bool Visibility
1794 /// Retrieves and sets the view's opacity.<br>
1796 public float Opacity
1801 GetProperty(View.Property.OPACITY).Get(out temp);
1806 SetProperty(View.Property.OPACITY, new Tizen.NUI.PropertyValue(value));
1811 /// Sets the position of the View for X and Y.<br>
1812 /// By default, sets the position vector between the parent origin and pivot point(default).<br>
1813 /// If Position inheritance if disabled, sets the world position.<br>
1815 public Position2D Position2D
1819 Position temp = new Position(0.0f, 0.0f, 0.0f);
1820 GetProperty(View.Property.POSITION).Get(temp);
1821 return new Position2D(temp);
1825 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(new Position(value)));
1830 /// Retrieves screen postion of view's.<br>
1832 public Vector2 ScreenPosition
1836 Vector2 temp = new Vector2(0.0f, 0.0f);
1837 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
1843 /// Determines whether the pivot point should be used to determine the position of the view.
1844 /// This is true by default.
1846 /// <remarks>If false, then the top-left of the view is used for the position.
1847 /// Setting this to false will allow scaling or rotation around the anchor-point without affecting the view's position.
1849 public bool PositionUsesPivotPoint
1854 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
1859 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
1863 [Obsolete("Please do not use! this will be deprecated")]
1864 public bool PositionUsesAnchorPoint
1869 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
1874 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
1878 internal bool FocusState
1882 return IsKeyboardFocusable();
1886 SetKeyboardFocusable(value);
1891 /// Queries whether the view is connected to the Stage.<br>
1892 /// When an view is connected, it will be directly or indirectly parented to the root View.<br>
1894 public bool IsOnWindow
1903 /// Gets depth in the hierarchy for the view.
1905 public int HierarchyDepth
1909 return GetHierarchyDepth();
1914 /// Sets the sibling order of the view so depth position can be defined within the same parent.
1917 /// Note The initial value is 0.
1918 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove and LowerBelow will override the sibling order.
1919 /// The values set by this Property will likely change.
1921 public int SiblingOrder
1926 GetProperty(View.Property.SIBLING_ORDER).Get(out temp);
1931 SetProperty(View.Property.SIBLING_ORDER, new Tizen.NUI.PropertyValue(value));
1935 [Obsolete("Please do not use! this will be internal property")]
1936 public Vector3 NaturalSize
1940 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
1941 if (NDalicPINVOKE.SWIGPendingException.Pending)
1942 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1951 /// This is an asynchronous method.
1962 /// This is an asynchronous method.
1963 /// If an view is hidden, then the view and its children will not be rendered.
1964 /// This is regardless of the individual visibility of the children i.e.an view will only be rendered if all of its parents are shown.
1971 internal void Raise()
1973 NDalicPINVOKE.Raise(swigCPtr);
1974 if (NDalicPINVOKE.SWIGPendingException.Pending)
1975 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1978 internal void Lower()
1980 NDalicPINVOKE.Lower(swigCPtr);
1981 if (NDalicPINVOKE.SWIGPendingException.Pending)
1982 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1986 /// Raise view above all other views.
1989 /// Sibling order of views within the parent will be updated automatically.
1990 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
1992 public void RaiseToTop()
1994 NDalicPINVOKE.RaiseToTop(swigCPtr);
1995 if (NDalicPINVOKE.SWIGPendingException.Pending)
1996 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2000 /// Lower view to the bottom of all views.
2003 /// Sibling order of views within the parent will be updated automatically.
2004 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2006 public void LowerToBottom()
2008 NDalicPINVOKE.LowerToBottom(swigCPtr);
2009 if (NDalicPINVOKE.SWIGPendingException.Pending)
2010 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2014 /// Query if all resources required by a View are loaded and ready.
2016 /// <remarks>Most resources are only loaded when the control is placed on stage
2018 public bool IsResourceReady()
2020 bool ret = NDalicPINVOKE.IsResourceReady(swigCPtr);
2021 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2026 /// Raise the view to above the target view.
2028 /// <remarks>Sibling order of views within the parent will be updated automatically.
2029 /// Views on the level above the target view will still be shown above this view.
2030 /// Raising this view above views with the same sibling order as each other will raise this view above them.
2031 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2033 /// <param name="target">Will be raised above this view</param>
2034 internal void RaiseAbove(View target)
2036 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
2037 if (NDalicPINVOKE.SWIGPendingException.Pending)
2038 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2042 /// Lower the view to below the target view.
2044 /// <remarks>Sibling order of views within the parent will be updated automatically.
2045 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
2046 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2048 /// <param name="target">Will be lowered below this view</param>
2049 internal void LowerBelow(View target)
2051 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
2052 if (NDalicPINVOKE.SWIGPendingException.Pending)
2053 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2056 internal string GetName()
2058 string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);
2059 if (NDalicPINVOKE.SWIGPendingException.Pending)
2060 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2064 internal void SetName(string name)
2066 NDalicPINVOKE.Actor_SetName(swigCPtr, name);
2067 if (NDalicPINVOKE.SWIGPendingException.Pending)
2068 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2071 internal uint GetId()
2073 uint ret = NDalicPINVOKE.Actor_GetId(swigCPtr);
2074 if (NDalicPINVOKE.SWIGPendingException.Pending)
2075 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2079 internal bool IsRoot()
2081 bool ret = NDalicPINVOKE.Actor_IsRoot(swigCPtr);
2082 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2086 internal bool OnWindow()
2088 bool ret = NDalicPINVOKE.Actor_OnStage(swigCPtr);
2089 if (NDalicPINVOKE.SWIGPendingException.Pending)
2090 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2094 internal Layer GetLayer()
2096 IntPtr cPtr = NDalicPINVOKE.Actor_GetLayer(swigCPtr);
2097 Layer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Layer;
2099 if (NDalicPINVOKE.SWIGPendingException.Pending)
2100 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2105 /// Adds a child view to this View.
2107 /// <pre>This View(the parent) has been initialized. The child view has been initialized. The child view is not the same as the parent view.</pre>
2108 /// <post>The child will be referenced by its parent. This means that the child will be kept alive, even if the handle passed into this method is reset or destroyed.</post>
2109 /// <remarks>If the child already has a parent, it will be removed from old parent and reparented to this view. This may change child's position, color, scale etc as it now inherits them from this view.</remarks>
2110 /// <param name="child">The child</param>
2111 public void Add(View child)
2113 NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
2114 if (NDalicPINVOKE.SWIGPendingException.Pending)
2115 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2119 /// Removes a child View from this View. If the view was not a child of this view, this is a no-op.
2121 /// <pre>This View(the parent) has been initialized. The child view is not the same as the parent view.</pre>
2122 /// <param name="child">The child</param>
2123 public void Remove(View child)
2125 NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
2126 if (NDalicPINVOKE.SWIGPendingException.Pending)
2127 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2131 /// Removes a View from its Parent View / Layer. If the View has no parent, this method does nothing.
2133 /// <pre>The (child) View has been initialized. </pre>
2134 public void Unparent()
2136 NDalicPINVOKE.Actor_Unparent(swigCPtr);
2137 if (NDalicPINVOKE.SWIGPendingException.Pending)
2138 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2142 /// Retrieves the number of children held by the view.
2144 /// <pre>The View has been initialized.</pre>
2145 /// <returns>The number of children</returns>
2146 internal uint GetChildCount()
2148 uint ret = NDalicPINVOKE.Actor_GetChildCount(swigCPtr);
2149 if (NDalicPINVOKE.SWIGPendingException.Pending)
2150 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2155 /// Retrieves child view by index.
2157 /// <pre>The View has been initialized.</pre>
2158 /// <param name="index">The index of the child to retrieve</param>
2159 /// <returns>The view for the given index or empty handle if children not initialized</returns>
2160 public View GetChildAt(uint index)
2162 IntPtr cPtr = NDalicPINVOKE.Actor_GetChildAt(swigCPtr, index);
2164 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2166 if (NDalicPINVOKE.SWIGPendingException.Pending)
2167 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2172 /// Search through this view's hierarchy for an view with the given name.
2173 /// The view itself is also considered in the search.
2175 /// <pre>The View has been initialized.</pre>
2176 /// <param name="viewName">The name of the view to find</param>
2177 /// <returns>A handle to the view if found, or an empty handle if not</returns>
2178 public View FindChildByName(string viewName)
2180 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
2182 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2184 if (NDalicPINVOKE.SWIGPendingException.Pending)
2185 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2189 internal View FindChildById(uint id)
2191 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
2193 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2195 if (NDalicPINVOKE.SWIGPendingException.Pending)
2196 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2200 internal View GetParent()
2203 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
2205 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(cPtr);
2207 if(basehandle is Layer)
2209 ret = new View(cPtr,false);
2213 ret = basehandle as View;
2216 if (NDalicPINVOKE.SWIGPendingException.Pending)
2217 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2221 internal void SetParentOrigin(Vector3 origin)
2223 NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
2224 if (NDalicPINVOKE.SWIGPendingException.Pending)
2225 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2228 internal Vector3 GetCurrentParentOrigin()
2230 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentParentOrigin(swigCPtr), true);
2231 if (NDalicPINVOKE.SWIGPendingException.Pending)
2232 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2236 internal void SetAnchorPoint(Vector3 anchorPoint)
2238 NDalicPINVOKE.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
2239 if (NDalicPINVOKE.SWIGPendingException.Pending)
2240 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2243 internal Vector3 GetCurrentAnchorPoint()
2245 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentAnchorPoint(swigCPtr), true);
2246 if (NDalicPINVOKE.SWIGPendingException.Pending)
2247 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2251 internal void SetSize(float width, float height)
2253 NDalicPINVOKE.Actor_SetSize__SWIG_0(swigCPtr, width, height);
2254 if (NDalicPINVOKE.SWIGPendingException.Pending)
2255 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2258 internal void SetSize(float width, float height, float depth)
2260 NDalicPINVOKE.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
2261 if (NDalicPINVOKE.SWIGPendingException.Pending)
2262 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2265 internal void SetSize(Vector2 size)
2267 NDalicPINVOKE.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
2268 if (NDalicPINVOKE.SWIGPendingException.Pending)
2269 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2272 internal void SetSize(Vector3 size)
2274 NDalicPINVOKE.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
2275 if (NDalicPINVOKE.SWIGPendingException.Pending)
2276 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2279 internal Vector3 GetTargetSize()
2281 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetTargetSize(swigCPtr), true);
2282 if (NDalicPINVOKE.SWIGPendingException.Pending)
2283 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2287 internal Size2D GetCurrentSize()
2289 Size ret = new Size(NDalicPINVOKE.Actor_GetCurrentSize(swigCPtr), true);
2290 if (NDalicPINVOKE.SWIGPendingException.Pending)
2291 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2292 Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
2296 internal Vector3 GetNaturalSize()
2298 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2299 if (NDalicPINVOKE.SWIGPendingException.Pending)
2300 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2304 internal void SetPosition(float x, float y)
2306 NDalicPINVOKE.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
2307 if (NDalicPINVOKE.SWIGPendingException.Pending)
2308 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2311 internal void SetPosition(float x, float y, float z)
2313 NDalicPINVOKE.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
2314 if (NDalicPINVOKE.SWIGPendingException.Pending)
2315 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2318 internal void SetPosition(Vector3 position)
2320 NDalicPINVOKE.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
2321 if (NDalicPINVOKE.SWIGPendingException.Pending)
2322 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2325 internal void SetX(float x)
2327 NDalicPINVOKE.Actor_SetX(swigCPtr, x);
2328 if (NDalicPINVOKE.SWIGPendingException.Pending)
2329 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2332 internal void SetY(float y)
2334 NDalicPINVOKE.Actor_SetY(swigCPtr, y);
2335 if (NDalicPINVOKE.SWIGPendingException.Pending)
2336 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2339 internal void SetZ(float z)
2341 NDalicPINVOKE.Actor_SetZ(swigCPtr, z);
2342 if (NDalicPINVOKE.SWIGPendingException.Pending)
2343 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2346 internal void TranslateBy(Vector3 distance)
2348 NDalicPINVOKE.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
2349 if (NDalicPINVOKE.SWIGPendingException.Pending)
2350 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2353 internal Position GetCurrentPosition()
2355 Position ret = new Position(NDalicPINVOKE.Actor_GetCurrentPosition(swigCPtr), true);
2356 if (NDalicPINVOKE.SWIGPendingException.Pending)
2357 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2361 internal Vector3 GetCurrentWorldPosition()
2363 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldPosition(swigCPtr), true);
2364 if (NDalicPINVOKE.SWIGPendingException.Pending)
2365 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2369 internal void SetInheritPosition(bool inherit)
2371 NDalicPINVOKE.Actor_SetInheritPosition(swigCPtr, inherit);
2372 if (NDalicPINVOKE.SWIGPendingException.Pending)
2373 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2376 internal bool IsPositionInherited()
2378 bool ret = NDalicPINVOKE.Actor_IsPositionInherited(swigCPtr);
2379 if (NDalicPINVOKE.SWIGPendingException.Pending)
2380 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2384 internal void SetOrientation(Degree angle, Vector3 axis)
2386 NDalicPINVOKE.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2387 if (NDalicPINVOKE.SWIGPendingException.Pending)
2388 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2391 internal void SetOrientation(Radian angle, Vector3 axis)
2393 NDalicPINVOKE.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2394 if (NDalicPINVOKE.SWIGPendingException.Pending)
2395 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2398 internal void SetOrientation(Rotation orientation)
2400 NDalicPINVOKE.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
2401 if (NDalicPINVOKE.SWIGPendingException.Pending)
2402 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2405 internal void RotateBy(Degree angle, Vector3 axis)
2407 NDalicPINVOKE.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2408 if (NDalicPINVOKE.SWIGPendingException.Pending)
2409 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2412 internal void RotateBy(Radian angle, Vector3 axis)
2414 NDalicPINVOKE.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2415 if (NDalicPINVOKE.SWIGPendingException.Pending)
2416 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2419 internal void RotateBy(Rotation relativeRotation)
2421 NDalicPINVOKE.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
2422 if (NDalicPINVOKE.SWIGPendingException.Pending)
2423 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2426 internal Rotation GetCurrentOrientation()
2428 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentOrientation(swigCPtr), true);
2429 if (NDalicPINVOKE.SWIGPendingException.Pending)
2430 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2434 internal void SetInheritOrientation(bool inherit)
2436 NDalicPINVOKE.Actor_SetInheritOrientation(swigCPtr, inherit);
2437 if (NDalicPINVOKE.SWIGPendingException.Pending)
2438 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2441 internal bool IsOrientationInherited()
2443 bool ret = NDalicPINVOKE.Actor_IsOrientationInherited(swigCPtr);
2444 if (NDalicPINVOKE.SWIGPendingException.Pending)
2445 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2449 internal Rotation GetCurrentWorldOrientation()
2451 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentWorldOrientation(swigCPtr), true);
2452 if (NDalicPINVOKE.SWIGPendingException.Pending)
2453 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2457 internal void SetScale(float scale)
2459 NDalicPINVOKE.Actor_SetScale__SWIG_0(swigCPtr, scale);
2460 if (NDalicPINVOKE.SWIGPendingException.Pending)
2461 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2464 internal void SetScale(float scaleX, float scaleY, float scaleZ)
2466 NDalicPINVOKE.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
2467 if (NDalicPINVOKE.SWIGPendingException.Pending)
2468 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2471 internal void SetScale(Vector3 scale)
2473 NDalicPINVOKE.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
2474 if (NDalicPINVOKE.SWIGPendingException.Pending)
2475 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2478 internal void ScaleBy(Vector3 relativeScale)
2480 NDalicPINVOKE.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
2481 if (NDalicPINVOKE.SWIGPendingException.Pending)
2482 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2485 internal Vector3 GetCurrentScale()
2487 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentScale(swigCPtr), true);
2488 if (NDalicPINVOKE.SWIGPendingException.Pending)
2489 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2493 internal Vector3 GetCurrentWorldScale()
2495 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldScale(swigCPtr), true);
2496 if (NDalicPINVOKE.SWIGPendingException.Pending)
2497 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2501 internal void SetInheritScale(bool inherit)
2503 NDalicPINVOKE.Actor_SetInheritScale(swigCPtr, inherit);
2504 if (NDalicPINVOKE.SWIGPendingException.Pending)
2505 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2508 internal bool IsScaleInherited()
2510 bool ret = NDalicPINVOKE.Actor_IsScaleInherited(swigCPtr);
2511 if (NDalicPINVOKE.SWIGPendingException.Pending)
2512 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2516 internal Matrix GetCurrentWorldMatrix()
2518 Matrix ret = new Matrix(NDalicPINVOKE.Actor_GetCurrentWorldMatrix(swigCPtr), true);
2519 if (NDalicPINVOKE.SWIGPendingException.Pending)
2520 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2524 internal void SetVisible(bool visible)
2526 NDalicPINVOKE.Actor_SetVisible(swigCPtr, visible);
2527 if (NDalicPINVOKE.SWIGPendingException.Pending)
2528 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2531 internal bool IsVisible()
2533 bool ret = NDalicPINVOKE.Actor_IsVisible(swigCPtr);
2534 if (NDalicPINVOKE.SWIGPendingException.Pending)
2535 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2539 internal void SetOpacity(float opacity)
2541 NDalicPINVOKE.Actor_SetOpacity(swigCPtr, opacity);
2542 if (NDalicPINVOKE.SWIGPendingException.Pending)
2543 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2546 internal float GetCurrentOpacity()
2548 float ret = NDalicPINVOKE.Actor_GetCurrentOpacity(swigCPtr);
2549 if (NDalicPINVOKE.SWIGPendingException.Pending)
2550 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2554 internal void SetColor(Vector4 color)
2556 NDalicPINVOKE.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
2557 if (NDalicPINVOKE.SWIGPendingException.Pending)
2558 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2561 internal Vector4 GetCurrentColor()
2563 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentColor(swigCPtr), true);
2564 if (NDalicPINVOKE.SWIGPendingException.Pending)
2565 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2569 internal void SetColorMode(ColorMode colorMode)
2571 NDalicPINVOKE.Actor_SetColorMode(swigCPtr, (int)colorMode);
2572 if (NDalicPINVOKE.SWIGPendingException.Pending)
2573 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2576 internal ColorMode GetColorMode()
2578 ColorMode ret = (ColorMode)NDalicPINVOKE.Actor_GetColorMode(swigCPtr);
2579 if (NDalicPINVOKE.SWIGPendingException.Pending)
2580 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2584 internal Vector4 GetCurrentWorldColor()
2586 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentWorldColor(swigCPtr), true);
2587 if (NDalicPINVOKE.SWIGPendingException.Pending)
2588 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2592 internal void SetDrawMode(DrawModeType drawMode)
2594 NDalicPINVOKE.Actor_SetDrawMode(swigCPtr, (int)drawMode);
2595 if (NDalicPINVOKE.SWIGPendingException.Pending)
2596 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2599 internal DrawModeType GetDrawMode()
2601 DrawModeType ret = (DrawModeType)NDalicPINVOKE.Actor_GetDrawMode(swigCPtr);
2602 if (NDalicPINVOKE.SWIGPendingException.Pending)
2603 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2608 /// Converts screen coordinates into the view's coordinate system using the default camera.
2610 /// <pre>The View has been initialized.</pre>
2611 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5)</remarks>
2612 /// <param name="localX">On return, the X-coordinate relative to the view</param>
2613 /// <param name="localY">On return, the Y-coordinate relative to the view</param>
2614 /// <param name="screenX">The screen X-coordinate</param>
2615 /// <param name="screenY">The screen Y-coordinate</param>
2616 /// <returns>True if the conversion succeeded</returns>
2617 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
2619 bool ret = NDalicPINVOKE.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
2620 if (NDalicPINVOKE.SWIGPendingException.Pending)
2621 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2625 internal void SetKeyboardFocusable(bool focusable)
2627 NDalicPINVOKE.Actor_SetKeyboardFocusable(swigCPtr, focusable);
2628 if (NDalicPINVOKE.SWIGPendingException.Pending)
2629 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2632 internal bool IsKeyboardFocusable()
2634 bool ret = NDalicPINVOKE.Actor_IsKeyboardFocusable(swigCPtr);
2635 if (NDalicPINVOKE.SWIGPendingException.Pending)
2636 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2640 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
2642 NDalicPINVOKE.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
2643 if (NDalicPINVOKE.SWIGPendingException.Pending)
2644 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2647 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
2649 ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.Actor_GetResizePolicy(swigCPtr, (int)dimension);
2650 if (NDalicPINVOKE.SWIGPendingException.Pending)
2651 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2656 /// Sets the relative to parent size factor of the view.<br>
2657 /// This factor is only used when ResizePolicy is set to either:
2658 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br>
2659 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br>
2661 /// <pre>The View has been initialized.</pre>
2662 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis</param>
2663 public void SetSizeModeFactor(Vector3 factor)
2665 NDalicPINVOKE.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
2666 if (NDalicPINVOKE.SWIGPendingException.Pending)
2667 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2670 internal Vector3 GetSizeModeFactor()
2672 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetSizeModeFactor(swigCPtr), true);
2673 if (NDalicPINVOKE.SWIGPendingException.Pending)
2674 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2679 /// Calculates the height of the view given a width.<br>
2680 /// The natural size is used for default calculation. <br>
2681 /// size 0 is treated as aspect ratio 1:1.<br>
2683 /// <param name="width">Width to use</param>
2684 /// <returns>The height based on the width</returns>
2685 public float GetHeightForWidth(float width)
2687 float ret = NDalicPINVOKE.Actor_GetHeightForWidth(swigCPtr, width);
2688 if (NDalicPINVOKE.SWIGPendingException.Pending)
2689 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2694 /// Calculates the width of the view given a height.<br>
2695 /// The natural size is used for default calculation.<br>
2696 /// size 0 is treated as aspect ratio 1:1.<br>
2698 /// <param name="height">Height to use</param>
2699 /// <returns>The width based on the height</returns>
2700 public float GetWidthForHeight(float height)
2702 float ret = NDalicPINVOKE.Actor_GetWidthForHeight(swigCPtr, height);
2703 if (NDalicPINVOKE.SWIGPendingException.Pending)
2704 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2708 public float GetRelayoutSize(DimensionType dimension)
2710 float ret = NDalicPINVOKE.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
2711 if (NDalicPINVOKE.SWIGPendingException.Pending)
2712 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2716 public void SetPadding(PaddingType padding)
2718 NDalicPINVOKE.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
2719 if (NDalicPINVOKE.SWIGPendingException.Pending)
2720 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2723 public void GetPadding(PaddingType paddingOut)
2725 NDalicPINVOKE.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
2726 if (NDalicPINVOKE.SWIGPendingException.Pending)
2727 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2730 internal void SetMinimumSize(Vector2 size)
2732 NDalicPINVOKE.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
2733 if (NDalicPINVOKE.SWIGPendingException.Pending)
2734 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2737 internal Vector2 GetMinimumSize()
2739 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMinimumSize(swigCPtr), true);
2740 if (NDalicPINVOKE.SWIGPendingException.Pending)
2741 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2745 internal void SetMaximumSize(Vector2 size)
2747 NDalicPINVOKE.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
2748 if (NDalicPINVOKE.SWIGPendingException.Pending)
2749 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2752 internal Vector2 GetMaximumSize()
2754 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMaximumSize(swigCPtr), true);
2755 if (NDalicPINVOKE.SWIGPendingException.Pending)
2756 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2760 internal int GetHierarchyDepth()
2762 int ret = NDalicPINVOKE.Actor_GetHierarchyDepth(swigCPtr);
2763 if (NDalicPINVOKE.SWIGPendingException.Pending)
2764 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2768 public uint AddRenderer(Renderer renderer)
2770 uint ret = NDalicPINVOKE.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
2771 if (NDalicPINVOKE.SWIGPendingException.Pending)
2772 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2776 internal uint GetRendererCount()
2778 uint ret = NDalicPINVOKE.Actor_GetRendererCount(swigCPtr);
2779 if (NDalicPINVOKE.SWIGPendingException.Pending)
2780 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2784 public Renderer GetRendererAt(uint index)
2786 IntPtr cPtr = NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index);
2787 Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Renderer;
2789 if (NDalicPINVOKE.SWIGPendingException.Pending)
2790 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2794 public void RemoveRenderer(Renderer renderer)
2796 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
2797 if (NDalicPINVOKE.SWIGPendingException.Pending)
2798 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2801 public void RemoveRenderer(uint index)
2803 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
2804 if (NDalicPINVOKE.SWIGPendingException.Pending)
2805 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2808 internal TouchDataSignal TouchSignal()
2810 TouchDataSignal ret = new TouchDataSignal(NDalicPINVOKE.Actor_TouchSignal(swigCPtr), false);
2811 if (NDalicPINVOKE.SWIGPendingException.Pending)
2812 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2816 internal HoverSignal HoveredSignal()
2818 HoverSignal ret = new HoverSignal(NDalicPINVOKE.Actor_HoveredSignal(swigCPtr), false);
2819 if (NDalicPINVOKE.SWIGPendingException.Pending)
2820 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2824 internal WheelSignal WheelEventSignal()
2826 WheelSignal ret = new WheelSignal(NDalicPINVOKE.Actor_WheelEventSignal(swigCPtr), false);
2827 if (NDalicPINVOKE.SWIGPendingException.Pending)
2828 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2832 internal ViewSignal OnWindowSignal()
2834 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnStageSignal(swigCPtr), false);
2835 if (NDalicPINVOKE.SWIGPendingException.Pending)
2836 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2840 internal ViewSignal OffWindowSignal()
2842 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OffStageSignal(swigCPtr), false);
2843 if (NDalicPINVOKE.SWIGPendingException.Pending)
2844 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2848 internal ViewSignal OnRelayoutSignal()
2850 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnRelayoutSignal(swigCPtr), false);
2851 if (NDalicPINVOKE.SWIGPendingException.Pending)
2852 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2856 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view) {
2857 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
2858 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2862 internal ViewSignal ResourcesLoadedSignal()
2864 ViewSignal ret = new ViewSignal(NDalicPINVOKE.ResourceReadySignal(swigCPtr), false);
2865 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2870 /// Gets/Sets the origin of an view, within its parent's area.<br>
2871 /// 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>
2872 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br>
2873 /// An view's position is the distance between this origin, and the view's anchor-point.<br>
2875 /// <pre>The View has been initialized.</pre>
2876 public Position ParentOrigin
2880 Position temp = new Position(0.0f, 0.0f, 0.0f);
2881 GetProperty(View.Property.PARENT_ORIGIN).Get(temp);
2886 SetProperty(View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue(value));
2890 internal float ParentOriginX
2895 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
2900 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
2904 internal float ParentOriginY
2909 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
2914 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
2918 internal float ParentOriginZ
2923 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
2928 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
2933 /// Gets/Sets the anchor-point of an view.<br>
2934 /// 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>
2935 /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br>
2936 /// An view position is the distance between its parent-origin and this anchor-point.<br>
2937 /// An view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br>
2938 /// <pre>The View has been initialized.</pre>
2940 public Position PivotPoint
2944 Position temp = new Position(0.0f, 0.0f, 0.0f);
2945 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
2950 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
2954 internal float PivotPointX
2959 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
2964 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
2968 internal float PivotPointY
2973 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
2978 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
2982 internal float PivotPointZ
2987 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
2992 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
2997 /// Gets/Sets the size width of an view.
2999 public float SizeWidth
3004 GetProperty(View.Property.SIZE_WIDTH).Get(out temp);
3009 SetProperty(View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue(value));
3014 /// Gets/Sets the size height of an view.
3016 public float SizeHeight
3021 GetProperty(View.Property.SIZE_HEIGHT).Get(out temp);
3026 SetProperty(View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue(value));
3031 /// Gets/Sets the position of the View.<br>
3032 /// By default, sets the position vector between the parent origin and pivot point(default).<br>
3033 /// If Position inheritance if disabled, sets the world position.<br>
3035 public Position Position
3039 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3040 GetProperty(View.Property.POSITION).Get(temp);
3045 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(value));
3050 /// Gets/Sets the position x of the View.
3052 public float PositionX
3057 GetProperty(View.Property.POSITION_X).Get(out temp);
3062 SetProperty(View.Property.POSITION_X, new Tizen.NUI.PropertyValue(value));
3067 /// Gets/Sets the position y of the View.
3069 public float PositionY
3074 GetProperty(View.Property.POSITION_Y).Get(out temp);
3079 SetProperty(View.Property.POSITION_Y, new Tizen.NUI.PropertyValue(value));
3084 /// Gets/Sets the position z of the View.
3086 public float PositionZ
3091 GetProperty(View.Property.POSITION_Z).Get(out temp);
3096 SetProperty(View.Property.POSITION_Z, new Tizen.NUI.PropertyValue(value));
3101 /// Gets/Sets the world position of the View.
3103 public Vector3 WorldPosition
3107 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3108 GetProperty(View.Property.WORLD_POSITION).Get(temp);
3113 internal float WorldPositionX
3118 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
3123 internal float WorldPositionY
3128 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
3133 internal float WorldPositionZ
3138 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
3144 /// Gets/Sets the orientation of the View.<br>
3145 /// An view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br>
3147 /// <remarks>This is an asynchronous method.</remarks>
3148 public Rotation Orientation
3152 Rotation temp = new Rotation();
3153 GetProperty(View.Property.ORIENTATION).Get(temp);
3158 SetProperty(View.Property.ORIENTATION, new Tizen.NUI.PropertyValue(value));
3163 /// Gets/Sets the world orientation of the View.<br>
3165 public Rotation WorldOrientation
3169 Rotation temp = new Rotation();
3170 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
3176 /// Gets/Sets the scale factor applied to an view.<br>
3178 public Vector3 Scale
3182 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3183 GetProperty(View.Property.SCALE).Get(temp);
3188 SetProperty(View.Property.SCALE, new Tizen.NUI.PropertyValue(value));
3193 /// Gets/Sets the scale x factor applied to an view.
3200 GetProperty(View.Property.SCALE_X).Get(out temp);
3205 SetProperty(View.Property.SCALE_X, new Tizen.NUI.PropertyValue(value));
3210 /// Gets/Sets the scale y factor applied to an view.
3217 GetProperty(View.Property.SCALE_Y).Get(out temp);
3222 SetProperty(View.Property.SCALE_Y, new Tizen.NUI.PropertyValue(value));
3227 /// Gets/Sets the scale z factor applied to an view.
3234 GetProperty(View.Property.SCALE_Z).Get(out temp);
3239 SetProperty(View.Property.SCALE_Z, new Tizen.NUI.PropertyValue(value));
3244 /// Gets the world scale of View.
3246 public Vector3 WorldScale
3250 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3251 GetProperty(View.Property.WORLD_SCALE).Get(temp);
3257 /// Retrieves the visibility flag of an view.
3260 /// If an view is not visible, then the view and its children will not be rendered.
3261 /// This is regardless of the individual visibility values of the children i.e.an view will only be rendered if all of its parents have visibility set to true.
3268 GetProperty(View.Property.VISIBLE).Get(out temp);
3270 }/* only get is required : removed
3273 SetProperty(View.Property.VISIBLE, new Tizen.NUI.PropertyValue(value));
3278 /// Gets the view's world color.
3280 public Vector4 WorldColor
3284 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3285 GetProperty(View.Property.WORLD_COLOR).Get(temp);
3290 internal Matrix WorldMatrix
3294 Matrix temp = new Matrix();
3295 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
3301 /// Gets/Sets the View's name.
3308 GetProperty(View.Property.NAME).Get(out temp);
3313 SetProperty(View.Property.NAME, new Tizen.NUI.PropertyValue(value));
3318 /// Get the number of children held by the view.
3320 public uint ChildCount
3324 return GetChildCount();
3329 /// Gets the View's ID.
3341 /// Gets/Sets the status of whether an view should emit touch or hover signals.
3343 public bool Sensitive
3348 GetProperty(View.Property.SENSITIVE).Get(out temp);
3353 SetProperty(View.Property.SENSITIVE, new Tizen.NUI.PropertyValue(value));
3358 /// Gets/Sets the status of whether the view should receive a notification when touch or hover motion events leave the boundary of the view.
3360 public bool LeaveRequired
3365 GetProperty(View.Property.LEAVE_REQUIRED).Get(out temp);
3370 SetProperty(View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue(value));
3375 /// Gets/Sets the status of whether a child view inherits it's parent's orientation.
3377 public bool InheritOrientation
3382 GetProperty(View.Property.INHERIT_ORIENTATION).Get(out temp);
3387 SetProperty(View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue(value));
3392 /// Gets/Sets the status of whether a child view inherits it's parent's scale.
3394 public bool InheritScale
3399 GetProperty(View.Property.INHERIT_SCALE).Get(out temp);
3404 SetProperty(View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue(value));
3409 /// Gets/Sets the status of how the view and its children should be drawn.<br>
3410 /// Not all views are renderable, but DrawMode can be inherited from any view.<br>
3411 /// 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>
3412 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br>
3413 /// Overlay views are drawn in a separate pass, after all non-overlay views within the Layer.<br>
3414 /// For overlay views, the drawing order is with respect to tree levels of Views, and depth-testing will not be used.<br>
3416 public DrawModeType DrawMode
3421 if (GetProperty(View.Property.DRAW_MODE).Get(out temp) == false)
3423 NUILog.Error("DrawMode get error!");
3428 return DrawModeType.Normal;
3430 return DrawModeType.Overlay2D;
3432 return DrawModeType.Stencil;
3434 return DrawModeType.Normal;
3439 SetProperty(View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)value));
3444 /// Gets/Sets the relative to parent size factor of the view.<br>
3445 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br>
3446 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br>
3448 public Vector3 SizeModeFactor
3452 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3453 GetProperty(View.Property.SIZE_MODE_FACTOR).Get(temp);
3458 SetProperty(View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue(value));
3463 /// Gets/Sets the width resize policy to be used.
3465 public ResizePolicyType WidthResizePolicy
3470 if (GetProperty(View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
3472 NUILog.Error("WidthResizePolicy get error!");
3477 return ResizePolicyType.Fixed;
3478 case "USE_NATURAL_SIZE":
3479 return ResizePolicyType.UseNaturalSize;
3480 case "FILL_TO_PARENT":
3481 return ResizePolicyType.FillToParent;
3482 case "SIZE_RELATIVE_TO_PARENT":
3483 return ResizePolicyType.SizeRelativeToParent;
3484 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3485 return ResizePolicyType.SizeFixedOffsetFromParent;
3486 case "FIT_TO_CHILDREN":
3487 return ResizePolicyType.FitToChildren;
3488 case "DIMENSION_DEPENDENCY":
3489 return ResizePolicyType.DimensionDependency;
3490 case "USE_ASSIGNED_SIZE":
3491 return ResizePolicyType.UseAssignedSize;
3493 return ResizePolicyType.Fixed;
3498 SetProperty(View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3503 /// Gets/Sets the height resize policy to be used.
3505 public ResizePolicyType HeightResizePolicy
3510 if (GetProperty(View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
3512 NUILog.Error("HeightResizePolicy get error!");
3517 return ResizePolicyType.Fixed;
3518 case "USE_NATURAL_SIZE":
3519 return ResizePolicyType.UseNaturalSize;
3520 case "FILL_TO_PARENT":
3521 return ResizePolicyType.FillToParent;
3522 case "SIZE_RELATIVE_TO_PARENT":
3523 return ResizePolicyType.SizeRelativeToParent;
3524 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3525 return ResizePolicyType.SizeFixedOffsetFromParent;
3526 case "FIT_TO_CHILDREN":
3527 return ResizePolicyType.FitToChildren;
3528 case "DIMENSION_DEPENDENCY":
3529 return ResizePolicyType.DimensionDependency;
3530 case "USE_ASSIGNED_SIZE":
3531 return ResizePolicyType.UseAssignedSize;
3533 return ResizePolicyType.Fixed;
3538 SetProperty(View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3543 /// Gets/Sets the policy to use when setting size with size negotiation.<br>
3544 /// Defaults to SizeScalePolicyType.UseSizeSet.<br>
3546 public SizeScalePolicyType SizeScalePolicy
3551 if (GetProperty(View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
3553 NUILog.Error("SizeScalePolicy get error!");
3557 case "USE_SIZE_SET":
3558 return SizeScalePolicyType.UseSizeSet;
3559 case "FIT_WITH_ASPECT_RATIO":
3560 return SizeScalePolicyType.FitWithAspectRatio;
3561 case "FILL_WITH_ASPECT_RATIO":
3562 return SizeScalePolicyType.FillWithAspectRatio;
3564 return SizeScalePolicyType.UseSizeSet;
3569 string valueToString = "";
3572 case SizeScalePolicyType.UseSizeSet:
3574 valueToString = "USE_SIZE_SET";
3577 case SizeScalePolicyType.FitWithAspectRatio:
3579 valueToString = "FIT_WITH_ASPECT_RATIO";
3582 case SizeScalePolicyType.FillWithAspectRatio:
3584 valueToString = "FILL_WITH_ASPECT_RATIO";
3589 valueToString = "USE_SIZE_SET";
3593 SetProperty(View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
3598 /// Gets/Sets the status of whether the width size is dependent on height size.
3600 public bool WidthForHeight
3605 GetProperty(View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
3610 SetProperty(View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue(value));
3615 /// Gets/Sets the status of whether the height size is dependent on width size.
3617 public bool HeightForWidth
3622 GetProperty(View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
3627 SetProperty(View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue(value));
3632 /// Gets/Sets the padding for use in layout.
3634 public Vector4 Padding
3638 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3639 GetProperty(View.Property.PADDING).Get(temp);
3644 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
3649 /// Gets/Sets the minimum size an view can be assigned in size negotiation.
3651 public Size2D MinimumSize
3655 Size2D temp = new Size2D(0, 0);
3656 GetProperty(View.Property.MINIMUM_SIZE).Get(temp);
3661 SetProperty(View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3666 /// Gets/Sets the maximum size an view can be assigned in size negotiation.
3668 public Size2D MaximumSize
3672 Size2D temp = new Size2D(0, 0);
3673 GetProperty(View.Property.MAXIMUM_SIZE).Get(temp);
3678 SetProperty(View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3683 /// Gets/Sets whether a child view inherits it's parent's position.<br>
3684 /// Default is to inherit.<br>
3685 /// 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>
3687 public bool InheritPosition
3692 GetProperty(View.Property.INHERIT_POSITION).Get(out temp);
3697 SetProperty(View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue(value));
3702 /// Gets/Sets clipping behavior(mode) of it's children.
3704 public ClippingModeType ClippingMode
3709 if (GetProperty(View.Property.CLIPPING_MODE).Get(out temp) == false)
3711 NUILog.Error("ClippingMode get error!");
3716 return ClippingModeType.Disabled;
3717 case "CLIP_CHILDREN":
3718 return ClippingModeType.ClipChildren;
3720 return ClippingModeType.Disabled;
3725 SetProperty(View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)value));
3730 /// Get the number of renderers held by the view.
3732 public uint RendererCount
3736 return GetRendererCount();
3743 [Obsolete("Please do not use! this will be deprecated")]
3744 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> Touched
3748 if (_touchDataEventHandler == null)
3750 _touchDataCallback = OnTouch;
3751 this.TouchSignal().Connect(_touchDataCallback);
3754 _touchDataEventHandler += value;
3759 _touchDataEventHandler -= value;
3761 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
3763 this.TouchSignal().Disconnect(_touchDataCallback);
3769 [Obsolete("Please do not use! this will be deprecated")]
3770 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> Hovered
3774 if (_hoverEventHandler == null)
3776 _hoverEventCallback = OnHoverEvent;
3777 this.HoveredSignal().Connect(_hoverEventCallback);
3780 _hoverEventHandler += value;
3785 _hoverEventHandler -= value;
3787 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
3789 this.HoveredSignal().Disconnect(_hoverEventCallback);
3795 [Obsolete("Please do not use! this will be deprecated")]
3796 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelMoved
3800 if (_wheelEventHandler == null)
3802 _wheelEventCallback = OnWheelEvent;
3803 this.WheelEventSignal().Connect(_wheelEventCallback);
3806 _wheelEventHandler += value;
3811 _wheelEventHandler -= value;
3813 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
3815 this.WheelEventSignal().Disconnect(_wheelEventCallback);
3821 [Obsolete("Please do not use! this will be deprecated")]
3822 public Position AnchorPoint
3826 Position temp = new Position(0.0f, 0.0f, 0.0f);
3827 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
3832 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3836 [Obsolete("Please do not use! this will be deprecated")]
3841 Size temp = new Size(0.0f, 0.0f, 0.0f);
3842 GetProperty(View.Property.SIZE).Get(temp);
3847 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(value));
3851 [Obsolete("Please do not use! this will be deprecated")]
3852 public event EventHandler OnWindowEvent
3856 if (_onWindowEventHandler == null)
3858 _onWindowEventCallback = OnWindow;
3859 this.OnWindowSignal().Connect(_onWindowEventCallback);
3862 _onWindowEventHandler += value;
3867 _onWindowEventHandler -= value;
3869 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
3871 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
3876 [Obsolete("Please do not use! this will be deprecated")]
3877 public event EventHandler OffWindowEvent
3881 if (_offWindowEventHandler == null)
3883 _offWindowEventCallback = OffWindow;
3884 this.OffWindowSignal().Connect(_offWindowEventCallback);
3887 _offWindowEventHandler += value;
3892 _offWindowEventHandler -= value;
3894 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
3896 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
3901 [Obsolete("Please do not use! this will be deprecated")]
3902 public event EventHandler OnRelayoutEvent
3906 if (_onRelayoutEventHandler == null)
3908 _onRelayoutEventCallback = OnRelayout;
3909 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
3912 _onRelayoutEventHandler += value;
3917 _onRelayoutEventHandler -= value;
3919 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
3921 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);