1 /** Copyright (c) 2017 Samsung Electronics Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
17 namespace Tizen.NUI.BaseComponents
21 using System.Runtime.InteropServices;
24 /// View is the base class for all views.
26 public class View : Container
28 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
30 internal View(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.View_SWIGUpcast(cPtr), cMemoryOwn)
32 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
33 PositionUsesPivotPoint = false;
36 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
38 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
41 // From Container Base class
44 /// Adds a child view to this View.
46 /// <seealso cref="Container::Add()">
48 public override void Add(View child)
50 NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
51 if (NDalicPINVOKE.SWIGPendingException.Pending)
52 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
56 /// Removes a child View from this View. If the view was not a child of this view, this is a no-op.
58 /// <seealso cref="Container::Remove()">
60 public override void Remove(View child)
62 NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
63 if (NDalicPINVOKE.SWIGPendingException.Pending)
64 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
68 /// Retrieves child view by index.
70 /// <seealso cref="Container::GetChildAt()">
72 public override View GetChildAt(uint index)
74 IntPtr cPtr = NDalicPINVOKE.Actor_GetChildAt(swigCPtr, index);
76 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
78 if (NDalicPINVOKE.SWIGPendingException.Pending)
79 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
84 /// Retrieves the number of children held by the view.
86 /// <seealso cref="Container::GetChildCount()">
88 protected override uint GetChildCount()
90 uint ret = NDalicPINVOKE.Actor_GetChildCount(swigCPtr);
91 if (NDalicPINVOKE.SWIGPendingException.Pending)
92 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
97 /// Get the Views parent
99 /// <seealso cref="Container::GetParent()">
100 protected override Container GetParent()
103 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
105 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(cPtr);
107 if(basehandle is Layer)
109 ret = basehandle as Layer;
113 ret = basehandle as View;
116 if (NDalicPINVOKE.SWIGPendingException.Pending)
117 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
123 // you can override it to clean-up your own resources.
124 protected override void Dispose(DisposeTypes type)
131 if(type == DisposeTypes.Explicit)
134 //Release your own managed resources here.
135 //You should release all of your own disposable objects here.
138 //Release your own unmanaged resources here.
139 //You should not access any managed member here except static instance.
140 //because the execution order of Finalizes is non-deterministic.
142 DisConnectFromSignals();
144 if (swigCPtr.Handle != global::System.IntPtr.Zero)
149 NDalicPINVOKE.delete_View(swigCPtr);
151 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
157 private void DisConnectFromSignals()
159 // Save current CPtr.
160 global::System.Runtime.InteropServices.HandleRef currentCPtr = swigCPtr;
162 // Use BaseHandle CPtr as current might have been deleted already in derived classes.
163 swigCPtr = GetBaseHandleCPtrHandleRef;
165 if (_onRelayoutEventCallback != null)
167 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
170 if (_offWindowEventCallback != null)
172 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
175 if (_onWindowEventCallback != null)
177 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
180 if (_wheelEventCallback != null)
182 this.WheelEventSignal().Disconnect(_wheelEventCallback);
185 if (_hoverEventCallback != null)
187 this.HoveredSignal().Disconnect(_hoverEventCallback);
190 if (_touchDataCallback != null)
192 this.TouchSignal().Disconnect(_touchDataCallback);
195 if (_ResourcesLoadedCallback != null)
197 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
200 if (_offWindowEventCallback != null)
202 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
205 if (_onWindowEventCallback != null)
207 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
210 if (_wheelEventCallback != null)
212 this.WheelEventSignal().Disconnect(_wheelEventCallback);
215 if (_hoverEventCallback != null)
217 this.HoveredSignal().Disconnect(_hoverEventCallback);
220 if (_touchDataCallback != null)
222 this.TouchSignal().Disconnect(_touchDataCallback);
225 if (_onRelayoutEventCallback != null)
227 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
230 if (_keyCallback != null)
232 this.KeyEventSignal().Disconnect(_keyCallback);
235 if (_keyInputFocusLostCallback != null)
237 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
240 if (_keyInputFocusGainedCallback != null)
242 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
245 // BaseHandle CPtr is used in Registry and there is danger of deletion if we keep using it here.
246 // Restore current CPtr.
247 swigCPtr = currentCPtr;
250 private EventHandler _keyInputFocusGainedEventHandler;
251 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
252 private delegate void KeyInputFocusGainedCallbackType(IntPtr control);
253 private KeyInputFocusGainedCallbackType _keyInputFocusGainedCallback;
256 /// Event for KeyInputFocusGained signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
257 /// KeyInputFocusGained signal is emitted when the control gets Key Input Focus.<br>
259 public event EventHandler FocusGained
263 if (_keyInputFocusGainedEventHandler == null)
265 _keyInputFocusGainedCallback = OnKeyInputFocusGained;
266 this.KeyInputFocusGainedSignal().Connect(_keyInputFocusGainedCallback);
269 _keyInputFocusGainedEventHandler += value;
274 _keyInputFocusGainedEventHandler -= value;
276 if (_keyInputFocusGainedEventHandler == null && KeyInputFocusGainedSignal().Empty() == false)
278 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
283 private void OnKeyInputFocusGained(IntPtr view)
285 if (_keyInputFocusGainedEventHandler != null)
287 _keyInputFocusGainedEventHandler(this, null);
292 private EventHandler _keyInputFocusLostEventHandler;
293 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
294 private delegate void KeyInputFocusLostCallbackType(IntPtr control);
295 private KeyInputFocusLostCallbackType _keyInputFocusLostCallback;
298 /// Event for KeyInputFocusLost signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
299 /// KeyInputFocusLost signal is emitted when the control loses Key Input Focus.<br>
301 public event EventHandler FocusLost
305 if (_keyInputFocusLostEventHandler == null)
307 _keyInputFocusLostCallback = OnKeyInputFocusLost;
308 this.KeyInputFocusLostSignal().Connect(_keyInputFocusLostCallback);
311 _keyInputFocusLostEventHandler += value;
316 _keyInputFocusLostEventHandler -= value;
318 if (_keyInputFocusLostEventHandler == null && KeyInputFocusLostSignal().Empty() == false)
320 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
325 private void OnKeyInputFocusLost(IntPtr view)
327 if (_keyInputFocusLostEventHandler != null)
329 _keyInputFocusLostEventHandler(this, null);
334 /// Event arguments that passed via KeyEvent signal.
336 public class KeyEventArgs : EventArgs
341 /// Key - is the key sent to the View.
356 private EventHandlerWithReturnType<object, KeyEventArgs, bool> _keyEventHandler;
357 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
358 private delegate bool KeyCallbackType(IntPtr control, IntPtr keyEvent);
359 private KeyCallbackType _keyCallback;
362 /// Event for KeyPressed signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
363 /// KeyPressed signal is emitted when key event is received.<br>
365 public event EventHandlerWithReturnType<object, KeyEventArgs, bool> KeyEvent
369 if (_keyEventHandler == null)
371 _keyCallback = OnKeyEvent;
372 this.KeyEventSignal().Connect(_keyCallback);
375 _keyEventHandler += value;
380 _keyEventHandler -= value;
382 if (_keyEventHandler == null && KeyEventSignal().Empty() == false)
384 this.KeyEventSignal().Disconnect(_keyCallback);
389 private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
391 KeyEventArgs e = new KeyEventArgs();
395 e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
397 if (_keyEventHandler != null)
399 Delegate[] delegateList = _keyEventHandler.GetInvocationList();
401 // Oring the result of each callback.
402 foreach ( EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList )
404 result |= del( this, e );
411 private EventHandler _onRelayoutEventHandler;
412 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
413 private delegate void OnRelayoutEventCallbackType(IntPtr control);
414 private OnRelayoutEventCallbackType _onRelayoutEventCallback;
417 /// Event for OnRelayout signal which can be used to subscribe/unsubscribe the event handler.<br>
418 /// OnRelayout signal is emitted after the size has been set on the view during relayout.<br>
420 public event EventHandler Relayout
424 if (_onRelayoutEventHandler == null)
426 _onRelayoutEventCallback = OnRelayout;
427 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
430 _onRelayoutEventHandler += value;
435 _onRelayoutEventHandler -= value;
437 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
439 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
445 // Callback for View OnRelayout signal
446 private void OnRelayout(IntPtr data)
448 if (_onRelayoutEventHandler != null)
450 _onRelayoutEventHandler(this, null);
455 /// Event arguments that passed via Touch signal.
457 public class TouchEventArgs : EventArgs
459 private Touch _touch;
462 /// Touch - contains the information of touch points
477 private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
478 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
479 private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
480 private TouchDataCallbackType _touchDataCallback;
483 /// Event for Touched signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
484 /// Touched signal is emitted when touch input is received.<br>
486 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
490 if (_touchDataEventHandler == null)
492 _touchDataCallback = OnTouch;
493 this.TouchSignal().Connect(_touchDataCallback);
496 _touchDataEventHandler += value;
501 _touchDataEventHandler -= value;
503 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
505 this.TouchSignal().Disconnect(_touchDataCallback);
511 // Callback for View TouchSignal
512 private bool OnTouch(IntPtr view, IntPtr touchData)
514 TouchEventArgs e = new TouchEventArgs();
516 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
518 if (_touchDataEventHandler != null)
520 return _touchDataEventHandler(this, e);
527 /// Event arguments that passed via Hover signal.
529 public class HoverEventArgs : EventArgs
531 private Hover _hover;
534 /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
549 private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
550 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
551 private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
552 private HoverEventCallbackType _hoverEventCallback;
555 /// Event for Hovered signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
556 /// Hovered signal is emitted when hover input is received.<br>
558 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
562 if (_hoverEventHandler == null)
564 _hoverEventCallback = OnHoverEvent;
565 this.HoveredSignal().Connect(_hoverEventCallback);
568 _hoverEventHandler += value;
573 _hoverEventHandler -= value;
575 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
577 this.HoveredSignal().Disconnect(_hoverEventCallback);
583 // Callback for View Hover signal
584 private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
586 HoverEventArgs e = new HoverEventArgs();
588 e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
590 if (_hoverEventHandler != null)
592 return _hoverEventHandler(this, e);
599 /// Event arguments that passed via Wheel signal.
601 public class WheelEventArgs : EventArgs
603 private Wheel _wheel;
606 /// WheelEvent - store a wheel rolling type : MOUSE_WHEEL or CUSTOM_WHEEL
621 private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
622 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
623 private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
624 private WheelEventCallbackType _wheelEventCallback;
627 /// Event for WheelMoved signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
628 /// WheelMoved signal is emitted when wheel event is received.<br>
630 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
634 if (_wheelEventHandler == null)
636 _wheelEventCallback = OnWheelEvent;
637 this.WheelEventSignal().Connect(_wheelEventCallback);
640 _wheelEventHandler += value;
645 _wheelEventHandler -= value;
647 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
649 this.WheelEventSignal().Disconnect(_wheelEventCallback);
655 // Callback for View Wheel signal
656 private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
658 WheelEventArgs e = new WheelEventArgs();
660 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
662 if (_wheelEventHandler != null)
664 return _wheelEventHandler(this, e);
670 private EventHandler _onWindowEventHandler;
671 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
672 private delegate void OnWindowEventCallbackType(IntPtr control);
673 private OnWindowEventCallbackType _onWindowEventCallback;
676 /// Event for OnWindow signal which can be used to subscribe/unsubscribe the event handler.<br>
677 /// OnWindow signal is emitted after the view has been connected to the Window.<br>
679 public event EventHandler AddedToWindow
683 if (_onWindowEventHandler == null)
685 _onWindowEventCallback = OnWindow;
686 this.OnWindowSignal().Connect(_onWindowEventCallback);
689 _onWindowEventHandler += value;
694 _onWindowEventHandler -= value;
696 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
698 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
703 // Callback for View OnWindow signal
704 private void OnWindow(IntPtr data)
706 if (_onWindowEventHandler != null)
708 _onWindowEventHandler(this, null);
713 private EventHandler _offWindowEventHandler;
714 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
715 private delegate void OffWindowEventCallbackType(IntPtr control);
716 private OffWindowEventCallbackType _offWindowEventCallback;
719 /// Event for OffWindow signal which can be used to subscribe/unsubscribe the event handler.<br>
720 /// OffWindow signal is emitted after the view has been disconnected from the Window.<br>
722 public event EventHandler RemovedFromWindow
726 if (_offWindowEventHandler == null)
728 _offWindowEventCallback = OffWindow;
729 this.OffWindowSignal().Connect(_offWindowEventCallback);
732 _offWindowEventHandler += value;
737 _offWindowEventHandler -= value;
739 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
741 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
746 // Callback for View OffWindow signal
747 private void OffWindow(IntPtr data)
749 if (_offWindowEventHandler != null)
751 _offWindowEventHandler(this, null);
756 /// Event arguments of visibility changed.
758 public class VisibilityChangedEventArgs : EventArgs
761 private bool _visibility;
762 private VisibilityChangeType _type;
765 /// The view, or child of view, whose visibility has changed.
780 /// Whether the view is now visible or not.
782 public bool Visibility
795 /// Whether the view's visible property has changed or a parent's.
797 public VisibilityChangeType Type
810 private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
811 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
812 private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
813 private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
816 /// Event for visibility change which can be used to subscribe/unsubscribe the event handler.<br>
817 /// This signal is emitted when the visible property of this or a parent view is changed.<br>
819 public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
823 if (_visibilityChangedEventHandler == null)
825 _visibilityChangedEventCallback = OnVisibilityChanged;
826 VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
829 _visibilityChangedEventHandler += value;
834 _visibilityChangedEventHandler -= value;
836 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
838 VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
843 // Callback for View visibility change signal
844 private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
846 VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
849 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
851 e.Visibility = visibility;
854 if (_visibilityChangedEventHandler != null)
856 _visibilityChangedEventHandler(this, e);
860 // Resource Ready Signal
862 private EventHandler _resourcesLoadedEventHandler;
863 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
864 private delegate void ResourcesLoadedCallbackType(IntPtr control);
865 private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
868 /// Event for ResourcesLoadedSignal signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
869 /// This signal is emitted after all resources required by a View are loaded and ready.<br>
871 public event EventHandler ResourcesLoaded
875 if (_resourcesLoadedEventHandler == null)
877 _ResourcesLoadedCallback = OnResourcesLoaded;
878 this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
881 _resourcesLoadedEventHandler += value;
886 _resourcesLoadedEventHandler -= value;
888 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
890 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
895 private void OnResourcesLoaded(IntPtr view)
897 if (_resourcesLoadedEventHandler != null)
899 _resourcesLoadedEventHandler(this, null);
903 internal IntPtr GetPtrfromView()
905 return (IntPtr)swigCPtr;
908 internal class Property
910 internal static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get();
911 internal static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get();
912 internal static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get();
913 internal static readonly int LEFT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
914 internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
915 internal static readonly int UP_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
916 internal static readonly int DOWN_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
917 internal static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get();
918 internal static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get();
919 internal static readonly int SIBLING_ORDER = NDalicManualPINVOKE.Actor_Property_SIBLING_ORDER_get();
920 internal static readonly int OPACITY = NDalicManualPINVOKE.Actor_Property_OPACITY_get();
921 internal static readonly int SCREEN_POSITION = NDalicManualPINVOKE.Actor_Property_SCREEN_POSITION_get();
922 internal static readonly int POSITION_USES_ANCHOR_POINT = NDalicManualPINVOKE.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
923 internal static readonly int PARENT_ORIGIN = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_get();
924 internal static readonly int PARENT_ORIGIN_X = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_X_get();
925 internal static readonly int PARENT_ORIGIN_Y = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Y_get();
926 internal static readonly int PARENT_ORIGIN_Z = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Z_get();
927 internal static readonly int ANCHOR_POINT = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_get();
928 internal static readonly int ANCHOR_POINT_X = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_X_get();
929 internal static readonly int ANCHOR_POINT_Y = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Y_get();
930 internal static readonly int ANCHOR_POINT_Z = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Z_get();
931 internal static readonly int SIZE = NDalicPINVOKE.Actor_Property_SIZE_get();
932 internal static readonly int SIZE_WIDTH = NDalicPINVOKE.Actor_Property_SIZE_WIDTH_get();
933 internal static readonly int SIZE_HEIGHT = NDalicPINVOKE.Actor_Property_SIZE_HEIGHT_get();
934 internal static readonly int SIZE_DEPTH = NDalicPINVOKE.Actor_Property_SIZE_DEPTH_get();
935 internal static readonly int POSITION = NDalicPINVOKE.Actor_Property_POSITION_get();
936 internal static readonly int POSITION_X = NDalicPINVOKE.Actor_Property_POSITION_X_get();
937 internal static readonly int POSITION_Y = NDalicPINVOKE.Actor_Property_POSITION_Y_get();
938 internal static readonly int POSITION_Z = NDalicPINVOKE.Actor_Property_POSITION_Z_get();
939 internal static readonly int WORLD_POSITION = NDalicPINVOKE.Actor_Property_WORLD_POSITION_get();
940 internal static readonly int WORLD_POSITION_X = NDalicPINVOKE.Actor_Property_WORLD_POSITION_X_get();
941 internal static readonly int WORLD_POSITION_Y = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Y_get();
942 internal static readonly int WORLD_POSITION_Z = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Z_get();
943 internal static readonly int ORIENTATION = NDalicPINVOKE.Actor_Property_ORIENTATION_get();
944 internal static readonly int WORLD_ORIENTATION = NDalicPINVOKE.Actor_Property_WORLD_ORIENTATION_get();
945 internal static readonly int SCALE = NDalicPINVOKE.Actor_Property_SCALE_get();
946 internal static readonly int SCALE_X = NDalicPINVOKE.Actor_Property_SCALE_X_get();
947 internal static readonly int SCALE_Y = NDalicPINVOKE.Actor_Property_SCALE_Y_get();
948 internal static readonly int SCALE_Z = NDalicPINVOKE.Actor_Property_SCALE_Z_get();
949 internal static readonly int WORLD_SCALE = NDalicPINVOKE.Actor_Property_WORLD_SCALE_get();
950 internal static readonly int VISIBLE = NDalicPINVOKE.Actor_Property_VISIBLE_get();
951 internal static readonly int WORLD_COLOR = NDalicPINVOKE.Actor_Property_WORLD_COLOR_get();
952 internal static readonly int WORLD_MATRIX = NDalicPINVOKE.Actor_Property_WORLD_MATRIX_get();
953 internal static readonly int NAME = NDalicPINVOKE.Actor_Property_NAME_get();
954 internal static readonly int SENSITIVE = NDalicPINVOKE.Actor_Property_SENSITIVE_get();
955 internal static readonly int LEAVE_REQUIRED = NDalicPINVOKE.Actor_Property_LEAVE_REQUIRED_get();
956 internal static readonly int INHERIT_ORIENTATION = NDalicPINVOKE.Actor_Property_INHERIT_ORIENTATION_get();
957 internal static readonly int INHERIT_SCALE = NDalicPINVOKE.Actor_Property_INHERIT_SCALE_get();
958 internal static readonly int DRAW_MODE = NDalicPINVOKE.Actor_Property_DRAW_MODE_get();
959 internal static readonly int SIZE_MODE_FACTOR = NDalicPINVOKE.Actor_Property_SIZE_MODE_FACTOR_get();
960 internal static readonly int WIDTH_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_WIDTH_RESIZE_POLICY_get();
961 internal static readonly int HEIGHT_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_HEIGHT_RESIZE_POLICY_get();
962 internal static readonly int SIZE_SCALE_POLICY = NDalicPINVOKE.Actor_Property_SIZE_SCALE_POLICY_get();
963 internal static readonly int WIDTH_FOR_HEIGHT = NDalicPINVOKE.Actor_Property_WIDTH_FOR_HEIGHT_get();
964 internal static readonly int HEIGHT_FOR_WIDTH = NDalicPINVOKE.Actor_Property_HEIGHT_FOR_WIDTH_get();
965 internal static readonly int PADDING = NDalicPINVOKE.Actor_Property_PADDING_get();
966 internal static readonly int MINIMUM_SIZE = NDalicPINVOKE.Actor_Property_MINIMUM_SIZE_get();
967 internal static readonly int MAXIMUM_SIZE = NDalicPINVOKE.Actor_Property_MAXIMUM_SIZE_get();
968 internal static readonly int INHERIT_POSITION = NDalicPINVOKE.Actor_Property_INHERIT_POSITION_get();
969 internal static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
973 /// Describes the direction to move the focus towards.
975 public enum FocusDirection
986 /// Creates a new instance of a View.
988 public View() : this(NDalicPINVOKE.View_New(), true)
990 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
993 internal View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true)
995 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
999 /// Downcasts a handle to View handle.<br>
1000 /// If handle points to a View, the downcast produces valid handle.<br>
1001 /// If not, the returned handle is left uninitialized.<br>
1003 /// <param name="handle">Handle to an object</param>
1004 /// <returns>A handle to a View or an uninitialized handle</returns>
1005 [Obsolete("Please do not use! this will be deprecated, instead please use as keyword.")]
1006 public static View DownCast(BaseHandle handle)
1008 View ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as View;
1009 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1013 [Obsolete("Please do not use! this will be deprecated, instead please use as keyword.")]
1014 public static T DownCast<T>(View view) where T : View
1016 T ret = Registry.GetManagedBaseHandleFromNativePtr(view) as T;
1024 private View ConvertIdToView(uint id)
1030 View parentView = Parent as View;
1031 view = parentView.FindChildById(id);
1036 view = Window.Instance.GetRootLayer().FindChildById(id);
1042 internal void SetKeyInputFocus()
1044 NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
1045 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1049 /// Quries whether the view has focus.
1051 /// <returns>true if this view has focus</returns>
1052 public bool HasFocus()
1054 bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
1055 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1059 internal void ClearKeyInputFocus()
1061 NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
1062 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1065 internal PinchGestureDetector GetPinchGestureDetector()
1067 PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
1068 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1072 internal PanGestureDetector GetPanGestureDetector()
1074 PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
1075 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1079 internal TapGestureDetector GetTapGestureDetector()
1081 TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
1082 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1086 internal LongPressGestureDetector GetLongPressGestureDetector()
1088 LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
1089 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1094 /// Sets the name of the style to be applied to the view.
1096 /// <param name="styleName">A string matching a style described in a stylesheet</param>
1097 public void SetStyleName(string styleName)
1099 NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
1100 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1104 /// Retrieves the name of the style to be applied to the view (if any).
1106 /// <returns>A string matching a style, or an empty string</returns>
1107 public string GetStyleName()
1109 string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
1110 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1114 internal void SetBackgroundColor(Vector4 color)
1116 NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
1117 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1120 internal Vector4 GetBackgroundColor()
1122 Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
1123 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1127 internal void SetBackgroundImage(Image image)
1129 NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
1130 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1134 /// Clears the background.
1136 public void ClearBackground()
1138 NDalicPINVOKE.View_ClearBackground(swigCPtr);
1139 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1142 internal ControlKeySignal KeyEventSignal()
1144 ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
1145 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1149 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
1151 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
1152 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1156 internal KeyInputFocusSignal KeyInputFocusLostSignal()
1158 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
1159 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1163 internal View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
1165 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1168 internal enum PropertyRange
1170 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
1171 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
1172 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
1176 /// styleName, type string.
1178 public string StyleName
1183 GetProperty(View.Property.STYLE_NAME).Get(out temp);
1188 SetProperty(View.Property.STYLE_NAME, new Tizen.NUI.PropertyValue(value));
1193 /// mutually exclusive with BACKGROUND_IMAGE & BACKGROUND, type Vector4.
1195 public Color BackgroundColor
1199 Color backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1201 Tizen.NUI.PropertyMap background = Background;
1203 background.Find(Visual.Property.Type)?.Get(out visualType);
1204 if (visualType == (int)Visual.Type.Color)
1206 background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor);
1209 return backgroundColor;
1213 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1218 /// Create an Animation to animate the background color visual. If there is no
1219 /// background visual, creates one with transparent black as it's mixColor.
1221 public Animation AnimateBackgroundColor( object destinationValue,
1224 AlphaFunction.BuiltinFunctions? alphaFunction = null,
1225 object initialValue = null)
1227 Tizen.NUI.PropertyMap background = Background;
1229 if( background.Empty() )
1231 // If there is no background yet, ensure there is a transparent
1233 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1234 background = Background;
1236 return AnimateColor( "background", destinationValue, startTime, endTime, alphaFunction, initialValue );
1240 /// Create an Animation to animate the mixColor of the named visual.
1242 public Animation AnimateColor( string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null )
1244 Animation animation = null;
1246 PropertyMap _animator = new PropertyMap();
1247 if( alphaFunction != null )
1249 _animator.Add("alphaFunction", new PropertyValue( AlphaFunction.BuiltinToPropertyKey(alphaFunction) ) );
1252 PropertyMap _timePeriod = new PropertyMap();
1253 _timePeriod.Add( "duration", new PropertyValue((endTime-startTime)/1000.0f) );
1254 _timePeriod.Add( "delay", new PropertyValue( startTime/1000.0f ) );
1255 _animator.Add( "timePeriod", new PropertyValue( _timePeriod ) );
1257 PropertyMap _transition = new PropertyMap();
1258 _transition.Add( "animator", new PropertyValue( _animator ) );
1259 _transition.Add( "target", new PropertyValue( targetVisual ) );
1260 _transition.Add( "property", new PropertyValue( "mixColor" ) );
1262 if( initialColor != null )
1264 PropertyValue initValue = PropertyValue.CreateFromObject( initialColor );
1265 _transition.Add( "initialValue", initValue );
1268 PropertyValue destValue = PropertyValue.CreateFromObject( destinationColor );
1269 _transition.Add( "targetValue", destValue );
1270 TransitionData _transitionData = new TransitionData( _transition );
1272 animation = new Animation( NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true );
1273 if (NDalicPINVOKE.SWIGPendingException.Pending)
1274 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1280 /// mutually exclusive with BACKGROUND_COLOR & BACKGROUND, type Map.
1282 public string BackgroundImage
1286 string backgroundImage = "";
1288 Tizen.NUI.PropertyMap background = Background;
1290 background.Find(Visual.Property.Type)?.Get(out visualType);
1291 if (visualType == (int)Visual.Type.Image)
1293 background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
1296 return backgroundImage;
1300 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1304 public Tizen.NUI.PropertyMap Background
1308 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1309 GetProperty( View.Property.BACKGROUND ).Get(temp);
1314 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1320 /// The current state of the view.
1327 if (GetProperty(View.Property.STATE).Get(out temp) == false)
1329 NUILog.Error("State get error!");
1335 return States.Normal;
1339 return States.Focused;
1343 return States.Disabled;
1347 return States.Normal;
1353 SetProperty(View.Property.STATE, new Tizen.NUI.PropertyValue((int)value));
1358 /// The current sub state of the view.
1360 public States SubState
1365 if (GetProperty(View.Property.SUB_STATE).Get(out temp) == false)
1367 NUILog.Error("subState get error!");
1372 return States.Normal;
1374 return States.Focused;
1376 return States.Disabled;
1378 return States.Normal;
1383 string valueToString = "";
1388 valueToString = "NORMAL";
1391 case States.Focused:
1393 valueToString = "FOCUSED";
1396 case States.Disabled:
1398 valueToString = "DISABLED";
1403 valueToString = "NORMAL";
1407 SetProperty(View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
1412 /// Displays a tooltip
1414 public Tizen.NUI.PropertyMap Tooltip
1418 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1419 GetProperty(View.Property.TOOLTIP).Get(temp);
1424 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1429 /// Displays a tooltip as Text
1431 public string TooltipText
1435 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1439 private int LeftFocusableViewId
1444 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
1449 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1453 private int RightFocusableViewId
1458 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
1463 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1467 private int UpFocusableViewId
1472 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
1477 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1481 private int DownFocusableViewId
1486 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
1491 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1496 /// Child Property of FlexContainer.<br>
1497 /// The proportion of the free space in the container the flex item will receive.<br>
1498 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br>
1505 GetProperty(FlexContainer.ChildProperty.FLEX).Get(out temp);
1510 SetProperty(FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue(value));
1515 /// Child Property of FlexContainer.<br>
1516 /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br>
1518 public int AlignSelf
1523 GetProperty(FlexContainer.ChildProperty.ALIGN_SELF).Get(out temp);
1528 SetProperty(FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue(value));
1533 /// Child Property of FlexContainer.<br>
1534 /// The space around the flex item.<br>
1536 public Vector4 FlexMargin
1540 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1541 GetProperty(FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
1546 SetProperty(FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue(value));
1551 /// The top-left cell this child occupies, if not set, the first available cell is used
1553 public Vector2 CellIndex
1557 Vector2 temp = new Vector2(0.0f, 0.0f);
1558 GetProperty(TableView.ChildProperty.CELL_INDEX).Get(temp);
1563 SetProperty(TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue(value));
1568 /// The number of rows this child occupies, if not set, default value is 1
1570 public float RowSpan
1575 GetProperty(TableView.ChildProperty.ROW_SPAN).Get(out temp);
1580 SetProperty(TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue(value));
1585 /// The number of columns this child occupies, if not set, default value is 1
1587 public float ColumnSpan
1592 GetProperty(TableView.ChildProperty.COLUMN_SPAN).Get(out temp);
1597 SetProperty(TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue(value));
1602 /// The horizontal alignment of this child inside the cells, if not set, default value is 'left'
1604 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
1609 if (GetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
1611 NUILog.Error("CellHorizontalAlignment get error!");
1617 return Tizen.NUI.HorizontalAlignmentType.Left;
1619 return Tizen.NUI.HorizontalAlignmentType.Center;
1621 return Tizen.NUI.HorizontalAlignmentType.Right;
1623 return Tizen.NUI.HorizontalAlignmentType.Left;
1628 string valueToString = "";
1631 case Tizen.NUI.HorizontalAlignmentType.Left:
1633 valueToString = "left";
1636 case Tizen.NUI.HorizontalAlignmentType.Center:
1638 valueToString = "center";
1641 case Tizen.NUI.HorizontalAlignmentType.Right:
1643 valueToString = "right";
1648 valueToString = "left";
1652 SetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1657 /// The vertical alignment of this child inside the cells, if not set, default value is 'top'
1659 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
1664 GetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
1666 NUILog.Error("CellVerticalAlignment get error!");
1672 return Tizen.NUI.VerticalAlignmentType.Top;
1674 return Tizen.NUI.VerticalAlignmentType.Center;
1676 return Tizen.NUI.VerticalAlignmentType.Bottom;
1678 return Tizen.NUI.VerticalAlignmentType.Top;
1683 string valueToString = "";
1686 case Tizen.NUI.VerticalAlignmentType.Top:
1688 valueToString = "top";
1691 case Tizen.NUI.VerticalAlignmentType.Center:
1693 valueToString = "center";
1696 case Tizen.NUI.VerticalAlignmentType.Bottom:
1698 valueToString = "bottom";
1703 valueToString = "top";
1707 SetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1712 /// The left focusable view.<br>
1713 /// This will return NULL if not set.<br>
1714 /// This will also return NULL if the specified left focusable view is not on Window.<br>
1716 public View LeftFocusableView
1718 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1721 if (LeftFocusableViewId >= 0)
1723 return ConvertIdToView((uint)LeftFocusableViewId);
1729 LeftFocusableViewId = (int)value.GetId();
1734 /// The right focusable view.<br>
1735 /// This will return NULL if not set.<br>
1736 /// This will also return NULL if the specified right focusable view is not on Window.<br>
1738 public View RightFocusableView
1740 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1743 if (RightFocusableViewId >= 0)
1745 return ConvertIdToView((uint)RightFocusableViewId);
1751 RightFocusableViewId = (int)value.GetId();
1756 /// The up focusable view.<br>
1757 /// This will return NULL if not set.<br>
1758 /// This will also return NULL if the specified up focusable view is not on Window.<br>
1760 public View UpFocusableView
1762 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1765 if (UpFocusableViewId >= 0)
1767 return ConvertIdToView((uint)UpFocusableViewId);
1773 UpFocusableViewId = (int)value.GetId();
1778 /// The down focusable view.<br>
1779 /// This will return NULL if not set.<br>
1780 /// This will also return NULL if the specified down focusable view is not on Window.<br>
1782 public View DownFocusableView
1784 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1787 if (DownFocusableViewId >= 0)
1789 return ConvertIdToView((uint)DownFocusableViewId);
1795 DownFocusableViewId = (int)value.GetId();
1800 /// whether the view should be focusable by keyboard navigation.
1802 public bool Focusable
1806 SetKeyboardFocusable(value);
1810 return IsKeyboardFocusable();
1815 /// Enumeration for describing the states of view.
1834 /// Retrieves the position of the View.<br>
1835 /// The coordinates are relative to the View's parent.<br>
1837 public Position CurrentPosition
1841 return GetCurrentPosition();
1846 /// Sets the size of an view for width and height.<br>
1847 /// Geometry can be scaled to fit within this area.<br>
1848 /// This does not interfere with the views scale factor.<br>
1849 /// The views default depth is the minimum of width & height.<br>
1851 public Size2D Size2D
1855 Size temp = new Size(0.0f, 0.0f, 0.0f);
1856 GetProperty(View.Property.SIZE).Get(temp);
1857 Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
1862 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(new Size(value)));
1867 /// Retrieves the size of the View.<br>
1868 /// The coordinates are relative to the View's parent.<br>
1870 public Size2D CurrentSize
1874 return GetCurrentSize();
1878 [Obsolete("Please do not use! this will be deprecated. Please use Visibility instead.")]
1888 /// Retrieves and sets the view's opacity.<br>
1890 public float Opacity
1895 GetProperty(View.Property.OPACITY).Get(out temp);
1900 SetProperty(View.Property.OPACITY, new Tizen.NUI.PropertyValue(value));
1905 /// Sets the position of the View for X and Y.<br>
1906 /// By default, sets the position vector between the parent origin and pivot point(default).<br>
1907 /// If Position inheritance if disabled, sets the world position.<br>
1909 public Position2D Position2D
1913 Position temp = new Position(0.0f, 0.0f, 0.0f);
1914 GetProperty(View.Property.POSITION).Get(temp);
1915 return new Position2D(temp);
1919 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(new Position(value)));
1924 /// Retrieves screen postion of view's.<br>
1926 public Vector2 ScreenPosition
1930 Vector2 temp = new Vector2(0.0f, 0.0f);
1931 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
1937 /// Determines whether the pivot point should be used to determine the position of the view.
1938 /// This is true by default.
1940 /// <remarks>If false, then the top-left of the view is used for the position.
1941 /// Setting this to false will allow scaling or rotation around the anchor-point without affecting the view's position.
1943 public bool PositionUsesPivotPoint
1948 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
1953 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
1957 [Obsolete("Please do not use! this will be deprecated")]
1958 public bool PositionUsesAnchorPoint
1963 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
1968 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
1972 internal bool FocusState
1976 return IsKeyboardFocusable();
1980 SetKeyboardFocusable(value);
1985 /// Queries whether the view is connected to the Stage.<br>
1986 /// When an view is connected, it will be directly or indirectly parented to the root View.<br>
1988 public bool IsOnWindow
1997 /// Gets depth in the hierarchy for the view.
1999 public int HierarchyDepth
2003 return GetHierarchyDepth();
2008 /// Sets the sibling order of the view so depth position can be defined within the same parent.
2011 /// Note The initial value is 0.
2012 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove and LowerBelow will override the sibling order.
2013 /// The values set by this Property will likely change.
2015 public int SiblingOrder
2020 GetProperty(View.Property.SIBLING_ORDER).Get(out temp);
2025 SetProperty(View.Property.SIBLING_ORDER, new Tizen.NUI.PropertyValue(value));
2030 /// Returns the natural size of the view.
2033 /// Deriving classes stipulate the natural size and by default a view has a ZERO natural size.
2035 [Obsolete("Please do not use! this will be deprecated, please use NaturalSize2D instead")]
2036 public Vector3 NaturalSize
2040 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2041 if (NDalicPINVOKE.SWIGPendingException.Pending)
2042 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2048 /// Returns the natural size (Size2D) of the view.
2051 /// Deriving classes stipulate the natural size and by default a view has a ZERO natural size.
2053 public Size2D NaturalSize2D
2057 Vector3 temp = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2058 if (NDalicPINVOKE.SWIGPendingException.Pending)
2059 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2061 return new Size2D((int)temp.Width, (int)temp.Height);
2069 /// This is an asynchronous method.
2080 /// This is an asynchronous method.
2081 /// If an view is hidden, then the view and its children will not be rendered.
2082 /// 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.
2089 internal void Raise()
2091 NDalicPINVOKE.Raise(swigCPtr);
2092 if (NDalicPINVOKE.SWIGPendingException.Pending)
2093 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2096 internal void Lower()
2098 NDalicPINVOKE.Lower(swigCPtr);
2099 if (NDalicPINVOKE.SWIGPendingException.Pending)
2100 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2104 /// Raise view above all other views.
2107 /// Sibling order of views within the parent will be updated automatically.
2108 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2110 public void RaiseToTop()
2112 NDalicPINVOKE.RaiseToTop(swigCPtr);
2113 if (NDalicPINVOKE.SWIGPendingException.Pending)
2114 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2118 /// Lower view to the bottom of all views.
2121 /// Sibling order of views within the parent will be updated automatically.
2122 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2124 public void LowerToBottom()
2126 NDalicPINVOKE.LowerToBottom(swigCPtr);
2127 if (NDalicPINVOKE.SWIGPendingException.Pending)
2128 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2132 /// Query if all resources required by a View are loaded and ready.
2134 /// <remarks>Most resources are only loaded when the control is placed on stage
2136 public bool IsResourceReady()
2138 bool ret = NDalicPINVOKE.IsResourceReady(swigCPtr);
2139 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2144 /// Raise the view to above the target view.
2146 /// <remarks>Sibling order of views within the parent will be updated automatically.
2147 /// Views on the level above the target view will still be shown above this view.
2148 /// Raising this view above views with the same sibling order as each other will raise this view above them.
2149 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2151 /// <param name="target">Will be raised above this view</param>
2152 internal void RaiseAbove(View target)
2154 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
2155 if (NDalicPINVOKE.SWIGPendingException.Pending)
2156 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2160 /// Lower the view to below the target view.
2162 /// <remarks>Sibling order of views within the parent will be updated automatically.
2163 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
2164 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2166 /// <param name="target">Will be lowered below this view</param>
2167 internal void LowerBelow(View target)
2169 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
2170 if (NDalicPINVOKE.SWIGPendingException.Pending)
2171 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2174 internal string GetName()
2176 string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);
2177 if (NDalicPINVOKE.SWIGPendingException.Pending)
2178 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2182 internal void SetName(string name)
2184 NDalicPINVOKE.Actor_SetName(swigCPtr, name);
2185 if (NDalicPINVOKE.SWIGPendingException.Pending)
2186 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2189 internal uint GetId()
2191 uint ret = NDalicPINVOKE.Actor_GetId(swigCPtr);
2192 if (NDalicPINVOKE.SWIGPendingException.Pending)
2193 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2197 internal bool IsRoot()
2199 bool ret = NDalicPINVOKE.Actor_IsRoot(swigCPtr);
2200 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2204 internal bool OnWindow()
2206 bool ret = NDalicPINVOKE.Actor_OnStage(swigCPtr);
2207 if (NDalicPINVOKE.SWIGPendingException.Pending)
2208 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2212 internal Layer GetLayer()
2214 IntPtr cPtr = NDalicPINVOKE.Actor_GetLayer(swigCPtr);
2215 Layer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Layer;
2217 if (NDalicPINVOKE.SWIGPendingException.Pending)
2218 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2223 /// Removes a View from its Parent View / Layer. If the View has no parent, this method does nothing.
2225 /// <pre>The (child) View has been initialized. </pre>
2226 public void Unparent()
2228 NDalicPINVOKE.Actor_Unparent(swigCPtr);
2229 if (NDalicPINVOKE.SWIGPendingException.Pending)
2230 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2234 /// Search through this view's hierarchy for an view with the given name.
2235 /// The view itself is also considered in the search.
2237 /// <pre>The View has been initialized.</pre>
2238 /// <param name="viewName">The name of the view to find</param>
2239 /// <returns>A handle to the view if found, or an empty handle if not</returns>
2240 public View FindChildByName(string viewName)
2242 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
2244 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2246 if (NDalicPINVOKE.SWIGPendingException.Pending)
2247 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2251 internal View FindChildById(uint id)
2253 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
2255 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2257 if (NDalicPINVOKE.SWIGPendingException.Pending)
2258 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2262 internal void SetParentOrigin(Vector3 origin)
2264 NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
2265 if (NDalicPINVOKE.SWIGPendingException.Pending)
2266 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2269 internal Vector3 GetCurrentParentOrigin()
2271 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentParentOrigin(swigCPtr), true);
2272 if (NDalicPINVOKE.SWIGPendingException.Pending)
2273 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2277 internal void SetAnchorPoint(Vector3 anchorPoint)
2279 NDalicPINVOKE.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
2280 if (NDalicPINVOKE.SWIGPendingException.Pending)
2281 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2284 internal Vector3 GetCurrentAnchorPoint()
2286 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentAnchorPoint(swigCPtr), true);
2287 if (NDalicPINVOKE.SWIGPendingException.Pending)
2288 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2292 internal void SetSize(float width, float height)
2294 NDalicPINVOKE.Actor_SetSize__SWIG_0(swigCPtr, width, height);
2295 if (NDalicPINVOKE.SWIGPendingException.Pending)
2296 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2299 internal void SetSize(float width, float height, float depth)
2301 NDalicPINVOKE.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
2302 if (NDalicPINVOKE.SWIGPendingException.Pending)
2303 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2306 internal void SetSize(Vector2 size)
2308 NDalicPINVOKE.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
2309 if (NDalicPINVOKE.SWIGPendingException.Pending)
2310 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2313 internal void SetSize(Vector3 size)
2315 NDalicPINVOKE.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
2316 if (NDalicPINVOKE.SWIGPendingException.Pending)
2317 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2320 internal Vector3 GetTargetSize()
2322 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetTargetSize(swigCPtr), true);
2323 if (NDalicPINVOKE.SWIGPendingException.Pending)
2324 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2328 internal Size2D GetCurrentSize()
2330 Size ret = new Size(NDalicPINVOKE.Actor_GetCurrentSize(swigCPtr), true);
2331 if (NDalicPINVOKE.SWIGPendingException.Pending)
2332 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2333 Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
2337 internal Vector3 GetNaturalSize()
2339 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2340 if (NDalicPINVOKE.SWIGPendingException.Pending)
2341 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2345 internal void SetPosition(float x, float y)
2347 NDalicPINVOKE.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
2348 if (NDalicPINVOKE.SWIGPendingException.Pending)
2349 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2352 internal void SetPosition(float x, float y, float z)
2354 NDalicPINVOKE.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
2355 if (NDalicPINVOKE.SWIGPendingException.Pending)
2356 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2359 internal void SetPosition(Vector3 position)
2361 NDalicPINVOKE.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
2362 if (NDalicPINVOKE.SWIGPendingException.Pending)
2363 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2366 internal void SetX(float x)
2368 NDalicPINVOKE.Actor_SetX(swigCPtr, x);
2369 if (NDalicPINVOKE.SWIGPendingException.Pending)
2370 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2373 internal void SetY(float y)
2375 NDalicPINVOKE.Actor_SetY(swigCPtr, y);
2376 if (NDalicPINVOKE.SWIGPendingException.Pending)
2377 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2380 internal void SetZ(float z)
2382 NDalicPINVOKE.Actor_SetZ(swigCPtr, z);
2383 if (NDalicPINVOKE.SWIGPendingException.Pending)
2384 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2387 internal void TranslateBy(Vector3 distance)
2389 NDalicPINVOKE.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
2390 if (NDalicPINVOKE.SWIGPendingException.Pending)
2391 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2394 internal Position GetCurrentPosition()
2396 Position ret = new Position(NDalicPINVOKE.Actor_GetCurrentPosition(swigCPtr), true);
2397 if (NDalicPINVOKE.SWIGPendingException.Pending)
2398 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2402 internal Vector3 GetCurrentWorldPosition()
2404 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldPosition(swigCPtr), true);
2405 if (NDalicPINVOKE.SWIGPendingException.Pending)
2406 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2410 internal void SetInheritPosition(bool inherit)
2412 NDalicPINVOKE.Actor_SetInheritPosition(swigCPtr, inherit);
2413 if (NDalicPINVOKE.SWIGPendingException.Pending)
2414 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2417 internal bool IsPositionInherited()
2419 bool ret = NDalicPINVOKE.Actor_IsPositionInherited(swigCPtr);
2420 if (NDalicPINVOKE.SWIGPendingException.Pending)
2421 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2425 internal void SetOrientation(Degree angle, Vector3 axis)
2427 NDalicPINVOKE.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2428 if (NDalicPINVOKE.SWIGPendingException.Pending)
2429 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2432 internal void SetOrientation(Radian angle, Vector3 axis)
2434 NDalicPINVOKE.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2435 if (NDalicPINVOKE.SWIGPendingException.Pending)
2436 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2439 internal void SetOrientation(Rotation orientation)
2441 NDalicPINVOKE.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
2442 if (NDalicPINVOKE.SWIGPendingException.Pending)
2443 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2446 internal void RotateBy(Degree angle, Vector3 axis)
2448 NDalicPINVOKE.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2449 if (NDalicPINVOKE.SWIGPendingException.Pending)
2450 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2453 internal void RotateBy(Radian angle, Vector3 axis)
2455 NDalicPINVOKE.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2456 if (NDalicPINVOKE.SWIGPendingException.Pending)
2457 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2460 internal void RotateBy(Rotation relativeRotation)
2462 NDalicPINVOKE.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
2463 if (NDalicPINVOKE.SWIGPendingException.Pending)
2464 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2467 internal Rotation GetCurrentOrientation()
2469 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentOrientation(swigCPtr), true);
2470 if (NDalicPINVOKE.SWIGPendingException.Pending)
2471 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2475 internal void SetInheritOrientation(bool inherit)
2477 NDalicPINVOKE.Actor_SetInheritOrientation(swigCPtr, inherit);
2478 if (NDalicPINVOKE.SWIGPendingException.Pending)
2479 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2482 internal bool IsOrientationInherited()
2484 bool ret = NDalicPINVOKE.Actor_IsOrientationInherited(swigCPtr);
2485 if (NDalicPINVOKE.SWIGPendingException.Pending)
2486 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2490 internal Rotation GetCurrentWorldOrientation()
2492 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentWorldOrientation(swigCPtr), true);
2493 if (NDalicPINVOKE.SWIGPendingException.Pending)
2494 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2498 internal void SetScale(float scale)
2500 NDalicPINVOKE.Actor_SetScale__SWIG_0(swigCPtr, scale);
2501 if (NDalicPINVOKE.SWIGPendingException.Pending)
2502 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2505 internal void SetScale(float scaleX, float scaleY, float scaleZ)
2507 NDalicPINVOKE.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
2508 if (NDalicPINVOKE.SWIGPendingException.Pending)
2509 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2512 internal void SetScale(Vector3 scale)
2514 NDalicPINVOKE.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
2515 if (NDalicPINVOKE.SWIGPendingException.Pending)
2516 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2519 internal void ScaleBy(Vector3 relativeScale)
2521 NDalicPINVOKE.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
2522 if (NDalicPINVOKE.SWIGPendingException.Pending)
2523 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2526 internal Vector3 GetCurrentScale()
2528 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentScale(swigCPtr), true);
2529 if (NDalicPINVOKE.SWIGPendingException.Pending)
2530 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2534 internal Vector3 GetCurrentWorldScale()
2536 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldScale(swigCPtr), true);
2537 if (NDalicPINVOKE.SWIGPendingException.Pending)
2538 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2542 internal void SetInheritScale(bool inherit)
2544 NDalicPINVOKE.Actor_SetInheritScale(swigCPtr, inherit);
2545 if (NDalicPINVOKE.SWIGPendingException.Pending)
2546 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2549 internal bool IsScaleInherited()
2551 bool ret = NDalicPINVOKE.Actor_IsScaleInherited(swigCPtr);
2552 if (NDalicPINVOKE.SWIGPendingException.Pending)
2553 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2557 internal Matrix GetCurrentWorldMatrix()
2559 Matrix ret = new Matrix(NDalicPINVOKE.Actor_GetCurrentWorldMatrix(swigCPtr), true);
2560 if (NDalicPINVOKE.SWIGPendingException.Pending)
2561 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2565 internal void SetVisible(bool visible)
2567 NDalicPINVOKE.Actor_SetVisible(swigCPtr, visible);
2568 if (NDalicPINVOKE.SWIGPendingException.Pending)
2569 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2572 internal bool IsVisible()
2574 bool ret = NDalicPINVOKE.Actor_IsVisible(swigCPtr);
2575 if (NDalicPINVOKE.SWIGPendingException.Pending)
2576 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2580 internal void SetOpacity(float opacity)
2582 NDalicPINVOKE.Actor_SetOpacity(swigCPtr, opacity);
2583 if (NDalicPINVOKE.SWIGPendingException.Pending)
2584 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2587 internal float GetCurrentOpacity()
2589 float ret = NDalicPINVOKE.Actor_GetCurrentOpacity(swigCPtr);
2590 if (NDalicPINVOKE.SWIGPendingException.Pending)
2591 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2595 internal void SetColor(Vector4 color)
2597 NDalicPINVOKE.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
2598 if (NDalicPINVOKE.SWIGPendingException.Pending)
2599 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2602 internal Vector4 GetCurrentColor()
2604 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentColor(swigCPtr), true);
2605 if (NDalicPINVOKE.SWIGPendingException.Pending)
2606 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2610 internal void SetColorMode(ColorMode colorMode)
2612 NDalicPINVOKE.Actor_SetColorMode(swigCPtr, (int)colorMode);
2613 if (NDalicPINVOKE.SWIGPendingException.Pending)
2614 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2617 internal ColorMode GetColorMode()
2619 ColorMode ret = (ColorMode)NDalicPINVOKE.Actor_GetColorMode(swigCPtr);
2620 if (NDalicPINVOKE.SWIGPendingException.Pending)
2621 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2625 internal Vector4 GetCurrentWorldColor()
2627 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentWorldColor(swigCPtr), true);
2628 if (NDalicPINVOKE.SWIGPendingException.Pending)
2629 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2633 internal void SetDrawMode(DrawModeType drawMode)
2635 NDalicPINVOKE.Actor_SetDrawMode(swigCPtr, (int)drawMode);
2636 if (NDalicPINVOKE.SWIGPendingException.Pending)
2637 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2640 internal DrawModeType GetDrawMode()
2642 DrawModeType ret = (DrawModeType)NDalicPINVOKE.Actor_GetDrawMode(swigCPtr);
2643 if (NDalicPINVOKE.SWIGPendingException.Pending)
2644 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2649 /// Converts screen coordinates into the view's coordinate system using the default camera.
2651 /// <pre>The View has been initialized.</pre>
2652 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5)</remarks>
2653 /// <param name="localX">On return, the X-coordinate relative to the view</param>
2654 /// <param name="localY">On return, the Y-coordinate relative to the view</param>
2655 /// <param name="screenX">The screen X-coordinate</param>
2656 /// <param name="screenY">The screen Y-coordinate</param>
2657 /// <returns>True if the conversion succeeded</returns>
2658 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
2660 bool ret = NDalicPINVOKE.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
2661 if (NDalicPINVOKE.SWIGPendingException.Pending)
2662 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2666 internal void SetKeyboardFocusable(bool focusable)
2668 NDalicPINVOKE.Actor_SetKeyboardFocusable(swigCPtr, focusable);
2669 if (NDalicPINVOKE.SWIGPendingException.Pending)
2670 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2673 internal bool IsKeyboardFocusable()
2675 bool ret = NDalicPINVOKE.Actor_IsKeyboardFocusable(swigCPtr);
2676 if (NDalicPINVOKE.SWIGPendingException.Pending)
2677 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2681 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
2683 NDalicPINVOKE.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
2684 if (NDalicPINVOKE.SWIGPendingException.Pending)
2685 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2688 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
2690 ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.Actor_GetResizePolicy(swigCPtr, (int)dimension);
2691 if (NDalicPINVOKE.SWIGPendingException.Pending)
2692 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2697 /// Sets the relative to parent size factor of the view.<br>
2698 /// This factor is only used when ResizePolicy is set to either:
2699 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br>
2700 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br>
2702 /// <pre>The View has been initialized.</pre>
2703 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis</param>
2704 public void SetSizeModeFactor(Vector3 factor)
2706 NDalicPINVOKE.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
2707 if (NDalicPINVOKE.SWIGPendingException.Pending)
2708 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2711 internal Vector3 GetSizeModeFactor()
2713 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetSizeModeFactor(swigCPtr), true);
2714 if (NDalicPINVOKE.SWIGPendingException.Pending)
2715 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2720 /// Calculates the height of the view given a width.<br>
2721 /// The natural size is used for default calculation. <br>
2722 /// size 0 is treated as aspect ratio 1:1.<br>
2724 /// <param name="width">Width to use</param>
2725 /// <returns>The height based on the width</returns>
2726 public float GetHeightForWidth(float width)
2728 float ret = NDalicPINVOKE.Actor_GetHeightForWidth(swigCPtr, width);
2729 if (NDalicPINVOKE.SWIGPendingException.Pending)
2730 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2735 /// Calculates the width of the view given a height.<br>
2736 /// The natural size is used for default calculation.<br>
2737 /// size 0 is treated as aspect ratio 1:1.<br>
2739 /// <param name="height">Height to use</param>
2740 /// <returns>The width based on the height</returns>
2741 public float GetWidthForHeight(float height)
2743 float ret = NDalicPINVOKE.Actor_GetWidthForHeight(swigCPtr, height);
2744 if (NDalicPINVOKE.SWIGPendingException.Pending)
2745 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2749 public float GetRelayoutSize(DimensionType dimension)
2751 float ret = NDalicPINVOKE.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
2752 if (NDalicPINVOKE.SWIGPendingException.Pending)
2753 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2757 public void SetPadding(PaddingType padding)
2759 NDalicPINVOKE.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
2760 if (NDalicPINVOKE.SWIGPendingException.Pending)
2761 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2764 public void GetPadding(PaddingType paddingOut)
2766 NDalicPINVOKE.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
2767 if (NDalicPINVOKE.SWIGPendingException.Pending)
2768 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2771 internal void SetMinimumSize(Vector2 size)
2773 NDalicPINVOKE.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
2774 if (NDalicPINVOKE.SWIGPendingException.Pending)
2775 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2778 internal Vector2 GetMinimumSize()
2780 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMinimumSize(swigCPtr), true);
2781 if (NDalicPINVOKE.SWIGPendingException.Pending)
2782 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2786 internal void SetMaximumSize(Vector2 size)
2788 NDalicPINVOKE.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
2789 if (NDalicPINVOKE.SWIGPendingException.Pending)
2790 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2793 internal Vector2 GetMaximumSize()
2795 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMaximumSize(swigCPtr), true);
2796 if (NDalicPINVOKE.SWIGPendingException.Pending)
2797 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2801 internal int GetHierarchyDepth()
2803 int ret = NDalicPINVOKE.Actor_GetHierarchyDepth(swigCPtr);
2804 if (NDalicPINVOKE.SWIGPendingException.Pending)
2805 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2809 public uint AddRenderer(Renderer renderer)
2811 uint ret = NDalicPINVOKE.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
2812 if (NDalicPINVOKE.SWIGPendingException.Pending)
2813 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2817 internal uint GetRendererCount()
2819 uint ret = NDalicPINVOKE.Actor_GetRendererCount(swigCPtr);
2820 if (NDalicPINVOKE.SWIGPendingException.Pending)
2821 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2825 public Renderer GetRendererAt(uint index)
2827 IntPtr cPtr = NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index);
2828 Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Renderer;
2830 if (NDalicPINVOKE.SWIGPendingException.Pending)
2831 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2835 public void RemoveRenderer(Renderer renderer)
2837 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
2838 if (NDalicPINVOKE.SWIGPendingException.Pending)
2839 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2842 public void RemoveRenderer(uint index)
2844 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
2845 if (NDalicPINVOKE.SWIGPendingException.Pending)
2846 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2849 internal TouchDataSignal TouchSignal()
2851 TouchDataSignal ret = new TouchDataSignal(NDalicPINVOKE.Actor_TouchSignal(swigCPtr), false);
2852 if (NDalicPINVOKE.SWIGPendingException.Pending)
2853 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2857 internal HoverSignal HoveredSignal()
2859 HoverSignal ret = new HoverSignal(NDalicPINVOKE.Actor_HoveredSignal(swigCPtr), false);
2860 if (NDalicPINVOKE.SWIGPendingException.Pending)
2861 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2865 internal WheelSignal WheelEventSignal()
2867 WheelSignal ret = new WheelSignal(NDalicPINVOKE.Actor_WheelEventSignal(swigCPtr), false);
2868 if (NDalicPINVOKE.SWIGPendingException.Pending)
2869 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2873 internal ViewSignal OnWindowSignal()
2875 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnStageSignal(swigCPtr), false);
2876 if (NDalicPINVOKE.SWIGPendingException.Pending)
2877 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2881 internal ViewSignal OffWindowSignal()
2883 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OffStageSignal(swigCPtr), false);
2884 if (NDalicPINVOKE.SWIGPendingException.Pending)
2885 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2889 internal ViewSignal OnRelayoutSignal()
2891 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnRelayoutSignal(swigCPtr), false);
2892 if (NDalicPINVOKE.SWIGPendingException.Pending)
2893 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2897 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view) {
2898 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
2899 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2903 internal ViewSignal ResourcesLoadedSignal()
2905 ViewSignal ret = new ViewSignal(NDalicPINVOKE.ResourceReadySignal(swigCPtr), false);
2906 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2911 /// Gets/Sets the origin of an view, within its parent's area.<br>
2912 /// 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>
2913 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br>
2914 /// An view's position is the distance between this origin, and the view's anchor-point.<br>
2916 /// <pre>The View has been initialized.</pre>
2917 public Position ParentOrigin
2921 Position temp = new Position(0.0f, 0.0f, 0.0f);
2922 GetProperty(View.Property.PARENT_ORIGIN).Get(temp);
2927 SetProperty(View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue(value));
2931 internal float ParentOriginX
2936 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
2941 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
2945 internal float ParentOriginY
2950 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
2955 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
2959 internal float ParentOriginZ
2964 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
2969 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
2974 /// Gets/Sets the anchor-point of an view.<br>
2975 /// 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>
2976 /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br>
2977 /// An view position is the distance between its parent-origin and this anchor-point.<br>
2978 /// An view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br>
2979 /// <pre>The View has been initialized.</pre>
2981 public Position PivotPoint
2985 Position temp = new Position(0.0f, 0.0f, 0.0f);
2986 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
2991 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
2995 internal float PivotPointX
3000 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
3005 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
3009 internal float PivotPointY
3014 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
3019 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
3023 internal float PivotPointZ
3028 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
3033 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
3038 /// Gets/Sets the size width of an view.
3040 public float SizeWidth
3045 GetProperty(View.Property.SIZE_WIDTH).Get(out temp);
3050 SetProperty(View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue(value));
3055 /// Gets/Sets the size height of an view.
3057 public float SizeHeight
3062 GetProperty(View.Property.SIZE_HEIGHT).Get(out temp);
3067 SetProperty(View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue(value));
3072 /// Gets/Sets the position of the View.<br>
3073 /// By default, sets the position vector between the parent origin and pivot point(default).<br>
3074 /// If Position inheritance if disabled, sets the world position.<br>
3076 public Position Position
3080 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3081 GetProperty(View.Property.POSITION).Get(temp);
3086 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(value));
3091 /// Gets/Sets the position x of the View.
3093 public float PositionX
3098 GetProperty(View.Property.POSITION_X).Get(out temp);
3103 SetProperty(View.Property.POSITION_X, new Tizen.NUI.PropertyValue(value));
3108 /// Gets/Sets the position y of the View.
3110 public float PositionY
3115 GetProperty(View.Property.POSITION_Y).Get(out temp);
3120 SetProperty(View.Property.POSITION_Y, new Tizen.NUI.PropertyValue(value));
3125 /// Gets/Sets the position z of the View.
3127 public float PositionZ
3132 GetProperty(View.Property.POSITION_Z).Get(out temp);
3137 SetProperty(View.Property.POSITION_Z, new Tizen.NUI.PropertyValue(value));
3142 /// Gets/Sets the world position of the View.
3144 public Vector3 WorldPosition
3148 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3149 GetProperty(View.Property.WORLD_POSITION).Get(temp);
3154 internal float WorldPositionX
3159 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
3164 internal float WorldPositionY
3169 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
3174 internal float WorldPositionZ
3179 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
3185 /// Gets/Sets the orientation of the View.<br>
3186 /// An view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br>
3188 /// <remarks>This is an asynchronous method.</remarks>
3189 public Rotation Orientation
3193 Rotation temp = new Rotation();
3194 GetProperty(View.Property.ORIENTATION).Get(temp);
3199 SetProperty(View.Property.ORIENTATION, new Tizen.NUI.PropertyValue(value));
3204 /// Gets/Sets the world orientation of the View.<br>
3206 public Rotation WorldOrientation
3210 Rotation temp = new Rotation();
3211 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
3217 /// Gets/Sets the scale factor applied to an view.<br>
3219 public Vector3 Scale
3223 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3224 GetProperty(View.Property.SCALE).Get(temp);
3229 SetProperty(View.Property.SCALE, new Tizen.NUI.PropertyValue(value));
3234 /// Gets/Sets the scale x factor applied to an view.
3241 GetProperty(View.Property.SCALE_X).Get(out temp);
3246 SetProperty(View.Property.SCALE_X, new Tizen.NUI.PropertyValue(value));
3251 /// Gets/Sets the scale y factor applied to an view.
3258 GetProperty(View.Property.SCALE_Y).Get(out temp);
3263 SetProperty(View.Property.SCALE_Y, new Tizen.NUI.PropertyValue(value));
3268 /// Gets/Sets the scale z factor applied to an view.
3275 GetProperty(View.Property.SCALE_Z).Get(out temp);
3280 SetProperty(View.Property.SCALE_Z, new Tizen.NUI.PropertyValue(value));
3285 /// Gets the world scale of View.
3287 public Vector3 WorldScale
3291 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3292 GetProperty(View.Property.WORLD_SCALE).Get(temp);
3298 /// Retrieves the visibility flag of an view.
3301 /// If an view is not visible, then the view and its children will not be rendered.
3302 /// 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.
3304 public bool Visibility
3309 GetProperty(View.Property.VISIBLE).Get(out temp);
3315 /// Gets the view's world color.
3317 public Vector4 WorldColor
3321 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3322 GetProperty(View.Property.WORLD_COLOR).Get(temp);
3327 internal Matrix WorldMatrix
3331 Matrix temp = new Matrix();
3332 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
3338 /// Gets/Sets the View's name.
3345 GetProperty(View.Property.NAME).Get(out temp);
3350 SetProperty(View.Property.NAME, new Tizen.NUI.PropertyValue(value));
3355 /// Get the number of children held by the view.
3357 public uint ChildCount
3361 return GetChildCount();
3366 /// Gets the View's ID.
3378 /// Gets/Sets the status of whether an view should emit touch or hover signals.
3380 public bool Sensitive
3385 GetProperty(View.Property.SENSITIVE).Get(out temp);
3390 SetProperty(View.Property.SENSITIVE, new Tizen.NUI.PropertyValue(value));
3395 /// Gets/Sets the status of whether the view should receive a notification when touch or hover motion events leave the boundary of the view.
3397 public bool LeaveRequired
3402 GetProperty(View.Property.LEAVE_REQUIRED).Get(out temp);
3407 SetProperty(View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue(value));
3412 /// Gets/Sets the status of whether a child view inherits it's parent's orientation.
3414 public bool InheritOrientation
3419 GetProperty(View.Property.INHERIT_ORIENTATION).Get(out temp);
3424 SetProperty(View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue(value));
3429 /// Gets/Sets the status of whether a child view inherits it's parent's scale.
3431 public bool InheritScale
3436 GetProperty(View.Property.INHERIT_SCALE).Get(out temp);
3441 SetProperty(View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue(value));
3446 /// Gets/Sets the status of how the view and its children should be drawn.<br>
3447 /// Not all views are renderable, but DrawMode can be inherited from any view.<br>
3448 /// 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>
3449 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br>
3450 /// Overlay views are drawn in a separate pass, after all non-overlay views within the Layer.<br>
3451 /// For overlay views, the drawing order is with respect to tree levels of Views, and depth-testing will not be used.<br>
3453 public DrawModeType DrawMode
3458 if (GetProperty(View.Property.DRAW_MODE).Get(out temp) == false)
3460 NUILog.Error("DrawMode get error!");
3465 return DrawModeType.Normal;
3467 return DrawModeType.Overlay2D;
3469 return DrawModeType.Stencil;
3471 return DrawModeType.Normal;
3476 SetProperty(View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)value));
3481 /// Gets/Sets the relative to parent size factor of the view.<br>
3482 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br>
3483 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br>
3485 public Vector3 SizeModeFactor
3489 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3490 GetProperty(View.Property.SIZE_MODE_FACTOR).Get(temp);
3495 SetProperty(View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue(value));
3500 /// Gets/Sets the width resize policy to be used.
3502 public ResizePolicyType WidthResizePolicy
3507 if (GetProperty(View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
3509 NUILog.Error("WidthResizePolicy get error!");
3514 return ResizePolicyType.Fixed;
3515 case "USE_NATURAL_SIZE":
3516 return ResizePolicyType.UseNaturalSize;
3517 case "FILL_TO_PARENT":
3518 return ResizePolicyType.FillToParent;
3519 case "SIZE_RELATIVE_TO_PARENT":
3520 return ResizePolicyType.SizeRelativeToParent;
3521 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3522 return ResizePolicyType.SizeFixedOffsetFromParent;
3523 case "FIT_TO_CHILDREN":
3524 return ResizePolicyType.FitToChildren;
3525 case "DIMENSION_DEPENDENCY":
3526 return ResizePolicyType.DimensionDependency;
3527 case "USE_ASSIGNED_SIZE":
3528 return ResizePolicyType.UseAssignedSize;
3530 return ResizePolicyType.Fixed;
3535 SetProperty(View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3540 /// Gets/Sets the height resize policy to be used.
3542 public ResizePolicyType HeightResizePolicy
3547 if (GetProperty(View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
3549 NUILog.Error("HeightResizePolicy get error!");
3554 return ResizePolicyType.Fixed;
3555 case "USE_NATURAL_SIZE":
3556 return ResizePolicyType.UseNaturalSize;
3557 case "FILL_TO_PARENT":
3558 return ResizePolicyType.FillToParent;
3559 case "SIZE_RELATIVE_TO_PARENT":
3560 return ResizePolicyType.SizeRelativeToParent;
3561 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3562 return ResizePolicyType.SizeFixedOffsetFromParent;
3563 case "FIT_TO_CHILDREN":
3564 return ResizePolicyType.FitToChildren;
3565 case "DIMENSION_DEPENDENCY":
3566 return ResizePolicyType.DimensionDependency;
3567 case "USE_ASSIGNED_SIZE":
3568 return ResizePolicyType.UseAssignedSize;
3570 return ResizePolicyType.Fixed;
3575 SetProperty(View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3580 /// Gets/Sets the policy to use when setting size with size negotiation.<br>
3581 /// Defaults to SizeScalePolicyType.UseSizeSet.<br>
3583 public SizeScalePolicyType SizeScalePolicy
3588 if (GetProperty(View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
3590 NUILog.Error("SizeScalePolicy get error!");
3594 case "USE_SIZE_SET":
3595 return SizeScalePolicyType.UseSizeSet;
3596 case "FIT_WITH_ASPECT_RATIO":
3597 return SizeScalePolicyType.FitWithAspectRatio;
3598 case "FILL_WITH_ASPECT_RATIO":
3599 return SizeScalePolicyType.FillWithAspectRatio;
3601 return SizeScalePolicyType.UseSizeSet;
3606 string valueToString = "";
3609 case SizeScalePolicyType.UseSizeSet:
3611 valueToString = "USE_SIZE_SET";
3614 case SizeScalePolicyType.FitWithAspectRatio:
3616 valueToString = "FIT_WITH_ASPECT_RATIO";
3619 case SizeScalePolicyType.FillWithAspectRatio:
3621 valueToString = "FILL_WITH_ASPECT_RATIO";
3626 valueToString = "USE_SIZE_SET";
3630 SetProperty(View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
3635 /// Gets/Sets the status of whether the width size is dependent on height size.
3637 public bool WidthForHeight
3642 GetProperty(View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
3647 SetProperty(View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue(value));
3652 /// Gets/Sets the status of whether the height size is dependent on width size.
3654 public bool HeightForWidth
3659 GetProperty(View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
3664 SetProperty(View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue(value));
3669 /// Gets/Sets the padding for use in layout.
3671 public Vector4 Padding
3675 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3676 GetProperty(View.Property.PADDING).Get(temp);
3681 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
3686 /// Gets/Sets the minimum size an view can be assigned in size negotiation.
3688 public Size2D MinimumSize
3692 Size2D temp = new Size2D(0, 0);
3693 GetProperty(View.Property.MINIMUM_SIZE).Get(temp);
3698 SetProperty(View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3703 /// Gets/Sets the maximum size an view can be assigned in size negotiation.
3705 public Size2D MaximumSize
3709 Size2D temp = new Size2D(0, 0);
3710 GetProperty(View.Property.MAXIMUM_SIZE).Get(temp);
3715 SetProperty(View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3720 /// Gets/Sets whether a child view inherits it's parent's position.<br>
3721 /// Default is to inherit.<br>
3722 /// 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>
3724 public bool InheritPosition
3729 GetProperty(View.Property.INHERIT_POSITION).Get(out temp);
3734 SetProperty(View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue(value));
3739 /// Gets/Sets clipping behavior(mode) of it's children.
3741 public ClippingModeType ClippingMode
3746 if (GetProperty(View.Property.CLIPPING_MODE).Get(out temp) == false)
3748 NUILog.Error("ClippingMode get error!");
3753 return ClippingModeType.Disabled;
3754 case "CLIP_CHILDREN":
3755 return ClippingModeType.ClipChildren;
3757 return ClippingModeType.Disabled;
3762 SetProperty(View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)value));
3767 /// Get the number of renderers held by the view.
3769 public uint RendererCount
3773 return GetRendererCount();
3780 [Obsolete("Please do not use! this will be deprecated")]
3781 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> Touched
3785 if (_touchDataEventHandler == null)
3787 _touchDataCallback = OnTouch;
3788 this.TouchSignal().Connect(_touchDataCallback);
3791 _touchDataEventHandler += value;
3796 _touchDataEventHandler -= value;
3798 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
3800 this.TouchSignal().Disconnect(_touchDataCallback);
3806 [Obsolete("Please do not use! this will be deprecated")]
3807 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> Hovered
3811 if (_hoverEventHandler == null)
3813 _hoverEventCallback = OnHoverEvent;
3814 this.HoveredSignal().Connect(_hoverEventCallback);
3817 _hoverEventHandler += value;
3822 _hoverEventHandler -= value;
3824 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
3826 this.HoveredSignal().Disconnect(_hoverEventCallback);
3832 [Obsolete("Please do not use! this will be deprecated")]
3833 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelMoved
3837 if (_wheelEventHandler == null)
3839 _wheelEventCallback = OnWheelEvent;
3840 this.WheelEventSignal().Connect(_wheelEventCallback);
3843 _wheelEventHandler += value;
3848 _wheelEventHandler -= value;
3850 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
3852 this.WheelEventSignal().Disconnect(_wheelEventCallback);
3858 [Obsolete("Please do not use! this will be deprecated")]
3859 public Position AnchorPoint
3863 Position temp = new Position(0.0f, 0.0f, 0.0f);
3864 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
3869 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3873 [Obsolete("Please do not use! this will be deprecated, please use Size2D instead")]
3878 Size temp = new Size(0.0f, 0.0f, 0.0f);
3879 GetProperty(View.Property.SIZE).Get(temp);
3884 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(value));
3888 [Obsolete("Please do not use! this will be deprecated")]
3889 public event EventHandler OnWindowEvent
3893 if (_onWindowEventHandler == null)
3895 _onWindowEventCallback = OnWindow;
3896 this.OnWindowSignal().Connect(_onWindowEventCallback);
3899 _onWindowEventHandler += value;
3904 _onWindowEventHandler -= value;
3906 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
3908 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
3913 [Obsolete("Please do not use! this will be deprecated")]
3914 public event EventHandler OffWindowEvent
3918 if (_offWindowEventHandler == null)
3920 _offWindowEventCallback = OffWindow;
3921 this.OffWindowSignal().Connect(_offWindowEventCallback);
3924 _offWindowEventHandler += value;
3929 _offWindowEventHandler -= value;
3931 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
3933 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
3938 [Obsolete("Please do not use! this will be deprecated")]
3939 public event EventHandler OnRelayoutEvent
3943 if (_onRelayoutEventHandler == null)
3945 _onRelayoutEventCallback = OnRelayout;
3946 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
3949 _onRelayoutEventHandler += value;
3954 _onRelayoutEventHandler -= value;
3956 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
3958 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
3964 [Obsolete("Please DO NOT use! This will be deprecated! Please use 'Container GetParent()' instead!")]
3970 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
3972 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(cPtr);
3974 if (basehandle is Layer)
3976 ret = new View(cPtr, false);
3980 ret = basehandle as View;
3983 if (NDalicPINVOKE.SWIGPendingException.Pending)
3984 throw NDalicPINVOKE.SWIGPendingException.Retrieve();