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 if (_onRelayoutEventCallback != null)
145 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
148 if (_offWindowEventCallback != null)
150 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
153 if (_onWindowEventCallback != null)
155 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
158 if (_wheelEventCallback != null)
160 this.WheelEventSignal().Disconnect(_wheelEventCallback);
163 if (_hoverEventCallback != null)
165 this.HoveredSignal().Disconnect(_hoverEventCallback);
168 if (_touchDataCallback != null)
170 this.TouchSignal().Disconnect(_touchDataCallback);
173 if (_ResourcesLoadedCallback != null)
175 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
178 if (_offWindowEventCallback != null)
180 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
183 if (_onWindowEventCallback != null)
185 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
188 if (_wheelEventCallback != null)
190 this.WheelEventSignal().Disconnect(_wheelEventCallback);
193 if (_hoverEventCallback != null)
195 this.HoveredSignal().Disconnect(_hoverEventCallback);
198 if (_touchDataCallback != null)
200 this.TouchSignal().Disconnect(_touchDataCallback);
203 if (_onRelayoutEventCallback != null)
205 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
208 if (_keyCallback != null)
210 this.KeyEventSignal().Disconnect(_keyCallback);
213 if (_keyInputFocusLostCallback != null)
215 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
218 if (_keyInputFocusGainedCallback != null)
220 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
223 if (swigCPtr.Handle != global::System.IntPtr.Zero)
228 NDalicPINVOKE.delete_View(swigCPtr);
230 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
236 private EventHandler _keyInputFocusGainedEventHandler;
237 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
238 private delegate void KeyInputFocusGainedCallbackType(IntPtr control);
239 private KeyInputFocusGainedCallbackType _keyInputFocusGainedCallback;
242 /// Event for KeyInputFocusGained signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
243 /// KeyInputFocusGained signal is emitted when the control gets Key Input Focus.<br>
245 public event EventHandler FocusGained
249 if (_keyInputFocusGainedEventHandler == null)
251 _keyInputFocusGainedCallback = OnKeyInputFocusGained;
252 this.KeyInputFocusGainedSignal().Connect(_keyInputFocusGainedCallback);
255 _keyInputFocusGainedEventHandler += value;
260 _keyInputFocusGainedEventHandler -= value;
262 if (_keyInputFocusGainedEventHandler == null && KeyInputFocusGainedSignal().Empty() == false)
264 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
269 private void OnKeyInputFocusGained(IntPtr view)
271 if (_keyInputFocusGainedEventHandler != null)
273 _keyInputFocusGainedEventHandler(this, null);
278 private EventHandler _keyInputFocusLostEventHandler;
279 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
280 private delegate void KeyInputFocusLostCallbackType(IntPtr control);
281 private KeyInputFocusLostCallbackType _keyInputFocusLostCallback;
284 /// Event for KeyInputFocusLost signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
285 /// KeyInputFocusLost signal is emitted when the control loses Key Input Focus.<br>
287 public event EventHandler FocusLost
291 if (_keyInputFocusLostEventHandler == null)
293 _keyInputFocusLostCallback = OnKeyInputFocusLost;
294 this.KeyInputFocusLostSignal().Connect(_keyInputFocusLostCallback);
297 _keyInputFocusLostEventHandler += value;
302 _keyInputFocusLostEventHandler -= value;
304 if (_keyInputFocusLostEventHandler == null && KeyInputFocusLostSignal().Empty() == false)
306 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
311 private void OnKeyInputFocusLost(IntPtr view)
313 if (_keyInputFocusLostEventHandler != null)
315 _keyInputFocusLostEventHandler(this, null);
320 /// Event arguments that passed via KeyEvent signal.
322 public class KeyEventArgs : EventArgs
327 /// Key - is the key sent to the View.
342 private EventHandlerWithReturnType<object, KeyEventArgs, bool> _keyEventHandler;
343 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
344 private delegate bool KeyCallbackType(IntPtr control, IntPtr keyEvent);
345 private KeyCallbackType _keyCallback;
348 /// Event for KeyPressed signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
349 /// KeyPressed signal is emitted when key event is received.<br>
351 public event EventHandlerWithReturnType<object, KeyEventArgs, bool> KeyEvent
355 if (_keyEventHandler == null)
357 _keyCallback = OnKeyEvent;
358 this.KeyEventSignal().Connect(_keyCallback);
361 _keyEventHandler += value;
366 _keyEventHandler -= value;
368 if (_keyEventHandler == null && KeyEventSignal().Empty() == false)
370 this.KeyEventSignal().Disconnect(_keyCallback);
375 private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
377 KeyEventArgs e = new KeyEventArgs();
381 e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
383 if (_keyEventHandler != null)
385 Delegate[] delegateList = _keyEventHandler.GetInvocationList();
387 // Oring the result of each callback.
388 foreach ( EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList )
390 result |= del( this, e );
397 private EventHandler _onRelayoutEventHandler;
398 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
399 private delegate void OnRelayoutEventCallbackType(IntPtr control);
400 private OnRelayoutEventCallbackType _onRelayoutEventCallback;
403 /// Event for OnRelayout signal which can be used to subscribe/unsubscribe the event handler.<br>
404 /// OnRelayout signal is emitted after the size has been set on the view during relayout.<br>
406 public event EventHandler Relayout
410 if (_onRelayoutEventHandler == null)
412 _onRelayoutEventCallback = OnRelayout;
413 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
416 _onRelayoutEventHandler += value;
421 _onRelayoutEventHandler -= value;
423 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
425 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
431 // Callback for View OnRelayout signal
432 private void OnRelayout(IntPtr data)
434 if (_onRelayoutEventHandler != null)
436 _onRelayoutEventHandler(this, null);
441 /// Event arguments that passed via Touch signal.
443 public class TouchEventArgs : EventArgs
445 private Touch _touch;
448 /// Touch - contains the information of touch points
463 private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
464 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
465 private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
466 private TouchDataCallbackType _touchDataCallback;
469 /// Event for Touched signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
470 /// Touched signal is emitted when touch input is received.<br>
472 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
476 if (_touchDataEventHandler == null)
478 _touchDataCallback = OnTouch;
479 this.TouchSignal().Connect(_touchDataCallback);
482 _touchDataEventHandler += value;
487 _touchDataEventHandler -= value;
489 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
491 this.TouchSignal().Disconnect(_touchDataCallback);
497 // Callback for View TouchSignal
498 private bool OnTouch(IntPtr view, IntPtr touchData)
500 TouchEventArgs e = new TouchEventArgs();
502 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
504 if (_touchDataEventHandler != null)
506 return _touchDataEventHandler(this, e);
513 /// Event arguments that passed via Hover signal.
515 public class HoverEventArgs : EventArgs
517 private Hover _hover;
520 /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
535 private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
536 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
537 private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
538 private HoverEventCallbackType _hoverEventCallback;
541 /// Event for Hovered signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
542 /// Hovered signal is emitted when hover input is received.<br>
544 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
548 if (_hoverEventHandler == null)
550 _hoverEventCallback = OnHoverEvent;
551 this.HoveredSignal().Connect(_hoverEventCallback);
554 _hoverEventHandler += value;
559 _hoverEventHandler -= value;
561 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
563 this.HoveredSignal().Disconnect(_hoverEventCallback);
569 // Callback for View Hover signal
570 private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
572 HoverEventArgs e = new HoverEventArgs();
574 e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
576 if (_hoverEventHandler != null)
578 return _hoverEventHandler(this, e);
585 /// Event arguments that passed via Wheel signal.
587 public class WheelEventArgs : EventArgs
589 private Wheel _wheel;
592 /// WheelEvent - store a wheel rolling type : MOUSE_WHEEL or CUSTOM_WHEEL
607 private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
608 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
609 private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
610 private WheelEventCallbackType _wheelEventCallback;
613 /// Event for WheelMoved signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
614 /// WheelMoved signal is emitted when wheel event is received.<br>
616 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
620 if (_wheelEventHandler == null)
622 _wheelEventCallback = OnWheelEvent;
623 this.WheelEventSignal().Connect(_wheelEventCallback);
626 _wheelEventHandler += value;
631 _wheelEventHandler -= value;
633 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
635 this.WheelEventSignal().Disconnect(_wheelEventCallback);
641 // Callback for View Wheel signal
642 private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
644 WheelEventArgs e = new WheelEventArgs();
646 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
648 if (_wheelEventHandler != null)
650 return _wheelEventHandler(this, e);
656 private EventHandler _onWindowEventHandler;
657 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
658 private delegate void OnWindowEventCallbackType(IntPtr control);
659 private OnWindowEventCallbackType _onWindowEventCallback;
662 /// Event for OnWindow signal which can be used to subscribe/unsubscribe the event handler.<br>
663 /// OnWindow signal is emitted after the view has been connected to the Window.<br>
665 public event EventHandler AddedToWindow
669 if (_onWindowEventHandler == null)
671 _onWindowEventCallback = OnWindow;
672 this.OnWindowSignal().Connect(_onWindowEventCallback);
675 _onWindowEventHandler += value;
680 _onWindowEventHandler -= value;
682 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
684 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
689 // Callback for View OnWindow signal
690 private void OnWindow(IntPtr data)
692 if (_onWindowEventHandler != null)
694 _onWindowEventHandler(this, null);
699 private EventHandler _offWindowEventHandler;
700 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
701 private delegate void OffWindowEventCallbackType(IntPtr control);
702 private OffWindowEventCallbackType _offWindowEventCallback;
705 /// Event for OffWindow signal which can be used to subscribe/unsubscribe the event handler.<br>
706 /// OffWindow signal is emitted after the view has been disconnected from the Window.<br>
708 public event EventHandler RemovedFromWindow
712 if (_offWindowEventHandler == null)
714 _offWindowEventCallback = OffWindow;
715 this.OffWindowSignal().Connect(_offWindowEventCallback);
718 _offWindowEventHandler += value;
723 _offWindowEventHandler -= value;
725 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
727 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
732 // Callback for View OffWindow signal
733 private void OffWindow(IntPtr data)
735 if (_offWindowEventHandler != null)
737 _offWindowEventHandler(this, null);
742 /// Event arguments of visibility changed.
744 public class VisibilityChangedEventArgs : EventArgs
747 private bool _visibility;
748 private VisibilityChangeType _type;
751 /// The view, or child of view, whose visibility has changed.
766 /// Whether the view is now visible or not.
768 public bool Visibility
781 /// Whether the view's visible property has changed or a parent's.
783 public VisibilityChangeType Type
796 private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
797 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
798 private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
799 private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
802 /// Event for visibility change which can be used to subscribe/unsubscribe the event handler.<br>
803 /// This signal is emitted when the visible property of this or a parent view is changed.<br>
805 public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
809 if (_visibilityChangedEventHandler == null)
811 _visibilityChangedEventCallback = OnVisibilityChanged;
812 VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
815 _visibilityChangedEventHandler += value;
820 _visibilityChangedEventHandler -= value;
822 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
824 VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
829 // Callback for View visibility change signal
830 private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
832 VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
835 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
837 e.Visibility = visibility;
840 if (_visibilityChangedEventHandler != null)
842 _visibilityChangedEventHandler(this, e);
846 // Resource Ready Signal
848 private EventHandler _resourcesLoadedEventHandler;
849 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
850 private delegate void ResourcesLoadedCallbackType(IntPtr control);
851 private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
854 /// Event for ResourcesLoadedSignal signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
855 /// This signal is emitted after all resources required by a View are loaded and ready.<br>
857 public event EventHandler ResourcesLoaded
861 if (_resourcesLoadedEventHandler == null)
863 _ResourcesLoadedCallback = OnResourcesLoaded;
864 this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
867 _resourcesLoadedEventHandler += value;
872 _resourcesLoadedEventHandler -= value;
874 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
876 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
881 private void OnResourcesLoaded(IntPtr view)
883 if (_resourcesLoadedEventHandler != null)
885 _resourcesLoadedEventHandler(this, null);
889 internal IntPtr GetPtrfromView()
891 return (IntPtr)swigCPtr;
894 internal class Property
896 internal static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get();
897 internal static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get();
898 internal static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get();
899 internal static readonly int LEFT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
900 internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
901 internal static readonly int UP_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
902 internal static readonly int DOWN_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
903 internal static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get();
904 internal static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get();
905 internal static readonly int SIBLING_ORDER = NDalicManualPINVOKE.Actor_Property_SIBLING_ORDER_get();
906 internal static readonly int OPACITY = NDalicManualPINVOKE.Actor_Property_OPACITY_get();
907 internal static readonly int SCREEN_POSITION = NDalicManualPINVOKE.Actor_Property_SCREEN_POSITION_get();
908 internal static readonly int POSITION_USES_ANCHOR_POINT = NDalicManualPINVOKE.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
909 internal static readonly int PARENT_ORIGIN = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_get();
910 internal static readonly int PARENT_ORIGIN_X = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_X_get();
911 internal static readonly int PARENT_ORIGIN_Y = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Y_get();
912 internal static readonly int PARENT_ORIGIN_Z = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Z_get();
913 internal static readonly int ANCHOR_POINT = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_get();
914 internal static readonly int ANCHOR_POINT_X = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_X_get();
915 internal static readonly int ANCHOR_POINT_Y = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Y_get();
916 internal static readonly int ANCHOR_POINT_Z = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Z_get();
917 internal static readonly int SIZE = NDalicPINVOKE.Actor_Property_SIZE_get();
918 internal static readonly int SIZE_WIDTH = NDalicPINVOKE.Actor_Property_SIZE_WIDTH_get();
919 internal static readonly int SIZE_HEIGHT = NDalicPINVOKE.Actor_Property_SIZE_HEIGHT_get();
920 internal static readonly int SIZE_DEPTH = NDalicPINVOKE.Actor_Property_SIZE_DEPTH_get();
921 internal static readonly int POSITION = NDalicPINVOKE.Actor_Property_POSITION_get();
922 internal static readonly int POSITION_X = NDalicPINVOKE.Actor_Property_POSITION_X_get();
923 internal static readonly int POSITION_Y = NDalicPINVOKE.Actor_Property_POSITION_Y_get();
924 internal static readonly int POSITION_Z = NDalicPINVOKE.Actor_Property_POSITION_Z_get();
925 internal static readonly int WORLD_POSITION = NDalicPINVOKE.Actor_Property_WORLD_POSITION_get();
926 internal static readonly int WORLD_POSITION_X = NDalicPINVOKE.Actor_Property_WORLD_POSITION_X_get();
927 internal static readonly int WORLD_POSITION_Y = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Y_get();
928 internal static readonly int WORLD_POSITION_Z = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Z_get();
929 internal static readonly int ORIENTATION = NDalicPINVOKE.Actor_Property_ORIENTATION_get();
930 internal static readonly int WORLD_ORIENTATION = NDalicPINVOKE.Actor_Property_WORLD_ORIENTATION_get();
931 internal static readonly int SCALE = NDalicPINVOKE.Actor_Property_SCALE_get();
932 internal static readonly int SCALE_X = NDalicPINVOKE.Actor_Property_SCALE_X_get();
933 internal static readonly int SCALE_Y = NDalicPINVOKE.Actor_Property_SCALE_Y_get();
934 internal static readonly int SCALE_Z = NDalicPINVOKE.Actor_Property_SCALE_Z_get();
935 internal static readonly int WORLD_SCALE = NDalicPINVOKE.Actor_Property_WORLD_SCALE_get();
936 internal static readonly int VISIBLE = NDalicPINVOKE.Actor_Property_VISIBLE_get();
937 internal static readonly int WORLD_COLOR = NDalicPINVOKE.Actor_Property_WORLD_COLOR_get();
938 internal static readonly int WORLD_MATRIX = NDalicPINVOKE.Actor_Property_WORLD_MATRIX_get();
939 internal static readonly int NAME = NDalicPINVOKE.Actor_Property_NAME_get();
940 internal static readonly int SENSITIVE = NDalicPINVOKE.Actor_Property_SENSITIVE_get();
941 internal static readonly int LEAVE_REQUIRED = NDalicPINVOKE.Actor_Property_LEAVE_REQUIRED_get();
942 internal static readonly int INHERIT_ORIENTATION = NDalicPINVOKE.Actor_Property_INHERIT_ORIENTATION_get();
943 internal static readonly int INHERIT_SCALE = NDalicPINVOKE.Actor_Property_INHERIT_SCALE_get();
944 internal static readonly int DRAW_MODE = NDalicPINVOKE.Actor_Property_DRAW_MODE_get();
945 internal static readonly int SIZE_MODE_FACTOR = NDalicPINVOKE.Actor_Property_SIZE_MODE_FACTOR_get();
946 internal static readonly int WIDTH_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_WIDTH_RESIZE_POLICY_get();
947 internal static readonly int HEIGHT_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_HEIGHT_RESIZE_POLICY_get();
948 internal static readonly int SIZE_SCALE_POLICY = NDalicPINVOKE.Actor_Property_SIZE_SCALE_POLICY_get();
949 internal static readonly int WIDTH_FOR_HEIGHT = NDalicPINVOKE.Actor_Property_WIDTH_FOR_HEIGHT_get();
950 internal static readonly int HEIGHT_FOR_WIDTH = NDalicPINVOKE.Actor_Property_HEIGHT_FOR_WIDTH_get();
951 internal static readonly int PADDING = NDalicPINVOKE.Actor_Property_PADDING_get();
952 internal static readonly int MINIMUM_SIZE = NDalicPINVOKE.Actor_Property_MINIMUM_SIZE_get();
953 internal static readonly int MAXIMUM_SIZE = NDalicPINVOKE.Actor_Property_MAXIMUM_SIZE_get();
954 internal static readonly int INHERIT_POSITION = NDalicPINVOKE.Actor_Property_INHERIT_POSITION_get();
955 internal static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
959 /// Describes the direction to move the focus towards.
961 public enum FocusDirection
972 /// Creates a new instance of a View.
974 public View() : this(NDalicPINVOKE.View_New(), true)
976 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
979 internal View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true)
981 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
985 /// Downcasts a handle to View handle.<br>
986 /// If handle points to a View, the downcast produces valid handle.<br>
987 /// If not, the returned handle is left uninitialized.<br>
989 /// <param name="handle">Handle to an object</param>
990 /// <returns>A handle to a View or an uninitialized handle</returns>
991 [Obsolete("Please do not use! this will be deprecated, instead please use as keyword.")]
992 public new static View DownCast(BaseHandle handle)
994 View ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as View;
995 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
999 [Obsolete("Please do not use! this will be deprecated, instead please use as keyword.")]
1000 public static T DownCast<T>(View view) where T : View
1002 T ret = Registry.GetManagedBaseHandleFromNativePtr(view) as T;
1010 private View ConvertIdToView(uint id)
1016 View parentView = Parent as View;
1017 view = parentView.FindChildById(id);
1022 view = Window.Instance.GetRootLayer().FindChildById(id);
1028 internal void SetKeyInputFocus()
1030 NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
1031 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1035 /// Quries whether the view has focus.
1037 /// <returns>true if this view has focus</returns>
1038 public bool HasFocus()
1040 bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
1041 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1045 internal void ClearKeyInputFocus()
1047 NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
1048 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1051 internal PinchGestureDetector GetPinchGestureDetector()
1053 PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
1054 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1058 internal PanGestureDetector GetPanGestureDetector()
1060 PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
1061 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1065 internal TapGestureDetector GetTapGestureDetector()
1067 TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
1068 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1072 internal LongPressGestureDetector GetLongPressGestureDetector()
1074 LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
1075 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1080 /// Sets the name of the style to be applied to the view.
1082 /// <param name="styleName">A string matching a style described in a stylesheet</param>
1083 public void SetStyleName(string styleName)
1085 NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
1086 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1090 /// Retrieves the name of the style to be applied to the view (if any).
1092 /// <returns>A string matching a style, or an empty string</returns>
1093 public string GetStyleName()
1095 string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
1096 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1100 internal void SetBackgroundColor(Vector4 color)
1102 NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
1103 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1106 internal Vector4 GetBackgroundColor()
1108 Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
1109 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1113 internal void SetBackgroundImage(Image image)
1115 NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
1116 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1120 /// Clears the background.
1122 public void ClearBackground()
1124 NDalicPINVOKE.View_ClearBackground(swigCPtr);
1125 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1128 internal ControlKeySignal KeyEventSignal()
1130 ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
1131 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1135 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
1137 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
1138 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1142 internal KeyInputFocusSignal KeyInputFocusLostSignal()
1144 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
1145 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1149 internal View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
1151 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1154 internal enum PropertyRange
1156 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
1157 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
1158 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
1162 /// styleName, type string.
1164 public string StyleName
1169 GetProperty(View.Property.STYLE_NAME).Get(out temp);
1174 SetProperty(View.Property.STYLE_NAME, new Tizen.NUI.PropertyValue(value));
1179 /// mutually exclusive with BACKGROUND_IMAGE & BACKGROUND, type Vector4.
1181 public Color BackgroundColor
1185 Color backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1187 Tizen.NUI.PropertyMap background = Background;
1189 background.Find(Visual.Property.Type)?.Get(out visualType);
1190 if (visualType == (int)Visual.Type.Color)
1192 background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor);
1195 return backgroundColor;
1199 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1204 /// Create an Animation to animate the background color visual. If there is no
1205 /// background visual, creates one with transparent black as it's mixColor.
1207 public Animation AnimateBackgroundColor( object destinationValue,
1210 AlphaFunction.BuiltinFunctions? alphaFunction = null,
1211 object initialValue = null)
1213 Tizen.NUI.PropertyMap background = Background;
1215 if( background.Empty() )
1217 // If there is no background yet, ensure there is a transparent
1219 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1220 background = Background;
1222 return AnimateColor( "background", destinationValue, startTime, endTime, alphaFunction, initialValue );
1226 /// Create an Animation to animate the mixColor of the named visual.
1228 public Animation AnimateColor( string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null )
1230 Animation animation = null;
1232 PropertyMap _animator = new PropertyMap();
1233 if( alphaFunction != null )
1235 _animator.Add("alphaFunction", new PropertyValue( AlphaFunction.BuiltinToPropertyKey(alphaFunction) ) );
1238 PropertyMap _timePeriod = new PropertyMap();
1239 _timePeriod.Add( "duration", new PropertyValue((endTime-startTime)/1000.0f) );
1240 _timePeriod.Add( "delay", new PropertyValue( startTime/1000.0f ) );
1241 _animator.Add( "timePeriod", new PropertyValue( _timePeriod ) );
1243 PropertyMap _transition = new PropertyMap();
1244 _transition.Add( "animator", new PropertyValue( _animator ) );
1245 _transition.Add( "target", new PropertyValue( targetVisual ) );
1246 _transition.Add( "property", new PropertyValue( "mixColor" ) );
1248 if( initialColor != null )
1250 PropertyValue initValue = PropertyValue.CreateFromObject( initialColor );
1251 _transition.Add( "initialValue", initValue );
1254 PropertyValue destValue = PropertyValue.CreateFromObject( destinationColor );
1255 _transition.Add( "targetValue", destValue );
1256 TransitionData _transitionData = new TransitionData( _transition );
1258 animation = new Animation( NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true );
1259 if (NDalicPINVOKE.SWIGPendingException.Pending)
1260 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1266 /// mutually exclusive with BACKGROUND_COLOR & BACKGROUND, type Map.
1268 public string BackgroundImage
1272 string backgroundImage = "";
1274 Tizen.NUI.PropertyMap background = Background;
1276 background.Find(Visual.Property.Type)?.Get(out visualType);
1277 if (visualType == (int)Visual.Type.Image)
1279 background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
1282 return backgroundImage;
1286 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1290 public Tizen.NUI.PropertyMap Background
1294 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1295 GetProperty( View.Property.BACKGROUND ).Get(temp);
1300 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1306 /// The current state of the view.
1313 if (GetProperty(View.Property.STATE).Get(out temp) == false)
1315 NUILog.Error("State get error!");
1321 return States.Normal;
1325 return States.Focused;
1329 return States.Disabled;
1333 return States.Normal;
1339 SetProperty(View.Property.STATE, new Tizen.NUI.PropertyValue((int)value));
1344 /// The current sub state of the view.
1346 public States SubState
1351 if (GetProperty(View.Property.SUB_STATE).Get(out temp) == false)
1353 NUILog.Error("subState get error!");
1358 return States.Normal;
1360 return States.Focused;
1362 return States.Disabled;
1364 return States.Normal;
1369 string valueToString = "";
1374 valueToString = "NORMAL";
1377 case States.Focused:
1379 valueToString = "FOCUSED";
1382 case States.Disabled:
1384 valueToString = "DISABLED";
1389 valueToString = "NORMAL";
1393 SetProperty(View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
1398 /// Displays a tooltip
1400 public Tizen.NUI.PropertyMap Tooltip
1404 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1405 GetProperty(View.Property.TOOLTIP).Get(temp);
1410 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1415 /// Displays a tooltip as Text
1417 public string TooltipText
1421 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1425 private int LeftFocusableViewId
1430 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
1435 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1439 private int RightFocusableViewId
1444 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
1449 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1453 private int UpFocusableViewId
1458 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
1463 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1467 private int DownFocusableViewId
1472 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
1477 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1482 /// Child Property of FlexContainer.<br>
1483 /// The proportion of the free space in the container the flex item will receive.<br>
1484 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br>
1491 GetProperty(FlexContainer.ChildProperty.FLEX).Get(out temp);
1496 SetProperty(FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue(value));
1501 /// Child Property of FlexContainer.<br>
1502 /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br>
1504 public int AlignSelf
1509 GetProperty(FlexContainer.ChildProperty.ALIGN_SELF).Get(out temp);
1514 SetProperty(FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue(value));
1519 /// Child Property of FlexContainer.<br>
1520 /// The space around the flex item.<br>
1522 public Vector4 FlexMargin
1526 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1527 GetProperty(FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
1532 SetProperty(FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue(value));
1537 /// The top-left cell this child occupies, if not set, the first available cell is used
1539 public Vector2 CellIndex
1543 Vector2 temp = new Vector2(0.0f, 0.0f);
1544 GetProperty(TableView.ChildProperty.CELL_INDEX).Get(temp);
1549 SetProperty(TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue(value));
1554 /// The number of rows this child occupies, if not set, default value is 1
1556 public float RowSpan
1561 GetProperty(TableView.ChildProperty.ROW_SPAN).Get(out temp);
1566 SetProperty(TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue(value));
1571 /// The number of columns this child occupies, if not set, default value is 1
1573 public float ColumnSpan
1578 GetProperty(TableView.ChildProperty.COLUMN_SPAN).Get(out temp);
1583 SetProperty(TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue(value));
1588 /// The horizontal alignment of this child inside the cells, if not set, default value is 'left'
1590 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
1595 if (GetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
1597 NUILog.Error("CellHorizontalAlignment get error!");
1603 return Tizen.NUI.HorizontalAlignmentType.Left;
1605 return Tizen.NUI.HorizontalAlignmentType.Center;
1607 return Tizen.NUI.HorizontalAlignmentType.Right;
1609 return Tizen.NUI.HorizontalAlignmentType.Left;
1614 string valueToString = "";
1617 case Tizen.NUI.HorizontalAlignmentType.Left:
1619 valueToString = "left";
1622 case Tizen.NUI.HorizontalAlignmentType.Center:
1624 valueToString = "center";
1627 case Tizen.NUI.HorizontalAlignmentType.Right:
1629 valueToString = "right";
1634 valueToString = "left";
1638 SetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1643 /// The vertical alignment of this child inside the cells, if not set, default value is 'top'
1645 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
1650 GetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
1652 NUILog.Error("CellVerticalAlignment get error!");
1658 return Tizen.NUI.VerticalAlignmentType.Top;
1660 return Tizen.NUI.VerticalAlignmentType.Center;
1662 return Tizen.NUI.VerticalAlignmentType.Bottom;
1664 return Tizen.NUI.VerticalAlignmentType.Top;
1669 string valueToString = "";
1672 case Tizen.NUI.VerticalAlignmentType.Top:
1674 valueToString = "top";
1677 case Tizen.NUI.VerticalAlignmentType.Center:
1679 valueToString = "center";
1682 case Tizen.NUI.VerticalAlignmentType.Bottom:
1684 valueToString = "bottom";
1689 valueToString = "top";
1693 SetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1698 /// The left focusable view.<br>
1699 /// This will return NULL if not set.<br>
1700 /// This will also return NULL if the specified left focusable view is not on Window.<br>
1702 public View LeftFocusableView
1704 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1707 if (LeftFocusableViewId >= 0)
1709 return ConvertIdToView((uint)LeftFocusableViewId);
1715 LeftFocusableViewId = (int)value.GetId();
1720 /// The right focusable view.<br>
1721 /// This will return NULL if not set.<br>
1722 /// This will also return NULL if the specified right focusable view is not on Window.<br>
1724 public View RightFocusableView
1726 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1729 if (RightFocusableViewId >= 0)
1731 return ConvertIdToView((uint)RightFocusableViewId);
1737 RightFocusableViewId = (int)value.GetId();
1742 /// The up focusable view.<br>
1743 /// This will return NULL if not set.<br>
1744 /// This will also return NULL if the specified up focusable view is not on Window.<br>
1746 public View UpFocusableView
1748 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1751 if (UpFocusableViewId >= 0)
1753 return ConvertIdToView((uint)UpFocusableViewId);
1759 UpFocusableViewId = (int)value.GetId();
1764 /// The down focusable view.<br>
1765 /// This will return NULL if not set.<br>
1766 /// This will also return NULL if the specified down focusable view is not on Window.<br>
1768 public View DownFocusableView
1770 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1773 if (DownFocusableViewId >= 0)
1775 return ConvertIdToView((uint)DownFocusableViewId);
1781 DownFocusableViewId = (int)value.GetId();
1786 /// whether the view should be focusable by keyboard navigation.
1788 public bool Focusable
1792 SetKeyboardFocusable(value);
1796 return IsKeyboardFocusable();
1801 /// Enumeration for describing the states of view.
1820 /// Retrieves the position of the View.<br>
1821 /// The coordinates are relative to the View's parent.<br>
1823 public Position CurrentPosition
1827 return GetCurrentPosition();
1832 /// Sets the size of an view for width and height.<br>
1833 /// Geometry can be scaled to fit within this area.<br>
1834 /// This does not interfere with the views scale factor.<br>
1835 /// The views default depth is the minimum of width & height.<br>
1837 public Size2D Size2D
1841 Size temp = new Size(0.0f, 0.0f, 0.0f);
1842 GetProperty(View.Property.SIZE).Get(temp);
1843 Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
1848 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(new Size(value)));
1853 /// Retrieves the size of the View.<br>
1854 /// The coordinates are relative to the View's parent.<br>
1856 public Size2D CurrentSize
1860 return GetCurrentSize();
1864 public bool Visibility
1873 /// Retrieves and sets the view's opacity.<br>
1875 public float Opacity
1880 GetProperty(View.Property.OPACITY).Get(out temp);
1885 SetProperty(View.Property.OPACITY, new Tizen.NUI.PropertyValue(value));
1890 /// Sets the position of the View for X and Y.<br>
1891 /// By default, sets the position vector between the parent origin and pivot point(default).<br>
1892 /// If Position inheritance if disabled, sets the world position.<br>
1894 public Position2D Position2D
1898 Position temp = new Position(0.0f, 0.0f, 0.0f);
1899 GetProperty(View.Property.POSITION).Get(temp);
1900 return new Position2D(temp);
1904 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(new Position(value)));
1909 /// Retrieves screen postion of view's.<br>
1911 public Vector2 ScreenPosition
1915 Vector2 temp = new Vector2(0.0f, 0.0f);
1916 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
1922 /// Determines whether the pivot point should be used to determine the position of the view.
1923 /// This is true by default.
1925 /// <remarks>If false, then the top-left of the view is used for the position.
1926 /// Setting this to false will allow scaling or rotation around the anchor-point without affecting the view's position.
1928 public bool PositionUsesPivotPoint
1933 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
1938 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
1942 [Obsolete("Please do not use! this will be deprecated")]
1943 public bool PositionUsesAnchorPoint
1948 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
1953 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
1957 internal bool FocusState
1961 return IsKeyboardFocusable();
1965 SetKeyboardFocusable(value);
1970 /// Queries whether the view is connected to the Stage.<br>
1971 /// When an view is connected, it will be directly or indirectly parented to the root View.<br>
1973 public bool IsOnWindow
1982 /// Gets depth in the hierarchy for the view.
1984 public int HierarchyDepth
1988 return GetHierarchyDepth();
1993 /// Sets the sibling order of the view so depth position can be defined within the same parent.
1996 /// Note The initial value is 0.
1997 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove and LowerBelow will override the sibling order.
1998 /// The values set by this Property will likely change.
2000 public int SiblingOrder
2005 GetProperty(View.Property.SIBLING_ORDER).Get(out temp);
2010 SetProperty(View.Property.SIBLING_ORDER, new Tizen.NUI.PropertyValue(value));
2015 /// Returns the natural size of the view.
2018 /// Deriving classes stipulate the natural size and by default a view has a ZERO natural size.
2020 [Obsolete("Please do not use! this will be deprecated, please use NaturalSize2D instead")]
2021 public Vector3 NaturalSize
2025 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2026 if (NDalicPINVOKE.SWIGPendingException.Pending)
2027 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2033 /// Returns the natural size (Size2D) of the view.
2036 /// Deriving classes stipulate the natural size and by default a view has a ZERO natural size.
2038 public Size2D NaturalSize2D
2042 Vector3 temp = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2043 if (NDalicPINVOKE.SWIGPendingException.Pending)
2044 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2046 return new Size2D((int)temp.Width, (int)temp.Height);
2054 /// This is an asynchronous method.
2065 /// This is an asynchronous method.
2066 /// If an view is hidden, then the view and its children will not be rendered.
2067 /// 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.
2074 internal void Raise()
2076 NDalicPINVOKE.Raise(swigCPtr);
2077 if (NDalicPINVOKE.SWIGPendingException.Pending)
2078 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2081 internal void Lower()
2083 NDalicPINVOKE.Lower(swigCPtr);
2084 if (NDalicPINVOKE.SWIGPendingException.Pending)
2085 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2089 /// Raise view above all other views.
2092 /// Sibling order of views within the parent will be updated automatically.
2093 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2095 public void RaiseToTop()
2097 NDalicPINVOKE.RaiseToTop(swigCPtr);
2098 if (NDalicPINVOKE.SWIGPendingException.Pending)
2099 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2103 /// Lower view to the bottom of all views.
2106 /// Sibling order of views within the parent will be updated automatically.
2107 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2109 public void LowerToBottom()
2111 NDalicPINVOKE.LowerToBottom(swigCPtr);
2112 if (NDalicPINVOKE.SWIGPendingException.Pending)
2113 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2117 /// Query if all resources required by a View are loaded and ready.
2119 /// <remarks>Most resources are only loaded when the control is placed on stage
2121 public bool IsResourceReady()
2123 bool ret = NDalicPINVOKE.IsResourceReady(swigCPtr);
2124 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2129 /// Raise the view to above the target view.
2131 /// <remarks>Sibling order of views within the parent will be updated automatically.
2132 /// Views on the level above the target view will still be shown above this view.
2133 /// Raising this view above views with the same sibling order as each other will raise this view above them.
2134 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2136 /// <param name="target">Will be raised above this view</param>
2137 internal void RaiseAbove(View target)
2139 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
2140 if (NDalicPINVOKE.SWIGPendingException.Pending)
2141 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2145 /// Lower the view to below the target view.
2147 /// <remarks>Sibling order of views within the parent will be updated automatically.
2148 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
2149 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2151 /// <param name="target">Will be lowered below this view</param>
2152 internal void LowerBelow(View target)
2154 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
2155 if (NDalicPINVOKE.SWIGPendingException.Pending)
2156 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2159 internal string GetName()
2161 string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);
2162 if (NDalicPINVOKE.SWIGPendingException.Pending)
2163 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2167 internal void SetName(string name)
2169 NDalicPINVOKE.Actor_SetName(swigCPtr, name);
2170 if (NDalicPINVOKE.SWIGPendingException.Pending)
2171 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2174 internal uint GetId()
2176 uint ret = NDalicPINVOKE.Actor_GetId(swigCPtr);
2177 if (NDalicPINVOKE.SWIGPendingException.Pending)
2178 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2182 internal bool IsRoot()
2184 bool ret = NDalicPINVOKE.Actor_IsRoot(swigCPtr);
2185 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2189 internal bool OnWindow()
2191 bool ret = NDalicPINVOKE.Actor_OnStage(swigCPtr);
2192 if (NDalicPINVOKE.SWIGPendingException.Pending)
2193 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2197 internal Layer GetLayer()
2199 IntPtr cPtr = NDalicPINVOKE.Actor_GetLayer(swigCPtr);
2200 Layer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Layer;
2202 if (NDalicPINVOKE.SWIGPendingException.Pending)
2203 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2208 /// Removes a View from its Parent View / Layer. If the View has no parent, this method does nothing.
2210 /// <pre>The (child) View has been initialized. </pre>
2211 public void Unparent()
2213 NDalicPINVOKE.Actor_Unparent(swigCPtr);
2214 if (NDalicPINVOKE.SWIGPendingException.Pending)
2215 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2219 /// Search through this view's hierarchy for an view with the given name.
2220 /// The view itself is also considered in the search.
2222 /// <pre>The View has been initialized.</pre>
2223 /// <param name="viewName">The name of the view to find</param>
2224 /// <returns>A handle to the view if found, or an empty handle if not</returns>
2225 public View FindChildByName(string viewName)
2227 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
2229 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2231 if (NDalicPINVOKE.SWIGPendingException.Pending)
2232 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2236 internal View FindChildById(uint id)
2238 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
2240 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2242 if (NDalicPINVOKE.SWIGPendingException.Pending)
2243 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2247 /*internal View GetParent()
2250 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
2252 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(cPtr);
2254 if(basehandle is Layer)
2256 ret = new View(cPtr,false);
2260 ret = basehandle as View;
2263 if (NDalicPINVOKE.SWIGPendingException.Pending)
2264 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2268 internal View GetParent()
2271 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
2273 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(cPtr);
2275 if(basehandle is Layer)
2277 View ret2 = new View(cPtr,false);
2281 ret = basehandle as View;
2283 if (NDalicPINVOKE.SWIGPendingException.Pending)
2284 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2288 internal void SetParentOrigin(Vector3 origin)
2290 NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
2291 if (NDalicPINVOKE.SWIGPendingException.Pending)
2292 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2295 internal Vector3 GetCurrentParentOrigin()
2297 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentParentOrigin(swigCPtr), true);
2298 if (NDalicPINVOKE.SWIGPendingException.Pending)
2299 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2303 internal void SetAnchorPoint(Vector3 anchorPoint)
2305 NDalicPINVOKE.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
2306 if (NDalicPINVOKE.SWIGPendingException.Pending)
2307 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2310 internal Vector3 GetCurrentAnchorPoint()
2312 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentAnchorPoint(swigCPtr), true);
2313 if (NDalicPINVOKE.SWIGPendingException.Pending)
2314 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2318 internal void SetSize(float width, float height)
2320 NDalicPINVOKE.Actor_SetSize__SWIG_0(swigCPtr, width, height);
2321 if (NDalicPINVOKE.SWIGPendingException.Pending)
2322 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2325 internal void SetSize(float width, float height, float depth)
2327 NDalicPINVOKE.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
2328 if (NDalicPINVOKE.SWIGPendingException.Pending)
2329 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2332 internal void SetSize(Vector2 size)
2334 NDalicPINVOKE.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
2335 if (NDalicPINVOKE.SWIGPendingException.Pending)
2336 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2339 internal void SetSize(Vector3 size)
2341 NDalicPINVOKE.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
2342 if (NDalicPINVOKE.SWIGPendingException.Pending)
2343 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2346 internal Vector3 GetTargetSize()
2348 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetTargetSize(swigCPtr), true);
2349 if (NDalicPINVOKE.SWIGPendingException.Pending)
2350 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2354 internal Size2D GetCurrentSize()
2356 Size ret = new Size(NDalicPINVOKE.Actor_GetCurrentSize(swigCPtr), true);
2357 if (NDalicPINVOKE.SWIGPendingException.Pending)
2358 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2359 Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
2363 internal Vector3 GetNaturalSize()
2365 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2366 if (NDalicPINVOKE.SWIGPendingException.Pending)
2367 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2371 internal void SetPosition(float x, float y)
2373 NDalicPINVOKE.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
2374 if (NDalicPINVOKE.SWIGPendingException.Pending)
2375 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2378 internal void SetPosition(float x, float y, float z)
2380 NDalicPINVOKE.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
2381 if (NDalicPINVOKE.SWIGPendingException.Pending)
2382 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2385 internal void SetPosition(Vector3 position)
2387 NDalicPINVOKE.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
2388 if (NDalicPINVOKE.SWIGPendingException.Pending)
2389 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2392 internal void SetX(float x)
2394 NDalicPINVOKE.Actor_SetX(swigCPtr, x);
2395 if (NDalicPINVOKE.SWIGPendingException.Pending)
2396 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2399 internal void SetY(float y)
2401 NDalicPINVOKE.Actor_SetY(swigCPtr, y);
2402 if (NDalicPINVOKE.SWIGPendingException.Pending)
2403 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2406 internal void SetZ(float z)
2408 NDalicPINVOKE.Actor_SetZ(swigCPtr, z);
2409 if (NDalicPINVOKE.SWIGPendingException.Pending)
2410 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2413 internal void TranslateBy(Vector3 distance)
2415 NDalicPINVOKE.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
2416 if (NDalicPINVOKE.SWIGPendingException.Pending)
2417 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2420 internal Position GetCurrentPosition()
2422 Position ret = new Position(NDalicPINVOKE.Actor_GetCurrentPosition(swigCPtr), true);
2423 if (NDalicPINVOKE.SWIGPendingException.Pending)
2424 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2428 internal Vector3 GetCurrentWorldPosition()
2430 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldPosition(swigCPtr), true);
2431 if (NDalicPINVOKE.SWIGPendingException.Pending)
2432 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2436 internal void SetInheritPosition(bool inherit)
2438 NDalicPINVOKE.Actor_SetInheritPosition(swigCPtr, inherit);
2439 if (NDalicPINVOKE.SWIGPendingException.Pending)
2440 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2443 internal bool IsPositionInherited()
2445 bool ret = NDalicPINVOKE.Actor_IsPositionInherited(swigCPtr);
2446 if (NDalicPINVOKE.SWIGPendingException.Pending)
2447 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2451 internal void SetOrientation(Degree angle, Vector3 axis)
2453 NDalicPINVOKE.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2454 if (NDalicPINVOKE.SWIGPendingException.Pending)
2455 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2458 internal void SetOrientation(Radian angle, Vector3 axis)
2460 NDalicPINVOKE.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2461 if (NDalicPINVOKE.SWIGPendingException.Pending)
2462 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2465 internal void SetOrientation(Rotation orientation)
2467 NDalicPINVOKE.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
2468 if (NDalicPINVOKE.SWIGPendingException.Pending)
2469 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2472 internal void RotateBy(Degree angle, Vector3 axis)
2474 NDalicPINVOKE.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2475 if (NDalicPINVOKE.SWIGPendingException.Pending)
2476 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2479 internal void RotateBy(Radian angle, Vector3 axis)
2481 NDalicPINVOKE.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2482 if (NDalicPINVOKE.SWIGPendingException.Pending)
2483 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2486 internal void RotateBy(Rotation relativeRotation)
2488 NDalicPINVOKE.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
2489 if (NDalicPINVOKE.SWIGPendingException.Pending)
2490 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2493 internal Rotation GetCurrentOrientation()
2495 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentOrientation(swigCPtr), true);
2496 if (NDalicPINVOKE.SWIGPendingException.Pending)
2497 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2501 internal void SetInheritOrientation(bool inherit)
2503 NDalicPINVOKE.Actor_SetInheritOrientation(swigCPtr, inherit);
2504 if (NDalicPINVOKE.SWIGPendingException.Pending)
2505 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2508 internal bool IsOrientationInherited()
2510 bool ret = NDalicPINVOKE.Actor_IsOrientationInherited(swigCPtr);
2511 if (NDalicPINVOKE.SWIGPendingException.Pending)
2512 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2516 internal Rotation GetCurrentWorldOrientation()
2518 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentWorldOrientation(swigCPtr), true);
2519 if (NDalicPINVOKE.SWIGPendingException.Pending)
2520 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2524 internal void SetScale(float scale)
2526 NDalicPINVOKE.Actor_SetScale__SWIG_0(swigCPtr, scale);
2527 if (NDalicPINVOKE.SWIGPendingException.Pending)
2528 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2531 internal void SetScale(float scaleX, float scaleY, float scaleZ)
2533 NDalicPINVOKE.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
2534 if (NDalicPINVOKE.SWIGPendingException.Pending)
2535 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2538 internal void SetScale(Vector3 scale)
2540 NDalicPINVOKE.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
2541 if (NDalicPINVOKE.SWIGPendingException.Pending)
2542 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2545 internal void ScaleBy(Vector3 relativeScale)
2547 NDalicPINVOKE.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
2548 if (NDalicPINVOKE.SWIGPendingException.Pending)
2549 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2552 internal Vector3 GetCurrentScale()
2554 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentScale(swigCPtr), true);
2555 if (NDalicPINVOKE.SWIGPendingException.Pending)
2556 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2560 internal Vector3 GetCurrentWorldScale()
2562 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldScale(swigCPtr), true);
2563 if (NDalicPINVOKE.SWIGPendingException.Pending)
2564 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2568 internal void SetInheritScale(bool inherit)
2570 NDalicPINVOKE.Actor_SetInheritScale(swigCPtr, inherit);
2571 if (NDalicPINVOKE.SWIGPendingException.Pending)
2572 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2575 internal bool IsScaleInherited()
2577 bool ret = NDalicPINVOKE.Actor_IsScaleInherited(swigCPtr);
2578 if (NDalicPINVOKE.SWIGPendingException.Pending)
2579 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2583 internal Matrix GetCurrentWorldMatrix()
2585 Matrix ret = new Matrix(NDalicPINVOKE.Actor_GetCurrentWorldMatrix(swigCPtr), true);
2586 if (NDalicPINVOKE.SWIGPendingException.Pending)
2587 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2591 internal void SetVisible(bool visible)
2593 NDalicPINVOKE.Actor_SetVisible(swigCPtr, visible);
2594 if (NDalicPINVOKE.SWIGPendingException.Pending)
2595 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2598 internal bool IsVisible()
2600 bool ret = NDalicPINVOKE.Actor_IsVisible(swigCPtr);
2601 if (NDalicPINVOKE.SWIGPendingException.Pending)
2602 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2606 internal void SetOpacity(float opacity)
2608 NDalicPINVOKE.Actor_SetOpacity(swigCPtr, opacity);
2609 if (NDalicPINVOKE.SWIGPendingException.Pending)
2610 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2613 internal float GetCurrentOpacity()
2615 float ret = NDalicPINVOKE.Actor_GetCurrentOpacity(swigCPtr);
2616 if (NDalicPINVOKE.SWIGPendingException.Pending)
2617 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2621 internal void SetColor(Vector4 color)
2623 NDalicPINVOKE.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
2624 if (NDalicPINVOKE.SWIGPendingException.Pending)
2625 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2628 internal Vector4 GetCurrentColor()
2630 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentColor(swigCPtr), true);
2631 if (NDalicPINVOKE.SWIGPendingException.Pending)
2632 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2636 internal void SetColorMode(ColorMode colorMode)
2638 NDalicPINVOKE.Actor_SetColorMode(swigCPtr, (int)colorMode);
2639 if (NDalicPINVOKE.SWIGPendingException.Pending)
2640 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2643 internal ColorMode GetColorMode()
2645 ColorMode ret = (ColorMode)NDalicPINVOKE.Actor_GetColorMode(swigCPtr);
2646 if (NDalicPINVOKE.SWIGPendingException.Pending)
2647 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2651 internal Vector4 GetCurrentWorldColor()
2653 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentWorldColor(swigCPtr), true);
2654 if (NDalicPINVOKE.SWIGPendingException.Pending)
2655 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2659 internal void SetDrawMode(DrawModeType drawMode)
2661 NDalicPINVOKE.Actor_SetDrawMode(swigCPtr, (int)drawMode);
2662 if (NDalicPINVOKE.SWIGPendingException.Pending)
2663 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2666 internal DrawModeType GetDrawMode()
2668 DrawModeType ret = (DrawModeType)NDalicPINVOKE.Actor_GetDrawMode(swigCPtr);
2669 if (NDalicPINVOKE.SWIGPendingException.Pending)
2670 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2675 /// Converts screen coordinates into the view's coordinate system using the default camera.
2677 /// <pre>The View has been initialized.</pre>
2678 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5)</remarks>
2679 /// <param name="localX">On return, the X-coordinate relative to the view</param>
2680 /// <param name="localY">On return, the Y-coordinate relative to the view</param>
2681 /// <param name="screenX">The screen X-coordinate</param>
2682 /// <param name="screenY">The screen Y-coordinate</param>
2683 /// <returns>True if the conversion succeeded</returns>
2684 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
2686 bool ret = NDalicPINVOKE.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
2687 if (NDalicPINVOKE.SWIGPendingException.Pending)
2688 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2692 internal void SetKeyboardFocusable(bool focusable)
2694 NDalicPINVOKE.Actor_SetKeyboardFocusable(swigCPtr, focusable);
2695 if (NDalicPINVOKE.SWIGPendingException.Pending)
2696 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2699 internal bool IsKeyboardFocusable()
2701 bool ret = NDalicPINVOKE.Actor_IsKeyboardFocusable(swigCPtr);
2702 if (NDalicPINVOKE.SWIGPendingException.Pending)
2703 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2707 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
2709 NDalicPINVOKE.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
2710 if (NDalicPINVOKE.SWIGPendingException.Pending)
2711 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2714 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
2716 ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.Actor_GetResizePolicy(swigCPtr, (int)dimension);
2717 if (NDalicPINVOKE.SWIGPendingException.Pending)
2718 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2723 /// Sets the relative to parent size factor of the view.<br>
2724 /// This factor is only used when ResizePolicy is set to either:
2725 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br>
2726 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br>
2728 /// <pre>The View has been initialized.</pre>
2729 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis</param>
2730 public void SetSizeModeFactor(Vector3 factor)
2732 NDalicPINVOKE.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
2733 if (NDalicPINVOKE.SWIGPendingException.Pending)
2734 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2737 internal Vector3 GetSizeModeFactor()
2739 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetSizeModeFactor(swigCPtr), true);
2740 if (NDalicPINVOKE.SWIGPendingException.Pending)
2741 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2746 /// Calculates the height of the view given a width.<br>
2747 /// The natural size is used for default calculation. <br>
2748 /// size 0 is treated as aspect ratio 1:1.<br>
2750 /// <param name="width">Width to use</param>
2751 /// <returns>The height based on the width</returns>
2752 public float GetHeightForWidth(float width)
2754 float ret = NDalicPINVOKE.Actor_GetHeightForWidth(swigCPtr, width);
2755 if (NDalicPINVOKE.SWIGPendingException.Pending)
2756 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2761 /// Calculates the width of the view given a height.<br>
2762 /// The natural size is used for default calculation.<br>
2763 /// size 0 is treated as aspect ratio 1:1.<br>
2765 /// <param name="height">Height to use</param>
2766 /// <returns>The width based on the height</returns>
2767 public float GetWidthForHeight(float height)
2769 float ret = NDalicPINVOKE.Actor_GetWidthForHeight(swigCPtr, height);
2770 if (NDalicPINVOKE.SWIGPendingException.Pending)
2771 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2775 public float GetRelayoutSize(DimensionType dimension)
2777 float ret = NDalicPINVOKE.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
2778 if (NDalicPINVOKE.SWIGPendingException.Pending)
2779 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2783 public void SetPadding(PaddingType padding)
2785 NDalicPINVOKE.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
2786 if (NDalicPINVOKE.SWIGPendingException.Pending)
2787 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2790 public void GetPadding(PaddingType paddingOut)
2792 NDalicPINVOKE.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
2793 if (NDalicPINVOKE.SWIGPendingException.Pending)
2794 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2797 internal void SetMinimumSize(Vector2 size)
2799 NDalicPINVOKE.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
2800 if (NDalicPINVOKE.SWIGPendingException.Pending)
2801 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2804 internal Vector2 GetMinimumSize()
2806 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMinimumSize(swigCPtr), true);
2807 if (NDalicPINVOKE.SWIGPendingException.Pending)
2808 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2812 internal void SetMaximumSize(Vector2 size)
2814 NDalicPINVOKE.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
2815 if (NDalicPINVOKE.SWIGPendingException.Pending)
2816 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2819 internal Vector2 GetMaximumSize()
2821 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMaximumSize(swigCPtr), true);
2822 if (NDalicPINVOKE.SWIGPendingException.Pending)
2823 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2827 internal int GetHierarchyDepth()
2829 int ret = NDalicPINVOKE.Actor_GetHierarchyDepth(swigCPtr);
2830 if (NDalicPINVOKE.SWIGPendingException.Pending)
2831 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2835 public uint AddRenderer(Renderer renderer)
2837 uint ret = NDalicPINVOKE.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
2838 if (NDalicPINVOKE.SWIGPendingException.Pending)
2839 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2843 internal uint GetRendererCount()
2845 uint ret = NDalicPINVOKE.Actor_GetRendererCount(swigCPtr);
2846 if (NDalicPINVOKE.SWIGPendingException.Pending)
2847 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2851 public Renderer GetRendererAt(uint index)
2853 IntPtr cPtr = NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index);
2854 Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Renderer;
2856 if (NDalicPINVOKE.SWIGPendingException.Pending)
2857 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2861 public void RemoveRenderer(Renderer renderer)
2863 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
2864 if (NDalicPINVOKE.SWIGPendingException.Pending)
2865 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2868 public void RemoveRenderer(uint index)
2870 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
2871 if (NDalicPINVOKE.SWIGPendingException.Pending)
2872 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2875 internal TouchDataSignal TouchSignal()
2877 TouchDataSignal ret = new TouchDataSignal(NDalicPINVOKE.Actor_TouchSignal(swigCPtr), false);
2878 if (NDalicPINVOKE.SWIGPendingException.Pending)
2879 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2883 internal HoverSignal HoveredSignal()
2885 HoverSignal ret = new HoverSignal(NDalicPINVOKE.Actor_HoveredSignal(swigCPtr), false);
2886 if (NDalicPINVOKE.SWIGPendingException.Pending)
2887 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2891 internal WheelSignal WheelEventSignal()
2893 WheelSignal ret = new WheelSignal(NDalicPINVOKE.Actor_WheelEventSignal(swigCPtr), false);
2894 if (NDalicPINVOKE.SWIGPendingException.Pending)
2895 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2899 internal ViewSignal OnWindowSignal()
2901 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnStageSignal(swigCPtr), false);
2902 if (NDalicPINVOKE.SWIGPendingException.Pending)
2903 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2907 internal ViewSignal OffWindowSignal()
2909 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OffStageSignal(swigCPtr), false);
2910 if (NDalicPINVOKE.SWIGPendingException.Pending)
2911 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2915 internal ViewSignal OnRelayoutSignal()
2917 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnRelayoutSignal(swigCPtr), false);
2918 if (NDalicPINVOKE.SWIGPendingException.Pending)
2919 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2923 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view) {
2924 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
2925 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2929 internal ViewSignal ResourcesLoadedSignal()
2931 ViewSignal ret = new ViewSignal(NDalicPINVOKE.ResourceReadySignal(swigCPtr), false);
2932 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2937 /// Gets/Sets the origin of an view, within its parent's area.<br>
2938 /// 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>
2939 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br>
2940 /// An view's position is the distance between this origin, and the view's anchor-point.<br>
2942 /// <pre>The View has been initialized.</pre>
2943 public Position ParentOrigin
2947 Position temp = new Position(0.0f, 0.0f, 0.0f);
2948 GetProperty(View.Property.PARENT_ORIGIN).Get(temp);
2953 SetProperty(View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue(value));
2957 internal float ParentOriginX
2962 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
2967 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
2971 internal float ParentOriginY
2976 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
2981 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
2985 internal float ParentOriginZ
2990 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
2995 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
3000 /// Gets/Sets the anchor-point of an view.<br>
3001 /// 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>
3002 /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br>
3003 /// An view position is the distance between its parent-origin and this anchor-point.<br>
3004 /// An view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br>
3005 /// <pre>The View has been initialized.</pre>
3007 public Position PivotPoint
3011 Position temp = new Position(0.0f, 0.0f, 0.0f);
3012 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
3017 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3021 internal float PivotPointX
3026 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
3031 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
3035 internal float PivotPointY
3040 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
3045 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
3049 internal float PivotPointZ
3054 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
3059 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
3064 /// Gets/Sets the size width of an view.
3066 public float SizeWidth
3071 GetProperty(View.Property.SIZE_WIDTH).Get(out temp);
3076 SetProperty(View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue(value));
3081 /// Gets/Sets the size height of an view.
3083 public float SizeHeight
3088 GetProperty(View.Property.SIZE_HEIGHT).Get(out temp);
3093 SetProperty(View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue(value));
3098 /// Gets/Sets the position of the View.<br>
3099 /// By default, sets the position vector between the parent origin and pivot point(default).<br>
3100 /// If Position inheritance if disabled, sets the world position.<br>
3102 public Position Position
3106 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3107 GetProperty(View.Property.POSITION).Get(temp);
3112 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(value));
3117 /// Gets/Sets the position x of the View.
3119 public float PositionX
3124 GetProperty(View.Property.POSITION_X).Get(out temp);
3129 SetProperty(View.Property.POSITION_X, new Tizen.NUI.PropertyValue(value));
3134 /// Gets/Sets the position y of the View.
3136 public float PositionY
3141 GetProperty(View.Property.POSITION_Y).Get(out temp);
3146 SetProperty(View.Property.POSITION_Y, new Tizen.NUI.PropertyValue(value));
3151 /// Gets/Sets the position z of the View.
3153 public float PositionZ
3158 GetProperty(View.Property.POSITION_Z).Get(out temp);
3163 SetProperty(View.Property.POSITION_Z, new Tizen.NUI.PropertyValue(value));
3168 /// Gets/Sets the world position of the View.
3170 public Vector3 WorldPosition
3174 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3175 GetProperty(View.Property.WORLD_POSITION).Get(temp);
3180 internal float WorldPositionX
3185 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
3190 internal float WorldPositionY
3195 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
3200 internal float WorldPositionZ
3205 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
3211 /// Gets/Sets the orientation of the View.<br>
3212 /// An view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br>
3214 /// <remarks>This is an asynchronous method.</remarks>
3215 public Rotation Orientation
3219 Rotation temp = new Rotation();
3220 GetProperty(View.Property.ORIENTATION).Get(temp);
3225 SetProperty(View.Property.ORIENTATION, new Tizen.NUI.PropertyValue(value));
3230 /// Gets/Sets the world orientation of the View.<br>
3232 public Rotation WorldOrientation
3236 Rotation temp = new Rotation();
3237 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
3243 /// Gets/Sets the scale factor applied to an view.<br>
3245 public Vector3 Scale
3249 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3250 GetProperty(View.Property.SCALE).Get(temp);
3255 SetProperty(View.Property.SCALE, new Tizen.NUI.PropertyValue(value));
3260 /// Gets/Sets the scale x factor applied to an view.
3267 GetProperty(View.Property.SCALE_X).Get(out temp);
3272 SetProperty(View.Property.SCALE_X, new Tizen.NUI.PropertyValue(value));
3277 /// Gets/Sets the scale y factor applied to an view.
3284 GetProperty(View.Property.SCALE_Y).Get(out temp);
3289 SetProperty(View.Property.SCALE_Y, new Tizen.NUI.PropertyValue(value));
3294 /// Gets/Sets the scale z factor applied to an view.
3301 GetProperty(View.Property.SCALE_Z).Get(out temp);
3306 SetProperty(View.Property.SCALE_Z, new Tizen.NUI.PropertyValue(value));
3311 /// Gets the world scale of View.
3313 public Vector3 WorldScale
3317 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3318 GetProperty(View.Property.WORLD_SCALE).Get(temp);
3324 /// Retrieves the visibility flag of an view.
3327 /// If an view is not visible, then the view and its children will not be rendered.
3328 /// 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.
3335 GetProperty(View.Property.VISIBLE).Get(out temp);
3337 }/* only get is required : removed
3340 SetProperty(View.Property.VISIBLE, new Tizen.NUI.PropertyValue(value));
3345 /// Gets the view's world color.
3347 public Vector4 WorldColor
3351 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3352 GetProperty(View.Property.WORLD_COLOR).Get(temp);
3357 internal Matrix WorldMatrix
3361 Matrix temp = new Matrix();
3362 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
3368 /// Gets/Sets the View's name.
3375 GetProperty(View.Property.NAME).Get(out temp);
3380 SetProperty(View.Property.NAME, new Tizen.NUI.PropertyValue(value));
3385 /// Gets the View's ID.
3397 /// Gets/Sets the status of whether an view should emit touch or hover signals.
3399 public bool Sensitive
3404 GetProperty(View.Property.SENSITIVE).Get(out temp);
3409 SetProperty(View.Property.SENSITIVE, new Tizen.NUI.PropertyValue(value));
3414 /// Gets/Sets the status of whether the view should receive a notification when touch or hover motion events leave the boundary of the view.
3416 public bool LeaveRequired
3421 GetProperty(View.Property.LEAVE_REQUIRED).Get(out temp);
3426 SetProperty(View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue(value));
3431 /// Gets/Sets the status of whether a child view inherits it's parent's orientation.
3433 public bool InheritOrientation
3438 GetProperty(View.Property.INHERIT_ORIENTATION).Get(out temp);
3443 SetProperty(View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue(value));
3448 /// Gets/Sets the status of whether a child view inherits it's parent's scale.
3450 public bool InheritScale
3455 GetProperty(View.Property.INHERIT_SCALE).Get(out temp);
3460 SetProperty(View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue(value));
3465 /// Gets/Sets the status of how the view and its children should be drawn.<br>
3466 /// Not all views are renderable, but DrawMode can be inherited from any view.<br>
3467 /// 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>
3468 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br>
3469 /// Overlay views are drawn in a separate pass, after all non-overlay views within the Layer.<br>
3470 /// For overlay views, the drawing order is with respect to tree levels of Views, and depth-testing will not be used.<br>
3472 public DrawModeType DrawMode
3477 if (GetProperty(View.Property.DRAW_MODE).Get(out temp) == false)
3479 NUILog.Error("DrawMode get error!");
3484 return DrawModeType.Normal;
3486 return DrawModeType.Overlay2D;
3488 return DrawModeType.Stencil;
3490 return DrawModeType.Normal;
3495 SetProperty(View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)value));
3500 /// Gets/Sets the relative to parent size factor of the view.<br>
3501 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br>
3502 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br>
3504 public Vector3 SizeModeFactor
3508 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3509 GetProperty(View.Property.SIZE_MODE_FACTOR).Get(temp);
3514 SetProperty(View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue(value));
3519 /// Gets/Sets the width resize policy to be used.
3521 public ResizePolicyType WidthResizePolicy
3526 if (GetProperty(View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
3528 NUILog.Error("WidthResizePolicy get error!");
3533 return ResizePolicyType.Fixed;
3534 case "USE_NATURAL_SIZE":
3535 return ResizePolicyType.UseNaturalSize;
3536 case "FILL_TO_PARENT":
3537 return ResizePolicyType.FillToParent;
3538 case "SIZE_RELATIVE_TO_PARENT":
3539 return ResizePolicyType.SizeRelativeToParent;
3540 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3541 return ResizePolicyType.SizeFixedOffsetFromParent;
3542 case "FIT_TO_CHILDREN":
3543 return ResizePolicyType.FitToChildren;
3544 case "DIMENSION_DEPENDENCY":
3545 return ResizePolicyType.DimensionDependency;
3546 case "USE_ASSIGNED_SIZE":
3547 return ResizePolicyType.UseAssignedSize;
3549 return ResizePolicyType.Fixed;
3554 SetProperty(View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3559 /// Gets/Sets the height resize policy to be used.
3561 public ResizePolicyType HeightResizePolicy
3566 if (GetProperty(View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
3568 NUILog.Error("HeightResizePolicy get error!");
3573 return ResizePolicyType.Fixed;
3574 case "USE_NATURAL_SIZE":
3575 return ResizePolicyType.UseNaturalSize;
3576 case "FILL_TO_PARENT":
3577 return ResizePolicyType.FillToParent;
3578 case "SIZE_RELATIVE_TO_PARENT":
3579 return ResizePolicyType.SizeRelativeToParent;
3580 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3581 return ResizePolicyType.SizeFixedOffsetFromParent;
3582 case "FIT_TO_CHILDREN":
3583 return ResizePolicyType.FitToChildren;
3584 case "DIMENSION_DEPENDENCY":
3585 return ResizePolicyType.DimensionDependency;
3586 case "USE_ASSIGNED_SIZE":
3587 return ResizePolicyType.UseAssignedSize;
3589 return ResizePolicyType.Fixed;
3594 SetProperty(View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3599 /// Gets/Sets the policy to use when setting size with size negotiation.<br>
3600 /// Defaults to SizeScalePolicyType.UseSizeSet.<br>
3602 public SizeScalePolicyType SizeScalePolicy
3607 if (GetProperty(View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
3609 NUILog.Error("SizeScalePolicy get error!");
3613 case "USE_SIZE_SET":
3614 return SizeScalePolicyType.UseSizeSet;
3615 case "FIT_WITH_ASPECT_RATIO":
3616 return SizeScalePolicyType.FitWithAspectRatio;
3617 case "FILL_WITH_ASPECT_RATIO":
3618 return SizeScalePolicyType.FillWithAspectRatio;
3620 return SizeScalePolicyType.UseSizeSet;
3625 string valueToString = "";
3628 case SizeScalePolicyType.UseSizeSet:
3630 valueToString = "USE_SIZE_SET";
3633 case SizeScalePolicyType.FitWithAspectRatio:
3635 valueToString = "FIT_WITH_ASPECT_RATIO";
3638 case SizeScalePolicyType.FillWithAspectRatio:
3640 valueToString = "FILL_WITH_ASPECT_RATIO";
3645 valueToString = "USE_SIZE_SET";
3649 SetProperty(View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
3654 /// Gets/Sets the status of whether the width size is dependent on height size.
3656 public bool WidthForHeight
3661 GetProperty(View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
3666 SetProperty(View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue(value));
3671 /// Gets/Sets the status of whether the height size is dependent on width size.
3673 public bool HeightForWidth
3678 GetProperty(View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
3683 SetProperty(View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue(value));
3688 /// Gets/Sets the padding for use in layout.
3690 public Vector4 Padding
3694 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3695 GetProperty(View.Property.PADDING).Get(temp);
3700 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
3705 /// Gets/Sets the minimum size an view can be assigned in size negotiation.
3707 public Size2D MinimumSize
3711 Size2D temp = new Size2D(0, 0);
3712 GetProperty(View.Property.MINIMUM_SIZE).Get(temp);
3717 SetProperty(View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3722 /// Gets/Sets the maximum size an view can be assigned in size negotiation.
3724 public Size2D MaximumSize
3728 Size2D temp = new Size2D(0, 0);
3729 GetProperty(View.Property.MAXIMUM_SIZE).Get(temp);
3734 SetProperty(View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3739 /// Gets/Sets whether a child view inherits it's parent's position.<br>
3740 /// Default is to inherit.<br>
3741 /// 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>
3743 public bool InheritPosition
3748 GetProperty(View.Property.INHERIT_POSITION).Get(out temp);
3753 SetProperty(View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue(value));
3758 /// Gets/Sets clipping behavior(mode) of it's children.
3760 public ClippingModeType ClippingMode
3765 if (GetProperty(View.Property.CLIPPING_MODE).Get(out temp) == false)
3767 NUILog.Error("ClippingMode get error!");
3772 return ClippingModeType.Disabled;
3773 case "CLIP_CHILDREN":
3774 return ClippingModeType.ClipChildren;
3776 return ClippingModeType.Disabled;
3781 SetProperty(View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)value));
3786 /// Get the number of renderers held by the view.
3788 public uint RendererCount
3792 return GetRendererCount();
3799 [Obsolete("Please do not use! this will be deprecated")]
3800 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> Touched
3804 if (_touchDataEventHandler == null)
3806 _touchDataCallback = OnTouch;
3807 this.TouchSignal().Connect(_touchDataCallback);
3810 _touchDataEventHandler += value;
3815 _touchDataEventHandler -= value;
3817 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
3819 this.TouchSignal().Disconnect(_touchDataCallback);
3825 [Obsolete("Please do not use! this will be deprecated")]
3826 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> Hovered
3830 if (_hoverEventHandler == null)
3832 _hoverEventCallback = OnHoverEvent;
3833 this.HoveredSignal().Connect(_hoverEventCallback);
3836 _hoverEventHandler += value;
3841 _hoverEventHandler -= value;
3843 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
3845 this.HoveredSignal().Disconnect(_hoverEventCallback);
3851 [Obsolete("Please do not use! this will be deprecated")]
3852 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelMoved
3856 if (_wheelEventHandler == null)
3858 _wheelEventCallback = OnWheelEvent;
3859 this.WheelEventSignal().Connect(_wheelEventCallback);
3862 _wheelEventHandler += value;
3867 _wheelEventHandler -= value;
3869 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
3871 this.WheelEventSignal().Disconnect(_wheelEventCallback);
3877 [Obsolete("Please do not use! this will be deprecated")]
3878 public Position AnchorPoint
3882 Position temp = new Position(0.0f, 0.0f, 0.0f);
3883 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
3888 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3892 [Obsolete("Please do not use! this will be deprecated, please use Size2D instead")]
3897 Size temp = new Size(0.0f, 0.0f, 0.0f);
3898 GetProperty(View.Property.SIZE).Get(temp);
3903 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(value));
3907 [Obsolete("Please do not use! this will be deprecated")]
3908 public event EventHandler OnWindowEvent
3912 if (_onWindowEventHandler == null)
3914 _onWindowEventCallback = OnWindow;
3915 this.OnWindowSignal().Connect(_onWindowEventCallback);
3918 _onWindowEventHandler += value;
3923 _onWindowEventHandler -= value;
3925 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
3927 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
3932 [Obsolete("Please do not use! this will be deprecated")]
3933 public event EventHandler OffWindowEvent
3937 if (_offWindowEventHandler == null)
3939 _offWindowEventCallback = OffWindow;
3940 this.OffWindowSignal().Connect(_offWindowEventCallback);
3943 _offWindowEventHandler += value;
3948 _offWindowEventHandler -= value;
3950 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
3952 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
3957 [Obsolete("Please do not use! this will be deprecated")]
3958 public event EventHandler OnRelayoutEvent
3962 if (_onRelayoutEventHandler == null)
3964 _onRelayoutEventCallback = OnRelayout;
3965 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
3968 _onRelayoutEventHandler += value;
3973 _onRelayoutEventHandler -= value;
3975 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
3977 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);