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;
31 internal View(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.View_SWIGUpcast(cPtr), cMemoryOwn)
33 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
34 PositionUsesPivotPoint = false;
37 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
39 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
42 // From Container Base class
45 /// Adds a child view to this View.
47 /// <seealso cref="Container::Add()">
49 public override void Add(View child)
51 NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
52 if (NDalicPINVOKE.SWIGPendingException.Pending)
53 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
59 /// Removes a child View from this View. If the view was not a child of this view, this is a no-op.
61 /// <seealso cref="Container::Remove()">
63 public override void Remove(View child)
65 NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
66 if (NDalicPINVOKE.SWIGPendingException.Pending)
67 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
69 Children.Remove(child);
73 /// Retrieves child view by index.
75 /// <seealso cref="Container::GetChildAt()">
77 public override View GetChildAt(uint index)
79 if (index < Children.Count)
81 return Children[Convert.ToInt32(index)];
90 /// Retrieves the number of children held by the view.
92 /// <seealso cref="Container::GetChildCount()">
94 protected override uint GetChildCount()
96 return Convert.ToUInt32(Children.Count);
100 /// Get the Views parent
102 /// <seealso cref="Container::GetParent()">
104 protected override Container GetParent()
106 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
108 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(cPtr);
110 if (NDalicPINVOKE.SWIGPendingException.Pending)
111 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
113 return basehandle as Container;
118 // you can override it to clean-up your own resources.
119 protected override void Dispose(DisposeTypes type)
126 if(type == DisposeTypes.Explicit)
129 //Release your own managed resources here.
130 //You should release all of your own disposable objects here.
133 //Release your own unmanaged resources here.
134 //You should not access any managed member here except static instance.
135 //because the execution order of Finalizes is non-deterministic.
137 DisConnectFromSignals();
139 if (swigCPtr.Handle != global::System.IntPtr.Zero)
144 NDalicPINVOKE.delete_View(swigCPtr);
146 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
151 // Dispose all Children of this View.
152 foreach (View childView in Children)
154 childView?.Dispose();
159 private void DisConnectFromSignals()
161 // Save current CPtr.
162 global::System.Runtime.InteropServices.HandleRef currentCPtr = swigCPtr;
164 // Use BaseHandle CPtr as current might have been deleted already in derived classes.
165 swigCPtr = GetBaseHandleCPtrHandleRef;
167 if (_onRelayoutEventCallback != null)
169 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
172 if (_offWindowEventCallback != null)
174 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
177 if (_onWindowEventCallback != null)
179 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
182 if (_wheelEventCallback != null)
184 this.WheelEventSignal().Disconnect(_wheelEventCallback);
187 if (_hoverEventCallback != null)
189 this.HoveredSignal().Disconnect(_hoverEventCallback);
192 if (_touchDataCallback != null)
194 this.TouchSignal().Disconnect(_touchDataCallback);
197 if (_ResourcesLoadedCallback != null)
199 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
202 if (_offWindowEventCallback != null)
204 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
207 if (_onWindowEventCallback != null)
209 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
212 if (_wheelEventCallback != null)
214 this.WheelEventSignal().Disconnect(_wheelEventCallback);
217 if (_hoverEventCallback != null)
219 this.HoveredSignal().Disconnect(_hoverEventCallback);
222 if (_touchDataCallback != null)
224 this.TouchSignal().Disconnect(_touchDataCallback);
227 if (_onRelayoutEventCallback != null)
229 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
232 if (_keyCallback != null)
234 this.KeyEventSignal().Disconnect(_keyCallback);
237 if (_keyInputFocusLostCallback != null)
239 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
242 if (_keyInputFocusGainedCallback != null)
244 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
247 // BaseHandle CPtr is used in Registry and there is danger of deletion if we keep using it here.
248 // Restore current CPtr.
249 swigCPtr = currentCPtr;
252 private EventHandler _keyInputFocusGainedEventHandler;
253 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
254 private delegate void KeyInputFocusGainedCallbackType(IntPtr control);
255 private KeyInputFocusGainedCallbackType _keyInputFocusGainedCallback;
258 /// Event for KeyInputFocusGained signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
259 /// KeyInputFocusGained signal is emitted when the control gets Key Input Focus.<br>
261 public event EventHandler FocusGained
265 if (_keyInputFocusGainedEventHandler == null)
267 _keyInputFocusGainedCallback = OnKeyInputFocusGained;
268 this.KeyInputFocusGainedSignal().Connect(_keyInputFocusGainedCallback);
271 _keyInputFocusGainedEventHandler += value;
276 _keyInputFocusGainedEventHandler -= value;
278 if (_keyInputFocusGainedEventHandler == null && KeyInputFocusGainedSignal().Empty() == false)
280 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
285 private void OnKeyInputFocusGained(IntPtr view)
287 if (_keyInputFocusGainedEventHandler != null)
289 _keyInputFocusGainedEventHandler(this, null);
294 private EventHandler _keyInputFocusLostEventHandler;
295 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
296 private delegate void KeyInputFocusLostCallbackType(IntPtr control);
297 private KeyInputFocusLostCallbackType _keyInputFocusLostCallback;
300 /// Event for KeyInputFocusLost signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
301 /// KeyInputFocusLost signal is emitted when the control loses Key Input Focus.<br>
303 public event EventHandler FocusLost
307 if (_keyInputFocusLostEventHandler == null)
309 _keyInputFocusLostCallback = OnKeyInputFocusLost;
310 this.KeyInputFocusLostSignal().Connect(_keyInputFocusLostCallback);
313 _keyInputFocusLostEventHandler += value;
318 _keyInputFocusLostEventHandler -= value;
320 if (_keyInputFocusLostEventHandler == null && KeyInputFocusLostSignal().Empty() == false)
322 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
327 private void OnKeyInputFocusLost(IntPtr view)
329 if (_keyInputFocusLostEventHandler != null)
331 _keyInputFocusLostEventHandler(this, null);
336 /// Event arguments that passed via KeyEvent signal.
338 public class KeyEventArgs : EventArgs
343 /// Key - is the key sent to the View.
358 private EventHandlerWithReturnType<object, KeyEventArgs, bool> _keyEventHandler;
359 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
360 private delegate bool KeyCallbackType(IntPtr control, IntPtr keyEvent);
361 private KeyCallbackType _keyCallback;
364 /// Event for KeyPressed signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
365 /// KeyPressed signal is emitted when key event is received.<br>
367 public event EventHandlerWithReturnType<object, KeyEventArgs, bool> KeyEvent
371 if (_keyEventHandler == null)
373 _keyCallback = OnKeyEvent;
374 this.KeyEventSignal().Connect(_keyCallback);
377 _keyEventHandler += value;
382 _keyEventHandler -= value;
384 if (_keyEventHandler == null && KeyEventSignal().Empty() == false)
386 this.KeyEventSignal().Disconnect(_keyCallback);
391 private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
393 KeyEventArgs e = new KeyEventArgs();
397 e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
399 if (_keyEventHandler != null)
401 Delegate[] delegateList = _keyEventHandler.GetInvocationList();
403 // Oring the result of each callback.
404 foreach ( EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList )
406 result |= del( this, e );
413 private EventHandler _onRelayoutEventHandler;
414 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
415 private delegate void OnRelayoutEventCallbackType(IntPtr control);
416 private OnRelayoutEventCallbackType _onRelayoutEventCallback;
419 /// Event for OnRelayout signal which can be used to subscribe/unsubscribe the event handler.<br>
420 /// OnRelayout signal is emitted after the size has been set on the view during relayout.<br>
422 public event EventHandler Relayout
426 if (_onRelayoutEventHandler == null)
428 _onRelayoutEventCallback = OnRelayout;
429 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
432 _onRelayoutEventHandler += value;
437 _onRelayoutEventHandler -= value;
439 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
441 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
447 // Callback for View OnRelayout signal
448 private void OnRelayout(IntPtr data)
450 if (_onRelayoutEventHandler != null)
452 _onRelayoutEventHandler(this, null);
457 /// Event arguments that passed via Touch signal.
459 public class TouchEventArgs : EventArgs
461 private Touch _touch;
464 /// Touch - contains the information of touch points
479 private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
480 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
481 private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
482 private TouchDataCallbackType _touchDataCallback;
485 /// Event for Touched signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
486 /// Touched signal is emitted when touch input is received.<br>
488 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
492 if (_touchDataEventHandler == null)
494 _touchDataCallback = OnTouch;
495 this.TouchSignal().Connect(_touchDataCallback);
498 _touchDataEventHandler += value;
503 _touchDataEventHandler -= value;
505 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
507 this.TouchSignal().Disconnect(_touchDataCallback);
513 // Callback for View TouchSignal
514 private bool OnTouch(IntPtr view, IntPtr touchData)
516 TouchEventArgs e = new TouchEventArgs();
518 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
520 if (_touchDataEventHandler != null)
522 return _touchDataEventHandler(this, e);
529 /// Event arguments that passed via Hover signal.
531 public class HoverEventArgs : EventArgs
533 private Hover _hover;
536 /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
551 private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
552 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
553 private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
554 private HoverEventCallbackType _hoverEventCallback;
557 /// Event for Hovered signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
558 /// Hovered signal is emitted when hover input is received.<br>
560 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
564 if (_hoverEventHandler == null)
566 _hoverEventCallback = OnHoverEvent;
567 this.HoveredSignal().Connect(_hoverEventCallback);
570 _hoverEventHandler += value;
575 _hoverEventHandler -= value;
577 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
579 this.HoveredSignal().Disconnect(_hoverEventCallback);
585 // Callback for View Hover signal
586 private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
588 HoverEventArgs e = new HoverEventArgs();
590 e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
592 if (_hoverEventHandler != null)
594 return _hoverEventHandler(this, e);
601 /// Event arguments that passed via Wheel signal.
603 public class WheelEventArgs : EventArgs
605 private Wheel _wheel;
608 /// WheelEvent - store a wheel rolling type : MOUSE_WHEEL or CUSTOM_WHEEL
623 private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
624 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
625 private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
626 private WheelEventCallbackType _wheelEventCallback;
629 /// Event for WheelMoved signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
630 /// WheelMoved signal is emitted when wheel event is received.<br>
632 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
636 if (_wheelEventHandler == null)
638 _wheelEventCallback = OnWheelEvent;
639 this.WheelEventSignal().Connect(_wheelEventCallback);
642 _wheelEventHandler += value;
647 _wheelEventHandler -= value;
649 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
651 this.WheelEventSignal().Disconnect(_wheelEventCallback);
657 // Callback for View Wheel signal
658 private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
660 WheelEventArgs e = new WheelEventArgs();
662 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
664 if (_wheelEventHandler != null)
666 return _wheelEventHandler(this, e);
672 private EventHandler _onWindowEventHandler;
673 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
674 private delegate void OnWindowEventCallbackType(IntPtr control);
675 private OnWindowEventCallbackType _onWindowEventCallback;
678 /// Event for OnWindow signal which can be used to subscribe/unsubscribe the event handler.<br>
679 /// OnWindow signal is emitted after the view has been connected to the Window.<br>
681 public event EventHandler AddedToWindow
685 if (_onWindowEventHandler == null)
687 _onWindowEventCallback = OnWindow;
688 this.OnWindowSignal().Connect(_onWindowEventCallback);
691 _onWindowEventHandler += value;
696 _onWindowEventHandler -= value;
698 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
700 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
705 // Callback for View OnWindow signal
706 private void OnWindow(IntPtr data)
708 if (_onWindowEventHandler != null)
710 _onWindowEventHandler(this, null);
715 private EventHandler _offWindowEventHandler;
716 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
717 private delegate void OffWindowEventCallbackType(IntPtr control);
718 private OffWindowEventCallbackType _offWindowEventCallback;
721 /// Event for OffWindow signal which can be used to subscribe/unsubscribe the event handler.<br>
722 /// OffWindow signal is emitted after the view has been disconnected from the Window.<br>
724 public event EventHandler RemovedFromWindow
728 if (_offWindowEventHandler == null)
730 _offWindowEventCallback = OffWindow;
731 this.OffWindowSignal().Connect(_offWindowEventCallback);
734 _offWindowEventHandler += value;
739 _offWindowEventHandler -= value;
741 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
743 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
748 // Callback for View OffWindow signal
749 private void OffWindow(IntPtr data)
751 if (_offWindowEventHandler != null)
753 _offWindowEventHandler(this, null);
758 /// Event arguments of visibility changed.
760 public class VisibilityChangedEventArgs : EventArgs
763 private bool _visibility;
764 private VisibilityChangeType _type;
767 /// The view, or child of view, whose visibility has changed.
782 /// Whether the view is now visible or not.
784 public bool Visibility
797 /// Whether the view's visible property has changed or a parent's.
799 public VisibilityChangeType Type
812 private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
813 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
814 private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
815 private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
818 /// Event for visibility change which can be used to subscribe/unsubscribe the event handler.<br>
819 /// This signal is emitted when the visible property of this or a parent view is changed.<br>
821 public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
825 if (_visibilityChangedEventHandler == null)
827 _visibilityChangedEventCallback = OnVisibilityChanged;
828 VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
831 _visibilityChangedEventHandler += value;
836 _visibilityChangedEventHandler -= value;
838 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
840 VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
845 // Callback for View visibility change signal
846 private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
848 VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
851 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
853 e.Visibility = visibility;
856 if (_visibilityChangedEventHandler != null)
858 _visibilityChangedEventHandler(this, e);
862 // Resource Ready Signal
864 private EventHandler _resourcesLoadedEventHandler;
865 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
866 private delegate void ResourcesLoadedCallbackType(IntPtr control);
867 private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
870 /// Event for ResourcesLoadedSignal signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
871 /// This signal is emitted after all resources required by a View are loaded and ready.<br>
873 public event EventHandler ResourcesLoaded
877 if (_resourcesLoadedEventHandler == null)
879 _ResourcesLoadedCallback = OnResourcesLoaded;
880 this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
883 _resourcesLoadedEventHandler += value;
888 _resourcesLoadedEventHandler -= value;
890 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
892 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
897 private void OnResourcesLoaded(IntPtr view)
899 if (_resourcesLoadedEventHandler != null)
901 _resourcesLoadedEventHandler(this, null);
905 internal IntPtr GetPtrfromView()
907 return (IntPtr)swigCPtr;
910 internal class Property
912 internal static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get();
913 internal static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get();
914 internal static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get();
915 internal static readonly int LEFT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
916 internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
917 internal static readonly int UP_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
918 internal static readonly int DOWN_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
919 internal static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get();
920 internal static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get();
921 internal static readonly int SIBLING_ORDER = NDalicManualPINVOKE.Actor_Property_SIBLING_ORDER_get();
922 internal static readonly int OPACITY = NDalicManualPINVOKE.Actor_Property_OPACITY_get();
923 internal static readonly int SCREEN_POSITION = NDalicManualPINVOKE.Actor_Property_SCREEN_POSITION_get();
924 internal static readonly int POSITION_USES_ANCHOR_POINT = NDalicManualPINVOKE.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
925 internal static readonly int PARENT_ORIGIN = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_get();
926 internal static readonly int PARENT_ORIGIN_X = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_X_get();
927 internal static readonly int PARENT_ORIGIN_Y = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Y_get();
928 internal static readonly int PARENT_ORIGIN_Z = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Z_get();
929 internal static readonly int ANCHOR_POINT = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_get();
930 internal static readonly int ANCHOR_POINT_X = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_X_get();
931 internal static readonly int ANCHOR_POINT_Y = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Y_get();
932 internal static readonly int ANCHOR_POINT_Z = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Z_get();
933 internal static readonly int SIZE = NDalicPINVOKE.Actor_Property_SIZE_get();
934 internal static readonly int SIZE_WIDTH = NDalicPINVOKE.Actor_Property_SIZE_WIDTH_get();
935 internal static readonly int SIZE_HEIGHT = NDalicPINVOKE.Actor_Property_SIZE_HEIGHT_get();
936 internal static readonly int SIZE_DEPTH = NDalicPINVOKE.Actor_Property_SIZE_DEPTH_get();
937 internal static readonly int POSITION = NDalicPINVOKE.Actor_Property_POSITION_get();
938 internal static readonly int POSITION_X = NDalicPINVOKE.Actor_Property_POSITION_X_get();
939 internal static readonly int POSITION_Y = NDalicPINVOKE.Actor_Property_POSITION_Y_get();
940 internal static readonly int POSITION_Z = NDalicPINVOKE.Actor_Property_POSITION_Z_get();
941 internal static readonly int WORLD_POSITION = NDalicPINVOKE.Actor_Property_WORLD_POSITION_get();
942 internal static readonly int WORLD_POSITION_X = NDalicPINVOKE.Actor_Property_WORLD_POSITION_X_get();
943 internal static readonly int WORLD_POSITION_Y = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Y_get();
944 internal static readonly int WORLD_POSITION_Z = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Z_get();
945 internal static readonly int ORIENTATION = NDalicPINVOKE.Actor_Property_ORIENTATION_get();
946 internal static readonly int WORLD_ORIENTATION = NDalicPINVOKE.Actor_Property_WORLD_ORIENTATION_get();
947 internal static readonly int SCALE = NDalicPINVOKE.Actor_Property_SCALE_get();
948 internal static readonly int SCALE_X = NDalicPINVOKE.Actor_Property_SCALE_X_get();
949 internal static readonly int SCALE_Y = NDalicPINVOKE.Actor_Property_SCALE_Y_get();
950 internal static readonly int SCALE_Z = NDalicPINVOKE.Actor_Property_SCALE_Z_get();
951 internal static readonly int WORLD_SCALE = NDalicPINVOKE.Actor_Property_WORLD_SCALE_get();
952 internal static readonly int VISIBLE = NDalicPINVOKE.Actor_Property_VISIBLE_get();
953 internal static readonly int WORLD_COLOR = NDalicPINVOKE.Actor_Property_WORLD_COLOR_get();
954 internal static readonly int WORLD_MATRIX = NDalicPINVOKE.Actor_Property_WORLD_MATRIX_get();
955 internal static readonly int NAME = NDalicPINVOKE.Actor_Property_NAME_get();
956 internal static readonly int SENSITIVE = NDalicPINVOKE.Actor_Property_SENSITIVE_get();
957 internal static readonly int LEAVE_REQUIRED = NDalicPINVOKE.Actor_Property_LEAVE_REQUIRED_get();
958 internal static readonly int INHERIT_ORIENTATION = NDalicPINVOKE.Actor_Property_INHERIT_ORIENTATION_get();
959 internal static readonly int INHERIT_SCALE = NDalicPINVOKE.Actor_Property_INHERIT_SCALE_get();
960 internal static readonly int DRAW_MODE = NDalicPINVOKE.Actor_Property_DRAW_MODE_get();
961 internal static readonly int SIZE_MODE_FACTOR = NDalicPINVOKE.Actor_Property_SIZE_MODE_FACTOR_get();
962 internal static readonly int WIDTH_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_WIDTH_RESIZE_POLICY_get();
963 internal static readonly int HEIGHT_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_HEIGHT_RESIZE_POLICY_get();
964 internal static readonly int SIZE_SCALE_POLICY = NDalicPINVOKE.Actor_Property_SIZE_SCALE_POLICY_get();
965 internal static readonly int WIDTH_FOR_HEIGHT = NDalicPINVOKE.Actor_Property_WIDTH_FOR_HEIGHT_get();
966 internal static readonly int HEIGHT_FOR_WIDTH = NDalicPINVOKE.Actor_Property_HEIGHT_FOR_WIDTH_get();
967 internal static readonly int PADDING = NDalicPINVOKE.Actor_Property_PADDING_get();
968 internal static readonly int MINIMUM_SIZE = NDalicPINVOKE.Actor_Property_MINIMUM_SIZE_get();
969 internal static readonly int MAXIMUM_SIZE = NDalicPINVOKE.Actor_Property_MAXIMUM_SIZE_get();
970 internal static readonly int INHERIT_POSITION = NDalicPINVOKE.Actor_Property_INHERIT_POSITION_get();
971 internal static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
975 /// Describes the direction to move the focus towards.
977 public enum FocusDirection
988 /// Creates a new instance of a View.
990 public View() : this(NDalicPINVOKE.View_New(), true)
992 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
995 internal View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true)
997 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1001 /// Downcasts a handle to View handle.<br>
1002 /// If handle points to a View, the downcast produces valid handle.<br>
1003 /// If not, the returned handle is left uninitialized.<br>
1005 /// <param name="handle">Handle to an object</param>
1006 /// <returns>A handle to a View or an uninitialized handle</returns>
1007 [Obsolete("Please do not use! this will be deprecated, instead please us as keyword.")]
1008 public new static View DownCast(BaseHandle handle)
1010 View ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as View;
1011 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1015 [Obsolete("Please do not use! this will be deprecated, instead please us as keyword.")]
1016 public static T DownCast<T>(View view) where T : View
1018 T ret = Registry.GetManagedBaseHandleFromNativePtr(view) as T;
1026 private View ConvertIdToView(uint id)
1032 View parentView = Parent as View;
1033 view = parentView.FindChildById(id);
1038 view = Window.Instance.GetRootLayer().FindChildById(id);
1044 internal void SetKeyInputFocus()
1046 NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
1047 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1051 /// Quries whether the view has focus.
1053 /// <returns>true if this view has focus</returns>
1054 public bool HasFocus()
1056 bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
1057 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1061 internal void ClearKeyInputFocus()
1063 NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
1064 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1067 internal PinchGestureDetector GetPinchGestureDetector()
1069 PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
1070 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1074 internal PanGestureDetector GetPanGestureDetector()
1076 PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
1077 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1081 internal TapGestureDetector GetTapGestureDetector()
1083 TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
1084 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1088 internal LongPressGestureDetector GetLongPressGestureDetector()
1090 LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
1091 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1096 /// Sets the name of the style to be applied to the view.
1098 /// <param name="styleName">A string matching a style described in a stylesheet</param>
1099 public void SetStyleName(string styleName)
1101 NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
1102 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1106 /// Retrieves the name of the style to be applied to the view (if any).
1108 /// <returns>A string matching a style, or an empty string</returns>
1109 public string GetStyleName()
1111 string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
1112 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1116 internal void SetBackgroundColor(Vector4 color)
1118 NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
1119 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1122 internal Vector4 GetBackgroundColor()
1124 Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
1125 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1129 internal void SetBackgroundImage(Image image)
1131 NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
1132 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1136 /// Clears the background.
1138 public void ClearBackground()
1140 NDalicPINVOKE.View_ClearBackground(swigCPtr);
1141 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1144 internal ControlKeySignal KeyEventSignal()
1146 ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
1147 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1151 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
1153 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
1154 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1158 internal KeyInputFocusSignal KeyInputFocusLostSignal()
1160 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
1161 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1165 internal View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
1167 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1170 internal enum PropertyRange
1172 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
1173 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
1174 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
1178 /// styleName, type string.
1180 public string StyleName
1185 GetProperty(View.Property.STYLE_NAME).Get(out temp);
1190 SetProperty(View.Property.STYLE_NAME, new Tizen.NUI.PropertyValue(value));
1195 /// mutually exclusive with BACKGROUND_IMAGE & BACKGROUND, type Vector4.
1197 public Color BackgroundColor
1201 Color backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1203 Tizen.NUI.PropertyMap background = Background;
1205 background.Find(Visual.Property.Type)?.Get(out visualType);
1206 if (visualType == (int)Visual.Type.Color)
1208 background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor);
1211 return backgroundColor;
1215 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1220 /// Create an Animation to animate the background color visual. If there is no
1221 /// background visual, creates one with transparent black as it's mixColor.
1223 public Animation AnimateBackgroundColor( object destinationValue,
1226 AlphaFunction.BuiltinFunctions? alphaFunction = null,
1227 object initialValue = null)
1229 Tizen.NUI.PropertyMap background = Background;
1231 if( background.Empty() )
1233 // If there is no background yet, ensure there is a transparent
1235 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1236 background = Background;
1238 return AnimateColor( "background", destinationValue, startTime, endTime, alphaFunction, initialValue );
1242 /// Create an Animation to animate the mixColor of the named visual.
1244 public Animation AnimateColor( string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null )
1246 Animation animation = null;
1248 PropertyMap _animator = new PropertyMap();
1249 if( alphaFunction != null )
1251 _animator.Add("alphaFunction", new PropertyValue( AlphaFunction.BuiltinToPropertyKey(alphaFunction) ) );
1254 PropertyMap _timePeriod = new PropertyMap();
1255 _timePeriod.Add( "duration", new PropertyValue((endTime-startTime)/1000.0f) );
1256 _timePeriod.Add( "delay", new PropertyValue( startTime/1000.0f ) );
1257 _animator.Add( "timePeriod", new PropertyValue( _timePeriod ) );
1259 PropertyMap _transition = new PropertyMap();
1260 _transition.Add( "animator", new PropertyValue( _animator ) );
1261 _transition.Add( "target", new PropertyValue( targetVisual ) );
1262 _transition.Add( "property", new PropertyValue( "mixColor" ) );
1264 if( initialColor != null )
1266 PropertyValue initValue = PropertyValue.CreateFromObject( initialColor );
1267 _transition.Add( "initialValue", initValue );
1270 PropertyValue destValue = PropertyValue.CreateFromObject( destinationColor );
1271 _transition.Add( "targetValue", destValue );
1272 TransitionData _transitionData = new TransitionData( _transition );
1274 animation = new Animation( NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true );
1275 if (NDalicPINVOKE.SWIGPendingException.Pending)
1276 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1282 /// mutually exclusive with BACKGROUND_COLOR & BACKGROUND, type Map.
1284 public string BackgroundImage
1288 string backgroundImage = "";
1290 Tizen.NUI.PropertyMap background = Background;
1292 background.Find(Visual.Property.Type)?.Get(out visualType);
1293 if (visualType == (int)Visual.Type.Image)
1295 background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
1298 return backgroundImage;
1302 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1306 public Tizen.NUI.PropertyMap Background
1310 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1311 GetProperty( View.Property.BACKGROUND ).Get(temp);
1316 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1322 /// The current state of the view.
1329 if (GetProperty(View.Property.STATE).Get(out temp) == false)
1331 NUILog.Error("State get error!");
1337 return States.Normal;
1341 return States.Focused;
1345 return States.Disabled;
1349 return States.Normal;
1355 SetProperty(View.Property.STATE, new Tizen.NUI.PropertyValue((int)value));
1360 /// The current sub state of the view.
1362 public States SubState
1367 if (GetProperty(View.Property.SUB_STATE).Get(out temp) == false)
1369 NUILog.Error("subState get error!");
1374 return States.Normal;
1376 return States.Focused;
1378 return States.Disabled;
1380 return States.Normal;
1385 string valueToString = "";
1390 valueToString = "NORMAL";
1393 case States.Focused:
1395 valueToString = "FOCUSED";
1398 case States.Disabled:
1400 valueToString = "DISABLED";
1405 valueToString = "NORMAL";
1409 SetProperty(View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
1414 /// Displays a tooltip
1416 public Tizen.NUI.PropertyMap Tooltip
1420 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1421 GetProperty(View.Property.TOOLTIP).Get(temp);
1426 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1431 /// Displays a tooltip as Text
1433 public string TooltipText
1437 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1441 private int LeftFocusableViewId
1446 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
1451 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1455 private int RightFocusableViewId
1460 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
1465 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1469 private int UpFocusableViewId
1474 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
1479 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1483 private int DownFocusableViewId
1488 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
1493 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1498 /// Child Property of FlexContainer.<br>
1499 /// The proportion of the free space in the container the flex item will receive.<br>
1500 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br>
1507 GetProperty(FlexContainer.ChildProperty.FLEX).Get(out temp);
1512 SetProperty(FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue(value));
1517 /// Child Property of FlexContainer.<br>
1518 /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br>
1520 public int AlignSelf
1525 GetProperty(FlexContainer.ChildProperty.ALIGN_SELF).Get(out temp);
1530 SetProperty(FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue(value));
1535 /// Child Property of FlexContainer.<br>
1536 /// The space around the flex item.<br>
1538 public Vector4 FlexMargin
1542 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1543 GetProperty(FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
1548 SetProperty(FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue(value));
1553 /// The top-left cell this child occupies, if not set, the first available cell is used
1555 public Vector2 CellIndex
1559 Vector2 temp = new Vector2(0.0f, 0.0f);
1560 GetProperty(TableView.ChildProperty.CELL_INDEX).Get(temp);
1565 SetProperty(TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue(value));
1570 /// The number of rows this child occupies, if not set, default value is 1
1572 public float RowSpan
1577 GetProperty(TableView.ChildProperty.ROW_SPAN).Get(out temp);
1582 SetProperty(TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue(value));
1587 /// The number of columns this child occupies, if not set, default value is 1
1589 public float ColumnSpan
1594 GetProperty(TableView.ChildProperty.COLUMN_SPAN).Get(out temp);
1599 SetProperty(TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue(value));
1604 /// The horizontal alignment of this child inside the cells, if not set, default value is 'left'
1606 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
1611 if (GetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
1613 NUILog.Error("CellHorizontalAlignment get error!");
1619 return Tizen.NUI.HorizontalAlignmentType.Left;
1621 return Tizen.NUI.HorizontalAlignmentType.Center;
1623 return Tizen.NUI.HorizontalAlignmentType.Right;
1625 return Tizen.NUI.HorizontalAlignmentType.Left;
1630 string valueToString = "";
1633 case Tizen.NUI.HorizontalAlignmentType.Left:
1635 valueToString = "left";
1638 case Tizen.NUI.HorizontalAlignmentType.Center:
1640 valueToString = "center";
1643 case Tizen.NUI.HorizontalAlignmentType.Right:
1645 valueToString = "right";
1650 valueToString = "left";
1654 SetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1659 /// The vertical alignment of this child inside the cells, if not set, default value is 'top'
1661 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
1666 GetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
1668 NUILog.Error("CellVerticalAlignment get error!");
1674 return Tizen.NUI.VerticalAlignmentType.Top;
1676 return Tizen.NUI.VerticalAlignmentType.Center;
1678 return Tizen.NUI.VerticalAlignmentType.Bottom;
1680 return Tizen.NUI.VerticalAlignmentType.Top;
1685 string valueToString = "";
1688 case Tizen.NUI.VerticalAlignmentType.Top:
1690 valueToString = "top";
1693 case Tizen.NUI.VerticalAlignmentType.Center:
1695 valueToString = "center";
1698 case Tizen.NUI.VerticalAlignmentType.Bottom:
1700 valueToString = "bottom";
1705 valueToString = "top";
1709 SetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1714 /// The left focusable view.<br>
1715 /// This will return NULL if not set.<br>
1716 /// This will also return NULL if the specified left focusable view is not on Window.<br>
1718 public View LeftFocusableView
1720 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1723 if (LeftFocusableViewId >= 0)
1725 return ConvertIdToView((uint)LeftFocusableViewId);
1731 LeftFocusableViewId = (int)value.GetId();
1736 /// The right focusable view.<br>
1737 /// This will return NULL if not set.<br>
1738 /// This will also return NULL if the specified right focusable view is not on Window.<br>
1740 public View RightFocusableView
1742 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1745 if (RightFocusableViewId >= 0)
1747 return ConvertIdToView((uint)RightFocusableViewId);
1753 RightFocusableViewId = (int)value.GetId();
1758 /// The up focusable view.<br>
1759 /// This will return NULL if not set.<br>
1760 /// This will also return NULL if the specified up focusable view is not on Window.<br>
1762 public View UpFocusableView
1764 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1767 if (UpFocusableViewId >= 0)
1769 return ConvertIdToView((uint)UpFocusableViewId);
1775 UpFocusableViewId = (int)value.GetId();
1780 /// The down focusable view.<br>
1781 /// This will return NULL if not set.<br>
1782 /// This will also return NULL if the specified down focusable view is not on Window.<br>
1784 public View DownFocusableView
1786 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1789 if (DownFocusableViewId >= 0)
1791 return ConvertIdToView((uint)DownFocusableViewId);
1797 DownFocusableViewId = (int)value.GetId();
1802 /// whether the view should be focusable by keyboard navigation.
1804 public bool Focusable
1808 SetKeyboardFocusable(value);
1812 return IsKeyboardFocusable();
1817 /// Enumeration for describing the states of view.
1836 /// Retrieves the position of the View.<br>
1837 /// The coordinates are relative to the View's parent.<br>
1839 public Position CurrentPosition
1843 return GetCurrentPosition();
1848 /// Sets the size of an view for width and height.<br>
1849 /// Geometry can be scaled to fit within this area.<br>
1850 /// This does not interfere with the views scale factor.<br>
1851 /// The views default depth is the minimum of width & height.<br>
1853 public Size2D Size2D
1857 Size temp = new Size(0.0f, 0.0f, 0.0f);
1858 GetProperty(View.Property.SIZE).Get(temp);
1859 Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
1864 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(new Size(value)));
1869 /// Retrieves the size of the View.<br>
1870 /// The coordinates are relative to the View's parent.<br>
1872 public Size2D CurrentSize
1876 return GetCurrentSize();
1880 [Obsolete("Please do not use! this will be deprecated. Please use Visibility instead.")]
1890 /// Retrieves and sets the view's opacity.<br>
1892 public float Opacity
1897 GetProperty(View.Property.OPACITY).Get(out temp);
1902 SetProperty(View.Property.OPACITY, new Tizen.NUI.PropertyValue(value));
1907 /// Sets the position of the View for X and Y.<br>
1908 /// By default, sets the position vector between the parent origin and pivot point(default).<br>
1909 /// If Position inheritance if disabled, sets the world position.<br>
1911 public Position2D Position2D
1915 Position temp = new Position(0.0f, 0.0f, 0.0f);
1916 GetProperty(View.Property.POSITION).Get(temp);
1917 return new Position2D(temp);
1921 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(new Position(value)));
1926 /// Retrieves screen postion of view's.<br>
1928 public Vector2 ScreenPosition
1932 Vector2 temp = new Vector2(0.0f, 0.0f);
1933 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
1939 /// Determines whether the pivot point should be used to determine the position of the view.
1940 /// This is true by default.
1942 /// <remarks>If false, then the top-left of the view is used for the position.
1943 /// Setting this to false will allow scaling or rotation around the anchor-point without affecting the view's position.
1945 public bool PositionUsesPivotPoint
1950 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
1955 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
1959 [Obsolete("Please do not use! this will be deprecated")]
1960 public bool PositionUsesAnchorPoint
1965 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
1970 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
1974 internal bool FocusState
1978 return IsKeyboardFocusable();
1982 SetKeyboardFocusable(value);
1987 /// Queries whether the view is connected to the Stage.<br>
1988 /// When an view is connected, it will be directly or indirectly parented to the root View.<br>
1990 public bool IsOnWindow
1999 /// Gets depth in the hierarchy for the view.
2001 public int HierarchyDepth
2005 return GetHierarchyDepth();
2010 /// Sets the sibling order of the view so depth position can be defined within the same parent.
2013 /// Note The initial value is 0.
2014 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove and LowerBelow will override the sibling order.
2015 /// The values set by this Property will likely change.
2017 public int SiblingOrder
2022 GetProperty(View.Property.SIBLING_ORDER).Get(out temp);
2027 SetProperty(View.Property.SIBLING_ORDER, new Tizen.NUI.PropertyValue(value));
2031 [Obsolete("Please do not use! this will be internal property")]
2032 public Vector3 NaturalSize
2036 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2037 if (NDalicPINVOKE.SWIGPendingException.Pending)
2038 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2047 /// This is an asynchronous method.
2058 /// This is an asynchronous method.
2059 /// If an view is hidden, then the view and its children will not be rendered.
2060 /// 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.
2067 internal void Raise()
2069 var parentChildren = Parent?.Children;
2071 if (parentChildren != null)
2073 int currentIndex = parentChildren.IndexOf(this);
2075 // If the view is not already the last item in the list.
2076 if (currentIndex != parentChildren.Count -1)
2078 View temp = parentChildren[currentIndex + 1];
2079 parentChildren[currentIndex + 1] = this;
2080 parentChildren[currentIndex] = temp;
2084 NDalicPINVOKE.Raise(swigCPtr);
2085 if (NDalicPINVOKE.SWIGPendingException.Pending)
2086 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2089 internal void Lower()
2091 var parentChildren = Parent?.Children;
2093 if (parentChildren != null)
2095 int currentIndex = parentChildren.IndexOf(this);
2097 // If the view is not already the first item in the list.
2098 if (currentIndex > 0)
2100 View temp = parentChildren[currentIndex - 1];
2101 parentChildren[currentIndex - 1] = this;
2102 parentChildren[currentIndex] = temp;
2106 NDalicPINVOKE.Lower(swigCPtr);
2107 if (NDalicPINVOKE.SWIGPendingException.Pending)
2108 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2112 /// Raise view above all other views.
2115 /// Sibling order of views within the parent will be updated automatically.
2116 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2118 public void RaiseToTop()
2120 var parentChildren = Parent?.Children;
2122 if (parentChildren != null)
2124 parentChildren.Remove(this);
2125 parentChildren.Add(this);
2128 NDalicPINVOKE.RaiseToTop(swigCPtr);
2129 if (NDalicPINVOKE.SWIGPendingException.Pending)
2130 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2134 /// Lower view to the bottom of all views.
2137 /// Sibling order of views within the parent will be updated automatically.
2138 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2140 public void LowerToBottom()
2142 var parentChildren = Parent?.Children;
2144 if (parentChildren != null)
2146 parentChildren.Remove(this);
2147 parentChildren.Insert(0, this);
2150 NDalicPINVOKE.LowerToBottom(swigCPtr);
2151 if (NDalicPINVOKE.SWIGPendingException.Pending)
2152 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2156 /// Query if all resources required by a View are loaded and ready.
2158 /// <remarks>Most resources are only loaded when the control is placed on stage
2160 public bool IsResourceReady()
2162 bool ret = NDalicPINVOKE.IsResourceReady(swigCPtr);
2163 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2168 /// Raise the view to above the target view.
2170 /// <remarks>Sibling order of views within the parent will be updated automatically.
2171 /// Views on the level above the target view will still be shown above this view.
2172 /// Raising this view above views with the same sibling order as each other will raise this view above them.
2173 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2175 /// <param name="target">Will be raised above this view</param>
2176 internal void RaiseAbove(View target)
2178 var parentChildren = Parent?.Children;
2180 if (parentChildren != null)
2182 int currentIndex = parentChildren.IndexOf(this);
2183 int targetIndex = parentChildren.IndexOf(target);
2185 // If the currentIndex is less than the target index and the target has the same parent.
2186 if (currentIndex < targetIndex)
2188 parentChildren.Remove(this);
2189 parentChildren.Insert(targetIndex, this);
2193 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
2194 if (NDalicPINVOKE.SWIGPendingException.Pending)
2195 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2199 /// Lower the view to below the target view.
2201 /// <remarks>Sibling order of views within the parent will be updated automatically.
2202 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
2203 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2205 /// <param name="target">Will be lowered below this view</param>
2206 internal void LowerBelow(View target)
2208 var parentChildren = Parent?.Children;
2210 if (parentChildren != null)
2212 int currentIndex = parentChildren.IndexOf(this);
2213 int targetIndex = parentChildren.IndexOf(target);
2215 // If the currentIndex is not already the 0th index and the target has the same parent.
2216 if ((currentIndex != 0) && (targetIndex != -1) &&
2217 (currentIndex > targetIndex))
2219 parentChildren.Remove(this);
2220 parentChildren.Insert(targetIndex, this);
2224 NDalicPINVOKE.LowerBelow(swigCPtr, View.getCPtr(target));
2225 if (NDalicPINVOKE.SWIGPendingException.Pending)
2226 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2229 internal string GetName()
2231 string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);
2232 if (NDalicPINVOKE.SWIGPendingException.Pending)
2233 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2237 internal void SetName(string name)
2239 NDalicPINVOKE.Actor_SetName(swigCPtr, name);
2240 if (NDalicPINVOKE.SWIGPendingException.Pending)
2241 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2244 internal uint GetId()
2246 uint ret = NDalicPINVOKE.Actor_GetId(swigCPtr);
2247 if (NDalicPINVOKE.SWIGPendingException.Pending)
2248 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2252 internal bool IsRoot()
2254 bool ret = NDalicPINVOKE.Actor_IsRoot(swigCPtr);
2255 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2259 internal bool OnWindow()
2261 bool ret = NDalicPINVOKE.Actor_OnStage(swigCPtr);
2262 if (NDalicPINVOKE.SWIGPendingException.Pending)
2263 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2267 internal Layer GetLayer()
2269 IntPtr cPtr = NDalicPINVOKE.Actor_GetLayer(swigCPtr);
2270 Layer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Layer;
2272 if (NDalicPINVOKE.SWIGPendingException.Pending)
2273 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2278 /// Removes a View from its Parent View / Layer. If the View has no parent, this method does nothing.
2280 /// <pre>The (child) View has been initialized. </pre>
2281 public void Unparent()
2283 GetParent()?.Remove(this);
2287 /// Search through this view's hierarchy for an view with the given name.
2288 /// The view itself is also considered in the search.
2290 /// <pre>The View has been initialized.</pre>
2291 /// <param name="viewName">The name of the view to find</param>
2292 /// <returns>A handle to the view if found, or an empty handle if not</returns>
2293 public View FindChildByName(string viewName)
2295 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
2297 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2299 if (NDalicPINVOKE.SWIGPendingException.Pending)
2300 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2304 internal View FindChildById(uint id)
2306 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
2308 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2310 if (NDalicPINVOKE.SWIGPendingException.Pending)
2311 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2315 internal void SetParentOrigin(Vector3 origin)
2317 NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
2318 if (NDalicPINVOKE.SWIGPendingException.Pending)
2319 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2322 internal Vector3 GetCurrentParentOrigin()
2324 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentParentOrigin(swigCPtr), true);
2325 if (NDalicPINVOKE.SWIGPendingException.Pending)
2326 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2330 internal void SetAnchorPoint(Vector3 anchorPoint)
2332 NDalicPINVOKE.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
2333 if (NDalicPINVOKE.SWIGPendingException.Pending)
2334 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2337 internal Vector3 GetCurrentAnchorPoint()
2339 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentAnchorPoint(swigCPtr), true);
2340 if (NDalicPINVOKE.SWIGPendingException.Pending)
2341 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2345 internal void SetSize(float width, float height)
2347 NDalicPINVOKE.Actor_SetSize__SWIG_0(swigCPtr, width, height);
2348 if (NDalicPINVOKE.SWIGPendingException.Pending)
2349 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2352 internal void SetSize(float width, float height, float depth)
2354 NDalicPINVOKE.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
2355 if (NDalicPINVOKE.SWIGPendingException.Pending)
2356 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2359 internal void SetSize(Vector2 size)
2361 NDalicPINVOKE.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
2362 if (NDalicPINVOKE.SWIGPendingException.Pending)
2363 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2366 internal void SetSize(Vector3 size)
2368 NDalicPINVOKE.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
2369 if (NDalicPINVOKE.SWIGPendingException.Pending)
2370 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2373 internal Vector3 GetTargetSize()
2375 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetTargetSize(swigCPtr), true);
2376 if (NDalicPINVOKE.SWIGPendingException.Pending)
2377 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2381 internal Size2D GetCurrentSize()
2383 Size ret = new Size(NDalicPINVOKE.Actor_GetCurrentSize(swigCPtr), true);
2384 if (NDalicPINVOKE.SWIGPendingException.Pending)
2385 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2386 Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
2390 internal Vector3 GetNaturalSize()
2392 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2393 if (NDalicPINVOKE.SWIGPendingException.Pending)
2394 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2398 internal void SetPosition(float x, float y)
2400 NDalicPINVOKE.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
2401 if (NDalicPINVOKE.SWIGPendingException.Pending)
2402 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2405 internal void SetPosition(float x, float y, float z)
2407 NDalicPINVOKE.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
2408 if (NDalicPINVOKE.SWIGPendingException.Pending)
2409 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2412 internal void SetPosition(Vector3 position)
2414 NDalicPINVOKE.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
2415 if (NDalicPINVOKE.SWIGPendingException.Pending)
2416 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2419 internal void SetX(float x)
2421 NDalicPINVOKE.Actor_SetX(swigCPtr, x);
2422 if (NDalicPINVOKE.SWIGPendingException.Pending)
2423 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2426 internal void SetY(float y)
2428 NDalicPINVOKE.Actor_SetY(swigCPtr, y);
2429 if (NDalicPINVOKE.SWIGPendingException.Pending)
2430 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2433 internal void SetZ(float z)
2435 NDalicPINVOKE.Actor_SetZ(swigCPtr, z);
2436 if (NDalicPINVOKE.SWIGPendingException.Pending)
2437 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2440 internal void TranslateBy(Vector3 distance)
2442 NDalicPINVOKE.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
2443 if (NDalicPINVOKE.SWIGPendingException.Pending)
2444 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2447 internal Position GetCurrentPosition()
2449 Position ret = new Position(NDalicPINVOKE.Actor_GetCurrentPosition(swigCPtr), true);
2450 if (NDalicPINVOKE.SWIGPendingException.Pending)
2451 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2455 internal Vector3 GetCurrentWorldPosition()
2457 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldPosition(swigCPtr), true);
2458 if (NDalicPINVOKE.SWIGPendingException.Pending)
2459 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2463 internal void SetInheritPosition(bool inherit)
2465 NDalicPINVOKE.Actor_SetInheritPosition(swigCPtr, inherit);
2466 if (NDalicPINVOKE.SWIGPendingException.Pending)
2467 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2470 internal bool IsPositionInherited()
2472 bool ret = NDalicPINVOKE.Actor_IsPositionInherited(swigCPtr);
2473 if (NDalicPINVOKE.SWIGPendingException.Pending)
2474 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2478 internal void SetOrientation(Degree angle, Vector3 axis)
2480 NDalicPINVOKE.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2481 if (NDalicPINVOKE.SWIGPendingException.Pending)
2482 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2485 internal void SetOrientation(Radian angle, Vector3 axis)
2487 NDalicPINVOKE.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2488 if (NDalicPINVOKE.SWIGPendingException.Pending)
2489 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2492 internal void SetOrientation(Rotation orientation)
2494 NDalicPINVOKE.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
2495 if (NDalicPINVOKE.SWIGPendingException.Pending)
2496 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2499 internal void RotateBy(Degree angle, Vector3 axis)
2501 NDalicPINVOKE.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2502 if (NDalicPINVOKE.SWIGPendingException.Pending)
2503 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2506 internal void RotateBy(Radian angle, Vector3 axis)
2508 NDalicPINVOKE.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2509 if (NDalicPINVOKE.SWIGPendingException.Pending)
2510 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2513 internal void RotateBy(Rotation relativeRotation)
2515 NDalicPINVOKE.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
2516 if (NDalicPINVOKE.SWIGPendingException.Pending)
2517 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2520 internal Rotation GetCurrentOrientation()
2522 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentOrientation(swigCPtr), true);
2523 if (NDalicPINVOKE.SWIGPendingException.Pending)
2524 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2528 internal void SetInheritOrientation(bool inherit)
2530 NDalicPINVOKE.Actor_SetInheritOrientation(swigCPtr, inherit);
2531 if (NDalicPINVOKE.SWIGPendingException.Pending)
2532 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2535 internal bool IsOrientationInherited()
2537 bool ret = NDalicPINVOKE.Actor_IsOrientationInherited(swigCPtr);
2538 if (NDalicPINVOKE.SWIGPendingException.Pending)
2539 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2543 internal Rotation GetCurrentWorldOrientation()
2545 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentWorldOrientation(swigCPtr), true);
2546 if (NDalicPINVOKE.SWIGPendingException.Pending)
2547 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2551 internal void SetScale(float scale)
2553 NDalicPINVOKE.Actor_SetScale__SWIG_0(swigCPtr, scale);
2554 if (NDalicPINVOKE.SWIGPendingException.Pending)
2555 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2558 internal void SetScale(float scaleX, float scaleY, float scaleZ)
2560 NDalicPINVOKE.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
2561 if (NDalicPINVOKE.SWIGPendingException.Pending)
2562 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2565 internal void SetScale(Vector3 scale)
2567 NDalicPINVOKE.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
2568 if (NDalicPINVOKE.SWIGPendingException.Pending)
2569 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2572 internal void ScaleBy(Vector3 relativeScale)
2574 NDalicPINVOKE.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
2575 if (NDalicPINVOKE.SWIGPendingException.Pending)
2576 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2579 internal Vector3 GetCurrentScale()
2581 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentScale(swigCPtr), true);
2582 if (NDalicPINVOKE.SWIGPendingException.Pending)
2583 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2587 internal Vector3 GetCurrentWorldScale()
2589 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldScale(swigCPtr), true);
2590 if (NDalicPINVOKE.SWIGPendingException.Pending)
2591 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2595 internal void SetInheritScale(bool inherit)
2597 NDalicPINVOKE.Actor_SetInheritScale(swigCPtr, inherit);
2598 if (NDalicPINVOKE.SWIGPendingException.Pending)
2599 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2602 internal bool IsScaleInherited()
2604 bool ret = NDalicPINVOKE.Actor_IsScaleInherited(swigCPtr);
2605 if (NDalicPINVOKE.SWIGPendingException.Pending)
2606 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2610 internal Matrix GetCurrentWorldMatrix()
2612 Matrix ret = new Matrix(NDalicPINVOKE.Actor_GetCurrentWorldMatrix(swigCPtr), true);
2613 if (NDalicPINVOKE.SWIGPendingException.Pending)
2614 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2618 internal void SetVisible(bool visible)
2620 NDalicPINVOKE.Actor_SetVisible(swigCPtr, visible);
2621 if (NDalicPINVOKE.SWIGPendingException.Pending)
2622 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2625 internal bool IsVisible()
2627 bool ret = NDalicPINVOKE.Actor_IsVisible(swigCPtr);
2628 if (NDalicPINVOKE.SWIGPendingException.Pending)
2629 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2633 internal void SetOpacity(float opacity)
2635 NDalicPINVOKE.Actor_SetOpacity(swigCPtr, opacity);
2636 if (NDalicPINVOKE.SWIGPendingException.Pending)
2637 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2640 internal float GetCurrentOpacity()
2642 float ret = NDalicPINVOKE.Actor_GetCurrentOpacity(swigCPtr);
2643 if (NDalicPINVOKE.SWIGPendingException.Pending)
2644 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2648 internal void SetColor(Vector4 color)
2650 NDalicPINVOKE.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
2651 if (NDalicPINVOKE.SWIGPendingException.Pending)
2652 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2655 internal Vector4 GetCurrentColor()
2657 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentColor(swigCPtr), true);
2658 if (NDalicPINVOKE.SWIGPendingException.Pending)
2659 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2663 internal void SetColorMode(ColorMode colorMode)
2665 NDalicPINVOKE.Actor_SetColorMode(swigCPtr, (int)colorMode);
2666 if (NDalicPINVOKE.SWIGPendingException.Pending)
2667 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2670 internal ColorMode GetColorMode()
2672 ColorMode ret = (ColorMode)NDalicPINVOKE.Actor_GetColorMode(swigCPtr);
2673 if (NDalicPINVOKE.SWIGPendingException.Pending)
2674 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2678 internal Vector4 GetCurrentWorldColor()
2680 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentWorldColor(swigCPtr), true);
2681 if (NDalicPINVOKE.SWIGPendingException.Pending)
2682 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2686 internal void SetDrawMode(DrawModeType drawMode)
2688 NDalicPINVOKE.Actor_SetDrawMode(swigCPtr, (int)drawMode);
2689 if (NDalicPINVOKE.SWIGPendingException.Pending)
2690 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2693 internal DrawModeType GetDrawMode()
2695 DrawModeType ret = (DrawModeType)NDalicPINVOKE.Actor_GetDrawMode(swigCPtr);
2696 if (NDalicPINVOKE.SWIGPendingException.Pending)
2697 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2702 /// Converts screen coordinates into the view's coordinate system using the default camera.
2704 /// <pre>The View has been initialized.</pre>
2705 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5)</remarks>
2706 /// <param name="localX">On return, the X-coordinate relative to the view</param>
2707 /// <param name="localY">On return, the Y-coordinate relative to the view</param>
2708 /// <param name="screenX">The screen X-coordinate</param>
2709 /// <param name="screenY">The screen Y-coordinate</param>
2710 /// <returns>True if the conversion succeeded</returns>
2711 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
2713 bool ret = NDalicPINVOKE.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
2714 if (NDalicPINVOKE.SWIGPendingException.Pending)
2715 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2719 internal void SetKeyboardFocusable(bool focusable)
2721 NDalicPINVOKE.Actor_SetKeyboardFocusable(swigCPtr, focusable);
2722 if (NDalicPINVOKE.SWIGPendingException.Pending)
2723 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2726 internal bool IsKeyboardFocusable()
2728 bool ret = NDalicPINVOKE.Actor_IsKeyboardFocusable(swigCPtr);
2729 if (NDalicPINVOKE.SWIGPendingException.Pending)
2730 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2734 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
2736 NDalicPINVOKE.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
2737 if (NDalicPINVOKE.SWIGPendingException.Pending)
2738 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2741 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
2743 ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.Actor_GetResizePolicy(swigCPtr, (int)dimension);
2744 if (NDalicPINVOKE.SWIGPendingException.Pending)
2745 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2750 /// Sets the relative to parent size factor of the view.<br>
2751 /// This factor is only used when ResizePolicy is set to either:
2752 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br>
2753 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br>
2755 /// <pre>The View has been initialized.</pre>
2756 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis</param>
2757 public void SetSizeModeFactor(Vector3 factor)
2759 NDalicPINVOKE.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
2760 if (NDalicPINVOKE.SWIGPendingException.Pending)
2761 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2764 internal Vector3 GetSizeModeFactor()
2766 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetSizeModeFactor(swigCPtr), true);
2767 if (NDalicPINVOKE.SWIGPendingException.Pending)
2768 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2773 /// Calculates the height of the view given a width.<br>
2774 /// The natural size is used for default calculation. <br>
2775 /// size 0 is treated as aspect ratio 1:1.<br>
2777 /// <param name="width">Width to use</param>
2778 /// <returns>The height based on the width</returns>
2779 public float GetHeightForWidth(float width)
2781 float ret = NDalicPINVOKE.Actor_GetHeightForWidth(swigCPtr, width);
2782 if (NDalicPINVOKE.SWIGPendingException.Pending)
2783 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2788 /// Calculates the width of the view given a height.<br>
2789 /// The natural size is used for default calculation.<br>
2790 /// size 0 is treated as aspect ratio 1:1.<br>
2792 /// <param name="height">Height to use</param>
2793 /// <returns>The width based on the height</returns>
2794 public float GetWidthForHeight(float height)
2796 float ret = NDalicPINVOKE.Actor_GetWidthForHeight(swigCPtr, height);
2797 if (NDalicPINVOKE.SWIGPendingException.Pending)
2798 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2802 public float GetRelayoutSize(DimensionType dimension)
2804 float ret = NDalicPINVOKE.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
2805 if (NDalicPINVOKE.SWIGPendingException.Pending)
2806 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2810 public void SetPadding(PaddingType padding)
2812 NDalicPINVOKE.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
2813 if (NDalicPINVOKE.SWIGPendingException.Pending)
2814 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2817 public void GetPadding(PaddingType paddingOut)
2819 NDalicPINVOKE.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
2820 if (NDalicPINVOKE.SWIGPendingException.Pending)
2821 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2824 internal void SetMinimumSize(Vector2 size)
2826 NDalicPINVOKE.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
2827 if (NDalicPINVOKE.SWIGPendingException.Pending)
2828 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2831 internal Vector2 GetMinimumSize()
2833 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMinimumSize(swigCPtr), true);
2834 if (NDalicPINVOKE.SWIGPendingException.Pending)
2835 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2839 internal void SetMaximumSize(Vector2 size)
2841 NDalicPINVOKE.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
2842 if (NDalicPINVOKE.SWIGPendingException.Pending)
2843 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2846 internal Vector2 GetMaximumSize()
2848 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMaximumSize(swigCPtr), true);
2849 if (NDalicPINVOKE.SWIGPendingException.Pending)
2850 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2854 internal int GetHierarchyDepth()
2856 int ret = NDalicPINVOKE.Actor_GetHierarchyDepth(swigCPtr);
2857 if (NDalicPINVOKE.SWIGPendingException.Pending)
2858 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2862 public uint AddRenderer(Renderer renderer)
2864 uint ret = NDalicPINVOKE.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
2865 if (NDalicPINVOKE.SWIGPendingException.Pending)
2866 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2870 internal uint GetRendererCount()
2872 uint ret = NDalicPINVOKE.Actor_GetRendererCount(swigCPtr);
2873 if (NDalicPINVOKE.SWIGPendingException.Pending)
2874 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2878 public Renderer GetRendererAt(uint index)
2880 IntPtr cPtr = NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index);
2881 Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Renderer;
2883 if (NDalicPINVOKE.SWIGPendingException.Pending)
2884 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2888 public void RemoveRenderer(Renderer renderer)
2890 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
2891 if (NDalicPINVOKE.SWIGPendingException.Pending)
2892 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2895 public void RemoveRenderer(uint index)
2897 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
2898 if (NDalicPINVOKE.SWIGPendingException.Pending)
2899 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2902 internal TouchDataSignal TouchSignal()
2904 TouchDataSignal ret = new TouchDataSignal(NDalicPINVOKE.Actor_TouchSignal(swigCPtr), false);
2905 if (NDalicPINVOKE.SWIGPendingException.Pending)
2906 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2910 internal HoverSignal HoveredSignal()
2912 HoverSignal ret = new HoverSignal(NDalicPINVOKE.Actor_HoveredSignal(swigCPtr), false);
2913 if (NDalicPINVOKE.SWIGPendingException.Pending)
2914 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2918 internal WheelSignal WheelEventSignal()
2920 WheelSignal ret = new WheelSignal(NDalicPINVOKE.Actor_WheelEventSignal(swigCPtr), false);
2921 if (NDalicPINVOKE.SWIGPendingException.Pending)
2922 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2926 internal ViewSignal OnWindowSignal()
2928 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnStageSignal(swigCPtr), false);
2929 if (NDalicPINVOKE.SWIGPendingException.Pending)
2930 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2934 internal ViewSignal OffWindowSignal()
2936 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OffStageSignal(swigCPtr), false);
2937 if (NDalicPINVOKE.SWIGPendingException.Pending)
2938 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2942 internal ViewSignal OnRelayoutSignal()
2944 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnRelayoutSignal(swigCPtr), false);
2945 if (NDalicPINVOKE.SWIGPendingException.Pending)
2946 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2950 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view) {
2951 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
2952 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2956 internal ViewSignal ResourcesLoadedSignal()
2958 ViewSignal ret = new ViewSignal(NDalicPINVOKE.ResourceReadySignal(swigCPtr), false);
2959 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2964 /// Gets/Sets the origin of an view, within its parent's area.<br>
2965 /// 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>
2966 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br>
2967 /// An view's position is the distance between this origin, and the view's anchor-point.<br>
2969 /// <pre>The View has been initialized.</pre>
2970 public Position ParentOrigin
2974 Position temp = new Position(0.0f, 0.0f, 0.0f);
2975 GetProperty(View.Property.PARENT_ORIGIN).Get(temp);
2980 SetProperty(View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue(value));
2984 internal float ParentOriginX
2989 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
2994 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
2998 internal float ParentOriginY
3003 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
3008 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
3012 internal float ParentOriginZ
3017 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
3022 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
3027 /// Gets/Sets the anchor-point of an view.<br>
3028 /// 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>
3029 /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br>
3030 /// An view position is the distance between its parent-origin and this anchor-point.<br>
3031 /// An view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br>
3032 /// <pre>The View has been initialized.</pre>
3034 public Position PivotPoint
3038 Position temp = new Position(0.0f, 0.0f, 0.0f);
3039 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
3044 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3048 internal float PivotPointX
3053 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
3058 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
3062 internal float PivotPointY
3067 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
3072 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
3076 internal float PivotPointZ
3081 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
3086 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
3091 /// Gets/Sets the size width of an view.
3093 public float SizeWidth
3098 GetProperty(View.Property.SIZE_WIDTH).Get(out temp);
3103 SetProperty(View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue(value));
3108 /// Gets/Sets the size height of an view.
3110 public float SizeHeight
3115 GetProperty(View.Property.SIZE_HEIGHT).Get(out temp);
3120 SetProperty(View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue(value));
3125 /// Gets/Sets the position of the View.<br>
3126 /// By default, sets the position vector between the parent origin and pivot point(default).<br>
3127 /// If Position inheritance if disabled, sets the world position.<br>
3129 public Position Position
3133 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3134 GetProperty(View.Property.POSITION).Get(temp);
3139 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(value));
3144 /// Gets/Sets the position x of the View.
3146 public float PositionX
3151 GetProperty(View.Property.POSITION_X).Get(out temp);
3156 SetProperty(View.Property.POSITION_X, new Tizen.NUI.PropertyValue(value));
3161 /// Gets/Sets the position y of the View.
3163 public float PositionY
3168 GetProperty(View.Property.POSITION_Y).Get(out temp);
3173 SetProperty(View.Property.POSITION_Y, new Tizen.NUI.PropertyValue(value));
3178 /// Gets/Sets the position z of the View.
3180 public float PositionZ
3185 GetProperty(View.Property.POSITION_Z).Get(out temp);
3190 SetProperty(View.Property.POSITION_Z, new Tizen.NUI.PropertyValue(value));
3195 /// Gets/Sets the world position of the View.
3197 public Vector3 WorldPosition
3201 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3202 GetProperty(View.Property.WORLD_POSITION).Get(temp);
3207 internal float WorldPositionX
3212 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
3217 internal float WorldPositionY
3222 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
3227 internal float WorldPositionZ
3232 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
3238 /// Gets/Sets the orientation of the View.<br>
3239 /// An view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br>
3241 /// <remarks>This is an asynchronous method.</remarks>
3242 public Rotation Orientation
3246 Rotation temp = new Rotation();
3247 GetProperty(View.Property.ORIENTATION).Get(temp);
3252 SetProperty(View.Property.ORIENTATION, new Tizen.NUI.PropertyValue(value));
3257 /// Gets/Sets the world orientation of the View.<br>
3259 public Rotation WorldOrientation
3263 Rotation temp = new Rotation();
3264 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
3270 /// Gets/Sets the scale factor applied to an view.<br>
3272 public Vector3 Scale
3276 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3277 GetProperty(View.Property.SCALE).Get(temp);
3282 SetProperty(View.Property.SCALE, new Tizen.NUI.PropertyValue(value));
3287 /// Gets/Sets the scale x factor applied to an view.
3294 GetProperty(View.Property.SCALE_X).Get(out temp);
3299 SetProperty(View.Property.SCALE_X, new Tizen.NUI.PropertyValue(value));
3304 /// Gets/Sets the scale y factor applied to an view.
3311 GetProperty(View.Property.SCALE_Y).Get(out temp);
3316 SetProperty(View.Property.SCALE_Y, new Tizen.NUI.PropertyValue(value));
3321 /// Gets/Sets the scale z factor applied to an view.
3328 GetProperty(View.Property.SCALE_Z).Get(out temp);
3333 SetProperty(View.Property.SCALE_Z, new Tizen.NUI.PropertyValue(value));
3338 /// Gets the world scale of View.
3340 public Vector3 WorldScale
3344 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3345 GetProperty(View.Property.WORLD_SCALE).Get(temp);
3351 /// Retrieves the visibility flag of an view.
3354 /// If an view is not visible, then the view and its children will not be rendered.
3355 /// 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.
3357 public bool Visibility
3362 GetProperty(View.Property.VISIBLE).Get(out temp);
3368 /// Gets the view's world color.
3370 public Vector4 WorldColor
3374 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3375 GetProperty(View.Property.WORLD_COLOR).Get(temp);
3380 internal Matrix WorldMatrix
3384 Matrix temp = new Matrix();
3385 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
3391 /// Gets/Sets the View's name.
3398 GetProperty(View.Property.NAME).Get(out temp);
3403 SetProperty(View.Property.NAME, new Tizen.NUI.PropertyValue(value));
3408 /// Gets the View's ID.
3420 /// Gets/Sets the status of whether an view should emit touch or hover signals.
3422 public bool Sensitive
3427 GetProperty(View.Property.SENSITIVE).Get(out temp);
3432 SetProperty(View.Property.SENSITIVE, new Tizen.NUI.PropertyValue(value));
3437 /// Gets/Sets the status of whether the view should receive a notification when touch or hover motion events leave the boundary of the view.
3439 public bool LeaveRequired
3444 GetProperty(View.Property.LEAVE_REQUIRED).Get(out temp);
3449 SetProperty(View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue(value));
3454 /// Gets/Sets the status of whether a child view inherits it's parent's orientation.
3456 public bool InheritOrientation
3461 GetProperty(View.Property.INHERIT_ORIENTATION).Get(out temp);
3466 SetProperty(View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue(value));
3471 /// Gets/Sets the status of whether a child view inherits it's parent's scale.
3473 public bool InheritScale
3478 GetProperty(View.Property.INHERIT_SCALE).Get(out temp);
3483 SetProperty(View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue(value));
3488 /// Gets/Sets the Opacity inheritance state. If true (default) This view will blend its opacity with the parents.
3489 /// If false, this view will use its own opacity value directly.
3491 public bool InheritOpacity
3495 return GetColorMode() != ColorMode.UseOwnColor;
3499 SetColorMode(value ? ColorMode.UseOwnMultiplyParentAlpha : ColorMode.UseOwnColor);
3504 /// Gets/Sets the status of how the view and its children should be drawn.<br>
3505 /// Not all views are renderable, but DrawMode can be inherited from any view.<br>
3506 /// 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>
3507 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br>
3508 /// Overlay views are drawn in a separate pass, after all non-overlay views within the Layer.<br>
3509 /// For overlay views, the drawing order is with respect to tree levels of Views, and depth-testing will not be used.<br>
3511 public DrawModeType DrawMode
3516 if (GetProperty(View.Property.DRAW_MODE).Get(out temp) == false)
3518 NUILog.Error("DrawMode get error!");
3523 return DrawModeType.Normal;
3525 return DrawModeType.Overlay2D;
3527 return DrawModeType.Stencil;
3529 return DrawModeType.Normal;
3534 SetProperty(View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)value));
3539 /// Gets/Sets the relative to parent size factor of the view.<br>
3540 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br>
3541 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br>
3543 public Vector3 SizeModeFactor
3547 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3548 GetProperty(View.Property.SIZE_MODE_FACTOR).Get(temp);
3553 SetProperty(View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue(value));
3558 /// Gets/Sets the width resize policy to be used.
3560 public ResizePolicyType WidthResizePolicy
3565 if (GetProperty(View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
3567 NUILog.Error("WidthResizePolicy get error!");
3572 return ResizePolicyType.Fixed;
3573 case "USE_NATURAL_SIZE":
3574 return ResizePolicyType.UseNaturalSize;
3575 case "FILL_TO_PARENT":
3576 return ResizePolicyType.FillToParent;
3577 case "SIZE_RELATIVE_TO_PARENT":
3578 return ResizePolicyType.SizeRelativeToParent;
3579 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3580 return ResizePolicyType.SizeFixedOffsetFromParent;
3581 case "FIT_TO_CHILDREN":
3582 return ResizePolicyType.FitToChildren;
3583 case "DIMENSION_DEPENDENCY":
3584 return ResizePolicyType.DimensionDependency;
3585 case "USE_ASSIGNED_SIZE":
3586 return ResizePolicyType.UseAssignedSize;
3588 return ResizePolicyType.Fixed;
3593 SetProperty(View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3598 /// Gets/Sets the height resize policy to be used.
3600 public ResizePolicyType HeightResizePolicy
3605 if (GetProperty(View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
3607 NUILog.Error("HeightResizePolicy get error!");
3612 return ResizePolicyType.Fixed;
3613 case "USE_NATURAL_SIZE":
3614 return ResizePolicyType.UseNaturalSize;
3615 case "FILL_TO_PARENT":
3616 return ResizePolicyType.FillToParent;
3617 case "SIZE_RELATIVE_TO_PARENT":
3618 return ResizePolicyType.SizeRelativeToParent;
3619 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3620 return ResizePolicyType.SizeFixedOffsetFromParent;
3621 case "FIT_TO_CHILDREN":
3622 return ResizePolicyType.FitToChildren;
3623 case "DIMENSION_DEPENDENCY":
3624 return ResizePolicyType.DimensionDependency;
3625 case "USE_ASSIGNED_SIZE":
3626 return ResizePolicyType.UseAssignedSize;
3628 return ResizePolicyType.Fixed;
3633 SetProperty(View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3638 /// Gets/Sets the policy to use when setting size with size negotiation.<br>
3639 /// Defaults to SizeScalePolicyType.UseSizeSet.<br>
3641 public SizeScalePolicyType SizeScalePolicy
3646 if (GetProperty(View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
3648 NUILog.Error("SizeScalePolicy get error!");
3652 case "USE_SIZE_SET":
3653 return SizeScalePolicyType.UseSizeSet;
3654 case "FIT_WITH_ASPECT_RATIO":
3655 return SizeScalePolicyType.FitWithAspectRatio;
3656 case "FILL_WITH_ASPECT_RATIO":
3657 return SizeScalePolicyType.FillWithAspectRatio;
3659 return SizeScalePolicyType.UseSizeSet;
3664 string valueToString = "";
3667 case SizeScalePolicyType.UseSizeSet:
3669 valueToString = "USE_SIZE_SET";
3672 case SizeScalePolicyType.FitWithAspectRatio:
3674 valueToString = "FIT_WITH_ASPECT_RATIO";
3677 case SizeScalePolicyType.FillWithAspectRatio:
3679 valueToString = "FILL_WITH_ASPECT_RATIO";
3684 valueToString = "USE_SIZE_SET";
3688 SetProperty(View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
3693 /// Gets/Sets the status of whether the width size is dependent on height size.
3695 public bool WidthForHeight
3700 GetProperty(View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
3705 SetProperty(View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue(value));
3710 /// Gets/Sets the status of whether the height size is dependent on width size.
3712 public bool HeightForWidth
3717 GetProperty(View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
3722 SetProperty(View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue(value));
3727 /// Gets/Sets the padding for use in layout.
3729 public Vector4 Padding
3733 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3734 GetProperty(View.Property.PADDING).Get(temp);
3739 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
3744 /// Gets/Sets the minimum size an view can be assigned in size negotiation.
3746 public Size2D MinimumSize
3750 Size2D temp = new Size2D(0, 0);
3751 GetProperty(View.Property.MINIMUM_SIZE).Get(temp);
3756 SetProperty(View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3761 /// Gets/Sets the maximum size an view can be assigned in size negotiation.
3763 public Size2D MaximumSize
3767 Size2D temp = new Size2D(0, 0);
3768 GetProperty(View.Property.MAXIMUM_SIZE).Get(temp);
3773 SetProperty(View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3778 /// Gets/Sets whether a child view inherits it's parent's position.<br>
3779 /// Default is to inherit.<br>
3780 /// 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>
3782 public bool InheritPosition
3787 GetProperty(View.Property.INHERIT_POSITION).Get(out temp);
3792 SetProperty(View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue(value));
3797 /// Gets/Sets clipping behavior(mode) of it's children.
3799 public ClippingModeType ClippingMode
3804 if (GetProperty(View.Property.CLIPPING_MODE).Get(out temp) == false)
3806 NUILog.Error("ClippingMode get error!");
3811 return ClippingModeType.Disabled;
3812 case "CLIP_CHILDREN":
3813 return ClippingModeType.ClipChildren;
3815 return ClippingModeType.Disabled;
3820 SetProperty(View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)value));
3825 /// Get the number of renderers held by the view.
3827 public uint RendererCount
3831 return GetRendererCount();
3838 [Obsolete("Please do not use! this will be deprecated")]
3839 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> Touched
3843 if (_touchDataEventHandler == null)
3845 _touchDataCallback = OnTouch;
3846 this.TouchSignal().Connect(_touchDataCallback);
3849 _touchDataEventHandler += value;
3854 _touchDataEventHandler -= value;
3856 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
3858 this.TouchSignal().Disconnect(_touchDataCallback);
3864 [Obsolete("Please do not use! this will be deprecated")]
3865 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> Hovered
3869 if (_hoverEventHandler == null)
3871 _hoverEventCallback = OnHoverEvent;
3872 this.HoveredSignal().Connect(_hoverEventCallback);
3875 _hoverEventHandler += value;
3880 _hoverEventHandler -= value;
3882 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
3884 this.HoveredSignal().Disconnect(_hoverEventCallback);
3890 [Obsolete("Please do not use! this will be deprecated")]
3891 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelMoved
3895 if (_wheelEventHandler == null)
3897 _wheelEventCallback = OnWheelEvent;
3898 this.WheelEventSignal().Connect(_wheelEventCallback);
3901 _wheelEventHandler += value;
3906 _wheelEventHandler -= value;
3908 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
3910 this.WheelEventSignal().Disconnect(_wheelEventCallback);
3916 [Obsolete("Please do not use! this will be deprecated")]
3917 public Position AnchorPoint
3921 Position temp = new Position(0.0f, 0.0f, 0.0f);
3922 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
3927 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3931 [Obsolete("Please do not use! this will be deprecated")]
3936 Size temp = new Size(0.0f, 0.0f, 0.0f);
3937 GetProperty(View.Property.SIZE).Get(temp);
3942 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(value));
3946 [Obsolete("Please do not use! this will be deprecated")]
3947 public event EventHandler OnWindowEvent
3951 if (_onWindowEventHandler == null)
3953 _onWindowEventCallback = OnWindow;
3954 this.OnWindowSignal().Connect(_onWindowEventCallback);
3957 _onWindowEventHandler += value;
3962 _onWindowEventHandler -= value;
3964 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
3966 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
3971 [Obsolete("Please do not use! this will be deprecated")]
3972 public event EventHandler OffWindowEvent
3976 if (_offWindowEventHandler == null)
3978 _offWindowEventCallback = OffWindow;
3979 this.OffWindowSignal().Connect(_offWindowEventCallback);
3982 _offWindowEventHandler += value;
3987 _offWindowEventHandler -= value;
3989 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
3991 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
3996 [Obsolete("Please do not use! this will be deprecated")]
3997 public event EventHandler OnRelayoutEvent
4001 if (_onRelayoutEventHandler == null)
4003 _onRelayoutEventCallback = OnRelayout;
4004 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
4007 _onRelayoutEventHandler += value;
4012 _onRelayoutEventHandler -= value;
4014 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
4016 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);