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();
300 e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
302 if (_keyEventHandler != null)
304 Delegate[] delegateList = _keyEventHandler.GetInvocationList();
306 // Oring the result of each callback.
307 foreach ( EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList )
309 result |= del( this, e );
316 private EventHandler _onRelayoutEventHandler;
317 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
318 private delegate void OnRelayoutEventCallbackType(IntPtr control);
319 private OnRelayoutEventCallbackType _onRelayoutEventCallback;
322 /// Event for OnRelayout signal which can be used to subscribe/unsubscribe the event handler.<br>
323 /// OnRelayout signal is emitted after the size has been set on the view during relayout.<br>
325 public event EventHandler Relayout
329 if (_onRelayoutEventHandler == null)
331 _onRelayoutEventCallback = OnRelayout;
332 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
335 _onRelayoutEventHandler += value;
340 _onRelayoutEventHandler -= value;
342 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
344 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
350 // Callback for View OnRelayout signal
351 private void OnRelayout(IntPtr data)
353 if (_onRelayoutEventHandler != null)
355 _onRelayoutEventHandler(this, null);
360 /// Event arguments that passed via Touch signal.
362 public class TouchEventArgs : EventArgs
364 private Touch _touch;
367 /// Touch - contains the information of touch points
382 private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
383 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
384 private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
385 private TouchDataCallbackType _touchDataCallback;
388 /// Event for Touched signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
389 /// Touched signal is emitted when touch input is received.<br>
391 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
395 if (_touchDataEventHandler == null)
397 _touchDataCallback = OnTouch;
398 this.TouchSignal().Connect(_touchDataCallback);
401 _touchDataEventHandler += value;
406 _touchDataEventHandler -= value;
408 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
410 this.TouchSignal().Disconnect(_touchDataCallback);
416 // Callback for View TouchSignal
417 private bool OnTouch(IntPtr view, IntPtr touchData)
419 TouchEventArgs e = new TouchEventArgs();
421 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
423 if (_touchDataEventHandler != null)
425 return _touchDataEventHandler(this, e);
432 /// Event arguments that passed via Hover signal.
434 public class HoverEventArgs : EventArgs
436 private Hover _hover;
439 /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
454 private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
455 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
456 private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
457 private HoverEventCallbackType _hoverEventCallback;
460 /// Event for Hovered signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
461 /// Hovered signal is emitted when hover input is received.<br>
463 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
467 if (_hoverEventHandler == null)
469 _hoverEventCallback = OnHoverEvent;
470 this.HoveredSignal().Connect(_hoverEventCallback);
473 _hoverEventHandler += value;
478 _hoverEventHandler -= value;
480 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
482 this.HoveredSignal().Disconnect(_hoverEventCallback);
488 // Callback for View Hover signal
489 private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
491 HoverEventArgs e = new HoverEventArgs();
493 e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
495 if (_hoverEventHandler != null)
497 return _hoverEventHandler(this, e);
504 /// Event arguments that passed via Wheel signal.
506 public class WheelEventArgs : EventArgs
508 private Wheel _wheel;
511 /// WheelEvent - store a wheel rolling type : MOUSE_WHEEL or CUSTOM_WHEEL
526 private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
527 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
528 private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
529 private WheelEventCallbackType _wheelEventCallback;
532 /// Event for WheelMoved signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
533 /// WheelMoved signal is emitted when wheel event is received.<br>
535 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
539 if (_wheelEventHandler == null)
541 _wheelEventCallback = OnWheelEvent;
542 this.WheelEventSignal().Connect(_wheelEventCallback);
545 _wheelEventHandler += value;
550 _wheelEventHandler -= value;
552 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
554 this.WheelEventSignal().Disconnect(_wheelEventCallback);
560 // Callback for View Wheel signal
561 private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
563 WheelEventArgs e = new WheelEventArgs();
565 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
567 if (_wheelEventHandler != null)
569 return _wheelEventHandler(this, e);
575 private EventHandler _onWindowEventHandler;
576 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
577 private delegate void OnWindowEventCallbackType(IntPtr control);
578 private OnWindowEventCallbackType _onWindowEventCallback;
581 /// Event for OnWindow signal which can be used to subscribe/unsubscribe the event handler.<br>
582 /// OnWindow signal is emitted after the view has been connected to the Window.<br>
584 public event EventHandler AddedToWindow
588 if (_onWindowEventHandler == null)
590 _onWindowEventCallback = OnWindow;
591 this.OnWindowSignal().Connect(_onWindowEventCallback);
594 _onWindowEventHandler += value;
599 _onWindowEventHandler -= value;
601 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
603 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
608 // Callback for View OnWindow signal
609 private void OnWindow(IntPtr data)
611 if (_onWindowEventHandler != null)
613 _onWindowEventHandler(this, null);
618 private EventHandler _offWindowEventHandler;
619 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
620 private delegate void OffWindowEventCallbackType(IntPtr control);
621 private OffWindowEventCallbackType _offWindowEventCallback;
624 /// Event for OffWindow signal which can be used to subscribe/unsubscribe the event handler.<br>
625 /// OffWindow signal is emitted after the view has been disconnected from the Window.<br>
627 public event EventHandler RemovedFromWindow
631 if (_offWindowEventHandler == null)
633 _offWindowEventCallback = OffWindow;
634 this.OffWindowSignal().Connect(_offWindowEventCallback);
637 _offWindowEventHandler += value;
642 _offWindowEventHandler -= value;
644 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
646 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
651 // Callback for View OffWindow signal
652 private void OffWindow(IntPtr data)
654 if (_offWindowEventHandler != null)
656 _offWindowEventHandler(this, null);
661 /// Event arguments of visibility changed.
663 public class VisibilityChangedEventArgs : EventArgs
666 private bool _visibility;
667 private VisibilityChangeType _type;
670 /// The view, or child of view, whose visibility has changed.
685 /// Whether the view is now visible or not.
687 public bool Visibility
700 /// Whether the view's visible property has changed or a parent's.
702 public VisibilityChangeType Type
715 private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
716 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
717 private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
718 private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
721 /// Event for visibility change which can be used to subscribe/unsubscribe the event handler.<br>
722 /// This signal is emitted when the visible property of this or a parent view is changed.<br>
724 public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
728 if (_visibilityChangedEventHandler == null)
730 _visibilityChangedEventCallback = OnVisibilityChanged;
731 VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
734 _visibilityChangedEventHandler += value;
739 _visibilityChangedEventHandler -= value;
741 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
743 VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
748 // Callback for View visibility change signal
749 private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
751 VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
754 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
756 e.Visibility = visibility;
759 if (_visibilityChangedEventHandler != null)
761 _visibilityChangedEventHandler(this, e);
765 // Resource Ready Signal
767 private EventHandler _resourcesLoadedEventHandler;
768 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
769 private delegate void ResourcesLoadedCallbackType(IntPtr control);
770 private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
773 /// Event for ResourcesLoadedSignal signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
774 /// This signal is emitted after all resources required by a View are loaded and ready.<br>
776 public event EventHandler ResourcesLoaded
780 if (_resourcesLoadedEventHandler == null)
782 _ResourcesLoadedCallback = OnResourcesLoaded;
783 this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
786 _resourcesLoadedEventHandler += value;
791 _resourcesLoadedEventHandler -= value;
793 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
795 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
800 private void OnResourcesLoaded(IntPtr view)
802 if (_resourcesLoadedEventHandler != null)
804 _resourcesLoadedEventHandler(this, null);
808 internal IntPtr GetPtrfromView()
810 return (IntPtr)swigCPtr;
813 internal class Property
815 internal static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get();
816 internal static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get();
817 internal static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get();
818 internal static readonly int LEFT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
819 internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
820 internal static readonly int UP_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
821 internal static readonly int DOWN_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
822 internal static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get();
823 internal static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get();
824 internal static readonly int SIBLING_ORDER = NDalicManualPINVOKE.Actor_Property_SIBLING_ORDER_get();
825 internal static readonly int OPACITY = NDalicManualPINVOKE.Actor_Property_OPACITY_get();
826 internal static readonly int SCREEN_POSITION = NDalicManualPINVOKE.Actor_Property_SCREEN_POSITION_get();
827 internal static readonly int POSITION_USES_ANCHOR_POINT = NDalicManualPINVOKE.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
828 internal static readonly int PARENT_ORIGIN = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_get();
829 internal static readonly int PARENT_ORIGIN_X = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_X_get();
830 internal static readonly int PARENT_ORIGIN_Y = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Y_get();
831 internal static readonly int PARENT_ORIGIN_Z = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Z_get();
832 internal static readonly int ANCHOR_POINT = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_get();
833 internal static readonly int ANCHOR_POINT_X = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_X_get();
834 internal static readonly int ANCHOR_POINT_Y = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Y_get();
835 internal static readonly int ANCHOR_POINT_Z = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Z_get();
836 internal static readonly int SIZE = NDalicPINVOKE.Actor_Property_SIZE_get();
837 internal static readonly int SIZE_WIDTH = NDalicPINVOKE.Actor_Property_SIZE_WIDTH_get();
838 internal static readonly int SIZE_HEIGHT = NDalicPINVOKE.Actor_Property_SIZE_HEIGHT_get();
839 internal static readonly int SIZE_DEPTH = NDalicPINVOKE.Actor_Property_SIZE_DEPTH_get();
840 internal static readonly int POSITION = NDalicPINVOKE.Actor_Property_POSITION_get();
841 internal static readonly int POSITION_X = NDalicPINVOKE.Actor_Property_POSITION_X_get();
842 internal static readonly int POSITION_Y = NDalicPINVOKE.Actor_Property_POSITION_Y_get();
843 internal static readonly int POSITION_Z = NDalicPINVOKE.Actor_Property_POSITION_Z_get();
844 internal static readonly int WORLD_POSITION = NDalicPINVOKE.Actor_Property_WORLD_POSITION_get();
845 internal static readonly int WORLD_POSITION_X = NDalicPINVOKE.Actor_Property_WORLD_POSITION_X_get();
846 internal static readonly int WORLD_POSITION_Y = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Y_get();
847 internal static readonly int WORLD_POSITION_Z = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Z_get();
848 internal static readonly int ORIENTATION = NDalicPINVOKE.Actor_Property_ORIENTATION_get();
849 internal static readonly int WORLD_ORIENTATION = NDalicPINVOKE.Actor_Property_WORLD_ORIENTATION_get();
850 internal static readonly int SCALE = NDalicPINVOKE.Actor_Property_SCALE_get();
851 internal static readonly int SCALE_X = NDalicPINVOKE.Actor_Property_SCALE_X_get();
852 internal static readonly int SCALE_Y = NDalicPINVOKE.Actor_Property_SCALE_Y_get();
853 internal static readonly int SCALE_Z = NDalicPINVOKE.Actor_Property_SCALE_Z_get();
854 internal static readonly int WORLD_SCALE = NDalicPINVOKE.Actor_Property_WORLD_SCALE_get();
855 internal static readonly int VISIBLE = NDalicPINVOKE.Actor_Property_VISIBLE_get();
856 internal static readonly int WORLD_COLOR = NDalicPINVOKE.Actor_Property_WORLD_COLOR_get();
857 internal static readonly int WORLD_MATRIX = NDalicPINVOKE.Actor_Property_WORLD_MATRIX_get();
858 internal static readonly int NAME = NDalicPINVOKE.Actor_Property_NAME_get();
859 internal static readonly int SENSITIVE = NDalicPINVOKE.Actor_Property_SENSITIVE_get();
860 internal static readonly int LEAVE_REQUIRED = NDalicPINVOKE.Actor_Property_LEAVE_REQUIRED_get();
861 internal static readonly int INHERIT_ORIENTATION = NDalicPINVOKE.Actor_Property_INHERIT_ORIENTATION_get();
862 internal static readonly int INHERIT_SCALE = NDalicPINVOKE.Actor_Property_INHERIT_SCALE_get();
863 internal static readonly int DRAW_MODE = NDalicPINVOKE.Actor_Property_DRAW_MODE_get();
864 internal static readonly int SIZE_MODE_FACTOR = NDalicPINVOKE.Actor_Property_SIZE_MODE_FACTOR_get();
865 internal static readonly int WIDTH_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_WIDTH_RESIZE_POLICY_get();
866 internal static readonly int HEIGHT_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_HEIGHT_RESIZE_POLICY_get();
867 internal static readonly int SIZE_SCALE_POLICY = NDalicPINVOKE.Actor_Property_SIZE_SCALE_POLICY_get();
868 internal static readonly int WIDTH_FOR_HEIGHT = NDalicPINVOKE.Actor_Property_WIDTH_FOR_HEIGHT_get();
869 internal static readonly int HEIGHT_FOR_WIDTH = NDalicPINVOKE.Actor_Property_HEIGHT_FOR_WIDTH_get();
870 internal static readonly int PADDING = NDalicPINVOKE.Actor_Property_PADDING_get();
871 internal static readonly int MINIMUM_SIZE = NDalicPINVOKE.Actor_Property_MINIMUM_SIZE_get();
872 internal static readonly int MAXIMUM_SIZE = NDalicPINVOKE.Actor_Property_MAXIMUM_SIZE_get();
873 internal static readonly int INHERIT_POSITION = NDalicPINVOKE.Actor_Property_INHERIT_POSITION_get();
874 internal static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
878 /// Describes the direction to move the focus towards.
880 public enum FocusDirection
891 /// Creates a new instance of a View.
893 public View() : this(NDalicPINVOKE.View_New(), true)
895 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
898 internal View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true)
900 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
904 /// Downcasts a handle to View handle.<br>
905 /// If handle points to a View, the downcast produces valid handle.<br>
906 /// If not, the returned handle is left uninitialized.<br>
908 /// <param name="handle">Handle to an object</param>
909 /// <returns>A handle to a View or an uninitialized handle</returns>
910 [Obsolete("Please do not use! this will be deprecated, instead please use as keyword.")]
911 public new static View DownCast(BaseHandle handle)
913 View ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as View;
914 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
918 [Obsolete("Please do not use! this will be deprecated, instead please use as keyword.")]
919 public static T DownCast<T>(View view) where T : View
921 T ret = Registry.GetManagedBaseHandleFromNativePtr(view) as T;
929 private View ConvertIdToView(uint id)
935 view = Parent.FindChildById(id);
940 view = Window.Instance.GetRootLayer().FindChildById(id);
946 internal void SetKeyInputFocus()
948 NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
949 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
953 /// Quries whether the view has focus.
955 /// <returns>true if this view has focus</returns>
956 public bool HasFocus()
958 bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
959 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
963 internal void ClearKeyInputFocus()
965 NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
966 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
969 internal PinchGestureDetector GetPinchGestureDetector()
971 PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
972 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
976 internal PanGestureDetector GetPanGestureDetector()
978 PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
979 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
983 internal TapGestureDetector GetTapGestureDetector()
985 TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
986 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
990 internal LongPressGestureDetector GetLongPressGestureDetector()
992 LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
993 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
998 /// Sets the name of the style to be applied to the view.
1000 /// <param name="styleName">A string matching a style described in a stylesheet</param>
1001 public void SetStyleName(string styleName)
1003 NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
1004 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1008 /// Retrieves the name of the style to be applied to the view (if any).
1010 /// <returns>A string matching a style, or an empty string</returns>
1011 public string GetStyleName()
1013 string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
1014 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1018 internal void SetBackgroundColor(Vector4 color)
1020 NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
1021 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1024 internal Vector4 GetBackgroundColor()
1026 Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
1027 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1031 internal void SetBackgroundImage(Image image)
1033 NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
1034 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1038 /// Clears the background.
1040 public void ClearBackground()
1042 NDalicPINVOKE.View_ClearBackground(swigCPtr);
1043 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1046 internal ControlKeySignal KeyEventSignal()
1048 ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
1049 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1053 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
1055 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
1056 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1060 internal KeyInputFocusSignal KeyInputFocusLostSignal()
1062 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
1063 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1067 internal View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
1069 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1072 internal enum PropertyRange
1074 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
1075 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
1076 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
1080 /// styleName, type string.
1082 public string StyleName
1087 GetProperty(View.Property.STYLE_NAME).Get(out temp);
1092 SetProperty(View.Property.STYLE_NAME, new Tizen.NUI.PropertyValue(value));
1097 /// mutually exclusive with BACKGROUND_IMAGE & BACKGROUND, type Vector4.
1099 public Color BackgroundColor
1103 Color backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1105 Tizen.NUI.PropertyMap background = Background;
1107 background.Find(Visual.Property.Type)?.Get(out visualType);
1108 if (visualType == (int)Visual.Type.Color)
1110 background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor);
1113 return backgroundColor;
1117 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1122 /// Create an Animation to animate the background color visual. If there is no
1123 /// background visual, creates one with transparent black as it's mixColor.
1125 public Animation AnimateBackgroundColor( object destinationValue,
1128 AlphaFunction.BuiltinFunctions? alphaFunction = null,
1129 object initialValue = null)
1131 Tizen.NUI.PropertyMap background = Background;
1133 if( background.Empty() )
1135 // If there is no background yet, ensure there is a transparent
1137 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1138 background = Background;
1140 return AnimateColor( "background", destinationValue, startTime, endTime, alphaFunction, initialValue );
1144 /// Create an Animation to animate the mixColor of the named visual.
1146 public Animation AnimateColor( string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null )
1148 Animation animation = null;
1150 PropertyMap _animator = new PropertyMap();
1151 if( alphaFunction != null )
1153 _animator.Add("alphaFunction", new PropertyValue( AlphaFunction.BuiltinToPropertyKey(alphaFunction) ) );
1156 PropertyMap _timePeriod = new PropertyMap();
1157 _timePeriod.Add( "duration", new PropertyValue((endTime-startTime)/1000.0f) );
1158 _timePeriod.Add( "delay", new PropertyValue( startTime/1000.0f ) );
1159 _animator.Add( "timePeriod", new PropertyValue( _timePeriod ) );
1161 PropertyMap _transition = new PropertyMap();
1162 _transition.Add( "animator", new PropertyValue( _animator ) );
1163 _transition.Add( "target", new PropertyValue( targetVisual ) );
1164 _transition.Add( "property", new PropertyValue( "mixColor" ) );
1166 if( initialColor != null )
1168 PropertyValue initValue = PropertyValue.CreateFromObject( initialColor );
1169 _transition.Add( "initialValue", initValue );
1172 PropertyValue destValue = PropertyValue.CreateFromObject( destinationColor );
1173 _transition.Add( "targetValue", destValue );
1174 TransitionData _transitionData = new TransitionData( _transition );
1176 animation = new Animation( NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true );
1177 if (NDalicPINVOKE.SWIGPendingException.Pending)
1178 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1184 /// mutually exclusive with BACKGROUND_COLOR & BACKGROUND, type Map.
1186 public string BackgroundImage
1190 string backgroundImage = "";
1192 Tizen.NUI.PropertyMap background = Background;
1194 background.Find(Visual.Property.Type)?.Get(out visualType);
1195 if (visualType == (int)Visual.Type.Image)
1197 background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
1200 return backgroundImage;
1204 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1208 public Tizen.NUI.PropertyMap Background
1212 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1213 GetProperty( View.Property.BACKGROUND ).Get(temp);
1218 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1224 /// The current state of the view.
1231 if (GetProperty(View.Property.STATE).Get(out temp) == false)
1233 NUILog.Error("State get error!");
1239 return States.Normal;
1243 return States.Focused;
1247 return States.Disabled;
1251 return States.Normal;
1257 SetProperty(View.Property.STATE, new Tizen.NUI.PropertyValue((int)value));
1262 /// The current sub state of the view.
1264 public States SubState
1269 if (GetProperty(View.Property.SUB_STATE).Get(out temp) == false)
1271 NUILog.Error("subState get error!");
1276 return States.Normal;
1278 return States.Focused;
1280 return States.Disabled;
1282 return States.Normal;
1287 string valueToString = "";
1292 valueToString = "NORMAL";
1295 case States.Focused:
1297 valueToString = "FOCUSED";
1300 case States.Disabled:
1302 valueToString = "DISABLED";
1307 valueToString = "NORMAL";
1311 SetProperty(View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
1316 /// Displays a tooltip
1318 public Tizen.NUI.PropertyMap Tooltip
1322 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1323 GetProperty(View.Property.TOOLTIP).Get(temp);
1328 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1333 /// Displays a tooltip as Text
1335 public string TooltipText
1339 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1343 private int LeftFocusableViewId
1348 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
1353 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1357 private int RightFocusableViewId
1362 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
1367 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1371 private int UpFocusableViewId
1376 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
1381 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1385 private int DownFocusableViewId
1390 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
1395 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1400 /// Child Property of FlexContainer.<br>
1401 /// The proportion of the free space in the container the flex item will receive.<br>
1402 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br>
1409 GetProperty(FlexContainer.ChildProperty.FLEX).Get(out temp);
1414 SetProperty(FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue(value));
1419 /// Child Property of FlexContainer.<br>
1420 /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br>
1422 public int AlignSelf
1427 GetProperty(FlexContainer.ChildProperty.ALIGN_SELF).Get(out temp);
1432 SetProperty(FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue(value));
1437 /// Child Property of FlexContainer.<br>
1438 /// The space around the flex item.<br>
1440 public Vector4 FlexMargin
1444 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1445 GetProperty(FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
1450 SetProperty(FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue(value));
1455 /// The top-left cell this child occupies, if not set, the first available cell is used
1457 public Vector2 CellIndex
1461 Vector2 temp = new Vector2(0.0f, 0.0f);
1462 GetProperty(TableView.ChildProperty.CELL_INDEX).Get(temp);
1467 SetProperty(TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue(value));
1472 /// The number of rows this child occupies, if not set, default value is 1
1474 public float RowSpan
1479 GetProperty(TableView.ChildProperty.ROW_SPAN).Get(out temp);
1484 SetProperty(TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue(value));
1489 /// The number of columns this child occupies, if not set, default value is 1
1491 public float ColumnSpan
1496 GetProperty(TableView.ChildProperty.COLUMN_SPAN).Get(out temp);
1501 SetProperty(TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue(value));
1506 /// The horizontal alignment of this child inside the cells, if not set, default value is 'left'
1508 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
1513 if (GetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
1515 NUILog.Error("CellHorizontalAlignment get error!");
1521 return Tizen.NUI.HorizontalAlignmentType.Left;
1523 return Tizen.NUI.HorizontalAlignmentType.Center;
1525 return Tizen.NUI.HorizontalAlignmentType.Right;
1527 return Tizen.NUI.HorizontalAlignmentType.Left;
1532 string valueToString = "";
1535 case Tizen.NUI.HorizontalAlignmentType.Left:
1537 valueToString = "left";
1540 case Tizen.NUI.HorizontalAlignmentType.Center:
1542 valueToString = "center";
1545 case Tizen.NUI.HorizontalAlignmentType.Right:
1547 valueToString = "right";
1552 valueToString = "left";
1556 SetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1561 /// The vertical alignment of this child inside the cells, if not set, default value is 'top'
1563 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
1568 GetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
1570 NUILog.Error("CellVerticalAlignment get error!");
1576 return Tizen.NUI.VerticalAlignmentType.Top;
1578 return Tizen.NUI.VerticalAlignmentType.Center;
1580 return Tizen.NUI.VerticalAlignmentType.Bottom;
1582 return Tizen.NUI.VerticalAlignmentType.Top;
1587 string valueToString = "";
1590 case Tizen.NUI.VerticalAlignmentType.Top:
1592 valueToString = "top";
1595 case Tizen.NUI.VerticalAlignmentType.Center:
1597 valueToString = "center";
1600 case Tizen.NUI.VerticalAlignmentType.Bottom:
1602 valueToString = "bottom";
1607 valueToString = "top";
1611 SetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1616 /// The left focusable view.<br>
1617 /// This will return NULL if not set.<br>
1618 /// This will also return NULL if the specified left focusable view is not on Window.<br>
1620 public View LeftFocusableView
1622 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1625 if (LeftFocusableViewId >= 0)
1627 return ConvertIdToView((uint)LeftFocusableViewId);
1633 LeftFocusableViewId = (int)value.GetId();
1638 /// The right focusable view.<br>
1639 /// This will return NULL if not set.<br>
1640 /// This will also return NULL if the specified right focusable view is not on Window.<br>
1642 public View RightFocusableView
1644 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1647 if (RightFocusableViewId >= 0)
1649 return ConvertIdToView((uint)RightFocusableViewId);
1655 RightFocusableViewId = (int)value.GetId();
1660 /// The up focusable view.<br>
1661 /// This will return NULL if not set.<br>
1662 /// This will also return NULL if the specified up focusable view is not on Window.<br>
1664 public View UpFocusableView
1666 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1669 if (UpFocusableViewId >= 0)
1671 return ConvertIdToView((uint)UpFocusableViewId);
1677 UpFocusableViewId = (int)value.GetId();
1682 /// The down focusable view.<br>
1683 /// This will return NULL if not set.<br>
1684 /// This will also return NULL if the specified down focusable view is not on Window.<br>
1686 public View DownFocusableView
1688 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1691 if (DownFocusableViewId >= 0)
1693 return ConvertIdToView((uint)DownFocusableViewId);
1699 DownFocusableViewId = (int)value.GetId();
1704 /// whether the view should be focusable by keyboard navigation.
1706 public bool Focusable
1710 SetKeyboardFocusable(value);
1714 return IsKeyboardFocusable();
1719 /// Enumeration for describing the states of view.
1738 /// Retrieves the position of the View.<br>
1739 /// The coordinates are relative to the View's parent.<br>
1741 public Position CurrentPosition
1745 return GetCurrentPosition();
1750 /// Sets the size of an view for width and height.<br>
1751 /// Geometry can be scaled to fit within this area.<br>
1752 /// This does not interfere with the views scale factor.<br>
1753 /// The views default depth is the minimum of width & height.<br>
1755 public Size2D Size2D
1759 Size temp = new Size(0.0f, 0.0f, 0.0f);
1760 GetProperty(View.Property.SIZE).Get(temp);
1761 Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
1766 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(new Size(value)));
1771 /// Retrieves the size of the View.<br>
1772 /// The coordinates are relative to the View's parent.<br>
1774 public Size2D CurrentSize
1778 return GetCurrentSize();
1783 /// Retrieves the view's parent.<br>
1793 [Obsolete("Please do not use! this will be deprecated. Please use Visibility instead.")]
1803 /// Retrieves and sets the view's opacity.<br>
1805 public float Opacity
1810 GetProperty(View.Property.OPACITY).Get(out temp);
1815 SetProperty(View.Property.OPACITY, new Tizen.NUI.PropertyValue(value));
1820 /// Sets the position of the View for X and Y.<br>
1821 /// By default, sets the position vector between the parent origin and pivot point(default).<br>
1822 /// If Position inheritance if disabled, sets the world position.<br>
1824 public Position2D Position2D
1828 Position temp = new Position(0.0f, 0.0f, 0.0f);
1829 GetProperty(View.Property.POSITION).Get(temp);
1830 return new Position2D(temp);
1834 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(new Position(value)));
1839 /// Retrieves screen postion of view's.<br>
1841 public Vector2 ScreenPosition
1845 Vector2 temp = new Vector2(0.0f, 0.0f);
1846 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
1852 /// Determines whether the pivot point should be used to determine the position of the view.
1853 /// This is true by default.
1855 /// <remarks>If false, then the top-left of the view is used for the position.
1856 /// Setting this to false will allow scaling or rotation around the anchor-point without affecting the view's position.
1858 public bool PositionUsesPivotPoint
1863 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
1868 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
1872 [Obsolete("Please do not use! this will be deprecated")]
1873 public bool PositionUsesAnchorPoint
1878 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
1883 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
1887 internal bool FocusState
1891 return IsKeyboardFocusable();
1895 SetKeyboardFocusable(value);
1900 /// Queries whether the view is connected to the Stage.<br>
1901 /// When an view is connected, it will be directly or indirectly parented to the root View.<br>
1903 public bool IsOnWindow
1912 /// Gets depth in the hierarchy for the view.
1914 public int HierarchyDepth
1918 return GetHierarchyDepth();
1923 /// Sets the sibling order of the view so depth position can be defined within the same parent.
1926 /// Note The initial value is 0.
1927 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove and LowerBelow will override the sibling order.
1928 /// The values set by this Property will likely change.
1930 public int SiblingOrder
1935 GetProperty(View.Property.SIBLING_ORDER).Get(out temp);
1940 SetProperty(View.Property.SIBLING_ORDER, new Tizen.NUI.PropertyValue(value));
1945 /// Returns the natural size of the view.
1948 /// Deriving classes stipulate the natural size and by default a view has a ZERO natural size.
1950 [Obsolete("Please do not use! this will be deprecated, please use NaturalSize2D instead")]
1951 public Vector3 NaturalSize
1955 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
1956 if (NDalicPINVOKE.SWIGPendingException.Pending)
1957 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1963 /// Returns the natural size (Size2D) of the view.
1966 /// Deriving classes stipulate the natural size and by default a view has a ZERO natural size.
1968 public Size2D NaturalSize2D
1972 Vector3 temp = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
1973 if (NDalicPINVOKE.SWIGPendingException.Pending)
1974 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1976 return new Size2D((int)temp.Width, (int)temp.Height);
1984 /// This is an asynchronous method.
1995 /// This is an asynchronous method.
1996 /// If an view is hidden, then the view and its children will not be rendered.
1997 /// 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.
2004 internal void Raise()
2006 NDalicPINVOKE.Raise(swigCPtr);
2007 if (NDalicPINVOKE.SWIGPendingException.Pending)
2008 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2011 internal void Lower()
2013 NDalicPINVOKE.Lower(swigCPtr);
2014 if (NDalicPINVOKE.SWIGPendingException.Pending)
2015 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2019 /// Raise view above all other views.
2022 /// Sibling order of views within the parent will be updated automatically.
2023 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2025 public void RaiseToTop()
2027 NDalicPINVOKE.RaiseToTop(swigCPtr);
2028 if (NDalicPINVOKE.SWIGPendingException.Pending)
2029 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2033 /// Lower view to the bottom of all views.
2036 /// Sibling order of views within the parent will be updated automatically.
2037 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2039 public void LowerToBottom()
2041 NDalicPINVOKE.LowerToBottom(swigCPtr);
2042 if (NDalicPINVOKE.SWIGPendingException.Pending)
2043 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2047 /// Query if all resources required by a View are loaded and ready.
2049 /// <remarks>Most resources are only loaded when the control is placed on stage
2051 public bool IsResourceReady()
2053 bool ret = NDalicPINVOKE.IsResourceReady(swigCPtr);
2054 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2059 /// Raise the view to above the target view.
2061 /// <remarks>Sibling order of views within the parent will be updated automatically.
2062 /// Views on the level above the target view will still be shown above this view.
2063 /// Raising this view above views with the same sibling order as each other will raise this view above them.
2064 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2066 /// <param name="target">Will be raised above this view</param>
2067 internal void RaiseAbove(View target)
2069 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
2070 if (NDalicPINVOKE.SWIGPendingException.Pending)
2071 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2075 /// Lower the view to below the target view.
2077 /// <remarks>Sibling order of views within the parent will be updated automatically.
2078 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
2079 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2081 /// <param name="target">Will be lowered below this view</param>
2082 internal void LowerBelow(View target)
2084 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
2085 if (NDalicPINVOKE.SWIGPendingException.Pending)
2086 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2089 internal string GetName()
2091 string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);
2092 if (NDalicPINVOKE.SWIGPendingException.Pending)
2093 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2097 internal void SetName(string name)
2099 NDalicPINVOKE.Actor_SetName(swigCPtr, name);
2100 if (NDalicPINVOKE.SWIGPendingException.Pending)
2101 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2104 internal uint GetId()
2106 uint ret = NDalicPINVOKE.Actor_GetId(swigCPtr);
2107 if (NDalicPINVOKE.SWIGPendingException.Pending)
2108 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2112 internal bool IsRoot()
2114 bool ret = NDalicPINVOKE.Actor_IsRoot(swigCPtr);
2115 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2119 internal bool OnWindow()
2121 bool ret = NDalicPINVOKE.Actor_OnStage(swigCPtr);
2122 if (NDalicPINVOKE.SWIGPendingException.Pending)
2123 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2127 internal Layer GetLayer()
2129 IntPtr cPtr = NDalicPINVOKE.Actor_GetLayer(swigCPtr);
2130 Layer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Layer;
2132 if (NDalicPINVOKE.SWIGPendingException.Pending)
2133 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2138 /// Adds a child view to this View.
2140 /// <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>
2141 /// <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>
2142 /// <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>
2143 /// <param name="child">The child</param>
2144 public void Add(View child)
2146 NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
2147 if (NDalicPINVOKE.SWIGPendingException.Pending)
2148 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2152 /// Removes a child View from this View. If the view was not a child of this view, this is a no-op.
2154 /// <pre>This View(the parent) has been initialized. The child view is not the same as the parent view.</pre>
2155 /// <param name="child">The child</param>
2156 public void Remove(View child)
2158 NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
2159 if (NDalicPINVOKE.SWIGPendingException.Pending)
2160 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2164 /// Removes a View from its Parent View / Layer. If the View has no parent, this method does nothing.
2166 /// <pre>The (child) View has been initialized. </pre>
2167 public void Unparent()
2169 NDalicPINVOKE.Actor_Unparent(swigCPtr);
2170 if (NDalicPINVOKE.SWIGPendingException.Pending)
2171 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2175 /// Retrieves the number of children held by the view.
2177 /// <pre>The View has been initialized.</pre>
2178 /// <returns>The number of children</returns>
2179 internal uint GetChildCount()
2181 uint ret = NDalicPINVOKE.Actor_GetChildCount(swigCPtr);
2182 if (NDalicPINVOKE.SWIGPendingException.Pending)
2183 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2188 /// Retrieves child view by index.
2190 /// <pre>The View has been initialized.</pre>
2191 /// <param name="index">The index of the child to retrieve</param>
2192 /// <returns>The view for the given index or empty handle if children not initialized</returns>
2193 public View GetChildAt(uint index)
2195 IntPtr cPtr = NDalicPINVOKE.Actor_GetChildAt(swigCPtr, index);
2197 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2199 if (NDalicPINVOKE.SWIGPendingException.Pending)
2200 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2205 /// Search through this view's hierarchy for an view with the given name.
2206 /// The view itself is also considered in the search.
2208 /// <pre>The View has been initialized.</pre>
2209 /// <param name="viewName">The name of the view to find</param>
2210 /// <returns>A handle to the view if found, or an empty handle if not</returns>
2211 public View FindChildByName(string viewName)
2213 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
2215 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2217 if (NDalicPINVOKE.SWIGPendingException.Pending)
2218 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2222 internal View FindChildById(uint id)
2224 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
2226 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2228 if (NDalicPINVOKE.SWIGPendingException.Pending)
2229 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2233 internal View GetParent()
2236 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
2238 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(cPtr);
2240 if(basehandle is Layer)
2242 ret = new View(cPtr,false);
2246 ret = basehandle as View;
2249 if (NDalicPINVOKE.SWIGPendingException.Pending)
2250 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2254 internal void SetParentOrigin(Vector3 origin)
2256 NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
2257 if (NDalicPINVOKE.SWIGPendingException.Pending)
2258 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2261 internal Vector3 GetCurrentParentOrigin()
2263 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentParentOrigin(swigCPtr), true);
2264 if (NDalicPINVOKE.SWIGPendingException.Pending)
2265 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2269 internal void SetAnchorPoint(Vector3 anchorPoint)
2271 NDalicPINVOKE.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
2272 if (NDalicPINVOKE.SWIGPendingException.Pending)
2273 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2276 internal Vector3 GetCurrentAnchorPoint()
2278 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentAnchorPoint(swigCPtr), true);
2279 if (NDalicPINVOKE.SWIGPendingException.Pending)
2280 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2284 internal void SetSize(float width, float height)
2286 NDalicPINVOKE.Actor_SetSize__SWIG_0(swigCPtr, width, height);
2287 if (NDalicPINVOKE.SWIGPendingException.Pending)
2288 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2291 internal void SetSize(float width, float height, float depth)
2293 NDalicPINVOKE.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
2294 if (NDalicPINVOKE.SWIGPendingException.Pending)
2295 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2298 internal void SetSize(Vector2 size)
2300 NDalicPINVOKE.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
2301 if (NDalicPINVOKE.SWIGPendingException.Pending)
2302 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2305 internal void SetSize(Vector3 size)
2307 NDalicPINVOKE.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
2308 if (NDalicPINVOKE.SWIGPendingException.Pending)
2309 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2312 internal Vector3 GetTargetSize()
2314 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetTargetSize(swigCPtr), true);
2315 if (NDalicPINVOKE.SWIGPendingException.Pending)
2316 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2320 internal Size2D GetCurrentSize()
2322 Size ret = new Size(NDalicPINVOKE.Actor_GetCurrentSize(swigCPtr), true);
2323 if (NDalicPINVOKE.SWIGPendingException.Pending)
2324 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2325 Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
2329 internal Vector3 GetNaturalSize()
2331 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2332 if (NDalicPINVOKE.SWIGPendingException.Pending)
2333 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2337 internal void SetPosition(float x, float y)
2339 NDalicPINVOKE.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
2340 if (NDalicPINVOKE.SWIGPendingException.Pending)
2341 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2344 internal void SetPosition(float x, float y, float z)
2346 NDalicPINVOKE.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
2347 if (NDalicPINVOKE.SWIGPendingException.Pending)
2348 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2351 internal void SetPosition(Vector3 position)
2353 NDalicPINVOKE.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
2354 if (NDalicPINVOKE.SWIGPendingException.Pending)
2355 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2358 internal void SetX(float x)
2360 NDalicPINVOKE.Actor_SetX(swigCPtr, x);
2361 if (NDalicPINVOKE.SWIGPendingException.Pending)
2362 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2365 internal void SetY(float y)
2367 NDalicPINVOKE.Actor_SetY(swigCPtr, y);
2368 if (NDalicPINVOKE.SWIGPendingException.Pending)
2369 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2372 internal void SetZ(float z)
2374 NDalicPINVOKE.Actor_SetZ(swigCPtr, z);
2375 if (NDalicPINVOKE.SWIGPendingException.Pending)
2376 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2379 internal void TranslateBy(Vector3 distance)
2381 NDalicPINVOKE.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
2382 if (NDalicPINVOKE.SWIGPendingException.Pending)
2383 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2386 internal Position GetCurrentPosition()
2388 Position ret = new Position(NDalicPINVOKE.Actor_GetCurrentPosition(swigCPtr), true);
2389 if (NDalicPINVOKE.SWIGPendingException.Pending)
2390 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2394 internal Vector3 GetCurrentWorldPosition()
2396 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldPosition(swigCPtr), true);
2397 if (NDalicPINVOKE.SWIGPendingException.Pending)
2398 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2402 internal void SetInheritPosition(bool inherit)
2404 NDalicPINVOKE.Actor_SetInheritPosition(swigCPtr, inherit);
2405 if (NDalicPINVOKE.SWIGPendingException.Pending)
2406 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2409 internal bool IsPositionInherited()
2411 bool ret = NDalicPINVOKE.Actor_IsPositionInherited(swigCPtr);
2412 if (NDalicPINVOKE.SWIGPendingException.Pending)
2413 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2417 internal void SetOrientation(Degree angle, Vector3 axis)
2419 NDalicPINVOKE.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2420 if (NDalicPINVOKE.SWIGPendingException.Pending)
2421 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2424 internal void SetOrientation(Radian angle, Vector3 axis)
2426 NDalicPINVOKE.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2427 if (NDalicPINVOKE.SWIGPendingException.Pending)
2428 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2431 internal void SetOrientation(Rotation orientation)
2433 NDalicPINVOKE.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
2434 if (NDalicPINVOKE.SWIGPendingException.Pending)
2435 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2438 internal void RotateBy(Degree angle, Vector3 axis)
2440 NDalicPINVOKE.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2441 if (NDalicPINVOKE.SWIGPendingException.Pending)
2442 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2445 internal void RotateBy(Radian angle, Vector3 axis)
2447 NDalicPINVOKE.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2448 if (NDalicPINVOKE.SWIGPendingException.Pending)
2449 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2452 internal void RotateBy(Rotation relativeRotation)
2454 NDalicPINVOKE.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
2455 if (NDalicPINVOKE.SWIGPendingException.Pending)
2456 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2459 internal Rotation GetCurrentOrientation()
2461 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentOrientation(swigCPtr), true);
2462 if (NDalicPINVOKE.SWIGPendingException.Pending)
2463 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2467 internal void SetInheritOrientation(bool inherit)
2469 NDalicPINVOKE.Actor_SetInheritOrientation(swigCPtr, inherit);
2470 if (NDalicPINVOKE.SWIGPendingException.Pending)
2471 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2474 internal bool IsOrientationInherited()
2476 bool ret = NDalicPINVOKE.Actor_IsOrientationInherited(swigCPtr);
2477 if (NDalicPINVOKE.SWIGPendingException.Pending)
2478 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2482 internal Rotation GetCurrentWorldOrientation()
2484 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentWorldOrientation(swigCPtr), true);
2485 if (NDalicPINVOKE.SWIGPendingException.Pending)
2486 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2490 internal void SetScale(float scale)
2492 NDalicPINVOKE.Actor_SetScale__SWIG_0(swigCPtr, scale);
2493 if (NDalicPINVOKE.SWIGPendingException.Pending)
2494 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2497 internal void SetScale(float scaleX, float scaleY, float scaleZ)
2499 NDalicPINVOKE.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
2500 if (NDalicPINVOKE.SWIGPendingException.Pending)
2501 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2504 internal void SetScale(Vector3 scale)
2506 NDalicPINVOKE.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
2507 if (NDalicPINVOKE.SWIGPendingException.Pending)
2508 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2511 internal void ScaleBy(Vector3 relativeScale)
2513 NDalicPINVOKE.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
2514 if (NDalicPINVOKE.SWIGPendingException.Pending)
2515 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2518 internal Vector3 GetCurrentScale()
2520 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentScale(swigCPtr), true);
2521 if (NDalicPINVOKE.SWIGPendingException.Pending)
2522 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2526 internal Vector3 GetCurrentWorldScale()
2528 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldScale(swigCPtr), true);
2529 if (NDalicPINVOKE.SWIGPendingException.Pending)
2530 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2534 internal void SetInheritScale(bool inherit)
2536 NDalicPINVOKE.Actor_SetInheritScale(swigCPtr, inherit);
2537 if (NDalicPINVOKE.SWIGPendingException.Pending)
2538 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2541 internal bool IsScaleInherited()
2543 bool ret = NDalicPINVOKE.Actor_IsScaleInherited(swigCPtr);
2544 if (NDalicPINVOKE.SWIGPendingException.Pending)
2545 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2549 internal Matrix GetCurrentWorldMatrix()
2551 Matrix ret = new Matrix(NDalicPINVOKE.Actor_GetCurrentWorldMatrix(swigCPtr), true);
2552 if (NDalicPINVOKE.SWIGPendingException.Pending)
2553 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2557 internal void SetVisible(bool visible)
2559 NDalicPINVOKE.Actor_SetVisible(swigCPtr, visible);
2560 if (NDalicPINVOKE.SWIGPendingException.Pending)
2561 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2564 internal bool IsVisible()
2566 bool ret = NDalicPINVOKE.Actor_IsVisible(swigCPtr);
2567 if (NDalicPINVOKE.SWIGPendingException.Pending)
2568 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2572 internal void SetOpacity(float opacity)
2574 NDalicPINVOKE.Actor_SetOpacity(swigCPtr, opacity);
2575 if (NDalicPINVOKE.SWIGPendingException.Pending)
2576 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2579 internal float GetCurrentOpacity()
2581 float ret = NDalicPINVOKE.Actor_GetCurrentOpacity(swigCPtr);
2582 if (NDalicPINVOKE.SWIGPendingException.Pending)
2583 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2587 internal void SetColor(Vector4 color)
2589 NDalicPINVOKE.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
2590 if (NDalicPINVOKE.SWIGPendingException.Pending)
2591 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2594 internal Vector4 GetCurrentColor()
2596 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentColor(swigCPtr), true);
2597 if (NDalicPINVOKE.SWIGPendingException.Pending)
2598 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2602 internal void SetColorMode(ColorMode colorMode)
2604 NDalicPINVOKE.Actor_SetColorMode(swigCPtr, (int)colorMode);
2605 if (NDalicPINVOKE.SWIGPendingException.Pending)
2606 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2609 internal ColorMode GetColorMode()
2611 ColorMode ret = (ColorMode)NDalicPINVOKE.Actor_GetColorMode(swigCPtr);
2612 if (NDalicPINVOKE.SWIGPendingException.Pending)
2613 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2617 internal Vector4 GetCurrentWorldColor()
2619 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentWorldColor(swigCPtr), true);
2620 if (NDalicPINVOKE.SWIGPendingException.Pending)
2621 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2625 internal void SetDrawMode(DrawModeType drawMode)
2627 NDalicPINVOKE.Actor_SetDrawMode(swigCPtr, (int)drawMode);
2628 if (NDalicPINVOKE.SWIGPendingException.Pending)
2629 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2632 internal DrawModeType GetDrawMode()
2634 DrawModeType ret = (DrawModeType)NDalicPINVOKE.Actor_GetDrawMode(swigCPtr);
2635 if (NDalicPINVOKE.SWIGPendingException.Pending)
2636 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2641 /// Converts screen coordinates into the view's coordinate system using the default camera.
2643 /// <pre>The View has been initialized.</pre>
2644 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5)</remarks>
2645 /// <param name="localX">On return, the X-coordinate relative to the view</param>
2646 /// <param name="localY">On return, the Y-coordinate relative to the view</param>
2647 /// <param name="screenX">The screen X-coordinate</param>
2648 /// <param name="screenY">The screen Y-coordinate</param>
2649 /// <returns>True if the conversion succeeded</returns>
2650 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
2652 bool ret = NDalicPINVOKE.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
2653 if (NDalicPINVOKE.SWIGPendingException.Pending)
2654 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2658 internal void SetKeyboardFocusable(bool focusable)
2660 NDalicPINVOKE.Actor_SetKeyboardFocusable(swigCPtr, focusable);
2661 if (NDalicPINVOKE.SWIGPendingException.Pending)
2662 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2665 internal bool IsKeyboardFocusable()
2667 bool ret = NDalicPINVOKE.Actor_IsKeyboardFocusable(swigCPtr);
2668 if (NDalicPINVOKE.SWIGPendingException.Pending)
2669 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2673 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
2675 NDalicPINVOKE.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
2676 if (NDalicPINVOKE.SWIGPendingException.Pending)
2677 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2680 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
2682 ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.Actor_GetResizePolicy(swigCPtr, (int)dimension);
2683 if (NDalicPINVOKE.SWIGPendingException.Pending)
2684 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2689 /// Sets the relative to parent size factor of the view.<br>
2690 /// This factor is only used when ResizePolicy is set to either:
2691 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br>
2692 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br>
2694 /// <pre>The View has been initialized.</pre>
2695 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis</param>
2696 public void SetSizeModeFactor(Vector3 factor)
2698 NDalicPINVOKE.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
2699 if (NDalicPINVOKE.SWIGPendingException.Pending)
2700 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2703 internal Vector3 GetSizeModeFactor()
2705 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetSizeModeFactor(swigCPtr), true);
2706 if (NDalicPINVOKE.SWIGPendingException.Pending)
2707 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2712 /// Calculates the height of the view given a width.<br>
2713 /// The natural size is used for default calculation. <br>
2714 /// size 0 is treated as aspect ratio 1:1.<br>
2716 /// <param name="width">Width to use</param>
2717 /// <returns>The height based on the width</returns>
2718 public float GetHeightForWidth(float width)
2720 float ret = NDalicPINVOKE.Actor_GetHeightForWidth(swigCPtr, width);
2721 if (NDalicPINVOKE.SWIGPendingException.Pending)
2722 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2727 /// Calculates the width of the view given a height.<br>
2728 /// The natural size is used for default calculation.<br>
2729 /// size 0 is treated as aspect ratio 1:1.<br>
2731 /// <param name="height">Height to use</param>
2732 /// <returns>The width based on the height</returns>
2733 public float GetWidthForHeight(float height)
2735 float ret = NDalicPINVOKE.Actor_GetWidthForHeight(swigCPtr, height);
2736 if (NDalicPINVOKE.SWIGPendingException.Pending)
2737 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2741 public float GetRelayoutSize(DimensionType dimension)
2743 float ret = NDalicPINVOKE.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
2744 if (NDalicPINVOKE.SWIGPendingException.Pending)
2745 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2749 public void SetPadding(PaddingType padding)
2751 NDalicPINVOKE.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
2752 if (NDalicPINVOKE.SWIGPendingException.Pending)
2753 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2756 public void GetPadding(PaddingType paddingOut)
2758 NDalicPINVOKE.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
2759 if (NDalicPINVOKE.SWIGPendingException.Pending)
2760 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2763 internal void SetMinimumSize(Vector2 size)
2765 NDalicPINVOKE.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
2766 if (NDalicPINVOKE.SWIGPendingException.Pending)
2767 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2770 internal Vector2 GetMinimumSize()
2772 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMinimumSize(swigCPtr), true);
2773 if (NDalicPINVOKE.SWIGPendingException.Pending)
2774 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2778 internal void SetMaximumSize(Vector2 size)
2780 NDalicPINVOKE.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
2781 if (NDalicPINVOKE.SWIGPendingException.Pending)
2782 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2785 internal Vector2 GetMaximumSize()
2787 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMaximumSize(swigCPtr), true);
2788 if (NDalicPINVOKE.SWIGPendingException.Pending)
2789 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2793 internal int GetHierarchyDepth()
2795 int ret = NDalicPINVOKE.Actor_GetHierarchyDepth(swigCPtr);
2796 if (NDalicPINVOKE.SWIGPendingException.Pending)
2797 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2801 public uint AddRenderer(Renderer renderer)
2803 uint ret = NDalicPINVOKE.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
2804 if (NDalicPINVOKE.SWIGPendingException.Pending)
2805 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2809 internal uint GetRendererCount()
2811 uint ret = NDalicPINVOKE.Actor_GetRendererCount(swigCPtr);
2812 if (NDalicPINVOKE.SWIGPendingException.Pending)
2813 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2817 public Renderer GetRendererAt(uint index)
2819 IntPtr cPtr = NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index);
2820 Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Renderer;
2822 if (NDalicPINVOKE.SWIGPendingException.Pending)
2823 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2827 public void RemoveRenderer(Renderer renderer)
2829 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
2830 if (NDalicPINVOKE.SWIGPendingException.Pending)
2831 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2834 public void RemoveRenderer(uint index)
2836 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
2837 if (NDalicPINVOKE.SWIGPendingException.Pending)
2838 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2841 internal TouchDataSignal TouchSignal()
2843 TouchDataSignal ret = new TouchDataSignal(NDalicPINVOKE.Actor_TouchSignal(swigCPtr), false);
2844 if (NDalicPINVOKE.SWIGPendingException.Pending)
2845 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2849 internal HoverSignal HoveredSignal()
2851 HoverSignal ret = new HoverSignal(NDalicPINVOKE.Actor_HoveredSignal(swigCPtr), false);
2852 if (NDalicPINVOKE.SWIGPendingException.Pending)
2853 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2857 internal WheelSignal WheelEventSignal()
2859 WheelSignal ret = new WheelSignal(NDalicPINVOKE.Actor_WheelEventSignal(swigCPtr), false);
2860 if (NDalicPINVOKE.SWIGPendingException.Pending)
2861 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2865 internal ViewSignal OnWindowSignal()
2867 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnStageSignal(swigCPtr), false);
2868 if (NDalicPINVOKE.SWIGPendingException.Pending)
2869 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2873 internal ViewSignal OffWindowSignal()
2875 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OffStageSignal(swigCPtr), false);
2876 if (NDalicPINVOKE.SWIGPendingException.Pending)
2877 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2881 internal ViewSignal OnRelayoutSignal()
2883 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnRelayoutSignal(swigCPtr), false);
2884 if (NDalicPINVOKE.SWIGPendingException.Pending)
2885 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2889 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view) {
2890 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
2891 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2895 internal ViewSignal ResourcesLoadedSignal()
2897 ViewSignal ret = new ViewSignal(NDalicPINVOKE.ResourceReadySignal(swigCPtr), false);
2898 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2903 /// Gets/Sets the origin of an view, within its parent's area.<br>
2904 /// 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>
2905 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br>
2906 /// An view's position is the distance between this origin, and the view's anchor-point.<br>
2908 /// <pre>The View has been initialized.</pre>
2909 public Position ParentOrigin
2913 Position temp = new Position(0.0f, 0.0f, 0.0f);
2914 GetProperty(View.Property.PARENT_ORIGIN).Get(temp);
2919 SetProperty(View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue(value));
2923 internal float ParentOriginX
2928 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
2933 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
2937 internal float ParentOriginY
2942 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
2947 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
2951 internal float ParentOriginZ
2956 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
2961 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
2966 /// Gets/Sets the anchor-point of an view.<br>
2967 /// 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>
2968 /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br>
2969 /// An view position is the distance between its parent-origin and this anchor-point.<br>
2970 /// An view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br>
2971 /// <pre>The View has been initialized.</pre>
2973 public Position PivotPoint
2977 Position temp = new Position(0.0f, 0.0f, 0.0f);
2978 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
2983 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
2987 internal float PivotPointX
2992 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
2997 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
3001 internal float PivotPointY
3006 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
3011 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
3015 internal float PivotPointZ
3020 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
3025 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
3030 /// Gets/Sets the size width of an view.
3032 public float SizeWidth
3037 GetProperty(View.Property.SIZE_WIDTH).Get(out temp);
3042 SetProperty(View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue(value));
3047 /// Gets/Sets the size height of an view.
3049 public float SizeHeight
3054 GetProperty(View.Property.SIZE_HEIGHT).Get(out temp);
3059 SetProperty(View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue(value));
3064 /// Gets/Sets the position of the View.<br>
3065 /// By default, sets the position vector between the parent origin and pivot point(default).<br>
3066 /// If Position inheritance if disabled, sets the world position.<br>
3068 public Position Position
3072 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3073 GetProperty(View.Property.POSITION).Get(temp);
3078 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(value));
3083 /// Gets/Sets the position x of the View.
3085 public float PositionX
3090 GetProperty(View.Property.POSITION_X).Get(out temp);
3095 SetProperty(View.Property.POSITION_X, new Tizen.NUI.PropertyValue(value));
3100 /// Gets/Sets the position y of the View.
3102 public float PositionY
3107 GetProperty(View.Property.POSITION_Y).Get(out temp);
3112 SetProperty(View.Property.POSITION_Y, new Tizen.NUI.PropertyValue(value));
3117 /// Gets/Sets the position z of the View.
3119 public float PositionZ
3124 GetProperty(View.Property.POSITION_Z).Get(out temp);
3129 SetProperty(View.Property.POSITION_Z, new Tizen.NUI.PropertyValue(value));
3134 /// Gets/Sets the world position of the View.
3136 public Vector3 WorldPosition
3140 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3141 GetProperty(View.Property.WORLD_POSITION).Get(temp);
3146 internal float WorldPositionX
3151 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
3156 internal float WorldPositionY
3161 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
3166 internal float WorldPositionZ
3171 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
3177 /// Gets/Sets the orientation of the View.<br>
3178 /// An view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br>
3180 /// <remarks>This is an asynchronous method.</remarks>
3181 public Rotation Orientation
3185 Rotation temp = new Rotation();
3186 GetProperty(View.Property.ORIENTATION).Get(temp);
3191 SetProperty(View.Property.ORIENTATION, new Tizen.NUI.PropertyValue(value));
3196 /// Gets/Sets the world orientation of the View.<br>
3198 public Rotation WorldOrientation
3202 Rotation temp = new Rotation();
3203 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
3209 /// Gets/Sets the scale factor applied to an view.<br>
3211 public Vector3 Scale
3215 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3216 GetProperty(View.Property.SCALE).Get(temp);
3221 SetProperty(View.Property.SCALE, new Tizen.NUI.PropertyValue(value));
3226 /// Gets/Sets the scale x factor applied to an view.
3233 GetProperty(View.Property.SCALE_X).Get(out temp);
3238 SetProperty(View.Property.SCALE_X, new Tizen.NUI.PropertyValue(value));
3243 /// Gets/Sets the scale y factor applied to an view.
3250 GetProperty(View.Property.SCALE_Y).Get(out temp);
3255 SetProperty(View.Property.SCALE_Y, new Tizen.NUI.PropertyValue(value));
3260 /// Gets/Sets the scale z factor applied to an view.
3267 GetProperty(View.Property.SCALE_Z).Get(out temp);
3272 SetProperty(View.Property.SCALE_Z, new Tizen.NUI.PropertyValue(value));
3277 /// Gets the world scale of View.
3279 public Vector3 WorldScale
3283 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3284 GetProperty(View.Property.WORLD_SCALE).Get(temp);
3290 /// Retrieves the visibility flag of an view.
3293 /// If an view is not visible, then the view and its children will not be rendered.
3294 /// 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.
3296 public bool Visibility
3301 GetProperty(View.Property.VISIBLE).Get(out temp);
3307 /// Gets the view's world color.
3309 public Vector4 WorldColor
3313 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3314 GetProperty(View.Property.WORLD_COLOR).Get(temp);
3319 internal Matrix WorldMatrix
3323 Matrix temp = new Matrix();
3324 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
3330 /// Gets/Sets the View's name.
3337 GetProperty(View.Property.NAME).Get(out temp);
3342 SetProperty(View.Property.NAME, new Tizen.NUI.PropertyValue(value));
3347 /// Get the number of children held by the view.
3349 public uint ChildCount
3353 return GetChildCount();
3358 /// Gets the View's ID.
3370 /// Gets/Sets the status of whether an view should emit touch or hover signals.
3372 public bool Sensitive
3377 GetProperty(View.Property.SENSITIVE).Get(out temp);
3382 SetProperty(View.Property.SENSITIVE, new Tizen.NUI.PropertyValue(value));
3387 /// Gets/Sets the status of whether the view should receive a notification when touch or hover motion events leave the boundary of the view.
3389 public bool LeaveRequired
3394 GetProperty(View.Property.LEAVE_REQUIRED).Get(out temp);
3399 SetProperty(View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue(value));
3404 /// Gets/Sets the status of whether a child view inherits it's parent's orientation.
3406 public bool InheritOrientation
3411 GetProperty(View.Property.INHERIT_ORIENTATION).Get(out temp);
3416 SetProperty(View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue(value));
3421 /// Gets/Sets the status of whether a child view inherits it's parent's scale.
3423 public bool InheritScale
3428 GetProperty(View.Property.INHERIT_SCALE).Get(out temp);
3433 SetProperty(View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue(value));
3438 /// Gets/Sets the status of how the view and its children should be drawn.<br>
3439 /// Not all views are renderable, but DrawMode can be inherited from any view.<br>
3440 /// 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>
3441 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br>
3442 /// Overlay views are drawn in a separate pass, after all non-overlay views within the Layer.<br>
3443 /// For overlay views, the drawing order is with respect to tree levels of Views, and depth-testing will not be used.<br>
3445 public DrawModeType DrawMode
3450 if (GetProperty(View.Property.DRAW_MODE).Get(out temp) == false)
3452 NUILog.Error("DrawMode get error!");
3457 return DrawModeType.Normal;
3459 return DrawModeType.Overlay2D;
3461 return DrawModeType.Stencil;
3463 return DrawModeType.Normal;
3468 SetProperty(View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)value));
3473 /// Gets/Sets the relative to parent size factor of the view.<br>
3474 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br>
3475 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br>
3477 public Vector3 SizeModeFactor
3481 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3482 GetProperty(View.Property.SIZE_MODE_FACTOR).Get(temp);
3487 SetProperty(View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue(value));
3492 /// Gets/Sets the width resize policy to be used.
3494 public ResizePolicyType WidthResizePolicy
3499 if (GetProperty(View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
3501 NUILog.Error("WidthResizePolicy get error!");
3506 return ResizePolicyType.Fixed;
3507 case "USE_NATURAL_SIZE":
3508 return ResizePolicyType.UseNaturalSize;
3509 case "FILL_TO_PARENT":
3510 return ResizePolicyType.FillToParent;
3511 case "SIZE_RELATIVE_TO_PARENT":
3512 return ResizePolicyType.SizeRelativeToParent;
3513 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3514 return ResizePolicyType.SizeFixedOffsetFromParent;
3515 case "FIT_TO_CHILDREN":
3516 return ResizePolicyType.FitToChildren;
3517 case "DIMENSION_DEPENDENCY":
3518 return ResizePolicyType.DimensionDependency;
3519 case "USE_ASSIGNED_SIZE":
3520 return ResizePolicyType.UseAssignedSize;
3522 return ResizePolicyType.Fixed;
3527 SetProperty(View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3532 /// Gets/Sets the height resize policy to be used.
3534 public ResizePolicyType HeightResizePolicy
3539 if (GetProperty(View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
3541 NUILog.Error("HeightResizePolicy get error!");
3546 return ResizePolicyType.Fixed;
3547 case "USE_NATURAL_SIZE":
3548 return ResizePolicyType.UseNaturalSize;
3549 case "FILL_TO_PARENT":
3550 return ResizePolicyType.FillToParent;
3551 case "SIZE_RELATIVE_TO_PARENT":
3552 return ResizePolicyType.SizeRelativeToParent;
3553 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3554 return ResizePolicyType.SizeFixedOffsetFromParent;
3555 case "FIT_TO_CHILDREN":
3556 return ResizePolicyType.FitToChildren;
3557 case "DIMENSION_DEPENDENCY":
3558 return ResizePolicyType.DimensionDependency;
3559 case "USE_ASSIGNED_SIZE":
3560 return ResizePolicyType.UseAssignedSize;
3562 return ResizePolicyType.Fixed;
3567 SetProperty(View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3572 /// Gets/Sets the policy to use when setting size with size negotiation.<br>
3573 /// Defaults to SizeScalePolicyType.UseSizeSet.<br>
3575 public SizeScalePolicyType SizeScalePolicy
3580 if (GetProperty(View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
3582 NUILog.Error("SizeScalePolicy get error!");
3586 case "USE_SIZE_SET":
3587 return SizeScalePolicyType.UseSizeSet;
3588 case "FIT_WITH_ASPECT_RATIO":
3589 return SizeScalePolicyType.FitWithAspectRatio;
3590 case "FILL_WITH_ASPECT_RATIO":
3591 return SizeScalePolicyType.FillWithAspectRatio;
3593 return SizeScalePolicyType.UseSizeSet;
3598 string valueToString = "";
3601 case SizeScalePolicyType.UseSizeSet:
3603 valueToString = "USE_SIZE_SET";
3606 case SizeScalePolicyType.FitWithAspectRatio:
3608 valueToString = "FIT_WITH_ASPECT_RATIO";
3611 case SizeScalePolicyType.FillWithAspectRatio:
3613 valueToString = "FILL_WITH_ASPECT_RATIO";
3618 valueToString = "USE_SIZE_SET";
3622 SetProperty(View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
3627 /// Gets/Sets the status of whether the width size is dependent on height size.
3629 public bool WidthForHeight
3634 GetProperty(View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
3639 SetProperty(View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue(value));
3644 /// Gets/Sets the status of whether the height size is dependent on width size.
3646 public bool HeightForWidth
3651 GetProperty(View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
3656 SetProperty(View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue(value));
3661 /// Gets/Sets the padding for use in layout.
3663 public Vector4 Padding
3667 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3668 GetProperty(View.Property.PADDING).Get(temp);
3673 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
3678 /// Gets/Sets the minimum size an view can be assigned in size negotiation.
3680 public Size2D MinimumSize
3684 Size2D temp = new Size2D(0, 0);
3685 GetProperty(View.Property.MINIMUM_SIZE).Get(temp);
3690 SetProperty(View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3695 /// Gets/Sets the maximum size an view can be assigned in size negotiation.
3697 public Size2D MaximumSize
3701 Size2D temp = new Size2D(0, 0);
3702 GetProperty(View.Property.MAXIMUM_SIZE).Get(temp);
3707 SetProperty(View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3712 /// Gets/Sets whether a child view inherits it's parent's position.<br>
3713 /// Default is to inherit.<br>
3714 /// 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>
3716 public bool InheritPosition
3721 GetProperty(View.Property.INHERIT_POSITION).Get(out temp);
3726 SetProperty(View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue(value));
3731 /// Gets/Sets clipping behavior(mode) of it's children.
3733 public ClippingModeType ClippingMode
3738 if (GetProperty(View.Property.CLIPPING_MODE).Get(out temp) == false)
3740 NUILog.Error("ClippingMode get error!");
3745 return ClippingModeType.Disabled;
3746 case "CLIP_CHILDREN":
3747 return ClippingModeType.ClipChildren;
3749 return ClippingModeType.Disabled;
3754 SetProperty(View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)value));
3759 /// Get the number of renderers held by the view.
3761 public uint RendererCount
3765 return GetRendererCount();
3772 [Obsolete("Please do not use! this will be deprecated")]
3773 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> Touched
3777 if (_touchDataEventHandler == null)
3779 _touchDataCallback = OnTouch;
3780 this.TouchSignal().Connect(_touchDataCallback);
3783 _touchDataEventHandler += value;
3788 _touchDataEventHandler -= value;
3790 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
3792 this.TouchSignal().Disconnect(_touchDataCallback);
3798 [Obsolete("Please do not use! this will be deprecated")]
3799 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> Hovered
3803 if (_hoverEventHandler == null)
3805 _hoverEventCallback = OnHoverEvent;
3806 this.HoveredSignal().Connect(_hoverEventCallback);
3809 _hoverEventHandler += value;
3814 _hoverEventHandler -= value;
3816 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
3818 this.HoveredSignal().Disconnect(_hoverEventCallback);
3824 [Obsolete("Please do not use! this will be deprecated")]
3825 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelMoved
3829 if (_wheelEventHandler == null)
3831 _wheelEventCallback = OnWheelEvent;
3832 this.WheelEventSignal().Connect(_wheelEventCallback);
3835 _wheelEventHandler += value;
3840 _wheelEventHandler -= value;
3842 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
3844 this.WheelEventSignal().Disconnect(_wheelEventCallback);
3850 [Obsolete("Please do not use! this will be deprecated")]
3851 public Position AnchorPoint
3855 Position temp = new Position(0.0f, 0.0f, 0.0f);
3856 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
3861 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3865 [Obsolete("Please do not use! this will be deprecated, please use Size2D instead")]
3870 Size temp = new Size(0.0f, 0.0f, 0.0f);
3871 GetProperty(View.Property.SIZE).Get(temp);
3876 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(value));
3880 [Obsolete("Please do not use! this will be deprecated")]
3881 public event EventHandler OnWindowEvent
3885 if (_onWindowEventHandler == null)
3887 _onWindowEventCallback = OnWindow;
3888 this.OnWindowSignal().Connect(_onWindowEventCallback);
3891 _onWindowEventHandler += value;
3896 _onWindowEventHandler -= value;
3898 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
3900 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
3905 [Obsolete("Please do not use! this will be deprecated")]
3906 public event EventHandler OffWindowEvent
3910 if (_offWindowEventHandler == null)
3912 _offWindowEventCallback = OffWindow;
3913 this.OffWindowSignal().Connect(_offWindowEventCallback);
3916 _offWindowEventHandler += value;
3921 _offWindowEventHandler -= value;
3923 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
3925 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
3930 [Obsolete("Please do not use! this will be deprecated")]
3931 public event EventHandler OnRelayoutEvent
3935 if (_onRelayoutEventHandler == null)
3937 _onRelayoutEventCallback = OnRelayout;
3938 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
3941 _onRelayoutEventHandler += value;
3946 _onRelayoutEventHandler -= value;
3948 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
3950 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);