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()">
101 protected override Container GetParent()
104 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
106 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(cPtr);
108 if(basehandle is Layer)
110 ret = basehandle as Layer;
114 ret = basehandle as View;
117 if (NDalicPINVOKE.SWIGPendingException.Pending)
118 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
124 // you can override it to clean-up your own resources.
125 protected override void Dispose(DisposeTypes type)
132 if(type == DisposeTypes.Explicit)
135 //Release your own managed resources here.
136 //You should release all of your own disposable objects here.
139 //Release your own unmanaged resources here.
140 //You should not access any managed member here except static instance.
141 //because the execution order of Finalizes is non-deterministic.
143 DisConnectFromSignals();
145 if (swigCPtr.Handle != global::System.IntPtr.Zero)
150 NDalicPINVOKE.delete_View(swigCPtr);
152 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
158 private void DisConnectFromSignals()
160 // Save current CPtr.
161 global::System.Runtime.InteropServices.HandleRef currentCPtr = swigCPtr;
163 // Use BaseHandle CPtr as current might have been deleted already in derived classes.
164 swigCPtr = GetBaseHandleCPtrHandleRef;
166 if (_onRelayoutEventCallback != null)
168 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
171 if (_offWindowEventCallback != null)
173 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
176 if (_onWindowEventCallback != null)
178 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
181 if (_wheelEventCallback != null)
183 this.WheelEventSignal().Disconnect(_wheelEventCallback);
186 if (_hoverEventCallback != null)
188 this.HoveredSignal().Disconnect(_hoverEventCallback);
191 if (_touchDataCallback != null)
193 this.TouchSignal().Disconnect(_touchDataCallback);
196 if (_ResourcesLoadedCallback != null)
198 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
201 if (_offWindowEventCallback != null)
203 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
206 if (_onWindowEventCallback != null)
208 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
211 if (_wheelEventCallback != null)
213 this.WheelEventSignal().Disconnect(_wheelEventCallback);
216 if (_hoverEventCallback != null)
218 this.HoveredSignal().Disconnect(_hoverEventCallback);
221 if (_touchDataCallback != null)
223 this.TouchSignal().Disconnect(_touchDataCallback);
226 if (_onRelayoutEventCallback != null)
228 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
231 if (_keyCallback != null)
233 this.KeyEventSignal().Disconnect(_keyCallback);
236 if (_keyInputFocusLostCallback != null)
238 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
241 if (_keyInputFocusGainedCallback != null)
243 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
246 // BaseHandle CPtr is used in Registry and there is danger of deletion if we keep using it here.
247 // Restore current CPtr.
248 swigCPtr = currentCPtr;
251 private EventHandler _keyInputFocusGainedEventHandler;
252 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
253 private delegate void KeyInputFocusGainedCallbackType(IntPtr control);
254 private KeyInputFocusGainedCallbackType _keyInputFocusGainedCallback;
257 /// Event for KeyInputFocusGained signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
258 /// KeyInputFocusGained signal is emitted when the control gets Key Input Focus.<br>
260 public event EventHandler FocusGained
264 if (_keyInputFocusGainedEventHandler == null)
266 _keyInputFocusGainedCallback = OnKeyInputFocusGained;
267 this.KeyInputFocusGainedSignal().Connect(_keyInputFocusGainedCallback);
270 _keyInputFocusGainedEventHandler += value;
275 _keyInputFocusGainedEventHandler -= value;
277 if (_keyInputFocusGainedEventHandler == null && KeyInputFocusGainedSignal().Empty() == false)
279 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
284 private void OnKeyInputFocusGained(IntPtr view)
286 if (_keyInputFocusGainedEventHandler != null)
288 _keyInputFocusGainedEventHandler(this, null);
293 private EventHandler _keyInputFocusLostEventHandler;
294 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
295 private delegate void KeyInputFocusLostCallbackType(IntPtr control);
296 private KeyInputFocusLostCallbackType _keyInputFocusLostCallback;
299 /// Event for KeyInputFocusLost signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
300 /// KeyInputFocusLost signal is emitted when the control loses Key Input Focus.<br>
302 public event EventHandler FocusLost
306 if (_keyInputFocusLostEventHandler == null)
308 _keyInputFocusLostCallback = OnKeyInputFocusLost;
309 this.KeyInputFocusLostSignal().Connect(_keyInputFocusLostCallback);
312 _keyInputFocusLostEventHandler += value;
317 _keyInputFocusLostEventHandler -= value;
319 if (_keyInputFocusLostEventHandler == null && KeyInputFocusLostSignal().Empty() == false)
321 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
326 private void OnKeyInputFocusLost(IntPtr view)
328 if (_keyInputFocusLostEventHandler != null)
330 _keyInputFocusLostEventHandler(this, null);
335 /// Event arguments that passed via KeyEvent signal.
337 public class KeyEventArgs : EventArgs
342 /// Key - is the key sent to the View.
357 private EventHandlerWithReturnType<object, KeyEventArgs, bool> _keyEventHandler;
358 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
359 private delegate bool KeyCallbackType(IntPtr control, IntPtr keyEvent);
360 private KeyCallbackType _keyCallback;
363 /// Event for KeyPressed signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
364 /// KeyPressed signal is emitted when key event is received.<br>
366 public event EventHandlerWithReturnType<object, KeyEventArgs, bool> KeyEvent
370 if (_keyEventHandler == null)
372 _keyCallback = OnKeyEvent;
373 this.KeyEventSignal().Connect(_keyCallback);
376 _keyEventHandler += value;
381 _keyEventHandler -= value;
383 if (_keyEventHandler == null && KeyEventSignal().Empty() == false)
385 this.KeyEventSignal().Disconnect(_keyCallback);
390 private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
392 KeyEventArgs e = new KeyEventArgs();
396 e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
398 if (_keyEventHandler != null)
400 Delegate[] delegateList = _keyEventHandler.GetInvocationList();
402 // Oring the result of each callback.
403 foreach ( EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList )
405 result |= del( this, e );
412 private EventHandler _onRelayoutEventHandler;
413 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
414 private delegate void OnRelayoutEventCallbackType(IntPtr control);
415 private OnRelayoutEventCallbackType _onRelayoutEventCallback;
418 /// Event for OnRelayout signal which can be used to subscribe/unsubscribe the event handler.<br>
419 /// OnRelayout signal is emitted after the size has been set on the view during relayout.<br>
421 public event EventHandler Relayout
425 if (_onRelayoutEventHandler == null)
427 _onRelayoutEventCallback = OnRelayout;
428 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
431 _onRelayoutEventHandler += value;
436 _onRelayoutEventHandler -= value;
438 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
440 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
446 // Callback for View OnRelayout signal
447 private void OnRelayout(IntPtr data)
449 if (_onRelayoutEventHandler != null)
451 _onRelayoutEventHandler(this, null);
456 /// Event arguments that passed via Touch signal.
458 public class TouchEventArgs : EventArgs
460 private Touch _touch;
463 /// Touch - contains the information of touch points
478 private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
479 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
480 private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
481 private TouchDataCallbackType _touchDataCallback;
484 /// Event for Touched signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
485 /// Touched signal is emitted when touch input is received.<br>
487 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
491 if (_touchDataEventHandler == null)
493 _touchDataCallback = OnTouch;
494 this.TouchSignal().Connect(_touchDataCallback);
497 _touchDataEventHandler += value;
502 _touchDataEventHandler -= value;
504 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
506 this.TouchSignal().Disconnect(_touchDataCallback);
512 // Callback for View TouchSignal
513 private bool OnTouch(IntPtr view, IntPtr touchData)
515 TouchEventArgs e = new TouchEventArgs();
517 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
519 if (_touchDataEventHandler != null)
521 return _touchDataEventHandler(this, e);
528 /// Event arguments that passed via Hover signal.
530 public class HoverEventArgs : EventArgs
532 private Hover _hover;
535 /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
550 private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
551 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
552 private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
553 private HoverEventCallbackType _hoverEventCallback;
556 /// Event for Hovered signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
557 /// Hovered signal is emitted when hover input is received.<br>
559 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
563 if (_hoverEventHandler == null)
565 _hoverEventCallback = OnHoverEvent;
566 this.HoveredSignal().Connect(_hoverEventCallback);
569 _hoverEventHandler += value;
574 _hoverEventHandler -= value;
576 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
578 this.HoveredSignal().Disconnect(_hoverEventCallback);
584 // Callback for View Hover signal
585 private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
587 HoverEventArgs e = new HoverEventArgs();
589 e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
591 if (_hoverEventHandler != null)
593 return _hoverEventHandler(this, e);
600 /// Event arguments that passed via Wheel signal.
602 public class WheelEventArgs : EventArgs
604 private Wheel _wheel;
607 /// WheelEvent - store a wheel rolling type : MOUSE_WHEEL or CUSTOM_WHEEL
622 private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
623 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
624 private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
625 private WheelEventCallbackType _wheelEventCallback;
628 /// Event for WheelMoved signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
629 /// WheelMoved signal is emitted when wheel event is received.<br>
631 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
635 if (_wheelEventHandler == null)
637 _wheelEventCallback = OnWheelEvent;
638 this.WheelEventSignal().Connect(_wheelEventCallback);
641 _wheelEventHandler += value;
646 _wheelEventHandler -= value;
648 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
650 this.WheelEventSignal().Disconnect(_wheelEventCallback);
656 // Callback for View Wheel signal
657 private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
659 WheelEventArgs e = new WheelEventArgs();
661 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
663 if (_wheelEventHandler != null)
665 return _wheelEventHandler(this, e);
671 private EventHandler _onWindowEventHandler;
672 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
673 private delegate void OnWindowEventCallbackType(IntPtr control);
674 private OnWindowEventCallbackType _onWindowEventCallback;
677 /// Event for OnWindow signal which can be used to subscribe/unsubscribe the event handler.<br>
678 /// OnWindow signal is emitted after the view has been connected to the Window.<br>
680 public event EventHandler AddedToWindow
684 if (_onWindowEventHandler == null)
686 _onWindowEventCallback = OnWindow;
687 this.OnWindowSignal().Connect(_onWindowEventCallback);
690 _onWindowEventHandler += value;
695 _onWindowEventHandler -= value;
697 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
699 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
704 // Callback for View OnWindow signal
705 private void OnWindow(IntPtr data)
707 if (_onWindowEventHandler != null)
709 _onWindowEventHandler(this, null);
714 private EventHandler _offWindowEventHandler;
715 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
716 private delegate void OffWindowEventCallbackType(IntPtr control);
717 private OffWindowEventCallbackType _offWindowEventCallback;
720 /// Event for OffWindow signal which can be used to subscribe/unsubscribe the event handler.<br>
721 /// OffWindow signal is emitted after the view has been disconnected from the Window.<br>
723 public event EventHandler RemovedFromWindow
727 if (_offWindowEventHandler == null)
729 _offWindowEventCallback = OffWindow;
730 this.OffWindowSignal().Connect(_offWindowEventCallback);
733 _offWindowEventHandler += value;
738 _offWindowEventHandler -= value;
740 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
742 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
747 // Callback for View OffWindow signal
748 private void OffWindow(IntPtr data)
750 if (_offWindowEventHandler != null)
752 _offWindowEventHandler(this, null);
757 /// Event arguments of visibility changed.
759 public class VisibilityChangedEventArgs : EventArgs
762 private bool _visibility;
763 private VisibilityChangeType _type;
766 /// The view, or child of view, whose visibility has changed.
781 /// Whether the view is now visible or not.
783 public bool Visibility
796 /// Whether the view's visible property has changed or a parent's.
798 public VisibilityChangeType Type
811 private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
812 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
813 private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
814 private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
817 /// Event for visibility change which can be used to subscribe/unsubscribe the event handler.<br>
818 /// This signal is emitted when the visible property of this or a parent view is changed.<br>
820 public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
824 if (_visibilityChangedEventHandler == null)
826 _visibilityChangedEventCallback = OnVisibilityChanged;
827 VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
830 _visibilityChangedEventHandler += value;
835 _visibilityChangedEventHandler -= value;
837 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
839 VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
844 // Callback for View visibility change signal
845 private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
847 VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
850 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
852 e.Visibility = visibility;
855 if (_visibilityChangedEventHandler != null)
857 _visibilityChangedEventHandler(this, e);
861 // Resource Ready Signal
863 private EventHandler _resourcesLoadedEventHandler;
864 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
865 private delegate void ResourcesLoadedCallbackType(IntPtr control);
866 private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
869 /// Event for ResourcesLoadedSignal signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
870 /// This signal is emitted after all resources required by a View are loaded and ready.<br>
872 public event EventHandler ResourcesLoaded
876 if (_resourcesLoadedEventHandler == null)
878 _ResourcesLoadedCallback = OnResourcesLoaded;
879 this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
882 _resourcesLoadedEventHandler += value;
887 _resourcesLoadedEventHandler -= value;
889 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
891 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
896 private void OnResourcesLoaded(IntPtr view)
898 if (_resourcesLoadedEventHandler != null)
900 _resourcesLoadedEventHandler(this, null);
904 internal IntPtr GetPtrfromView()
906 return (IntPtr)swigCPtr;
909 internal class Property
911 internal static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get();
912 internal static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get();
913 internal static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get();
914 internal static readonly int LEFT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
915 internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
916 internal static readonly int UP_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
917 internal static readonly int DOWN_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
918 internal static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get();
919 internal static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get();
920 internal static readonly int SIBLING_ORDER = NDalicManualPINVOKE.Actor_Property_SIBLING_ORDER_get();
921 internal static readonly int OPACITY = NDalicManualPINVOKE.Actor_Property_OPACITY_get();
922 internal static readonly int SCREEN_POSITION = NDalicManualPINVOKE.Actor_Property_SCREEN_POSITION_get();
923 internal static readonly int POSITION_USES_ANCHOR_POINT = NDalicManualPINVOKE.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
924 internal static readonly int PARENT_ORIGIN = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_get();
925 internal static readonly int PARENT_ORIGIN_X = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_X_get();
926 internal static readonly int PARENT_ORIGIN_Y = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Y_get();
927 internal static readonly int PARENT_ORIGIN_Z = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Z_get();
928 internal static readonly int ANCHOR_POINT = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_get();
929 internal static readonly int ANCHOR_POINT_X = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_X_get();
930 internal static readonly int ANCHOR_POINT_Y = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Y_get();
931 internal static readonly int ANCHOR_POINT_Z = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Z_get();
932 internal static readonly int SIZE = NDalicPINVOKE.Actor_Property_SIZE_get();
933 internal static readonly int SIZE_WIDTH = NDalicPINVOKE.Actor_Property_SIZE_WIDTH_get();
934 internal static readonly int SIZE_HEIGHT = NDalicPINVOKE.Actor_Property_SIZE_HEIGHT_get();
935 internal static readonly int SIZE_DEPTH = NDalicPINVOKE.Actor_Property_SIZE_DEPTH_get();
936 internal static readonly int POSITION = NDalicPINVOKE.Actor_Property_POSITION_get();
937 internal static readonly int POSITION_X = NDalicPINVOKE.Actor_Property_POSITION_X_get();
938 internal static readonly int POSITION_Y = NDalicPINVOKE.Actor_Property_POSITION_Y_get();
939 internal static readonly int POSITION_Z = NDalicPINVOKE.Actor_Property_POSITION_Z_get();
940 internal static readonly int WORLD_POSITION = NDalicPINVOKE.Actor_Property_WORLD_POSITION_get();
941 internal static readonly int WORLD_POSITION_X = NDalicPINVOKE.Actor_Property_WORLD_POSITION_X_get();
942 internal static readonly int WORLD_POSITION_Y = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Y_get();
943 internal static readonly int WORLD_POSITION_Z = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Z_get();
944 internal static readonly int ORIENTATION = NDalicPINVOKE.Actor_Property_ORIENTATION_get();
945 internal static readonly int WORLD_ORIENTATION = NDalicPINVOKE.Actor_Property_WORLD_ORIENTATION_get();
946 internal static readonly int SCALE = NDalicPINVOKE.Actor_Property_SCALE_get();
947 internal static readonly int SCALE_X = NDalicPINVOKE.Actor_Property_SCALE_X_get();
948 internal static readonly int SCALE_Y = NDalicPINVOKE.Actor_Property_SCALE_Y_get();
949 internal static readonly int SCALE_Z = NDalicPINVOKE.Actor_Property_SCALE_Z_get();
950 internal static readonly int WORLD_SCALE = NDalicPINVOKE.Actor_Property_WORLD_SCALE_get();
951 internal static readonly int VISIBLE = NDalicPINVOKE.Actor_Property_VISIBLE_get();
952 internal static readonly int WORLD_COLOR = NDalicPINVOKE.Actor_Property_WORLD_COLOR_get();
953 internal static readonly int WORLD_MATRIX = NDalicPINVOKE.Actor_Property_WORLD_MATRIX_get();
954 internal static readonly int NAME = NDalicPINVOKE.Actor_Property_NAME_get();
955 internal static readonly int SENSITIVE = NDalicPINVOKE.Actor_Property_SENSITIVE_get();
956 internal static readonly int LEAVE_REQUIRED = NDalicPINVOKE.Actor_Property_LEAVE_REQUIRED_get();
957 internal static readonly int INHERIT_ORIENTATION = NDalicPINVOKE.Actor_Property_INHERIT_ORIENTATION_get();
958 internal static readonly int INHERIT_SCALE = NDalicPINVOKE.Actor_Property_INHERIT_SCALE_get();
959 internal static readonly int DRAW_MODE = NDalicPINVOKE.Actor_Property_DRAW_MODE_get();
960 internal static readonly int SIZE_MODE_FACTOR = NDalicPINVOKE.Actor_Property_SIZE_MODE_FACTOR_get();
961 internal static readonly int WIDTH_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_WIDTH_RESIZE_POLICY_get();
962 internal static readonly int HEIGHT_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_HEIGHT_RESIZE_POLICY_get();
963 internal static readonly int SIZE_SCALE_POLICY = NDalicPINVOKE.Actor_Property_SIZE_SCALE_POLICY_get();
964 internal static readonly int WIDTH_FOR_HEIGHT = NDalicPINVOKE.Actor_Property_WIDTH_FOR_HEIGHT_get();
965 internal static readonly int HEIGHT_FOR_WIDTH = NDalicPINVOKE.Actor_Property_HEIGHT_FOR_WIDTH_get();
966 internal static readonly int PADDING = NDalicPINVOKE.Actor_Property_PADDING_get();
967 internal static readonly int MINIMUM_SIZE = NDalicPINVOKE.Actor_Property_MINIMUM_SIZE_get();
968 internal static readonly int MAXIMUM_SIZE = NDalicPINVOKE.Actor_Property_MAXIMUM_SIZE_get();
969 internal static readonly int INHERIT_POSITION = NDalicPINVOKE.Actor_Property_INHERIT_POSITION_get();
970 internal static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
974 /// Describes the direction to move the focus towards.
976 public enum FocusDirection
987 /// Creates a new instance of a View.
989 public View() : this(NDalicPINVOKE.View_New(), true)
991 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
994 internal View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true)
996 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1000 /// Downcasts a handle to View handle.<br>
1001 /// If handle points to a View, the downcast produces valid handle.<br>
1002 /// If not, the returned handle is left uninitialized.<br>
1004 /// <param name="handle">Handle to an object</param>
1005 /// <returns>A handle to a View or an uninitialized handle</returns>
1006 [Obsolete("Please do not use! this will be deprecated, instead please use as keyword.")]
1007 public new static View DownCast(BaseHandle handle)
1009 View ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as View;
1010 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1014 [Obsolete("Please do not use! this will be deprecated, instead please use as keyword.")]
1015 public static T DownCast<T>(View view) where T : View
1017 T ret = Registry.GetManagedBaseHandleFromNativePtr(view) as T;
1025 private View ConvertIdToView(uint id)
1031 View parentView = Parent as View;
1032 view = parentView.FindChildById(id);
1037 view = Window.Instance.GetRootLayer().FindChildById(id);
1043 internal void SetKeyInputFocus()
1045 NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
1046 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1050 /// Quries whether the view has focus.
1052 /// <returns>true if this view has focus</returns>
1053 public bool HasFocus()
1055 bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
1056 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1060 internal void ClearKeyInputFocus()
1062 NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
1063 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1066 internal PinchGestureDetector GetPinchGestureDetector()
1068 PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
1069 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1073 internal PanGestureDetector GetPanGestureDetector()
1075 PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
1076 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1080 internal TapGestureDetector GetTapGestureDetector()
1082 TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
1083 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1087 internal LongPressGestureDetector GetLongPressGestureDetector()
1089 LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
1090 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1095 /// Sets the name of the style to be applied to the view.
1097 /// <param name="styleName">A string matching a style described in a stylesheet</param>
1098 public void SetStyleName(string styleName)
1100 NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
1101 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1105 /// Retrieves the name of the style to be applied to the view (if any).
1107 /// <returns>A string matching a style, or an empty string</returns>
1108 public string GetStyleName()
1110 string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
1111 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1115 internal void SetBackgroundColor(Vector4 color)
1117 NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
1118 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1121 internal Vector4 GetBackgroundColor()
1123 Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
1124 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1128 internal void SetBackgroundImage(Image image)
1130 NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
1131 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1135 /// Clears the background.
1137 public void ClearBackground()
1139 NDalicPINVOKE.View_ClearBackground(swigCPtr);
1140 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1143 internal ControlKeySignal KeyEventSignal()
1145 ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
1146 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1150 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
1152 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
1153 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1157 internal KeyInputFocusSignal KeyInputFocusLostSignal()
1159 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
1160 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1164 internal View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
1166 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1169 internal enum PropertyRange
1171 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
1172 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
1173 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
1177 /// styleName, type string.
1179 public string StyleName
1184 GetProperty(View.Property.STYLE_NAME).Get(out temp);
1189 SetProperty(View.Property.STYLE_NAME, new Tizen.NUI.PropertyValue(value));
1194 /// mutually exclusive with BACKGROUND_IMAGE & BACKGROUND, type Vector4.
1196 public Color BackgroundColor
1200 Color backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1202 Tizen.NUI.PropertyMap background = Background;
1204 background.Find(Visual.Property.Type)?.Get(out visualType);
1205 if (visualType == (int)Visual.Type.Color)
1207 background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor);
1210 return backgroundColor;
1214 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1219 /// Create an Animation to animate the background color visual. If there is no
1220 /// background visual, creates one with transparent black as it's mixColor.
1222 public Animation AnimateBackgroundColor( object destinationValue,
1225 AlphaFunction.BuiltinFunctions? alphaFunction = null,
1226 object initialValue = null)
1228 Tizen.NUI.PropertyMap background = Background;
1230 if( background.Empty() )
1232 // If there is no background yet, ensure there is a transparent
1234 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1235 background = Background;
1237 return AnimateColor( "background", destinationValue, startTime, endTime, alphaFunction, initialValue );
1241 /// Create an Animation to animate the mixColor of the named visual.
1243 public Animation AnimateColor( string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null )
1245 Animation animation = null;
1247 PropertyMap _animator = new PropertyMap();
1248 if( alphaFunction != null )
1250 _animator.Add("alphaFunction", new PropertyValue( AlphaFunction.BuiltinToPropertyKey(alphaFunction) ) );
1253 PropertyMap _timePeriod = new PropertyMap();
1254 _timePeriod.Add( "duration", new PropertyValue((endTime-startTime)/1000.0f) );
1255 _timePeriod.Add( "delay", new PropertyValue( startTime/1000.0f ) );
1256 _animator.Add( "timePeriod", new PropertyValue( _timePeriod ) );
1258 PropertyMap _transition = new PropertyMap();
1259 _transition.Add( "animator", new PropertyValue( _animator ) );
1260 _transition.Add( "target", new PropertyValue( targetVisual ) );
1261 _transition.Add( "property", new PropertyValue( "mixColor" ) );
1263 if( initialColor != null )
1265 PropertyValue initValue = PropertyValue.CreateFromObject( initialColor );
1266 _transition.Add( "initialValue", initValue );
1269 PropertyValue destValue = PropertyValue.CreateFromObject( destinationColor );
1270 _transition.Add( "targetValue", destValue );
1271 TransitionData _transitionData = new TransitionData( _transition );
1273 animation = new Animation( NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true );
1274 if (NDalicPINVOKE.SWIGPendingException.Pending)
1275 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1281 /// mutually exclusive with BACKGROUND_COLOR & BACKGROUND, type Map.
1283 public string BackgroundImage
1287 string backgroundImage = "";
1289 Tizen.NUI.PropertyMap background = Background;
1291 background.Find(Visual.Property.Type)?.Get(out visualType);
1292 if (visualType == (int)Visual.Type.Image)
1294 background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
1297 return backgroundImage;
1301 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1305 public Tizen.NUI.PropertyMap Background
1309 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1310 GetProperty( View.Property.BACKGROUND ).Get(temp);
1315 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1321 /// The current state of the view.
1328 if (GetProperty(View.Property.STATE).Get(out temp) == false)
1330 NUILog.Error("State get error!");
1336 return States.Normal;
1340 return States.Focused;
1344 return States.Disabled;
1348 return States.Normal;
1354 SetProperty(View.Property.STATE, new Tizen.NUI.PropertyValue((int)value));
1359 /// The current sub state of the view.
1361 public States SubState
1366 if (GetProperty(View.Property.SUB_STATE).Get(out temp) == false)
1368 NUILog.Error("subState get error!");
1373 return States.Normal;
1375 return States.Focused;
1377 return States.Disabled;
1379 return States.Normal;
1384 string valueToString = "";
1389 valueToString = "NORMAL";
1392 case States.Focused:
1394 valueToString = "FOCUSED";
1397 case States.Disabled:
1399 valueToString = "DISABLED";
1404 valueToString = "NORMAL";
1408 SetProperty(View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
1413 /// Displays a tooltip
1415 public Tizen.NUI.PropertyMap Tooltip
1419 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1420 GetProperty(View.Property.TOOLTIP).Get(temp);
1425 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1430 /// Displays a tooltip as Text
1432 public string TooltipText
1436 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1440 private int LeftFocusableViewId
1445 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
1450 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1454 private int RightFocusableViewId
1459 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
1464 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1468 private int UpFocusableViewId
1473 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
1478 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1482 private int DownFocusableViewId
1487 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
1492 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1497 /// Child Property of FlexContainer.<br>
1498 /// The proportion of the free space in the container the flex item will receive.<br>
1499 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br>
1506 GetProperty(FlexContainer.ChildProperty.FLEX).Get(out temp);
1511 SetProperty(FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue(value));
1516 /// Child Property of FlexContainer.<br>
1517 /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br>
1519 public int AlignSelf
1524 GetProperty(FlexContainer.ChildProperty.ALIGN_SELF).Get(out temp);
1529 SetProperty(FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue(value));
1534 /// Child Property of FlexContainer.<br>
1535 /// The space around the flex item.<br>
1537 public Vector4 FlexMargin
1541 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1542 GetProperty(FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
1547 SetProperty(FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue(value));
1552 /// The top-left cell this child occupies, if not set, the first available cell is used
1554 public Vector2 CellIndex
1558 Vector2 temp = new Vector2(0.0f, 0.0f);
1559 GetProperty(TableView.ChildProperty.CELL_INDEX).Get(temp);
1564 SetProperty(TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue(value));
1569 /// The number of rows this child occupies, if not set, default value is 1
1571 public float RowSpan
1576 GetProperty(TableView.ChildProperty.ROW_SPAN).Get(out temp);
1581 SetProperty(TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue(value));
1586 /// The number of columns this child occupies, if not set, default value is 1
1588 public float ColumnSpan
1593 GetProperty(TableView.ChildProperty.COLUMN_SPAN).Get(out temp);
1598 SetProperty(TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue(value));
1603 /// The horizontal alignment of this child inside the cells, if not set, default value is 'left'
1605 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
1610 if (GetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
1612 NUILog.Error("CellHorizontalAlignment get error!");
1618 return Tizen.NUI.HorizontalAlignmentType.Left;
1620 return Tizen.NUI.HorizontalAlignmentType.Center;
1622 return Tizen.NUI.HorizontalAlignmentType.Right;
1624 return Tizen.NUI.HorizontalAlignmentType.Left;
1629 string valueToString = "";
1632 case Tizen.NUI.HorizontalAlignmentType.Left:
1634 valueToString = "left";
1637 case Tizen.NUI.HorizontalAlignmentType.Center:
1639 valueToString = "center";
1642 case Tizen.NUI.HorizontalAlignmentType.Right:
1644 valueToString = "right";
1649 valueToString = "left";
1653 SetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1658 /// The vertical alignment of this child inside the cells, if not set, default value is 'top'
1660 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
1665 GetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
1667 NUILog.Error("CellVerticalAlignment get error!");
1673 return Tizen.NUI.VerticalAlignmentType.Top;
1675 return Tizen.NUI.VerticalAlignmentType.Center;
1677 return Tizen.NUI.VerticalAlignmentType.Bottom;
1679 return Tizen.NUI.VerticalAlignmentType.Top;
1684 string valueToString = "";
1687 case Tizen.NUI.VerticalAlignmentType.Top:
1689 valueToString = "top";
1692 case Tizen.NUI.VerticalAlignmentType.Center:
1694 valueToString = "center";
1697 case Tizen.NUI.VerticalAlignmentType.Bottom:
1699 valueToString = "bottom";
1704 valueToString = "top";
1708 SetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1713 /// The left focusable view.<br>
1714 /// This will return NULL if not set.<br>
1715 /// This will also return NULL if the specified left focusable view is not on Window.<br>
1717 public View LeftFocusableView
1719 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1722 if (LeftFocusableViewId >= 0)
1724 return ConvertIdToView((uint)LeftFocusableViewId);
1730 LeftFocusableViewId = (int)value.GetId();
1735 /// The right focusable view.<br>
1736 /// This will return NULL if not set.<br>
1737 /// This will also return NULL if the specified right focusable view is not on Window.<br>
1739 public View RightFocusableView
1741 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1744 if (RightFocusableViewId >= 0)
1746 return ConvertIdToView((uint)RightFocusableViewId);
1752 RightFocusableViewId = (int)value.GetId();
1757 /// The up focusable view.<br>
1758 /// This will return NULL if not set.<br>
1759 /// This will also return NULL if the specified up focusable view is not on Window.<br>
1761 public View UpFocusableView
1763 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1766 if (UpFocusableViewId >= 0)
1768 return ConvertIdToView((uint)UpFocusableViewId);
1774 UpFocusableViewId = (int)value.GetId();
1779 /// The down focusable view.<br>
1780 /// This will return NULL if not set.<br>
1781 /// This will also return NULL if the specified down focusable view is not on Window.<br>
1783 public View DownFocusableView
1785 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1788 if (DownFocusableViewId >= 0)
1790 return ConvertIdToView((uint)DownFocusableViewId);
1796 DownFocusableViewId = (int)value.GetId();
1801 /// whether the view should be focusable by keyboard navigation.
1803 public bool Focusable
1807 SetKeyboardFocusable(value);
1811 return IsKeyboardFocusable();
1816 /// Enumeration for describing the states of view.
1835 /// Retrieves the position of the View.<br>
1836 /// The coordinates are relative to the View's parent.<br>
1838 public Position CurrentPosition
1842 return GetCurrentPosition();
1847 /// Sets the size of an view for width and height.<br>
1848 /// Geometry can be scaled to fit within this area.<br>
1849 /// This does not interfere with the views scale factor.<br>
1850 /// The views default depth is the minimum of width & height.<br>
1852 public Size2D Size2D
1856 Size temp = new Size(0.0f, 0.0f, 0.0f);
1857 GetProperty(View.Property.SIZE).Get(temp);
1858 Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
1863 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(new Size(value)));
1868 /// Retrieves the size of the View.<br>
1869 /// The coordinates are relative to the View's parent.<br>
1871 public Size2D CurrentSize
1875 return GetCurrentSize();
1880 /// Retrieves the view's parent.<br>
1886 return GetParent() as View;
1890 [Obsolete("Please do not use! this will be deprecated. Please use Visibility instead.")]
1900 /// Retrieves and sets the view's opacity.<br>
1902 public float Opacity
1907 GetProperty(View.Property.OPACITY).Get(out temp);
1912 SetProperty(View.Property.OPACITY, new Tizen.NUI.PropertyValue(value));
1917 /// Sets the position of the View for X and Y.<br>
1918 /// By default, sets the position vector between the parent origin and pivot point(default).<br>
1919 /// If Position inheritance if disabled, sets the world position.<br>
1921 public Position2D Position2D
1925 Position temp = new Position(0.0f, 0.0f, 0.0f);
1926 GetProperty(View.Property.POSITION).Get(temp);
1927 return new Position2D(temp);
1931 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(new Position(value)));
1936 /// Retrieves screen postion of view's.<br>
1938 public Vector2 ScreenPosition
1942 Vector2 temp = new Vector2(0.0f, 0.0f);
1943 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
1949 /// Determines whether the pivot point should be used to determine the position of the view.
1950 /// This is true by default.
1952 /// <remarks>If false, then the top-left of the view is used for the position.
1953 /// Setting this to false will allow scaling or rotation around the anchor-point without affecting the view's position.
1955 public bool PositionUsesPivotPoint
1960 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
1965 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
1969 [Obsolete("Please do not use! this will be deprecated")]
1970 public bool PositionUsesAnchorPoint
1975 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
1980 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
1984 internal bool FocusState
1988 return IsKeyboardFocusable();
1992 SetKeyboardFocusable(value);
1997 /// Queries whether the view is connected to the Stage.<br>
1998 /// When an view is connected, it will be directly or indirectly parented to the root View.<br>
2000 public bool IsOnWindow
2009 /// Gets depth in the hierarchy for the view.
2011 public int HierarchyDepth
2015 return GetHierarchyDepth();
2020 /// Sets the sibling order of the view so depth position can be defined within the same parent.
2023 /// Note The initial value is 0.
2024 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove and LowerBelow will override the sibling order.
2025 /// The values set by this Property will likely change.
2027 public int SiblingOrder
2032 GetProperty(View.Property.SIBLING_ORDER).Get(out temp);
2037 SetProperty(View.Property.SIBLING_ORDER, new Tizen.NUI.PropertyValue(value));
2042 /// Returns the natural size of the view.
2045 /// Deriving classes stipulate the natural size and by default a view has a ZERO natural size.
2047 [Obsolete("Please do not use! this will be deprecated, please use NaturalSize2D instead")]
2048 public Vector3 NaturalSize
2052 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2053 if (NDalicPINVOKE.SWIGPendingException.Pending)
2054 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2060 /// Returns the natural size (Size2D) of the view.
2063 /// Deriving classes stipulate the natural size and by default a view has a ZERO natural size.
2065 public Size2D NaturalSize2D
2069 Vector3 temp = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2070 if (NDalicPINVOKE.SWIGPendingException.Pending)
2071 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2073 return new Size2D((int)temp.Width, (int)temp.Height);
2081 /// This is an asynchronous method.
2092 /// This is an asynchronous method.
2093 /// If an view is hidden, then the view and its children will not be rendered.
2094 /// 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.
2101 internal void Raise()
2103 NDalicPINVOKE.Raise(swigCPtr);
2104 if (NDalicPINVOKE.SWIGPendingException.Pending)
2105 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2108 internal void Lower()
2110 NDalicPINVOKE.Lower(swigCPtr);
2111 if (NDalicPINVOKE.SWIGPendingException.Pending)
2112 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2116 /// Raise view above all other views.
2119 /// Sibling order of views within the parent will be updated automatically.
2120 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2122 public void RaiseToTop()
2124 NDalicPINVOKE.RaiseToTop(swigCPtr);
2125 if (NDalicPINVOKE.SWIGPendingException.Pending)
2126 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2130 /// Lower view to the bottom of all views.
2133 /// Sibling order of views within the parent will be updated automatically.
2134 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2136 public void LowerToBottom()
2138 NDalicPINVOKE.LowerToBottom(swigCPtr);
2139 if (NDalicPINVOKE.SWIGPendingException.Pending)
2140 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2144 /// Query if all resources required by a View are loaded and ready.
2146 /// <remarks>Most resources are only loaded when the control is placed on stage
2148 public bool IsResourceReady()
2150 bool ret = NDalicPINVOKE.IsResourceReady(swigCPtr);
2151 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2156 /// Raise the view to above the target view.
2158 /// <remarks>Sibling order of views within the parent will be updated automatically.
2159 /// Views on the level above the target view will still be shown above this view.
2160 /// Raising this view above views with the same sibling order as each other will raise this view above them.
2161 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2163 /// <param name="target">Will be raised above this view</param>
2164 internal void RaiseAbove(View target)
2166 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
2167 if (NDalicPINVOKE.SWIGPendingException.Pending)
2168 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2172 /// Lower the view to below the target view.
2174 /// <remarks>Sibling order of views within the parent will be updated automatically.
2175 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
2176 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2178 /// <param name="target">Will be lowered below this view</param>
2179 internal void LowerBelow(View target)
2181 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
2182 if (NDalicPINVOKE.SWIGPendingException.Pending)
2183 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2186 internal string GetName()
2188 string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);
2189 if (NDalicPINVOKE.SWIGPendingException.Pending)
2190 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2194 internal void SetName(string name)
2196 NDalicPINVOKE.Actor_SetName(swigCPtr, name);
2197 if (NDalicPINVOKE.SWIGPendingException.Pending)
2198 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2201 internal uint GetId()
2203 uint ret = NDalicPINVOKE.Actor_GetId(swigCPtr);
2204 if (NDalicPINVOKE.SWIGPendingException.Pending)
2205 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2209 internal bool IsRoot()
2211 bool ret = NDalicPINVOKE.Actor_IsRoot(swigCPtr);
2212 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2216 internal bool OnWindow()
2218 bool ret = NDalicPINVOKE.Actor_OnStage(swigCPtr);
2219 if (NDalicPINVOKE.SWIGPendingException.Pending)
2220 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2224 internal Layer GetLayer()
2226 IntPtr cPtr = NDalicPINVOKE.Actor_GetLayer(swigCPtr);
2227 Layer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Layer;
2229 if (NDalicPINVOKE.SWIGPendingException.Pending)
2230 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2235 /// Removes a View from its Parent View / Layer. If the View has no parent, this method does nothing.
2237 /// <pre>The (child) View has been initialized. </pre>
2238 public void Unparent()
2240 NDalicPINVOKE.Actor_Unparent(swigCPtr);
2241 if (NDalicPINVOKE.SWIGPendingException.Pending)
2242 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2246 /// Search through this view's hierarchy for an view with the given name.
2247 /// The view itself is also considered in the search.
2249 /// <pre>The View has been initialized.</pre>
2250 /// <param name="viewName">The name of the view to find</param>
2251 /// <returns>A handle to the view if found, or an empty handle if not</returns>
2252 public View FindChildByName(string viewName)
2254 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
2256 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2258 if (NDalicPINVOKE.SWIGPendingException.Pending)
2259 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2263 internal View FindChildById(uint id)
2265 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
2267 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2269 if (NDalicPINVOKE.SWIGPendingException.Pending)
2270 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2274 /*internal View GetParent()
2277 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
2279 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(cPtr);
2281 if(basehandle is Layer)
2283 ret = new View(cPtr,false);
2287 ret = basehandle as View;
2290 if (NDalicPINVOKE.SWIGPendingException.Pending)
2291 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2295 internal void SetParentOrigin(Vector3 origin)
2297 NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
2298 if (NDalicPINVOKE.SWIGPendingException.Pending)
2299 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2302 internal Vector3 GetCurrentParentOrigin()
2304 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentParentOrigin(swigCPtr), true);
2305 if (NDalicPINVOKE.SWIGPendingException.Pending)
2306 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2310 internal void SetAnchorPoint(Vector3 anchorPoint)
2312 NDalicPINVOKE.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
2313 if (NDalicPINVOKE.SWIGPendingException.Pending)
2314 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2317 internal Vector3 GetCurrentAnchorPoint()
2319 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentAnchorPoint(swigCPtr), true);
2320 if (NDalicPINVOKE.SWIGPendingException.Pending)
2321 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2325 internal void SetSize(float width, float height)
2327 NDalicPINVOKE.Actor_SetSize__SWIG_0(swigCPtr, width, height);
2328 if (NDalicPINVOKE.SWIGPendingException.Pending)
2329 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2332 internal void SetSize(float width, float height, float depth)
2334 NDalicPINVOKE.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
2335 if (NDalicPINVOKE.SWIGPendingException.Pending)
2336 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2339 internal void SetSize(Vector2 size)
2341 NDalicPINVOKE.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
2342 if (NDalicPINVOKE.SWIGPendingException.Pending)
2343 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2346 internal void SetSize(Vector3 size)
2348 NDalicPINVOKE.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
2349 if (NDalicPINVOKE.SWIGPendingException.Pending)
2350 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2353 internal Vector3 GetTargetSize()
2355 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetTargetSize(swigCPtr), true);
2356 if (NDalicPINVOKE.SWIGPendingException.Pending)
2357 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2361 internal Size2D GetCurrentSize()
2363 Size ret = new Size(NDalicPINVOKE.Actor_GetCurrentSize(swigCPtr), true);
2364 if (NDalicPINVOKE.SWIGPendingException.Pending)
2365 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2366 Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
2370 internal Vector3 GetNaturalSize()
2372 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2373 if (NDalicPINVOKE.SWIGPendingException.Pending)
2374 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2378 internal void SetPosition(float x, float y)
2380 NDalicPINVOKE.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
2381 if (NDalicPINVOKE.SWIGPendingException.Pending)
2382 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2385 internal void SetPosition(float x, float y, float z)
2387 NDalicPINVOKE.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
2388 if (NDalicPINVOKE.SWIGPendingException.Pending)
2389 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2392 internal void SetPosition(Vector3 position)
2394 NDalicPINVOKE.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
2395 if (NDalicPINVOKE.SWIGPendingException.Pending)
2396 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2399 internal void SetX(float x)
2401 NDalicPINVOKE.Actor_SetX(swigCPtr, x);
2402 if (NDalicPINVOKE.SWIGPendingException.Pending)
2403 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2406 internal void SetY(float y)
2408 NDalicPINVOKE.Actor_SetY(swigCPtr, y);
2409 if (NDalicPINVOKE.SWIGPendingException.Pending)
2410 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2413 internal void SetZ(float z)
2415 NDalicPINVOKE.Actor_SetZ(swigCPtr, z);
2416 if (NDalicPINVOKE.SWIGPendingException.Pending)
2417 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2420 internal void TranslateBy(Vector3 distance)
2422 NDalicPINVOKE.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
2423 if (NDalicPINVOKE.SWIGPendingException.Pending)
2424 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2427 internal Position GetCurrentPosition()
2429 Position ret = new Position(NDalicPINVOKE.Actor_GetCurrentPosition(swigCPtr), true);
2430 if (NDalicPINVOKE.SWIGPendingException.Pending)
2431 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2435 internal Vector3 GetCurrentWorldPosition()
2437 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldPosition(swigCPtr), true);
2438 if (NDalicPINVOKE.SWIGPendingException.Pending)
2439 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2443 internal void SetInheritPosition(bool inherit)
2445 NDalicPINVOKE.Actor_SetInheritPosition(swigCPtr, inherit);
2446 if (NDalicPINVOKE.SWIGPendingException.Pending)
2447 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2450 internal bool IsPositionInherited()
2452 bool ret = NDalicPINVOKE.Actor_IsPositionInherited(swigCPtr);
2453 if (NDalicPINVOKE.SWIGPendingException.Pending)
2454 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2458 internal void SetOrientation(Degree angle, Vector3 axis)
2460 NDalicPINVOKE.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2461 if (NDalicPINVOKE.SWIGPendingException.Pending)
2462 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2465 internal void SetOrientation(Radian angle, Vector3 axis)
2467 NDalicPINVOKE.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2468 if (NDalicPINVOKE.SWIGPendingException.Pending)
2469 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2472 internal void SetOrientation(Rotation orientation)
2474 NDalicPINVOKE.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
2475 if (NDalicPINVOKE.SWIGPendingException.Pending)
2476 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2479 internal void RotateBy(Degree angle, Vector3 axis)
2481 NDalicPINVOKE.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2482 if (NDalicPINVOKE.SWIGPendingException.Pending)
2483 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2486 internal void RotateBy(Radian angle, Vector3 axis)
2488 NDalicPINVOKE.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2489 if (NDalicPINVOKE.SWIGPendingException.Pending)
2490 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2493 internal void RotateBy(Rotation relativeRotation)
2495 NDalicPINVOKE.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
2496 if (NDalicPINVOKE.SWIGPendingException.Pending)
2497 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2500 internal Rotation GetCurrentOrientation()
2502 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentOrientation(swigCPtr), true);
2503 if (NDalicPINVOKE.SWIGPendingException.Pending)
2504 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2508 internal void SetInheritOrientation(bool inherit)
2510 NDalicPINVOKE.Actor_SetInheritOrientation(swigCPtr, inherit);
2511 if (NDalicPINVOKE.SWIGPendingException.Pending)
2512 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2515 internal bool IsOrientationInherited()
2517 bool ret = NDalicPINVOKE.Actor_IsOrientationInherited(swigCPtr);
2518 if (NDalicPINVOKE.SWIGPendingException.Pending)
2519 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2523 internal Rotation GetCurrentWorldOrientation()
2525 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentWorldOrientation(swigCPtr), true);
2526 if (NDalicPINVOKE.SWIGPendingException.Pending)
2527 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2531 internal void SetScale(float scale)
2533 NDalicPINVOKE.Actor_SetScale__SWIG_0(swigCPtr, scale);
2534 if (NDalicPINVOKE.SWIGPendingException.Pending)
2535 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2538 internal void SetScale(float scaleX, float scaleY, float scaleZ)
2540 NDalicPINVOKE.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
2541 if (NDalicPINVOKE.SWIGPendingException.Pending)
2542 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2545 internal void SetScale(Vector3 scale)
2547 NDalicPINVOKE.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
2548 if (NDalicPINVOKE.SWIGPendingException.Pending)
2549 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2552 internal void ScaleBy(Vector3 relativeScale)
2554 NDalicPINVOKE.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
2555 if (NDalicPINVOKE.SWIGPendingException.Pending)
2556 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2559 internal Vector3 GetCurrentScale()
2561 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentScale(swigCPtr), true);
2562 if (NDalicPINVOKE.SWIGPendingException.Pending)
2563 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2567 internal Vector3 GetCurrentWorldScale()
2569 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldScale(swigCPtr), true);
2570 if (NDalicPINVOKE.SWIGPendingException.Pending)
2571 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2575 internal void SetInheritScale(bool inherit)
2577 NDalicPINVOKE.Actor_SetInheritScale(swigCPtr, inherit);
2578 if (NDalicPINVOKE.SWIGPendingException.Pending)
2579 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2582 internal bool IsScaleInherited()
2584 bool ret = NDalicPINVOKE.Actor_IsScaleInherited(swigCPtr);
2585 if (NDalicPINVOKE.SWIGPendingException.Pending)
2586 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2590 internal Matrix GetCurrentWorldMatrix()
2592 Matrix ret = new Matrix(NDalicPINVOKE.Actor_GetCurrentWorldMatrix(swigCPtr), true);
2593 if (NDalicPINVOKE.SWIGPendingException.Pending)
2594 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2598 internal void SetVisible(bool visible)
2600 NDalicPINVOKE.Actor_SetVisible(swigCPtr, visible);
2601 if (NDalicPINVOKE.SWIGPendingException.Pending)
2602 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2605 internal bool IsVisible()
2607 bool ret = NDalicPINVOKE.Actor_IsVisible(swigCPtr);
2608 if (NDalicPINVOKE.SWIGPendingException.Pending)
2609 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2613 internal void SetOpacity(float opacity)
2615 NDalicPINVOKE.Actor_SetOpacity(swigCPtr, opacity);
2616 if (NDalicPINVOKE.SWIGPendingException.Pending)
2617 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2620 internal float GetCurrentOpacity()
2622 float ret = NDalicPINVOKE.Actor_GetCurrentOpacity(swigCPtr);
2623 if (NDalicPINVOKE.SWIGPendingException.Pending)
2624 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2628 internal void SetColor(Vector4 color)
2630 NDalicPINVOKE.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
2631 if (NDalicPINVOKE.SWIGPendingException.Pending)
2632 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2635 internal Vector4 GetCurrentColor()
2637 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentColor(swigCPtr), true);
2638 if (NDalicPINVOKE.SWIGPendingException.Pending)
2639 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2643 internal void SetColorMode(ColorMode colorMode)
2645 NDalicPINVOKE.Actor_SetColorMode(swigCPtr, (int)colorMode);
2646 if (NDalicPINVOKE.SWIGPendingException.Pending)
2647 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2650 internal ColorMode GetColorMode()
2652 ColorMode ret = (ColorMode)NDalicPINVOKE.Actor_GetColorMode(swigCPtr);
2653 if (NDalicPINVOKE.SWIGPendingException.Pending)
2654 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2658 internal Vector4 GetCurrentWorldColor()
2660 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentWorldColor(swigCPtr), true);
2661 if (NDalicPINVOKE.SWIGPendingException.Pending)
2662 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2666 internal void SetDrawMode(DrawModeType drawMode)
2668 NDalicPINVOKE.Actor_SetDrawMode(swigCPtr, (int)drawMode);
2669 if (NDalicPINVOKE.SWIGPendingException.Pending)
2670 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2673 internal DrawModeType GetDrawMode()
2675 DrawModeType ret = (DrawModeType)NDalicPINVOKE.Actor_GetDrawMode(swigCPtr);
2676 if (NDalicPINVOKE.SWIGPendingException.Pending)
2677 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2682 /// Converts screen coordinates into the view's coordinate system using the default camera.
2684 /// <pre>The View has been initialized.</pre>
2685 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5)</remarks>
2686 /// <param name="localX">On return, the X-coordinate relative to the view</param>
2687 /// <param name="localY">On return, the Y-coordinate relative to the view</param>
2688 /// <param name="screenX">The screen X-coordinate</param>
2689 /// <param name="screenY">The screen Y-coordinate</param>
2690 /// <returns>True if the conversion succeeded</returns>
2691 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
2693 bool ret = NDalicPINVOKE.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
2694 if (NDalicPINVOKE.SWIGPendingException.Pending)
2695 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2699 internal void SetKeyboardFocusable(bool focusable)
2701 NDalicPINVOKE.Actor_SetKeyboardFocusable(swigCPtr, focusable);
2702 if (NDalicPINVOKE.SWIGPendingException.Pending)
2703 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2706 internal bool IsKeyboardFocusable()
2708 bool ret = NDalicPINVOKE.Actor_IsKeyboardFocusable(swigCPtr);
2709 if (NDalicPINVOKE.SWIGPendingException.Pending)
2710 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2714 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
2716 NDalicPINVOKE.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
2717 if (NDalicPINVOKE.SWIGPendingException.Pending)
2718 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2721 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
2723 ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.Actor_GetResizePolicy(swigCPtr, (int)dimension);
2724 if (NDalicPINVOKE.SWIGPendingException.Pending)
2725 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2730 /// Sets the relative to parent size factor of the view.<br>
2731 /// This factor is only used when ResizePolicy is set to either:
2732 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br>
2733 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br>
2735 /// <pre>The View has been initialized.</pre>
2736 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis</param>
2737 public void SetSizeModeFactor(Vector3 factor)
2739 NDalicPINVOKE.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
2740 if (NDalicPINVOKE.SWIGPendingException.Pending)
2741 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2744 internal Vector3 GetSizeModeFactor()
2746 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetSizeModeFactor(swigCPtr), true);
2747 if (NDalicPINVOKE.SWIGPendingException.Pending)
2748 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2753 /// Calculates the height of the view given a width.<br>
2754 /// The natural size is used for default calculation. <br>
2755 /// size 0 is treated as aspect ratio 1:1.<br>
2757 /// <param name="width">Width to use</param>
2758 /// <returns>The height based on the width</returns>
2759 public float GetHeightForWidth(float width)
2761 float ret = NDalicPINVOKE.Actor_GetHeightForWidth(swigCPtr, width);
2762 if (NDalicPINVOKE.SWIGPendingException.Pending)
2763 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2768 /// Calculates the width of the view given a height.<br>
2769 /// The natural size is used for default calculation.<br>
2770 /// size 0 is treated as aspect ratio 1:1.<br>
2772 /// <param name="height">Height to use</param>
2773 /// <returns>The width based on the height</returns>
2774 public float GetWidthForHeight(float height)
2776 float ret = NDalicPINVOKE.Actor_GetWidthForHeight(swigCPtr, height);
2777 if (NDalicPINVOKE.SWIGPendingException.Pending)
2778 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2782 public float GetRelayoutSize(DimensionType dimension)
2784 float ret = NDalicPINVOKE.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
2785 if (NDalicPINVOKE.SWIGPendingException.Pending)
2786 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2790 public void SetPadding(PaddingType padding)
2792 NDalicPINVOKE.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
2793 if (NDalicPINVOKE.SWIGPendingException.Pending)
2794 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2797 public void GetPadding(PaddingType paddingOut)
2799 NDalicPINVOKE.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
2800 if (NDalicPINVOKE.SWIGPendingException.Pending)
2801 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2804 internal void SetMinimumSize(Vector2 size)
2806 NDalicPINVOKE.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
2807 if (NDalicPINVOKE.SWIGPendingException.Pending)
2808 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2811 internal Vector2 GetMinimumSize()
2813 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMinimumSize(swigCPtr), true);
2814 if (NDalicPINVOKE.SWIGPendingException.Pending)
2815 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2819 internal void SetMaximumSize(Vector2 size)
2821 NDalicPINVOKE.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
2822 if (NDalicPINVOKE.SWIGPendingException.Pending)
2823 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2826 internal Vector2 GetMaximumSize()
2828 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMaximumSize(swigCPtr), true);
2829 if (NDalicPINVOKE.SWIGPendingException.Pending)
2830 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2834 internal int GetHierarchyDepth()
2836 int ret = NDalicPINVOKE.Actor_GetHierarchyDepth(swigCPtr);
2837 if (NDalicPINVOKE.SWIGPendingException.Pending)
2838 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2842 public uint AddRenderer(Renderer renderer)
2844 uint ret = NDalicPINVOKE.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
2845 if (NDalicPINVOKE.SWIGPendingException.Pending)
2846 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2850 internal uint GetRendererCount()
2852 uint ret = NDalicPINVOKE.Actor_GetRendererCount(swigCPtr);
2853 if (NDalicPINVOKE.SWIGPendingException.Pending)
2854 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2858 public Renderer GetRendererAt(uint index)
2860 IntPtr cPtr = NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index);
2861 Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Renderer;
2863 if (NDalicPINVOKE.SWIGPendingException.Pending)
2864 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2868 public void RemoveRenderer(Renderer renderer)
2870 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
2871 if (NDalicPINVOKE.SWIGPendingException.Pending)
2872 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2875 public void RemoveRenderer(uint index)
2877 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
2878 if (NDalicPINVOKE.SWIGPendingException.Pending)
2879 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2882 internal TouchDataSignal TouchSignal()
2884 TouchDataSignal ret = new TouchDataSignal(NDalicPINVOKE.Actor_TouchSignal(swigCPtr), false);
2885 if (NDalicPINVOKE.SWIGPendingException.Pending)
2886 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2890 internal HoverSignal HoveredSignal()
2892 HoverSignal ret = new HoverSignal(NDalicPINVOKE.Actor_HoveredSignal(swigCPtr), false);
2893 if (NDalicPINVOKE.SWIGPendingException.Pending)
2894 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2898 internal WheelSignal WheelEventSignal()
2900 WheelSignal ret = new WheelSignal(NDalicPINVOKE.Actor_WheelEventSignal(swigCPtr), false);
2901 if (NDalicPINVOKE.SWIGPendingException.Pending)
2902 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2906 internal ViewSignal OnWindowSignal()
2908 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnStageSignal(swigCPtr), false);
2909 if (NDalicPINVOKE.SWIGPendingException.Pending)
2910 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2914 internal ViewSignal OffWindowSignal()
2916 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OffStageSignal(swigCPtr), false);
2917 if (NDalicPINVOKE.SWIGPendingException.Pending)
2918 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2922 internal ViewSignal OnRelayoutSignal()
2924 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnRelayoutSignal(swigCPtr), false);
2925 if (NDalicPINVOKE.SWIGPendingException.Pending)
2926 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2930 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view) {
2931 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
2932 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2936 internal ViewSignal ResourcesLoadedSignal()
2938 ViewSignal ret = new ViewSignal(NDalicPINVOKE.ResourceReadySignal(swigCPtr), false);
2939 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2944 /// Gets/Sets the origin of an view, within its parent's area.<br>
2945 /// 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>
2946 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br>
2947 /// An view's position is the distance between this origin, and the view's anchor-point.<br>
2949 /// <pre>The View has been initialized.</pre>
2950 public Position ParentOrigin
2954 Position temp = new Position(0.0f, 0.0f, 0.0f);
2955 GetProperty(View.Property.PARENT_ORIGIN).Get(temp);
2960 SetProperty(View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue(value));
2964 internal float ParentOriginX
2969 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
2974 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
2978 internal float ParentOriginY
2983 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
2988 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
2992 internal float ParentOriginZ
2997 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
3002 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
3007 /// Gets/Sets the anchor-point of an view.<br>
3008 /// 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>
3009 /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br>
3010 /// An view position is the distance between its parent-origin and this anchor-point.<br>
3011 /// An view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br>
3012 /// <pre>The View has been initialized.</pre>
3014 public Position PivotPoint
3018 Position temp = new Position(0.0f, 0.0f, 0.0f);
3019 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
3024 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3028 internal float PivotPointX
3033 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
3038 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
3042 internal float PivotPointY
3047 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
3052 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
3056 internal float PivotPointZ
3061 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
3066 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
3071 /// Gets/Sets the size width of an view.
3073 public float SizeWidth
3078 GetProperty(View.Property.SIZE_WIDTH).Get(out temp);
3083 SetProperty(View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue(value));
3088 /// Gets/Sets the size height of an view.
3090 public float SizeHeight
3095 GetProperty(View.Property.SIZE_HEIGHT).Get(out temp);
3100 SetProperty(View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue(value));
3105 /// Gets/Sets the position of the View.<br>
3106 /// By default, sets the position vector between the parent origin and pivot point(default).<br>
3107 /// If Position inheritance if disabled, sets the world position.<br>
3109 public Position Position
3113 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3114 GetProperty(View.Property.POSITION).Get(temp);
3119 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(value));
3124 /// Gets/Sets the position x of the View.
3126 public float PositionX
3131 GetProperty(View.Property.POSITION_X).Get(out temp);
3136 SetProperty(View.Property.POSITION_X, new Tizen.NUI.PropertyValue(value));
3141 /// Gets/Sets the position y of the View.
3143 public float PositionY
3148 GetProperty(View.Property.POSITION_Y).Get(out temp);
3153 SetProperty(View.Property.POSITION_Y, new Tizen.NUI.PropertyValue(value));
3158 /// Gets/Sets the position z of the View.
3160 public float PositionZ
3165 GetProperty(View.Property.POSITION_Z).Get(out temp);
3170 SetProperty(View.Property.POSITION_Z, new Tizen.NUI.PropertyValue(value));
3175 /// Gets/Sets the world position of the View.
3177 public Vector3 WorldPosition
3181 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3182 GetProperty(View.Property.WORLD_POSITION).Get(temp);
3187 internal float WorldPositionX
3192 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
3197 internal float WorldPositionY
3202 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
3207 internal float WorldPositionZ
3212 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
3218 /// Gets/Sets the orientation of the View.<br>
3219 /// An view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br>
3221 /// <remarks>This is an asynchronous method.</remarks>
3222 public Rotation Orientation
3226 Rotation temp = new Rotation();
3227 GetProperty(View.Property.ORIENTATION).Get(temp);
3232 SetProperty(View.Property.ORIENTATION, new Tizen.NUI.PropertyValue(value));
3237 /// Gets/Sets the world orientation of the View.<br>
3239 public Rotation WorldOrientation
3243 Rotation temp = new Rotation();
3244 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
3250 /// Gets/Sets the scale factor applied to an view.<br>
3252 public Vector3 Scale
3256 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3257 GetProperty(View.Property.SCALE).Get(temp);
3262 SetProperty(View.Property.SCALE, new Tizen.NUI.PropertyValue(value));
3267 /// Gets/Sets the scale x factor applied to an view.
3274 GetProperty(View.Property.SCALE_X).Get(out temp);
3279 SetProperty(View.Property.SCALE_X, new Tizen.NUI.PropertyValue(value));
3284 /// Gets/Sets the scale y factor applied to an view.
3291 GetProperty(View.Property.SCALE_Y).Get(out temp);
3296 SetProperty(View.Property.SCALE_Y, new Tizen.NUI.PropertyValue(value));
3301 /// Gets/Sets the scale z factor applied to an view.
3308 GetProperty(View.Property.SCALE_Z).Get(out temp);
3313 SetProperty(View.Property.SCALE_Z, new Tizen.NUI.PropertyValue(value));
3318 /// Gets the world scale of View.
3320 public Vector3 WorldScale
3324 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3325 GetProperty(View.Property.WORLD_SCALE).Get(temp);
3331 /// Retrieves the visibility flag of an view.
3334 /// If an view is not visible, then the view and its children will not be rendered.
3335 /// 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.
3337 public bool Visibility
3342 GetProperty(View.Property.VISIBLE).Get(out temp);
3348 /// Gets the view's world color.
3350 public Vector4 WorldColor
3354 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3355 GetProperty(View.Property.WORLD_COLOR).Get(temp);
3360 internal Matrix WorldMatrix
3364 Matrix temp = new Matrix();
3365 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
3371 /// Gets/Sets the View's name.
3378 GetProperty(View.Property.NAME).Get(out temp);
3383 SetProperty(View.Property.NAME, new Tizen.NUI.PropertyValue(value));
3388 /// Gets the View's ID.
3400 /// Gets/Sets the status of whether an view should emit touch or hover signals.
3402 public bool Sensitive
3407 GetProperty(View.Property.SENSITIVE).Get(out temp);
3412 SetProperty(View.Property.SENSITIVE, new Tizen.NUI.PropertyValue(value));
3417 /// Gets/Sets the status of whether the view should receive a notification when touch or hover motion events leave the boundary of the view.
3419 public bool LeaveRequired
3424 GetProperty(View.Property.LEAVE_REQUIRED).Get(out temp);
3429 SetProperty(View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue(value));
3434 /// Gets/Sets the status of whether a child view inherits it's parent's orientation.
3436 public bool InheritOrientation
3441 GetProperty(View.Property.INHERIT_ORIENTATION).Get(out temp);
3446 SetProperty(View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue(value));
3451 /// Gets/Sets the status of whether a child view inherits it's parent's scale.
3453 public bool InheritScale
3458 GetProperty(View.Property.INHERIT_SCALE).Get(out temp);
3463 SetProperty(View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue(value));
3468 /// Gets/Sets the status of how the view and its children should be drawn.<br>
3469 /// Not all views are renderable, but DrawMode can be inherited from any view.<br>
3470 /// 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>
3471 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br>
3472 /// Overlay views are drawn in a separate pass, after all non-overlay views within the Layer.<br>
3473 /// For overlay views, the drawing order is with respect to tree levels of Views, and depth-testing will not be used.<br>
3475 public DrawModeType DrawMode
3480 if (GetProperty(View.Property.DRAW_MODE).Get(out temp) == false)
3482 NUILog.Error("DrawMode get error!");
3487 return DrawModeType.Normal;
3489 return DrawModeType.Overlay2D;
3491 return DrawModeType.Stencil;
3493 return DrawModeType.Normal;
3498 SetProperty(View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)value));
3503 /// Gets/Sets the relative to parent size factor of the view.<br>
3504 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br>
3505 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br>
3507 public Vector3 SizeModeFactor
3511 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3512 GetProperty(View.Property.SIZE_MODE_FACTOR).Get(temp);
3517 SetProperty(View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue(value));
3522 /// Gets/Sets the width resize policy to be used.
3524 public ResizePolicyType WidthResizePolicy
3529 if (GetProperty(View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
3531 NUILog.Error("WidthResizePolicy get error!");
3536 return ResizePolicyType.Fixed;
3537 case "USE_NATURAL_SIZE":
3538 return ResizePolicyType.UseNaturalSize;
3539 case "FILL_TO_PARENT":
3540 return ResizePolicyType.FillToParent;
3541 case "SIZE_RELATIVE_TO_PARENT":
3542 return ResizePolicyType.SizeRelativeToParent;
3543 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3544 return ResizePolicyType.SizeFixedOffsetFromParent;
3545 case "FIT_TO_CHILDREN":
3546 return ResizePolicyType.FitToChildren;
3547 case "DIMENSION_DEPENDENCY":
3548 return ResizePolicyType.DimensionDependency;
3549 case "USE_ASSIGNED_SIZE":
3550 return ResizePolicyType.UseAssignedSize;
3552 return ResizePolicyType.Fixed;
3557 SetProperty(View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3562 /// Gets/Sets the height resize policy to be used.
3564 public ResizePolicyType HeightResizePolicy
3569 if (GetProperty(View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
3571 NUILog.Error("HeightResizePolicy get error!");
3576 return ResizePolicyType.Fixed;
3577 case "USE_NATURAL_SIZE":
3578 return ResizePolicyType.UseNaturalSize;
3579 case "FILL_TO_PARENT":
3580 return ResizePolicyType.FillToParent;
3581 case "SIZE_RELATIVE_TO_PARENT":
3582 return ResizePolicyType.SizeRelativeToParent;
3583 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3584 return ResizePolicyType.SizeFixedOffsetFromParent;
3585 case "FIT_TO_CHILDREN":
3586 return ResizePolicyType.FitToChildren;
3587 case "DIMENSION_DEPENDENCY":
3588 return ResizePolicyType.DimensionDependency;
3589 case "USE_ASSIGNED_SIZE":
3590 return ResizePolicyType.UseAssignedSize;
3592 return ResizePolicyType.Fixed;
3597 SetProperty(View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3602 /// Gets/Sets the policy to use when setting size with size negotiation.<br>
3603 /// Defaults to SizeScalePolicyType.UseSizeSet.<br>
3605 public SizeScalePolicyType SizeScalePolicy
3610 if (GetProperty(View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
3612 NUILog.Error("SizeScalePolicy get error!");
3616 case "USE_SIZE_SET":
3617 return SizeScalePolicyType.UseSizeSet;
3618 case "FIT_WITH_ASPECT_RATIO":
3619 return SizeScalePolicyType.FitWithAspectRatio;
3620 case "FILL_WITH_ASPECT_RATIO":
3621 return SizeScalePolicyType.FillWithAspectRatio;
3623 return SizeScalePolicyType.UseSizeSet;
3628 string valueToString = "";
3631 case SizeScalePolicyType.UseSizeSet:
3633 valueToString = "USE_SIZE_SET";
3636 case SizeScalePolicyType.FitWithAspectRatio:
3638 valueToString = "FIT_WITH_ASPECT_RATIO";
3641 case SizeScalePolicyType.FillWithAspectRatio:
3643 valueToString = "FILL_WITH_ASPECT_RATIO";
3648 valueToString = "USE_SIZE_SET";
3652 SetProperty(View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
3657 /// Gets/Sets the status of whether the width size is dependent on height size.
3659 public bool WidthForHeight
3664 GetProperty(View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
3669 SetProperty(View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue(value));
3674 /// Gets/Sets the status of whether the height size is dependent on width size.
3676 public bool HeightForWidth
3681 GetProperty(View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
3686 SetProperty(View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue(value));
3691 /// Gets/Sets the padding for use in layout.
3693 public Vector4 Padding
3697 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3698 GetProperty(View.Property.PADDING).Get(temp);
3703 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
3708 /// Gets/Sets the minimum size an view can be assigned in size negotiation.
3710 public Size2D MinimumSize
3714 Size2D temp = new Size2D(0, 0);
3715 GetProperty(View.Property.MINIMUM_SIZE).Get(temp);
3720 SetProperty(View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3725 /// Gets/Sets the maximum size an view can be assigned in size negotiation.
3727 public Size2D MaximumSize
3731 Size2D temp = new Size2D(0, 0);
3732 GetProperty(View.Property.MAXIMUM_SIZE).Get(temp);
3737 SetProperty(View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3742 /// Gets/Sets whether a child view inherits it's parent's position.<br>
3743 /// Default is to inherit.<br>
3744 /// 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>
3746 public bool InheritPosition
3751 GetProperty(View.Property.INHERIT_POSITION).Get(out temp);
3756 SetProperty(View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue(value));
3761 /// Gets/Sets clipping behavior(mode) of it's children.
3763 public ClippingModeType ClippingMode
3768 if (GetProperty(View.Property.CLIPPING_MODE).Get(out temp) == false)
3770 NUILog.Error("ClippingMode get error!");
3775 return ClippingModeType.Disabled;
3776 case "CLIP_CHILDREN":
3777 return ClippingModeType.ClipChildren;
3779 return ClippingModeType.Disabled;
3784 SetProperty(View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)value));
3789 /// Get the number of renderers held by the view.
3791 public uint RendererCount
3795 return GetRendererCount();
3802 [Obsolete("Please do not use! this will be deprecated")]
3803 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> Touched
3807 if (_touchDataEventHandler == null)
3809 _touchDataCallback = OnTouch;
3810 this.TouchSignal().Connect(_touchDataCallback);
3813 _touchDataEventHandler += value;
3818 _touchDataEventHandler -= value;
3820 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
3822 this.TouchSignal().Disconnect(_touchDataCallback);
3828 [Obsolete("Please do not use! this will be deprecated")]
3829 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> Hovered
3833 if (_hoverEventHandler == null)
3835 _hoverEventCallback = OnHoverEvent;
3836 this.HoveredSignal().Connect(_hoverEventCallback);
3839 _hoverEventHandler += value;
3844 _hoverEventHandler -= value;
3846 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
3848 this.HoveredSignal().Disconnect(_hoverEventCallback);
3854 [Obsolete("Please do not use! this will be deprecated")]
3855 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelMoved
3859 if (_wheelEventHandler == null)
3861 _wheelEventCallback = OnWheelEvent;
3862 this.WheelEventSignal().Connect(_wheelEventCallback);
3865 _wheelEventHandler += value;
3870 _wheelEventHandler -= value;
3872 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
3874 this.WheelEventSignal().Disconnect(_wheelEventCallback);
3880 [Obsolete("Please do not use! this will be deprecated")]
3881 public Position AnchorPoint
3885 Position temp = new Position(0.0f, 0.0f, 0.0f);
3886 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
3891 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3895 [Obsolete("Please do not use! this will be deprecated, please use Size2D instead")]
3900 Size temp = new Size(0.0f, 0.0f, 0.0f);
3901 GetProperty(View.Property.SIZE).Get(temp);
3906 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(value));
3910 [Obsolete("Please do not use! this will be deprecated")]
3911 public event EventHandler OnWindowEvent
3915 if (_onWindowEventHandler == null)
3917 _onWindowEventCallback = OnWindow;
3918 this.OnWindowSignal().Connect(_onWindowEventCallback);
3921 _onWindowEventHandler += value;
3926 _onWindowEventHandler -= value;
3928 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
3930 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
3935 [Obsolete("Please do not use! this will be deprecated")]
3936 public event EventHandler OffWindowEvent
3940 if (_offWindowEventHandler == null)
3942 _offWindowEventCallback = OffWindow;
3943 this.OffWindowSignal().Connect(_offWindowEventCallback);
3946 _offWindowEventHandler += value;
3951 _offWindowEventHandler -= value;
3953 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
3955 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
3960 [Obsolete("Please do not use! this will be deprecated")]
3961 public event EventHandler OnRelayoutEvent
3965 if (_onRelayoutEventHandler == null)
3967 _onRelayoutEventCallback = OnRelayout;
3968 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
3971 _onRelayoutEventHandler += value;
3976 _onRelayoutEventHandler -= value;
3978 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
3980 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);