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 DisConnectFromSignals();
64 if (swigCPtr.Handle != global::System.IntPtr.Zero)
69 NDalicPINVOKE.delete_View(swigCPtr);
71 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
77 private void DisConnectFromSignals()
80 global::System.Runtime.InteropServices.HandleRef currentCPtr = swigCPtr;
82 // Use BaseHandle CPtr as current might have been deleted already in derived classes.
83 swigCPtr = GetBaseHandleCPtrHandleRef;
85 if (_onRelayoutEventCallback != null)
87 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
90 if (_offWindowEventCallback != null)
92 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
95 if (_onWindowEventCallback != null)
97 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
100 if (_wheelEventCallback != null)
102 this.WheelEventSignal().Disconnect(_wheelEventCallback);
105 if (_hoverEventCallback != null)
107 this.HoveredSignal().Disconnect(_hoverEventCallback);
110 if (_touchDataCallback != null)
112 this.TouchSignal().Disconnect(_touchDataCallback);
115 if (_ResourcesLoadedCallback != null)
117 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
120 if (_offWindowEventCallback != null)
122 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
125 if (_onWindowEventCallback != null)
127 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
130 if (_wheelEventCallback != null)
132 this.WheelEventSignal().Disconnect(_wheelEventCallback);
135 if (_hoverEventCallback != null)
137 this.HoveredSignal().Disconnect(_hoverEventCallback);
140 if (_touchDataCallback != null)
142 this.TouchSignal().Disconnect(_touchDataCallback);
145 if (_onRelayoutEventCallback != null)
147 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
150 if (_keyCallback != null)
152 this.KeyEventSignal().Disconnect(_keyCallback);
155 if (_keyInputFocusLostCallback != null)
157 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
160 if (_keyInputFocusGainedCallback != null)
162 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
165 // BaseHandle CPtr is used in Registry and there is danger of deletion if we keep using it here.
166 // Restore current CPtr.
167 swigCPtr = currentCPtr;
170 private EventHandler _keyInputFocusGainedEventHandler;
171 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
172 private delegate void KeyInputFocusGainedCallbackType(IntPtr control);
173 private KeyInputFocusGainedCallbackType _keyInputFocusGainedCallback;
176 /// Event for KeyInputFocusGained signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
177 /// KeyInputFocusGained signal is emitted when the control gets Key Input Focus.<br>
179 public event EventHandler FocusGained
183 if (_keyInputFocusGainedEventHandler == null)
185 _keyInputFocusGainedCallback = OnKeyInputFocusGained;
186 this.KeyInputFocusGainedSignal().Connect(_keyInputFocusGainedCallback);
189 _keyInputFocusGainedEventHandler += value;
194 _keyInputFocusGainedEventHandler -= value;
196 if (_keyInputFocusGainedEventHandler == null && KeyInputFocusGainedSignal().Empty() == false)
198 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
203 private void OnKeyInputFocusGained(IntPtr view)
205 if (_keyInputFocusGainedEventHandler != null)
207 _keyInputFocusGainedEventHandler(this, null);
212 private EventHandler _keyInputFocusLostEventHandler;
213 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
214 private delegate void KeyInputFocusLostCallbackType(IntPtr control);
215 private KeyInputFocusLostCallbackType _keyInputFocusLostCallback;
218 /// Event for KeyInputFocusLost signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
219 /// KeyInputFocusLost signal is emitted when the control loses Key Input Focus.<br>
221 public event EventHandler FocusLost
225 if (_keyInputFocusLostEventHandler == null)
227 _keyInputFocusLostCallback = OnKeyInputFocusLost;
228 this.KeyInputFocusLostSignal().Connect(_keyInputFocusLostCallback);
231 _keyInputFocusLostEventHandler += value;
236 _keyInputFocusLostEventHandler -= value;
238 if (_keyInputFocusLostEventHandler == null && KeyInputFocusLostSignal().Empty() == false)
240 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
245 private void OnKeyInputFocusLost(IntPtr view)
247 if (_keyInputFocusLostEventHandler != null)
249 _keyInputFocusLostEventHandler(this, null);
254 /// Event arguments that passed via KeyEvent signal.
256 public class KeyEventArgs : EventArgs
261 /// Key - is the key sent to the View.
276 private EventHandlerWithReturnType<object, KeyEventArgs, bool> _keyEventHandler;
277 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
278 private delegate bool KeyCallbackType(IntPtr control, IntPtr keyEvent);
279 private KeyCallbackType _keyCallback;
282 /// Event for KeyPressed signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
283 /// KeyPressed signal is emitted when key event is received.<br>
285 public event EventHandlerWithReturnType<object, KeyEventArgs, bool> KeyEvent
289 if (_keyEventHandler == null)
291 _keyCallback = OnKeyEvent;
292 this.KeyEventSignal().Connect(_keyCallback);
295 _keyEventHandler += value;
300 _keyEventHandler -= value;
302 if (_keyEventHandler == null && KeyEventSignal().Empty() == false)
304 this.KeyEventSignal().Disconnect(_keyCallback);
309 private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
311 KeyEventArgs e = new KeyEventArgs();
315 e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
317 if (_keyEventHandler != null)
319 Delegate[] delegateList = _keyEventHandler.GetInvocationList();
321 // Oring the result of each callback.
322 foreach ( EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList )
324 result |= del( this, e );
331 private EventHandler _onRelayoutEventHandler;
332 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
333 private delegate void OnRelayoutEventCallbackType(IntPtr control);
334 private OnRelayoutEventCallbackType _onRelayoutEventCallback;
337 /// Event for OnRelayout signal which can be used to subscribe/unsubscribe the event handler.<br>
338 /// OnRelayout signal is emitted after the size has been set on the view during relayout.<br>
340 public event EventHandler Relayout
344 if (_onRelayoutEventHandler == null)
346 _onRelayoutEventCallback = OnRelayout;
347 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
350 _onRelayoutEventHandler += value;
355 _onRelayoutEventHandler -= value;
357 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
359 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
365 // Callback for View OnRelayout signal
366 private void OnRelayout(IntPtr data)
368 if (_onRelayoutEventHandler != null)
370 _onRelayoutEventHandler(this, null);
375 /// Event arguments that passed via Touch signal.
377 public class TouchEventArgs : EventArgs
379 private Touch _touch;
382 /// Touch - contains the information of touch points
397 private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
398 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
399 private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
400 private TouchDataCallbackType _touchDataCallback;
403 /// Event for Touched signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
404 /// Touched signal is emitted when touch input is received.<br>
406 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
410 if (_touchDataEventHandler == null)
412 _touchDataCallback = OnTouch;
413 this.TouchSignal().Connect(_touchDataCallback);
416 _touchDataEventHandler += value;
421 _touchDataEventHandler -= value;
423 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
425 this.TouchSignal().Disconnect(_touchDataCallback);
431 // Callback for View TouchSignal
432 private bool OnTouch(IntPtr view, IntPtr touchData)
434 TouchEventArgs e = new TouchEventArgs();
436 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
438 if (_touchDataEventHandler != null)
440 return _touchDataEventHandler(this, e);
447 /// Event arguments that passed via Hover signal.
449 public class HoverEventArgs : EventArgs
451 private Hover _hover;
454 /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
469 private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
470 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
471 private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
472 private HoverEventCallbackType _hoverEventCallback;
475 /// Event for Hovered signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
476 /// Hovered signal is emitted when hover input is received.<br>
478 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
482 if (_hoverEventHandler == null)
484 _hoverEventCallback = OnHoverEvent;
485 this.HoveredSignal().Connect(_hoverEventCallback);
488 _hoverEventHandler += value;
493 _hoverEventHandler -= value;
495 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
497 this.HoveredSignal().Disconnect(_hoverEventCallback);
503 // Callback for View Hover signal
504 private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
506 HoverEventArgs e = new HoverEventArgs();
508 e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
510 if (_hoverEventHandler != null)
512 return _hoverEventHandler(this, e);
519 /// Event arguments that passed via Wheel signal.
521 public class WheelEventArgs : EventArgs
523 private Wheel _wheel;
526 /// WheelEvent - store a wheel rolling type : MOUSE_WHEEL or CUSTOM_WHEEL
541 private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
542 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
543 private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
544 private WheelEventCallbackType _wheelEventCallback;
547 /// Event for WheelMoved signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
548 /// WheelMoved signal is emitted when wheel event is received.<br>
550 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
554 if (_wheelEventHandler == null)
556 _wheelEventCallback = OnWheelEvent;
557 this.WheelEventSignal().Connect(_wheelEventCallback);
560 _wheelEventHandler += value;
565 _wheelEventHandler -= value;
567 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
569 this.WheelEventSignal().Disconnect(_wheelEventCallback);
575 // Callback for View Wheel signal
576 private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
578 WheelEventArgs e = new WheelEventArgs();
580 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
582 if (_wheelEventHandler != null)
584 return _wheelEventHandler(this, e);
590 private EventHandler _onWindowEventHandler;
591 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
592 private delegate void OnWindowEventCallbackType(IntPtr control);
593 private OnWindowEventCallbackType _onWindowEventCallback;
596 /// Event for OnWindow signal which can be used to subscribe/unsubscribe the event handler.<br>
597 /// OnWindow signal is emitted after the view has been connected to the Window.<br>
599 public event EventHandler AddedToWindow
603 if (_onWindowEventHandler == null)
605 _onWindowEventCallback = OnWindow;
606 this.OnWindowSignal().Connect(_onWindowEventCallback);
609 _onWindowEventHandler += value;
614 _onWindowEventHandler -= value;
616 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
618 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
623 // Callback for View OnWindow signal
624 private void OnWindow(IntPtr data)
626 if (_onWindowEventHandler != null)
628 _onWindowEventHandler(this, null);
633 private EventHandler _offWindowEventHandler;
634 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
635 private delegate void OffWindowEventCallbackType(IntPtr control);
636 private OffWindowEventCallbackType _offWindowEventCallback;
639 /// Event for OffWindow signal which can be used to subscribe/unsubscribe the event handler.<br>
640 /// OffWindow signal is emitted after the view has been disconnected from the Window.<br>
642 public event EventHandler RemovedFromWindow
646 if (_offWindowEventHandler == null)
648 _offWindowEventCallback = OffWindow;
649 this.OffWindowSignal().Connect(_offWindowEventCallback);
652 _offWindowEventHandler += value;
657 _offWindowEventHandler -= value;
659 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
661 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
666 // Callback for View OffWindow signal
667 private void OffWindow(IntPtr data)
669 if (_offWindowEventHandler != null)
671 _offWindowEventHandler(this, null);
676 /// Event arguments of visibility changed.
678 public class VisibilityChangedEventArgs : EventArgs
681 private bool _visibility;
682 private VisibilityChangeType _type;
685 /// The view, or child of view, whose visibility has changed.
700 /// Whether the view is now visible or not.
702 public bool Visibility
715 /// Whether the view's visible property has changed or a parent's.
717 public VisibilityChangeType Type
730 private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
731 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
732 private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
733 private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
736 /// Event for visibility change which can be used to subscribe/unsubscribe the event handler.<br>
737 /// This signal is emitted when the visible property of this or a parent view is changed.<br>
739 public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
743 if (_visibilityChangedEventHandler == null)
745 _visibilityChangedEventCallback = OnVisibilityChanged;
746 VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
749 _visibilityChangedEventHandler += value;
754 _visibilityChangedEventHandler -= value;
756 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
758 VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
763 // Callback for View visibility change signal
764 private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
766 VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
769 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
771 e.Visibility = visibility;
774 if (_visibilityChangedEventHandler != null)
776 _visibilityChangedEventHandler(this, e);
780 // Resource Ready Signal
782 private EventHandler _resourcesLoadedEventHandler;
783 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
784 private delegate void ResourcesLoadedCallbackType(IntPtr control);
785 private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
788 /// Event for ResourcesLoadedSignal signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
789 /// This signal is emitted after all resources required by a View are loaded and ready.<br>
791 public event EventHandler ResourcesLoaded
795 if (_resourcesLoadedEventHandler == null)
797 _ResourcesLoadedCallback = OnResourcesLoaded;
798 this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
801 _resourcesLoadedEventHandler += value;
806 _resourcesLoadedEventHandler -= value;
808 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
810 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
815 private void OnResourcesLoaded(IntPtr view)
817 if (_resourcesLoadedEventHandler != null)
819 _resourcesLoadedEventHandler(this, null);
823 internal IntPtr GetPtrfromView()
825 return (IntPtr)swigCPtr;
828 internal class Property
830 internal static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get();
831 internal static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get();
832 internal static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get();
833 internal static readonly int LEFT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
834 internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
835 internal static readonly int UP_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
836 internal static readonly int DOWN_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
837 internal static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get();
838 internal static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get();
839 internal static readonly int SIBLING_ORDER = NDalicManualPINVOKE.Actor_Property_SIBLING_ORDER_get();
840 internal static readonly int OPACITY = NDalicManualPINVOKE.Actor_Property_OPACITY_get();
841 internal static readonly int SCREEN_POSITION = NDalicManualPINVOKE.Actor_Property_SCREEN_POSITION_get();
842 internal static readonly int POSITION_USES_ANCHOR_POINT = NDalicManualPINVOKE.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
843 internal static readonly int PARENT_ORIGIN = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_get();
844 internal static readonly int PARENT_ORIGIN_X = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_X_get();
845 internal static readonly int PARENT_ORIGIN_Y = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Y_get();
846 internal static readonly int PARENT_ORIGIN_Z = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Z_get();
847 internal static readonly int ANCHOR_POINT = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_get();
848 internal static readonly int ANCHOR_POINT_X = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_X_get();
849 internal static readonly int ANCHOR_POINT_Y = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Y_get();
850 internal static readonly int ANCHOR_POINT_Z = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Z_get();
851 internal static readonly int SIZE = NDalicPINVOKE.Actor_Property_SIZE_get();
852 internal static readonly int SIZE_WIDTH = NDalicPINVOKE.Actor_Property_SIZE_WIDTH_get();
853 internal static readonly int SIZE_HEIGHT = NDalicPINVOKE.Actor_Property_SIZE_HEIGHT_get();
854 internal static readonly int SIZE_DEPTH = NDalicPINVOKE.Actor_Property_SIZE_DEPTH_get();
855 internal static readonly int POSITION = NDalicPINVOKE.Actor_Property_POSITION_get();
856 internal static readonly int POSITION_X = NDalicPINVOKE.Actor_Property_POSITION_X_get();
857 internal static readonly int POSITION_Y = NDalicPINVOKE.Actor_Property_POSITION_Y_get();
858 internal static readonly int POSITION_Z = NDalicPINVOKE.Actor_Property_POSITION_Z_get();
859 internal static readonly int WORLD_POSITION = NDalicPINVOKE.Actor_Property_WORLD_POSITION_get();
860 internal static readonly int WORLD_POSITION_X = NDalicPINVOKE.Actor_Property_WORLD_POSITION_X_get();
861 internal static readonly int WORLD_POSITION_Y = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Y_get();
862 internal static readonly int WORLD_POSITION_Z = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Z_get();
863 internal static readonly int ORIENTATION = NDalicPINVOKE.Actor_Property_ORIENTATION_get();
864 internal static readonly int WORLD_ORIENTATION = NDalicPINVOKE.Actor_Property_WORLD_ORIENTATION_get();
865 internal static readonly int SCALE = NDalicPINVOKE.Actor_Property_SCALE_get();
866 internal static readonly int SCALE_X = NDalicPINVOKE.Actor_Property_SCALE_X_get();
867 internal static readonly int SCALE_Y = NDalicPINVOKE.Actor_Property_SCALE_Y_get();
868 internal static readonly int SCALE_Z = NDalicPINVOKE.Actor_Property_SCALE_Z_get();
869 internal static readonly int WORLD_SCALE = NDalicPINVOKE.Actor_Property_WORLD_SCALE_get();
870 internal static readonly int VISIBLE = NDalicPINVOKE.Actor_Property_VISIBLE_get();
871 internal static readonly int WORLD_COLOR = NDalicPINVOKE.Actor_Property_WORLD_COLOR_get();
872 internal static readonly int WORLD_MATRIX = NDalicPINVOKE.Actor_Property_WORLD_MATRIX_get();
873 internal static readonly int NAME = NDalicPINVOKE.Actor_Property_NAME_get();
874 internal static readonly int SENSITIVE = NDalicPINVOKE.Actor_Property_SENSITIVE_get();
875 internal static readonly int LEAVE_REQUIRED = NDalicPINVOKE.Actor_Property_LEAVE_REQUIRED_get();
876 internal static readonly int INHERIT_ORIENTATION = NDalicPINVOKE.Actor_Property_INHERIT_ORIENTATION_get();
877 internal static readonly int INHERIT_SCALE = NDalicPINVOKE.Actor_Property_INHERIT_SCALE_get();
878 internal static readonly int DRAW_MODE = NDalicPINVOKE.Actor_Property_DRAW_MODE_get();
879 internal static readonly int SIZE_MODE_FACTOR = NDalicPINVOKE.Actor_Property_SIZE_MODE_FACTOR_get();
880 internal static readonly int WIDTH_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_WIDTH_RESIZE_POLICY_get();
881 internal static readonly int HEIGHT_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_HEIGHT_RESIZE_POLICY_get();
882 internal static readonly int SIZE_SCALE_POLICY = NDalicPINVOKE.Actor_Property_SIZE_SCALE_POLICY_get();
883 internal static readonly int WIDTH_FOR_HEIGHT = NDalicPINVOKE.Actor_Property_WIDTH_FOR_HEIGHT_get();
884 internal static readonly int HEIGHT_FOR_WIDTH = NDalicPINVOKE.Actor_Property_HEIGHT_FOR_WIDTH_get();
885 internal static readonly int PADDING = NDalicPINVOKE.Actor_Property_PADDING_get();
886 internal static readonly int MINIMUM_SIZE = NDalicPINVOKE.Actor_Property_MINIMUM_SIZE_get();
887 internal static readonly int MAXIMUM_SIZE = NDalicPINVOKE.Actor_Property_MAXIMUM_SIZE_get();
888 internal static readonly int INHERIT_POSITION = NDalicPINVOKE.Actor_Property_INHERIT_POSITION_get();
889 internal static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
893 /// Describes the direction to move the focus towards.
895 public enum FocusDirection
906 /// Creates a new instance of a View.
908 public View() : this(NDalicPINVOKE.View_New(), true)
910 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
913 internal View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true)
915 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
919 /// Downcasts a handle to View handle.<br>
920 /// If handle points to a View, the downcast produces valid handle.<br>
921 /// If not, the returned handle is left uninitialized.<br>
923 /// <param name="handle">Handle to an object</param>
924 /// <returns>A handle to a View or an uninitialized handle</returns>
925 [Obsolete("Please do not use! this will be deprecated, instead please use as keyword.")]
926 public new static View DownCast(BaseHandle handle)
928 View ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as View;
929 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
933 [Obsolete("Please do not use! this will be deprecated, instead please use as keyword.")]
934 public static T DownCast<T>(View view) where T : View
936 T ret = Registry.GetManagedBaseHandleFromNativePtr(view) as T;
944 private View ConvertIdToView(uint id)
950 view = Parent.FindChildById(id);
955 view = Window.Instance.GetRootLayer().FindChildById(id);
961 internal void SetKeyInputFocus()
963 NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
964 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
968 /// Quries whether the view has focus.
970 /// <returns>true if this view has focus</returns>
971 public bool HasFocus()
973 bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
974 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
978 internal void ClearKeyInputFocus()
980 NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
981 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
984 internal PinchGestureDetector GetPinchGestureDetector()
986 PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
987 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
991 internal PanGestureDetector GetPanGestureDetector()
993 PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
994 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
998 internal TapGestureDetector GetTapGestureDetector()
1000 TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
1001 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1005 internal LongPressGestureDetector GetLongPressGestureDetector()
1007 LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
1008 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1013 /// Sets the name of the style to be applied to the view.
1015 /// <param name="styleName">A string matching a style described in a stylesheet</param>
1016 public void SetStyleName(string styleName)
1018 NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
1019 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1023 /// Retrieves the name of the style to be applied to the view (if any).
1025 /// <returns>A string matching a style, or an empty string</returns>
1026 public string GetStyleName()
1028 string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
1029 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1033 internal void SetBackgroundColor(Vector4 color)
1035 NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
1036 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1039 internal Vector4 GetBackgroundColor()
1041 Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
1042 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1046 internal void SetBackgroundImage(Image image)
1048 NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
1049 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1053 /// Clears the background.
1055 public void ClearBackground()
1057 NDalicPINVOKE.View_ClearBackground(swigCPtr);
1058 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1061 internal ControlKeySignal KeyEventSignal()
1063 ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
1064 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1068 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
1070 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
1071 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1075 internal KeyInputFocusSignal KeyInputFocusLostSignal()
1077 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
1078 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1082 internal View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
1084 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1087 internal enum PropertyRange
1089 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
1090 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
1091 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
1095 /// styleName, type string.
1097 public string StyleName
1102 GetProperty(View.Property.STYLE_NAME).Get(out temp);
1107 SetProperty(View.Property.STYLE_NAME, new Tizen.NUI.PropertyValue(value));
1112 /// mutually exclusive with BACKGROUND_IMAGE & BACKGROUND, type Vector4.
1114 public Color BackgroundColor
1118 Color backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1120 Tizen.NUI.PropertyMap background = Background;
1122 background.Find(Visual.Property.Type)?.Get(out visualType);
1123 if (visualType == (int)Visual.Type.Color)
1125 background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor);
1128 return backgroundColor;
1132 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1137 /// Create an Animation to animate the background color visual. If there is no
1138 /// background visual, creates one with transparent black as it's mixColor.
1140 public Animation AnimateBackgroundColor( object destinationValue,
1143 AlphaFunction.BuiltinFunctions? alphaFunction = null,
1144 object initialValue = null)
1146 Tizen.NUI.PropertyMap background = Background;
1148 if( background.Empty() )
1150 // If there is no background yet, ensure there is a transparent
1152 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1153 background = Background;
1155 return AnimateColor( "background", destinationValue, startTime, endTime, alphaFunction, initialValue );
1159 /// Create an Animation to animate the mixColor of the named visual.
1161 public Animation AnimateColor( string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null )
1163 Animation animation = null;
1165 PropertyMap _animator = new PropertyMap();
1166 if( alphaFunction != null )
1168 _animator.Add("alphaFunction", new PropertyValue( AlphaFunction.BuiltinToPropertyKey(alphaFunction) ) );
1171 PropertyMap _timePeriod = new PropertyMap();
1172 _timePeriod.Add( "duration", new PropertyValue((endTime-startTime)/1000.0f) );
1173 _timePeriod.Add( "delay", new PropertyValue( startTime/1000.0f ) );
1174 _animator.Add( "timePeriod", new PropertyValue( _timePeriod ) );
1176 PropertyMap _transition = new PropertyMap();
1177 _transition.Add( "animator", new PropertyValue( _animator ) );
1178 _transition.Add( "target", new PropertyValue( targetVisual ) );
1179 _transition.Add( "property", new PropertyValue( "mixColor" ) );
1181 if( initialColor != null )
1183 PropertyValue initValue = PropertyValue.CreateFromObject( initialColor );
1184 _transition.Add( "initialValue", initValue );
1187 PropertyValue destValue = PropertyValue.CreateFromObject( destinationColor );
1188 _transition.Add( "targetValue", destValue );
1189 TransitionData _transitionData = new TransitionData( _transition );
1191 animation = new Animation( NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true );
1192 if (NDalicPINVOKE.SWIGPendingException.Pending)
1193 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1199 /// mutually exclusive with BACKGROUND_COLOR & BACKGROUND, type Map.
1201 public string BackgroundImage
1205 string backgroundImage = "";
1207 Tizen.NUI.PropertyMap background = Background;
1209 background.Find(Visual.Property.Type)?.Get(out visualType);
1210 if (visualType == (int)Visual.Type.Image)
1212 background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
1215 return backgroundImage;
1219 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1223 public Tizen.NUI.PropertyMap Background
1227 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1228 GetProperty( View.Property.BACKGROUND ).Get(temp);
1233 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1239 /// The current state of the view.
1246 if (GetProperty(View.Property.STATE).Get(out temp) == false)
1248 NUILog.Error("State get error!");
1254 return States.Normal;
1258 return States.Focused;
1262 return States.Disabled;
1266 return States.Normal;
1272 SetProperty(View.Property.STATE, new Tizen.NUI.PropertyValue((int)value));
1277 /// The current sub state of the view.
1279 public States SubState
1284 if (GetProperty(View.Property.SUB_STATE).Get(out temp) == false)
1286 NUILog.Error("subState get error!");
1291 return States.Normal;
1293 return States.Focused;
1295 return States.Disabled;
1297 return States.Normal;
1302 string valueToString = "";
1307 valueToString = "NORMAL";
1310 case States.Focused:
1312 valueToString = "FOCUSED";
1315 case States.Disabled:
1317 valueToString = "DISABLED";
1322 valueToString = "NORMAL";
1326 SetProperty(View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
1331 /// Displays a tooltip
1333 public Tizen.NUI.PropertyMap Tooltip
1337 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1338 GetProperty(View.Property.TOOLTIP).Get(temp);
1343 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1348 /// Displays a tooltip as Text
1350 public string TooltipText
1354 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1358 private int LeftFocusableViewId
1363 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
1368 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1372 private int RightFocusableViewId
1377 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
1382 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1386 private int UpFocusableViewId
1391 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
1396 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1400 private int DownFocusableViewId
1405 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
1410 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1415 /// Child Property of FlexContainer.<br>
1416 /// The proportion of the free space in the container the flex item will receive.<br>
1417 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br>
1424 GetProperty(FlexContainer.ChildProperty.FLEX).Get(out temp);
1429 SetProperty(FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue(value));
1434 /// Child Property of FlexContainer.<br>
1435 /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br>
1437 public int AlignSelf
1442 GetProperty(FlexContainer.ChildProperty.ALIGN_SELF).Get(out temp);
1447 SetProperty(FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue(value));
1452 /// Child Property of FlexContainer.<br>
1453 /// The space around the flex item.<br>
1455 public Vector4 FlexMargin
1459 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1460 GetProperty(FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
1465 SetProperty(FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue(value));
1470 /// The top-left cell this child occupies, if not set, the first available cell is used
1472 public Vector2 CellIndex
1476 Vector2 temp = new Vector2(0.0f, 0.0f);
1477 GetProperty(TableView.ChildProperty.CELL_INDEX).Get(temp);
1482 SetProperty(TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue(value));
1487 /// The number of rows this child occupies, if not set, default value is 1
1489 public float RowSpan
1494 GetProperty(TableView.ChildProperty.ROW_SPAN).Get(out temp);
1499 SetProperty(TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue(value));
1504 /// The number of columns this child occupies, if not set, default value is 1
1506 public float ColumnSpan
1511 GetProperty(TableView.ChildProperty.COLUMN_SPAN).Get(out temp);
1516 SetProperty(TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue(value));
1521 /// The horizontal alignment of this child inside the cells, if not set, default value is 'left'
1523 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
1528 if (GetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
1530 NUILog.Error("CellHorizontalAlignment get error!");
1536 return Tizen.NUI.HorizontalAlignmentType.Left;
1538 return Tizen.NUI.HorizontalAlignmentType.Center;
1540 return Tizen.NUI.HorizontalAlignmentType.Right;
1542 return Tizen.NUI.HorizontalAlignmentType.Left;
1547 string valueToString = "";
1550 case Tizen.NUI.HorizontalAlignmentType.Left:
1552 valueToString = "left";
1555 case Tizen.NUI.HorizontalAlignmentType.Center:
1557 valueToString = "center";
1560 case Tizen.NUI.HorizontalAlignmentType.Right:
1562 valueToString = "right";
1567 valueToString = "left";
1571 SetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1576 /// The vertical alignment of this child inside the cells, if not set, default value is 'top'
1578 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
1583 GetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
1585 NUILog.Error("CellVerticalAlignment get error!");
1591 return Tizen.NUI.VerticalAlignmentType.Top;
1593 return Tizen.NUI.VerticalAlignmentType.Center;
1595 return Tizen.NUI.VerticalAlignmentType.Bottom;
1597 return Tizen.NUI.VerticalAlignmentType.Top;
1602 string valueToString = "";
1605 case Tizen.NUI.VerticalAlignmentType.Top:
1607 valueToString = "top";
1610 case Tizen.NUI.VerticalAlignmentType.Center:
1612 valueToString = "center";
1615 case Tizen.NUI.VerticalAlignmentType.Bottom:
1617 valueToString = "bottom";
1622 valueToString = "top";
1626 SetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1631 /// The left focusable view.<br>
1632 /// This will return NULL if not set.<br>
1633 /// This will also return NULL if the specified left focusable view is not on Window.<br>
1635 public View LeftFocusableView
1637 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1640 if (LeftFocusableViewId >= 0)
1642 return ConvertIdToView((uint)LeftFocusableViewId);
1648 LeftFocusableViewId = (int)value.GetId();
1653 /// The right focusable view.<br>
1654 /// This will return NULL if not set.<br>
1655 /// This will also return NULL if the specified right focusable view is not on Window.<br>
1657 public View RightFocusableView
1659 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1662 if (RightFocusableViewId >= 0)
1664 return ConvertIdToView((uint)RightFocusableViewId);
1670 RightFocusableViewId = (int)value.GetId();
1675 /// The up focusable view.<br>
1676 /// This will return NULL if not set.<br>
1677 /// This will also return NULL if the specified up focusable view is not on Window.<br>
1679 public View UpFocusableView
1681 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1684 if (UpFocusableViewId >= 0)
1686 return ConvertIdToView((uint)UpFocusableViewId);
1692 UpFocusableViewId = (int)value.GetId();
1697 /// The down focusable view.<br>
1698 /// This will return NULL if not set.<br>
1699 /// This will also return NULL if the specified down focusable view is not on Window.<br>
1701 public View DownFocusableView
1703 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1706 if (DownFocusableViewId >= 0)
1708 return ConvertIdToView((uint)DownFocusableViewId);
1714 DownFocusableViewId = (int)value.GetId();
1719 /// whether the view should be focusable by keyboard navigation.
1721 public bool Focusable
1725 SetKeyboardFocusable(value);
1729 return IsKeyboardFocusable();
1734 /// Enumeration for describing the states of view.
1753 /// Retrieves the position of the View.<br>
1754 /// The coordinates are relative to the View's parent.<br>
1756 public Position CurrentPosition
1760 return GetCurrentPosition();
1765 /// Sets the size of an view for width and height.<br>
1766 /// Geometry can be scaled to fit within this area.<br>
1767 /// This does not interfere with the views scale factor.<br>
1768 /// The views default depth is the minimum of width & height.<br>
1770 public Size2D Size2D
1774 Size temp = new Size(0.0f, 0.0f, 0.0f);
1775 GetProperty(View.Property.SIZE).Get(temp);
1776 Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
1781 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(new Size(value)));
1786 /// Retrieves the size of the View.<br>
1787 /// The coordinates are relative to the View's parent.<br>
1789 public Size2D CurrentSize
1793 return GetCurrentSize();
1798 /// Retrieves the view's parent.<br>
1808 [Obsolete("Please do not use! this will be deprecated. Please use Visibility instead.")]
1818 /// Retrieves and sets the view's opacity.<br>
1820 public float Opacity
1825 GetProperty(View.Property.OPACITY).Get(out temp);
1830 SetProperty(View.Property.OPACITY, new Tizen.NUI.PropertyValue(value));
1835 /// Sets the position of the View for X and Y.<br>
1836 /// By default, sets the position vector between the parent origin and pivot point(default).<br>
1837 /// If Position inheritance if disabled, sets the world position.<br>
1839 public Position2D Position2D
1843 Position temp = new Position(0.0f, 0.0f, 0.0f);
1844 GetProperty(View.Property.POSITION).Get(temp);
1845 return new Position2D(temp);
1849 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(new Position(value)));
1854 /// Retrieves screen postion of view's.<br>
1856 public Vector2 ScreenPosition
1860 Vector2 temp = new Vector2(0.0f, 0.0f);
1861 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
1867 /// Determines whether the pivot point should be used to determine the position of the view.
1868 /// This is true by default.
1870 /// <remarks>If false, then the top-left of the view is used for the position.
1871 /// Setting this to false will allow scaling or rotation around the anchor-point without affecting the view's position.
1873 public bool PositionUsesPivotPoint
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 [Obsolete("Please do not use! this will be deprecated")]
1888 public bool PositionUsesAnchorPoint
1893 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
1898 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
1902 internal bool FocusState
1906 return IsKeyboardFocusable();
1910 SetKeyboardFocusable(value);
1915 /// Queries whether the view is connected to the Stage.<br>
1916 /// When an view is connected, it will be directly or indirectly parented to the root View.<br>
1918 public bool IsOnWindow
1927 /// Gets depth in the hierarchy for the view.
1929 public int HierarchyDepth
1933 return GetHierarchyDepth();
1938 /// Sets the sibling order of the view so depth position can be defined within the same parent.
1941 /// Note The initial value is 0.
1942 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove and LowerBelow will override the sibling order.
1943 /// The values set by this Property will likely change.
1945 public int SiblingOrder
1950 GetProperty(View.Property.SIBLING_ORDER).Get(out temp);
1955 SetProperty(View.Property.SIBLING_ORDER, new Tizen.NUI.PropertyValue(value));
1960 /// Returns the natural size of the view.
1963 /// Deriving classes stipulate the natural size and by default a view has a ZERO natural size.
1965 [Obsolete("Please do not use! this will be deprecated, please use NaturalSize2D instead")]
1966 public Vector3 NaturalSize
1970 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
1971 if (NDalicPINVOKE.SWIGPendingException.Pending)
1972 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1978 /// Returns the natural size (Size2D) of the view.
1981 /// Deriving classes stipulate the natural size and by default a view has a ZERO natural size.
1983 public Size2D NaturalSize2D
1987 Vector3 temp = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
1988 if (NDalicPINVOKE.SWIGPendingException.Pending)
1989 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1991 return new Size2D((int)temp.Width, (int)temp.Height);
1999 /// This is an asynchronous method.
2010 /// This is an asynchronous method.
2011 /// If an view is hidden, then the view and its children will not be rendered.
2012 /// 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.
2019 internal void Raise()
2021 NDalicPINVOKE.Raise(swigCPtr);
2022 if (NDalicPINVOKE.SWIGPendingException.Pending)
2023 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2026 internal void Lower()
2028 NDalicPINVOKE.Lower(swigCPtr);
2029 if (NDalicPINVOKE.SWIGPendingException.Pending)
2030 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2034 /// Raise view above all other views.
2037 /// Sibling order of views within the parent will be updated automatically.
2038 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2040 public void RaiseToTop()
2042 NDalicPINVOKE.RaiseToTop(swigCPtr);
2043 if (NDalicPINVOKE.SWIGPendingException.Pending)
2044 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2048 /// Lower view to the bottom of all views.
2051 /// Sibling order of views within the parent will be updated automatically.
2052 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2054 public void LowerToBottom()
2056 NDalicPINVOKE.LowerToBottom(swigCPtr);
2057 if (NDalicPINVOKE.SWIGPendingException.Pending)
2058 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2062 /// Query if all resources required by a View are loaded and ready.
2064 /// <remarks>Most resources are only loaded when the control is placed on stage
2066 public bool IsResourceReady()
2068 bool ret = NDalicPINVOKE.IsResourceReady(swigCPtr);
2069 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2074 /// Raise the view to above the target view.
2076 /// <remarks>Sibling order of views within the parent will be updated automatically.
2077 /// Views on the level above the target view will still be shown above this view.
2078 /// Raising this view above views with the same sibling order as each other will raise 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 raised above this view</param>
2082 internal void RaiseAbove(View target)
2084 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
2085 if (NDalicPINVOKE.SWIGPendingException.Pending)
2086 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2090 /// Lower the view to below the target view.
2092 /// <remarks>Sibling order of views within the parent will be updated automatically.
2093 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
2094 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2096 /// <param name="target">Will be lowered below this view</param>
2097 internal void LowerBelow(View target)
2099 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
2100 if (NDalicPINVOKE.SWIGPendingException.Pending)
2101 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2104 internal string GetName()
2106 string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);
2107 if (NDalicPINVOKE.SWIGPendingException.Pending)
2108 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2112 internal void SetName(string name)
2114 NDalicPINVOKE.Actor_SetName(swigCPtr, name);
2115 if (NDalicPINVOKE.SWIGPendingException.Pending)
2116 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2119 internal uint GetId()
2121 uint ret = NDalicPINVOKE.Actor_GetId(swigCPtr);
2122 if (NDalicPINVOKE.SWIGPendingException.Pending)
2123 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2127 internal bool IsRoot()
2129 bool ret = NDalicPINVOKE.Actor_IsRoot(swigCPtr);
2130 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2134 internal bool OnWindow()
2136 bool ret = NDalicPINVOKE.Actor_OnStage(swigCPtr);
2137 if (NDalicPINVOKE.SWIGPendingException.Pending)
2138 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2142 internal Layer GetLayer()
2144 IntPtr cPtr = NDalicPINVOKE.Actor_GetLayer(swigCPtr);
2145 Layer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Layer;
2147 if (NDalicPINVOKE.SWIGPendingException.Pending)
2148 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2153 /// Adds a child view to this View.
2155 /// <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>
2156 /// <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>
2157 /// <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>
2158 /// <param name="child">The child</param>
2159 public void Add(View child)
2161 NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
2162 if (NDalicPINVOKE.SWIGPendingException.Pending)
2163 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2167 /// Removes a child View from this View. If the view was not a child of this view, this is a no-op.
2169 /// <pre>This View(the parent) has been initialized. The child view is not the same as the parent view.</pre>
2170 /// <param name="child">The child</param>
2171 public void Remove(View child)
2173 NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
2174 if (NDalicPINVOKE.SWIGPendingException.Pending)
2175 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2179 /// Removes a View from its Parent View / Layer. If the View has no parent, this method does nothing.
2181 /// <pre>The (child) View has been initialized. </pre>
2182 public void Unparent()
2184 NDalicPINVOKE.Actor_Unparent(swigCPtr);
2185 if (NDalicPINVOKE.SWIGPendingException.Pending)
2186 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2190 /// Retrieves the number of children held by the view.
2192 /// <pre>The View has been initialized.</pre>
2193 /// <returns>The number of children</returns>
2194 internal uint GetChildCount()
2196 uint ret = NDalicPINVOKE.Actor_GetChildCount(swigCPtr);
2197 if (NDalicPINVOKE.SWIGPendingException.Pending)
2198 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2203 /// Retrieves child view by index.
2205 /// <pre>The View has been initialized.</pre>
2206 /// <param name="index">The index of the child to retrieve</param>
2207 /// <returns>The view for the given index or empty handle if children not initialized</returns>
2208 public View GetChildAt(uint index)
2210 IntPtr cPtr = NDalicPINVOKE.Actor_GetChildAt(swigCPtr, index);
2212 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2214 if (NDalicPINVOKE.SWIGPendingException.Pending)
2215 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2220 /// Search through this view's hierarchy for an view with the given name.
2221 /// The view itself is also considered in the search.
2223 /// <pre>The View has been initialized.</pre>
2224 /// <param name="viewName">The name of the view to find</param>
2225 /// <returns>A handle to the view if found, or an empty handle if not</returns>
2226 public View FindChildByName(string viewName)
2228 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
2230 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2232 if (NDalicPINVOKE.SWIGPendingException.Pending)
2233 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2237 internal View FindChildById(uint id)
2239 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
2241 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2243 if (NDalicPINVOKE.SWIGPendingException.Pending)
2244 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2248 internal View GetParent()
2251 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
2253 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(cPtr);
2255 if(basehandle is Layer)
2257 ret = new View(cPtr,false);
2261 ret = basehandle as View;
2264 if (NDalicPINVOKE.SWIGPendingException.Pending)
2265 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2269 internal void SetParentOrigin(Vector3 origin)
2271 NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
2272 if (NDalicPINVOKE.SWIGPendingException.Pending)
2273 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2276 internal Vector3 GetCurrentParentOrigin()
2278 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentParentOrigin(swigCPtr), true);
2279 if (NDalicPINVOKE.SWIGPendingException.Pending)
2280 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2284 internal void SetAnchorPoint(Vector3 anchorPoint)
2286 NDalicPINVOKE.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
2287 if (NDalicPINVOKE.SWIGPendingException.Pending)
2288 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2291 internal Vector3 GetCurrentAnchorPoint()
2293 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentAnchorPoint(swigCPtr), true);
2294 if (NDalicPINVOKE.SWIGPendingException.Pending)
2295 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2299 internal void SetSize(float width, float height)
2301 NDalicPINVOKE.Actor_SetSize__SWIG_0(swigCPtr, width, height);
2302 if (NDalicPINVOKE.SWIGPendingException.Pending)
2303 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2306 internal void SetSize(float width, float height, float depth)
2308 NDalicPINVOKE.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
2309 if (NDalicPINVOKE.SWIGPendingException.Pending)
2310 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2313 internal void SetSize(Vector2 size)
2315 NDalicPINVOKE.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
2316 if (NDalicPINVOKE.SWIGPendingException.Pending)
2317 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2320 internal void SetSize(Vector3 size)
2322 NDalicPINVOKE.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
2323 if (NDalicPINVOKE.SWIGPendingException.Pending)
2324 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2327 internal Vector3 GetTargetSize()
2329 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetTargetSize(swigCPtr), true);
2330 if (NDalicPINVOKE.SWIGPendingException.Pending)
2331 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2335 internal Size2D GetCurrentSize()
2337 Size ret = new Size(NDalicPINVOKE.Actor_GetCurrentSize(swigCPtr), true);
2338 if (NDalicPINVOKE.SWIGPendingException.Pending)
2339 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2340 Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
2344 internal Vector3 GetNaturalSize()
2346 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2347 if (NDalicPINVOKE.SWIGPendingException.Pending)
2348 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2352 internal void SetPosition(float x, float y)
2354 NDalicPINVOKE.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
2355 if (NDalicPINVOKE.SWIGPendingException.Pending)
2356 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2359 internal void SetPosition(float x, float y, float z)
2361 NDalicPINVOKE.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
2362 if (NDalicPINVOKE.SWIGPendingException.Pending)
2363 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2366 internal void SetPosition(Vector3 position)
2368 NDalicPINVOKE.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
2369 if (NDalicPINVOKE.SWIGPendingException.Pending)
2370 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2373 internal void SetX(float x)
2375 NDalicPINVOKE.Actor_SetX(swigCPtr, x);
2376 if (NDalicPINVOKE.SWIGPendingException.Pending)
2377 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2380 internal void SetY(float y)
2382 NDalicPINVOKE.Actor_SetY(swigCPtr, y);
2383 if (NDalicPINVOKE.SWIGPendingException.Pending)
2384 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2387 internal void SetZ(float z)
2389 NDalicPINVOKE.Actor_SetZ(swigCPtr, z);
2390 if (NDalicPINVOKE.SWIGPendingException.Pending)
2391 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2394 internal void TranslateBy(Vector3 distance)
2396 NDalicPINVOKE.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
2397 if (NDalicPINVOKE.SWIGPendingException.Pending)
2398 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2401 internal Position GetCurrentPosition()
2403 Position ret = new Position(NDalicPINVOKE.Actor_GetCurrentPosition(swigCPtr), true);
2404 if (NDalicPINVOKE.SWIGPendingException.Pending)
2405 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2409 internal Vector3 GetCurrentWorldPosition()
2411 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldPosition(swigCPtr), true);
2412 if (NDalicPINVOKE.SWIGPendingException.Pending)
2413 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2417 internal void SetInheritPosition(bool inherit)
2419 NDalicPINVOKE.Actor_SetInheritPosition(swigCPtr, inherit);
2420 if (NDalicPINVOKE.SWIGPendingException.Pending)
2421 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2424 internal bool IsPositionInherited()
2426 bool ret = NDalicPINVOKE.Actor_IsPositionInherited(swigCPtr);
2427 if (NDalicPINVOKE.SWIGPendingException.Pending)
2428 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2432 internal void SetOrientation(Degree angle, Vector3 axis)
2434 NDalicPINVOKE.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2435 if (NDalicPINVOKE.SWIGPendingException.Pending)
2436 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2439 internal void SetOrientation(Radian angle, Vector3 axis)
2441 NDalicPINVOKE.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2442 if (NDalicPINVOKE.SWIGPendingException.Pending)
2443 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2446 internal void SetOrientation(Rotation orientation)
2448 NDalicPINVOKE.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
2449 if (NDalicPINVOKE.SWIGPendingException.Pending)
2450 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2453 internal void RotateBy(Degree angle, Vector3 axis)
2455 NDalicPINVOKE.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2456 if (NDalicPINVOKE.SWIGPendingException.Pending)
2457 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2460 internal void RotateBy(Radian angle, Vector3 axis)
2462 NDalicPINVOKE.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2463 if (NDalicPINVOKE.SWIGPendingException.Pending)
2464 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2467 internal void RotateBy(Rotation relativeRotation)
2469 NDalicPINVOKE.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
2470 if (NDalicPINVOKE.SWIGPendingException.Pending)
2471 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2474 internal Rotation GetCurrentOrientation()
2476 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentOrientation(swigCPtr), true);
2477 if (NDalicPINVOKE.SWIGPendingException.Pending)
2478 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2482 internal void SetInheritOrientation(bool inherit)
2484 NDalicPINVOKE.Actor_SetInheritOrientation(swigCPtr, inherit);
2485 if (NDalicPINVOKE.SWIGPendingException.Pending)
2486 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2489 internal bool IsOrientationInherited()
2491 bool ret = NDalicPINVOKE.Actor_IsOrientationInherited(swigCPtr);
2492 if (NDalicPINVOKE.SWIGPendingException.Pending)
2493 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2497 internal Rotation GetCurrentWorldOrientation()
2499 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentWorldOrientation(swigCPtr), true);
2500 if (NDalicPINVOKE.SWIGPendingException.Pending)
2501 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2505 internal void SetScale(float scale)
2507 NDalicPINVOKE.Actor_SetScale__SWIG_0(swigCPtr, scale);
2508 if (NDalicPINVOKE.SWIGPendingException.Pending)
2509 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2512 internal void SetScale(float scaleX, float scaleY, float scaleZ)
2514 NDalicPINVOKE.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
2515 if (NDalicPINVOKE.SWIGPendingException.Pending)
2516 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2519 internal void SetScale(Vector3 scale)
2521 NDalicPINVOKE.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
2522 if (NDalicPINVOKE.SWIGPendingException.Pending)
2523 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2526 internal void ScaleBy(Vector3 relativeScale)
2528 NDalicPINVOKE.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
2529 if (NDalicPINVOKE.SWIGPendingException.Pending)
2530 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2533 internal Vector3 GetCurrentScale()
2535 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentScale(swigCPtr), true);
2536 if (NDalicPINVOKE.SWIGPendingException.Pending)
2537 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2541 internal Vector3 GetCurrentWorldScale()
2543 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldScale(swigCPtr), true);
2544 if (NDalicPINVOKE.SWIGPendingException.Pending)
2545 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2549 internal void SetInheritScale(bool inherit)
2551 NDalicPINVOKE.Actor_SetInheritScale(swigCPtr, inherit);
2552 if (NDalicPINVOKE.SWIGPendingException.Pending)
2553 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2556 internal bool IsScaleInherited()
2558 bool ret = NDalicPINVOKE.Actor_IsScaleInherited(swigCPtr);
2559 if (NDalicPINVOKE.SWIGPendingException.Pending)
2560 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2564 internal Matrix GetCurrentWorldMatrix()
2566 Matrix ret = new Matrix(NDalicPINVOKE.Actor_GetCurrentWorldMatrix(swigCPtr), true);
2567 if (NDalicPINVOKE.SWIGPendingException.Pending)
2568 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2572 internal void SetVisible(bool visible)
2574 NDalicPINVOKE.Actor_SetVisible(swigCPtr, visible);
2575 if (NDalicPINVOKE.SWIGPendingException.Pending)
2576 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2579 internal bool IsVisible()
2581 bool ret = NDalicPINVOKE.Actor_IsVisible(swigCPtr);
2582 if (NDalicPINVOKE.SWIGPendingException.Pending)
2583 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2587 internal void SetOpacity(float opacity)
2589 NDalicPINVOKE.Actor_SetOpacity(swigCPtr, opacity);
2590 if (NDalicPINVOKE.SWIGPendingException.Pending)
2591 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2594 internal float GetCurrentOpacity()
2596 float ret = NDalicPINVOKE.Actor_GetCurrentOpacity(swigCPtr);
2597 if (NDalicPINVOKE.SWIGPendingException.Pending)
2598 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2602 internal void SetColor(Vector4 color)
2604 NDalicPINVOKE.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
2605 if (NDalicPINVOKE.SWIGPendingException.Pending)
2606 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2609 internal Vector4 GetCurrentColor()
2611 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentColor(swigCPtr), true);
2612 if (NDalicPINVOKE.SWIGPendingException.Pending)
2613 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2617 internal void SetColorMode(ColorMode colorMode)
2619 NDalicPINVOKE.Actor_SetColorMode(swigCPtr, (int)colorMode);
2620 if (NDalicPINVOKE.SWIGPendingException.Pending)
2621 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2624 internal ColorMode GetColorMode()
2626 ColorMode ret = (ColorMode)NDalicPINVOKE.Actor_GetColorMode(swigCPtr);
2627 if (NDalicPINVOKE.SWIGPendingException.Pending)
2628 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2632 internal Vector4 GetCurrentWorldColor()
2634 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentWorldColor(swigCPtr), true);
2635 if (NDalicPINVOKE.SWIGPendingException.Pending)
2636 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2640 internal void SetDrawMode(DrawModeType drawMode)
2642 NDalicPINVOKE.Actor_SetDrawMode(swigCPtr, (int)drawMode);
2643 if (NDalicPINVOKE.SWIGPendingException.Pending)
2644 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2647 internal DrawModeType GetDrawMode()
2649 DrawModeType ret = (DrawModeType)NDalicPINVOKE.Actor_GetDrawMode(swigCPtr);
2650 if (NDalicPINVOKE.SWIGPendingException.Pending)
2651 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2656 /// Converts screen coordinates into the view's coordinate system using the default camera.
2658 /// <pre>The View has been initialized.</pre>
2659 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5)</remarks>
2660 /// <param name="localX">On return, the X-coordinate relative to the view</param>
2661 /// <param name="localY">On return, the Y-coordinate relative to the view</param>
2662 /// <param name="screenX">The screen X-coordinate</param>
2663 /// <param name="screenY">The screen Y-coordinate</param>
2664 /// <returns>True if the conversion succeeded</returns>
2665 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
2667 bool ret = NDalicPINVOKE.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
2668 if (NDalicPINVOKE.SWIGPendingException.Pending)
2669 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2673 internal void SetKeyboardFocusable(bool focusable)
2675 NDalicPINVOKE.Actor_SetKeyboardFocusable(swigCPtr, focusable);
2676 if (NDalicPINVOKE.SWIGPendingException.Pending)
2677 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2680 internal bool IsKeyboardFocusable()
2682 bool ret = NDalicPINVOKE.Actor_IsKeyboardFocusable(swigCPtr);
2683 if (NDalicPINVOKE.SWIGPendingException.Pending)
2684 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2688 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
2690 NDalicPINVOKE.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
2691 if (NDalicPINVOKE.SWIGPendingException.Pending)
2692 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2695 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
2697 ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.Actor_GetResizePolicy(swigCPtr, (int)dimension);
2698 if (NDalicPINVOKE.SWIGPendingException.Pending)
2699 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2704 /// Sets the relative to parent size factor of the view.<br>
2705 /// This factor is only used when ResizePolicy is set to either:
2706 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br>
2707 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br>
2709 /// <pre>The View has been initialized.</pre>
2710 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis</param>
2711 public void SetSizeModeFactor(Vector3 factor)
2713 NDalicPINVOKE.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
2714 if (NDalicPINVOKE.SWIGPendingException.Pending)
2715 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2718 internal Vector3 GetSizeModeFactor()
2720 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetSizeModeFactor(swigCPtr), true);
2721 if (NDalicPINVOKE.SWIGPendingException.Pending)
2722 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2727 /// Calculates the height of the view given a width.<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="width">Width to use</param>
2732 /// <returns>The height based on the width</returns>
2733 public float GetHeightForWidth(float width)
2735 float ret = NDalicPINVOKE.Actor_GetHeightForWidth(swigCPtr, width);
2736 if (NDalicPINVOKE.SWIGPendingException.Pending)
2737 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2742 /// Calculates the width of the view given a height.<br>
2743 /// The natural size is used for default calculation.<br>
2744 /// size 0 is treated as aspect ratio 1:1.<br>
2746 /// <param name="height">Height to use</param>
2747 /// <returns>The width based on the height</returns>
2748 public float GetWidthForHeight(float height)
2750 float ret = NDalicPINVOKE.Actor_GetWidthForHeight(swigCPtr, height);
2751 if (NDalicPINVOKE.SWIGPendingException.Pending)
2752 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2756 public float GetRelayoutSize(DimensionType dimension)
2758 float ret = NDalicPINVOKE.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
2759 if (NDalicPINVOKE.SWIGPendingException.Pending)
2760 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2764 public void SetPadding(PaddingType padding)
2766 NDalicPINVOKE.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
2767 if (NDalicPINVOKE.SWIGPendingException.Pending)
2768 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2771 public void GetPadding(PaddingType paddingOut)
2773 NDalicPINVOKE.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
2774 if (NDalicPINVOKE.SWIGPendingException.Pending)
2775 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2778 internal void SetMinimumSize(Vector2 size)
2780 NDalicPINVOKE.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
2781 if (NDalicPINVOKE.SWIGPendingException.Pending)
2782 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2785 internal Vector2 GetMinimumSize()
2787 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMinimumSize(swigCPtr), true);
2788 if (NDalicPINVOKE.SWIGPendingException.Pending)
2789 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2793 internal void SetMaximumSize(Vector2 size)
2795 NDalicPINVOKE.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
2796 if (NDalicPINVOKE.SWIGPendingException.Pending)
2797 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2800 internal Vector2 GetMaximumSize()
2802 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMaximumSize(swigCPtr), true);
2803 if (NDalicPINVOKE.SWIGPendingException.Pending)
2804 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2808 internal int GetHierarchyDepth()
2810 int ret = NDalicPINVOKE.Actor_GetHierarchyDepth(swigCPtr);
2811 if (NDalicPINVOKE.SWIGPendingException.Pending)
2812 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2816 public uint AddRenderer(Renderer renderer)
2818 uint ret = NDalicPINVOKE.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
2819 if (NDalicPINVOKE.SWIGPendingException.Pending)
2820 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2824 internal uint GetRendererCount()
2826 uint ret = NDalicPINVOKE.Actor_GetRendererCount(swigCPtr);
2827 if (NDalicPINVOKE.SWIGPendingException.Pending)
2828 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2832 public Renderer GetRendererAt(uint index)
2834 IntPtr cPtr = NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index);
2835 Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Renderer;
2837 if (NDalicPINVOKE.SWIGPendingException.Pending)
2838 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2842 public void RemoveRenderer(Renderer renderer)
2844 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
2845 if (NDalicPINVOKE.SWIGPendingException.Pending)
2846 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2849 public void RemoveRenderer(uint index)
2851 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
2852 if (NDalicPINVOKE.SWIGPendingException.Pending)
2853 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2856 internal TouchDataSignal TouchSignal()
2858 TouchDataSignal ret = new TouchDataSignal(NDalicPINVOKE.Actor_TouchSignal(swigCPtr), false);
2859 if (NDalicPINVOKE.SWIGPendingException.Pending)
2860 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2864 internal HoverSignal HoveredSignal()
2866 HoverSignal ret = new HoverSignal(NDalicPINVOKE.Actor_HoveredSignal(swigCPtr), false);
2867 if (NDalicPINVOKE.SWIGPendingException.Pending)
2868 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2872 internal WheelSignal WheelEventSignal()
2874 WheelSignal ret = new WheelSignal(NDalicPINVOKE.Actor_WheelEventSignal(swigCPtr), false);
2875 if (NDalicPINVOKE.SWIGPendingException.Pending)
2876 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2880 internal ViewSignal OnWindowSignal()
2882 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnStageSignal(swigCPtr), false);
2883 if (NDalicPINVOKE.SWIGPendingException.Pending)
2884 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2888 internal ViewSignal OffWindowSignal()
2890 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OffStageSignal(swigCPtr), false);
2891 if (NDalicPINVOKE.SWIGPendingException.Pending)
2892 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2896 internal ViewSignal OnRelayoutSignal()
2898 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnRelayoutSignal(swigCPtr), false);
2899 if (NDalicPINVOKE.SWIGPendingException.Pending)
2900 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2904 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view) {
2905 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
2906 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2910 internal ViewSignal ResourcesLoadedSignal()
2912 ViewSignal ret = new ViewSignal(NDalicPINVOKE.ResourceReadySignal(swigCPtr), false);
2913 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2918 /// Gets/Sets the origin of an view, within its parent's area.<br>
2919 /// 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>
2920 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br>
2921 /// An view's position is the distance between this origin, and the view's anchor-point.<br>
2923 /// <pre>The View has been initialized.</pre>
2924 public Position ParentOrigin
2928 Position temp = new Position(0.0f, 0.0f, 0.0f);
2929 GetProperty(View.Property.PARENT_ORIGIN).Get(temp);
2934 SetProperty(View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue(value));
2938 internal float ParentOriginX
2943 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
2948 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
2952 internal float ParentOriginY
2957 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
2962 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
2966 internal float ParentOriginZ
2971 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
2976 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
2981 /// Gets/Sets the anchor-point of an view.<br>
2982 /// 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>
2983 /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br>
2984 /// An view position is the distance between its parent-origin and this anchor-point.<br>
2985 /// An view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br>
2986 /// <pre>The View has been initialized.</pre>
2988 public Position PivotPoint
2992 Position temp = new Position(0.0f, 0.0f, 0.0f);
2993 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
2998 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3002 internal float PivotPointX
3007 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
3012 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
3016 internal float PivotPointY
3021 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
3026 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
3030 internal float PivotPointZ
3035 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
3040 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
3045 /// Gets/Sets the size width of an view.
3047 public float SizeWidth
3052 GetProperty(View.Property.SIZE_WIDTH).Get(out temp);
3057 SetProperty(View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue(value));
3062 /// Gets/Sets the size height of an view.
3064 public float SizeHeight
3069 GetProperty(View.Property.SIZE_HEIGHT).Get(out temp);
3074 SetProperty(View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue(value));
3079 /// Gets/Sets the position of the View.<br>
3080 /// By default, sets the position vector between the parent origin and pivot point(default).<br>
3081 /// If Position inheritance if disabled, sets the world position.<br>
3083 public Position Position
3087 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3088 GetProperty(View.Property.POSITION).Get(temp);
3093 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(value));
3098 /// Gets/Sets the position x of the View.
3100 public float PositionX
3105 GetProperty(View.Property.POSITION_X).Get(out temp);
3110 SetProperty(View.Property.POSITION_X, new Tizen.NUI.PropertyValue(value));
3115 /// Gets/Sets the position y of the View.
3117 public float PositionY
3122 GetProperty(View.Property.POSITION_Y).Get(out temp);
3127 SetProperty(View.Property.POSITION_Y, new Tizen.NUI.PropertyValue(value));
3132 /// Gets/Sets the position z of the View.
3134 public float PositionZ
3139 GetProperty(View.Property.POSITION_Z).Get(out temp);
3144 SetProperty(View.Property.POSITION_Z, new Tizen.NUI.PropertyValue(value));
3149 /// Gets/Sets the world position of the View.
3151 public Vector3 WorldPosition
3155 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3156 GetProperty(View.Property.WORLD_POSITION).Get(temp);
3161 internal float WorldPositionX
3166 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
3171 internal float WorldPositionY
3176 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
3181 internal float WorldPositionZ
3186 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
3192 /// Gets/Sets the orientation of the View.<br>
3193 /// An view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br>
3195 /// <remarks>This is an asynchronous method.</remarks>
3196 public Rotation Orientation
3200 Rotation temp = new Rotation();
3201 GetProperty(View.Property.ORIENTATION).Get(temp);
3206 SetProperty(View.Property.ORIENTATION, new Tizen.NUI.PropertyValue(value));
3211 /// Gets/Sets the world orientation of the View.<br>
3213 public Rotation WorldOrientation
3217 Rotation temp = new Rotation();
3218 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
3224 /// Gets/Sets the scale factor applied to an view.<br>
3226 public Vector3 Scale
3230 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3231 GetProperty(View.Property.SCALE).Get(temp);
3236 SetProperty(View.Property.SCALE, new Tizen.NUI.PropertyValue(value));
3241 /// Gets/Sets the scale x factor applied to an view.
3248 GetProperty(View.Property.SCALE_X).Get(out temp);
3253 SetProperty(View.Property.SCALE_X, new Tizen.NUI.PropertyValue(value));
3258 /// Gets/Sets the scale y factor applied to an view.
3265 GetProperty(View.Property.SCALE_Y).Get(out temp);
3270 SetProperty(View.Property.SCALE_Y, new Tizen.NUI.PropertyValue(value));
3275 /// Gets/Sets the scale z factor applied to an view.
3282 GetProperty(View.Property.SCALE_Z).Get(out temp);
3287 SetProperty(View.Property.SCALE_Z, new Tizen.NUI.PropertyValue(value));
3292 /// Gets the world scale of View.
3294 public Vector3 WorldScale
3298 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3299 GetProperty(View.Property.WORLD_SCALE).Get(temp);
3305 /// Retrieves the visibility flag of an view.
3308 /// If an view is not visible, then the view and its children will not be rendered.
3309 /// 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.
3311 public bool Visibility
3316 GetProperty(View.Property.VISIBLE).Get(out temp);
3322 /// Gets the view's world color.
3324 public Vector4 WorldColor
3328 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3329 GetProperty(View.Property.WORLD_COLOR).Get(temp);
3334 internal Matrix WorldMatrix
3338 Matrix temp = new Matrix();
3339 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
3345 /// Gets/Sets the View's name.
3352 GetProperty(View.Property.NAME).Get(out temp);
3357 SetProperty(View.Property.NAME, new Tizen.NUI.PropertyValue(value));
3362 /// Get the number of children held by the view.
3364 public uint ChildCount
3368 return GetChildCount();
3373 /// Gets the View's ID.
3385 /// Gets/Sets the status of whether an view should emit touch or hover signals.
3387 public bool Sensitive
3392 GetProperty(View.Property.SENSITIVE).Get(out temp);
3397 SetProperty(View.Property.SENSITIVE, new Tizen.NUI.PropertyValue(value));
3402 /// Gets/Sets the status of whether the view should receive a notification when touch or hover motion events leave the boundary of the view.
3404 public bool LeaveRequired
3409 GetProperty(View.Property.LEAVE_REQUIRED).Get(out temp);
3414 SetProperty(View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue(value));
3419 /// Gets/Sets the status of whether a child view inherits it's parent's orientation.
3421 public bool InheritOrientation
3426 GetProperty(View.Property.INHERIT_ORIENTATION).Get(out temp);
3431 SetProperty(View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue(value));
3436 /// Gets/Sets the status of whether a child view inherits it's parent's scale.
3438 public bool InheritScale
3443 GetProperty(View.Property.INHERIT_SCALE).Get(out temp);
3448 SetProperty(View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue(value));
3453 /// Gets/Sets the status of how the view and its children should be drawn.<br>
3454 /// Not all views are renderable, but DrawMode can be inherited from any view.<br>
3455 /// 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>
3456 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br>
3457 /// Overlay views are drawn in a separate pass, after all non-overlay views within the Layer.<br>
3458 /// For overlay views, the drawing order is with respect to tree levels of Views, and depth-testing will not be used.<br>
3460 public DrawModeType DrawMode
3465 if (GetProperty(View.Property.DRAW_MODE).Get(out temp) == false)
3467 NUILog.Error("DrawMode get error!");
3472 return DrawModeType.Normal;
3474 return DrawModeType.Overlay2D;
3476 return DrawModeType.Stencil;
3478 return DrawModeType.Normal;
3483 SetProperty(View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)value));
3488 /// Gets/Sets the relative to parent size factor of the view.<br>
3489 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br>
3490 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br>
3492 public Vector3 SizeModeFactor
3496 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3497 GetProperty(View.Property.SIZE_MODE_FACTOR).Get(temp);
3502 SetProperty(View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue(value));
3507 /// Gets/Sets the width resize policy to be used.
3509 public ResizePolicyType WidthResizePolicy
3514 if (GetProperty(View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
3516 NUILog.Error("WidthResizePolicy get error!");
3521 return ResizePolicyType.Fixed;
3522 case "USE_NATURAL_SIZE":
3523 return ResizePolicyType.UseNaturalSize;
3524 case "FILL_TO_PARENT":
3525 return ResizePolicyType.FillToParent;
3526 case "SIZE_RELATIVE_TO_PARENT":
3527 return ResizePolicyType.SizeRelativeToParent;
3528 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3529 return ResizePolicyType.SizeFixedOffsetFromParent;
3530 case "FIT_TO_CHILDREN":
3531 return ResizePolicyType.FitToChildren;
3532 case "DIMENSION_DEPENDENCY":
3533 return ResizePolicyType.DimensionDependency;
3534 case "USE_ASSIGNED_SIZE":
3535 return ResizePolicyType.UseAssignedSize;
3537 return ResizePolicyType.Fixed;
3542 SetProperty(View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3547 /// Gets/Sets the height resize policy to be used.
3549 public ResizePolicyType HeightResizePolicy
3554 if (GetProperty(View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
3556 NUILog.Error("HeightResizePolicy get error!");
3561 return ResizePolicyType.Fixed;
3562 case "USE_NATURAL_SIZE":
3563 return ResizePolicyType.UseNaturalSize;
3564 case "FILL_TO_PARENT":
3565 return ResizePolicyType.FillToParent;
3566 case "SIZE_RELATIVE_TO_PARENT":
3567 return ResizePolicyType.SizeRelativeToParent;
3568 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3569 return ResizePolicyType.SizeFixedOffsetFromParent;
3570 case "FIT_TO_CHILDREN":
3571 return ResizePolicyType.FitToChildren;
3572 case "DIMENSION_DEPENDENCY":
3573 return ResizePolicyType.DimensionDependency;
3574 case "USE_ASSIGNED_SIZE":
3575 return ResizePolicyType.UseAssignedSize;
3577 return ResizePolicyType.Fixed;
3582 SetProperty(View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3587 /// Gets/Sets the policy to use when setting size with size negotiation.<br>
3588 /// Defaults to SizeScalePolicyType.UseSizeSet.<br>
3590 public SizeScalePolicyType SizeScalePolicy
3595 if (GetProperty(View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
3597 NUILog.Error("SizeScalePolicy get error!");
3601 case "USE_SIZE_SET":
3602 return SizeScalePolicyType.UseSizeSet;
3603 case "FIT_WITH_ASPECT_RATIO":
3604 return SizeScalePolicyType.FitWithAspectRatio;
3605 case "FILL_WITH_ASPECT_RATIO":
3606 return SizeScalePolicyType.FillWithAspectRatio;
3608 return SizeScalePolicyType.UseSizeSet;
3613 string valueToString = "";
3616 case SizeScalePolicyType.UseSizeSet:
3618 valueToString = "USE_SIZE_SET";
3621 case SizeScalePolicyType.FitWithAspectRatio:
3623 valueToString = "FIT_WITH_ASPECT_RATIO";
3626 case SizeScalePolicyType.FillWithAspectRatio:
3628 valueToString = "FILL_WITH_ASPECT_RATIO";
3633 valueToString = "USE_SIZE_SET";
3637 SetProperty(View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
3642 /// Gets/Sets the status of whether the width size is dependent on height size.
3644 public bool WidthForHeight
3649 GetProperty(View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
3654 SetProperty(View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue(value));
3659 /// Gets/Sets the status of whether the height size is dependent on width size.
3661 public bool HeightForWidth
3666 GetProperty(View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
3671 SetProperty(View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue(value));
3676 /// Gets/Sets the padding for use in layout.
3678 public Vector4 Padding
3682 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3683 GetProperty(View.Property.PADDING).Get(temp);
3688 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
3693 /// Gets/Sets the minimum size an view can be assigned in size negotiation.
3695 public Size2D MinimumSize
3699 Size2D temp = new Size2D(0, 0);
3700 GetProperty(View.Property.MINIMUM_SIZE).Get(temp);
3705 SetProperty(View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3710 /// Gets/Sets the maximum size an view can be assigned in size negotiation.
3712 public Size2D MaximumSize
3716 Size2D temp = new Size2D(0, 0);
3717 GetProperty(View.Property.MAXIMUM_SIZE).Get(temp);
3722 SetProperty(View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3727 /// Gets/Sets whether a child view inherits it's parent's position.<br>
3728 /// Default is to inherit.<br>
3729 /// 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>
3731 public bool InheritPosition
3736 GetProperty(View.Property.INHERIT_POSITION).Get(out temp);
3741 SetProperty(View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue(value));
3746 /// Gets/Sets clipping behavior(mode) of it's children.
3748 public ClippingModeType ClippingMode
3753 if (GetProperty(View.Property.CLIPPING_MODE).Get(out temp) == false)
3755 NUILog.Error("ClippingMode get error!");
3760 return ClippingModeType.Disabled;
3761 case "CLIP_CHILDREN":
3762 return ClippingModeType.ClipChildren;
3764 return ClippingModeType.Disabled;
3769 SetProperty(View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)value));
3774 /// Get the number of renderers held by the view.
3776 public uint RendererCount
3780 return GetRendererCount();
3787 [Obsolete("Please do not use! this will be deprecated")]
3788 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> Touched
3792 if (_touchDataEventHandler == null)
3794 _touchDataCallback = OnTouch;
3795 this.TouchSignal().Connect(_touchDataCallback);
3798 _touchDataEventHandler += value;
3803 _touchDataEventHandler -= value;
3805 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
3807 this.TouchSignal().Disconnect(_touchDataCallback);
3813 [Obsolete("Please do not use! this will be deprecated")]
3814 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> Hovered
3818 if (_hoverEventHandler == null)
3820 _hoverEventCallback = OnHoverEvent;
3821 this.HoveredSignal().Connect(_hoverEventCallback);
3824 _hoverEventHandler += value;
3829 _hoverEventHandler -= value;
3831 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
3833 this.HoveredSignal().Disconnect(_hoverEventCallback);
3839 [Obsolete("Please do not use! this will be deprecated")]
3840 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelMoved
3844 if (_wheelEventHandler == null)
3846 _wheelEventCallback = OnWheelEvent;
3847 this.WheelEventSignal().Connect(_wheelEventCallback);
3850 _wheelEventHandler += value;
3855 _wheelEventHandler -= value;
3857 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
3859 this.WheelEventSignal().Disconnect(_wheelEventCallback);
3865 [Obsolete("Please do not use! this will be deprecated")]
3866 public Position AnchorPoint
3870 Position temp = new Position(0.0f, 0.0f, 0.0f);
3871 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
3876 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3880 [Obsolete("Please do not use! this will be deprecated, please use Size2D instead")]
3885 Size temp = new Size(0.0f, 0.0f, 0.0f);
3886 GetProperty(View.Property.SIZE).Get(temp);
3891 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(value));
3895 [Obsolete("Please do not use! this will be deprecated")]
3896 public event EventHandler OnWindowEvent
3900 if (_onWindowEventHandler == null)
3902 _onWindowEventCallback = OnWindow;
3903 this.OnWindowSignal().Connect(_onWindowEventCallback);
3906 _onWindowEventHandler += value;
3911 _onWindowEventHandler -= value;
3913 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
3915 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
3920 [Obsolete("Please do not use! this will be deprecated")]
3921 public event EventHandler OffWindowEvent
3925 if (_offWindowEventHandler == null)
3927 _offWindowEventCallback = OffWindow;
3928 this.OffWindowSignal().Connect(_offWindowEventCallback);
3931 _offWindowEventHandler += value;
3936 _offWindowEventHandler -= value;
3938 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
3940 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
3945 [Obsolete("Please do not use! this will be deprecated")]
3946 public event EventHandler OnRelayoutEvent
3950 if (_onRelayoutEventHandler == null)
3952 _onRelayoutEventCallback = OnRelayout;
3953 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
3956 _onRelayoutEventHandler += value;
3961 _onRelayoutEventHandler -= value;
3963 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
3965 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);