2 * Copyright(c) 2018 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 using System.ComponentModel;
19 using System.Runtime.InteropServices;
21 namespace Tizen.NUI.BaseComponents
24 /// View is the base class for all views.
26 /// <since_tizen> 3 </since_tizen>
27 public class View : Container
29 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
32 internal View(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.View_SWIGUpcast(cPtr), cMemoryOwn)
34 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
37 PositionUsesPivotPoint = false;
41 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
43 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
46 // From Container Base class
49 /// Adds a child view to this view.
51 /// <seealso cref="Container.Add" />
52 /// <since_tizen> 4 </since_tizen>
53 public override void Add(View child)
55 Container oldParent = child.Parent;
56 if (oldParent != this)
58 if (oldParent != null)
60 oldParent.Remove(child);
63 LayoutItem layoutItem = new LayoutItem();
64 child.Layout = layoutItem;
66 NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
67 if (NDalicPINVOKE.SWIGPendingException.Pending)
68 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
74 /// Removes a child view from this View. If the view was not a child of this view, this is a no-op.
76 /// <seealso cref="Container.Remove" />
77 /// <since_tizen> 4 </since_tizen>
78 public override void Remove(View child)
80 NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
81 if (NDalicPINVOKE.SWIGPendingException.Pending)
82 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
84 Children.Remove(child);
88 /// Retrieves a child view by index.
90 /// <seealso cref="Container.GetChildAt" />
91 /// <since_tizen> 4 </since_tizen>
92 public override View GetChildAt(uint index)
94 if (index < Children.Count)
96 return Children[Convert.ToInt32(index)];
105 /// Retrieves the number of children held by the view.
107 /// <seealso cref="Container.GetChildCount" />
108 /// <since_tizen> 4 </since_tizen>
109 public override uint GetChildCount()
111 return Convert.ToUInt32(Children.Count);
115 /// Gets the views parent.
117 /// <seealso cref="Container.GetParent()" />
118 /// <since_tizen> 4 </since_tizen>
119 public override Container GetParent()
121 //to fix memory leak issue, match the handle count with native side.
122 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
123 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
124 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
125 NDalicPINVOKE.delete_BaseHandle(CPtr);
126 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
128 if (NDalicPINVOKE.SWIGPendingException.Pending)
129 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
131 return basehandle as Container;
134 internal bool IsTopLevelView()
136 if (GetParent() is Layer)
144 /// you can override it to clean-up your own resources.
146 /// <param name="type">DisposeTypes</param>
147 /// <since_tizen> 3 </since_tizen>
148 protected override void Dispose(DisposeTypes type)
155 if (type == DisposeTypes.Explicit)
158 //Release your own managed resources here.
159 //You should release all of your own disposable objects here.
162 //Release your own unmanaged resources here.
163 //You should not access any managed member here except static instance.
164 //because the execution order of Finalizes is non-deterministic.
167 DisConnectFromSignals();
170 if (swigCPtr.Handle != global::System.IntPtr.Zero)
175 NDalicPINVOKE.delete_View(swigCPtr);
177 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
184 private void DisConnectFromSignals()
186 // Save current CPtr.
187 global::System.Runtime.InteropServices.HandleRef currentCPtr = swigCPtr;
189 // Use BaseHandle CPtr as current might have been deleted already in derived classes.
190 swigCPtr = GetBaseHandleCPtrHandleRef;
192 if (_onRelayoutEventCallback != null)
194 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
197 if (_offWindowEventCallback != null)
199 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
202 if (_onWindowEventCallback != null)
204 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
207 if (_wheelEventCallback != null)
209 this.WheelEventSignal().Disconnect(_wheelEventCallback);
212 if (_hoverEventCallback != null)
214 this.HoveredSignal().Disconnect(_hoverEventCallback);
217 if (_touchDataCallback != null)
219 this.TouchSignal().Disconnect(_touchDataCallback);
222 if (_ResourcesLoadedCallback != null)
224 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
227 if (_offWindowEventCallback != null)
229 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
232 if (_onWindowEventCallback != null)
234 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
237 if (_wheelEventCallback != null)
239 this.WheelEventSignal().Disconnect(_wheelEventCallback);
242 if (_hoverEventCallback != null)
244 this.HoveredSignal().Disconnect(_hoverEventCallback);
247 if (_touchDataCallback != null)
249 this.TouchSignal().Disconnect(_touchDataCallback);
252 if (_onRelayoutEventCallback != null)
254 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
257 if (_keyCallback != null)
259 this.KeyEventSignal().Disconnect(_keyCallback);
262 if (_keyInputFocusLostCallback != null)
264 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
267 if (_keyInputFocusGainedCallback != null)
269 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
272 // BaseHandle CPtr is used in Registry and there is danger of deletion if we keep using it here.
273 // Restore current CPtr.
274 swigCPtr = currentCPtr;
277 private EventHandler _keyInputFocusGainedEventHandler;
278 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
279 private delegate void KeyInputFocusGainedCallbackType(IntPtr control);
280 private KeyInputFocusGainedCallbackType _keyInputFocusGainedCallback;
283 /// An event for the KeyInputFocusGained signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
284 /// The KeyInputFocusGained signal is emitted when the control gets the key input focus.<br />
286 /// <since_tizen> 3 </since_tizen>
287 public event EventHandler FocusGained
291 if (_keyInputFocusGainedEventHandler == null)
293 _keyInputFocusGainedCallback = OnKeyInputFocusGained;
294 this.KeyInputFocusGainedSignal().Connect(_keyInputFocusGainedCallback);
297 _keyInputFocusGainedEventHandler += value;
302 _keyInputFocusGainedEventHandler -= value;
304 if (_keyInputFocusGainedEventHandler == null && KeyInputFocusGainedSignal().Empty() == false)
306 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
311 private void OnKeyInputFocusGained(IntPtr view)
313 if (_keyInputFocusGainedEventHandler != null)
315 _keyInputFocusGainedEventHandler(this, null);
320 private EventHandler _keyInputFocusLostEventHandler;
321 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
322 private delegate void KeyInputFocusLostCallbackType(IntPtr control);
323 private KeyInputFocusLostCallbackType _keyInputFocusLostCallback;
326 /// An event for the KeyInputFocusLost signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
327 /// The KeyInputFocusLost signal is emitted when the control loses the key input focus.<br />
329 /// <since_tizen> 3 </since_tizen>
330 public event EventHandler FocusLost
334 if (_keyInputFocusLostEventHandler == null)
336 _keyInputFocusLostCallback = OnKeyInputFocusLost;
337 this.KeyInputFocusLostSignal().Connect(_keyInputFocusLostCallback);
340 _keyInputFocusLostEventHandler += value;
345 _keyInputFocusLostEventHandler -= value;
347 if (_keyInputFocusLostEventHandler == null && KeyInputFocusLostSignal().Empty() == false)
349 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
354 private void OnKeyInputFocusLost(IntPtr view)
356 if (_keyInputFocusLostEventHandler != null)
358 _keyInputFocusLostEventHandler(this, null);
363 /// Event arguments that passed via the KeyEvent signal.
365 /// <since_tizen> 3 </since_tizen>
366 public class KeyEventArgs : EventArgs
371 /// Key - is the key sent to the view.
373 /// <since_tizen> 3 </since_tizen>
387 private EventHandlerWithReturnType<object, KeyEventArgs, bool> _keyEventHandler;
388 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
389 private delegate bool KeyCallbackType(IntPtr control, IntPtr keyEvent);
390 private KeyCallbackType _keyCallback;
393 /// An event for the KeyPressed signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
394 /// The KeyPressed signal is emitted when the key event is received.<br />
396 /// <since_tizen> 3 </since_tizen>
397 public event EventHandlerWithReturnType<object, KeyEventArgs, bool> KeyEvent
401 if (_keyEventHandler == null)
403 _keyCallback = OnKeyEvent;
404 this.KeyEventSignal().Connect(_keyCallback);
407 _keyEventHandler += value;
412 _keyEventHandler -= value;
414 if (_keyEventHandler == null && KeyEventSignal().Empty() == false)
416 this.KeyEventSignal().Disconnect(_keyCallback);
421 private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
423 if (keyEvent == global::System.IntPtr.Zero)
425 NUILog.Error("keyEvent should not be null!");
429 KeyEventArgs e = new KeyEventArgs();
433 e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
435 if (_keyEventHandler != null)
437 Delegate[] delegateList = _keyEventHandler.GetInvocationList();
439 // Oring the result of each callback.
440 foreach (EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList)
442 result |= del(this, e);
449 private EventHandler _onRelayoutEventHandler;
450 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
451 private delegate void OnRelayoutEventCallbackType(IntPtr control);
452 private OnRelayoutEventCallbackType _onRelayoutEventCallback;
455 /// An event for the OnRelayout signal which can be used to subscribe or unsubscribe the event handler.<br />
456 /// The OnRelayout signal is emitted after the size has been set on the view during relayout.<br />
458 /// <since_tizen> 3 </since_tizen>
459 public event EventHandler Relayout
463 if (_onRelayoutEventHandler == null)
465 _onRelayoutEventCallback = OnRelayout;
466 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
469 _onRelayoutEventHandler += value;
474 _onRelayoutEventHandler -= value;
476 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
478 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
484 // Callback for View OnRelayout signal
485 private void OnRelayout(IntPtr data)
487 if (_onRelayoutEventHandler != null)
489 _onRelayoutEventHandler(this, null);
494 /// Event arguments that passed via the touch signal.
496 /// <since_tizen> 3 </since_tizen>
497 public class TouchEventArgs : EventArgs
499 private Touch _touch;
502 /// Touch - contains the information of touch points.
504 /// <since_tizen> 3 </since_tizen>
518 private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
519 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
520 private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
521 private TouchDataCallbackType _touchDataCallback;
524 /// An event for the touched signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
525 /// The touched signal is emitted when the touch input is received.<br />
527 /// <since_tizen> 3 </since_tizen>
528 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
532 if (_touchDataEventHandler == null)
534 _touchDataCallback = OnTouch;
535 this.TouchSignal().Connect(_touchDataCallback);
538 _touchDataEventHandler += value;
543 _touchDataEventHandler -= value;
545 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
547 this.TouchSignal().Disconnect(_touchDataCallback);
553 // Callback for View TouchSignal
554 private bool OnTouch(IntPtr view, IntPtr touchData)
556 if (touchData == global::System.IntPtr.Zero)
558 NUILog.Error("touchData should not be null!");
562 TouchEventArgs e = new TouchEventArgs();
564 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
566 if (_touchDataEventHandler != null)
568 return _touchDataEventHandler(this, e);
575 /// Event arguments that passed via the hover signal.
577 /// <since_tizen> 3 </since_tizen>
578 public class HoverEventArgs : EventArgs
580 private Hover _hover;
583 /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
585 /// <since_tizen> 3 </since_tizen>
599 private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
600 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
601 private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
602 private HoverEventCallbackType _hoverEventCallback;
605 /// An event for the hovered signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
606 /// The hovered signal is emitted when the hover input is received.<br />
608 /// <since_tizen> 3 </since_tizen>
609 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
613 if (_hoverEventHandler == null)
615 _hoverEventCallback = OnHoverEvent;
616 this.HoveredSignal().Connect(_hoverEventCallback);
619 _hoverEventHandler += value;
624 _hoverEventHandler -= value;
626 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
628 this.HoveredSignal().Disconnect(_hoverEventCallback);
634 // Callback for View Hover signal
635 private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
637 if (hoverEvent == global::System.IntPtr.Zero)
639 NUILog.Error("hoverEvent should not be null!");
643 HoverEventArgs e = new HoverEventArgs();
645 e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
647 if (_hoverEventHandler != null)
649 return _hoverEventHandler(this, e);
656 /// Event arguments that passed via the wheel signal.
658 /// <since_tizen> 3 </since_tizen>
659 public class WheelEventArgs : EventArgs
661 private Wheel _wheel;
664 /// WheelEvent - store a wheel rolling type: MOUSE_WHEEL or CUSTOM_WHEEL.
666 /// <since_tizen> 3 </since_tizen>
680 private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
681 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
682 private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
683 private WheelEventCallbackType _wheelEventCallback;
686 /// An event for the WheelMoved signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
687 /// The WheelMoved signal is emitted when the wheel event is received.<br />
689 /// <since_tizen> 3 </since_tizen>
690 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
694 if (_wheelEventHandler == null)
696 _wheelEventCallback = OnWheelEvent;
697 this.WheelEventSignal().Connect(_wheelEventCallback);
700 _wheelEventHandler += value;
705 _wheelEventHandler -= value;
707 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
709 this.WheelEventSignal().Disconnect(_wheelEventCallback);
715 // Callback for View Wheel signal
716 private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
718 if (wheelEvent == global::System.IntPtr.Zero)
720 NUILog.Error("wheelEvent should not be null!");
724 WheelEventArgs e = new WheelEventArgs();
726 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
728 if (_wheelEventHandler != null)
730 return _wheelEventHandler(this, e);
736 private EventHandler _onWindowEventHandler;
737 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
738 private delegate void OnWindowEventCallbackType(IntPtr control);
739 private OnWindowEventCallbackType _onWindowEventCallback;
742 /// An event for the OnWindow signal which can be used to subscribe or unsubscribe the event handler.<br />
743 /// The OnWindow signal is emitted after the view has been connected to the window.<br />
745 /// <since_tizen> 3 </since_tizen>
746 public event EventHandler AddedToWindow
750 if (_onWindowEventHandler == null)
752 _onWindowEventCallback = OnWindow;
753 this.OnWindowSignal().Connect(_onWindowEventCallback);
756 _onWindowEventHandler += value;
761 _onWindowEventHandler -= value;
763 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
765 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
770 // Callback for View OnWindow signal
771 private void OnWindow(IntPtr data)
773 if (_onWindowEventHandler != null)
775 _onWindowEventHandler(this, null);
780 private EventHandler _offWindowEventHandler;
781 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
782 private delegate void OffWindowEventCallbackType(IntPtr control);
783 private OffWindowEventCallbackType _offWindowEventCallback;
786 /// An event for the OffWindow signal, which can be used to subscribe or unsubscribe the event handler.<br />
787 /// OffWindow signal is emitted after the view has been disconnected from the window.<br />
789 /// <since_tizen> 3 </since_tizen>
790 public event EventHandler RemovedFromWindow
794 if (_offWindowEventHandler == null)
796 _offWindowEventCallback = OffWindow;
797 this.OffWindowSignal().Connect(_offWindowEventCallback);
800 _offWindowEventHandler += value;
805 _offWindowEventHandler -= value;
807 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
809 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
814 // Callback for View OffWindow signal
815 private void OffWindow(IntPtr data)
817 if (_offWindowEventHandler != null)
819 _offWindowEventHandler(this, null);
824 /// Event arguments of visibility changed.
826 /// <since_tizen> 3 </since_tizen>
827 public class VisibilityChangedEventArgs : EventArgs
830 private bool _visibility;
831 private VisibilityChangeType _type;
834 /// The view, or child of view, whose visibility has changed.
836 /// <since_tizen> 3 </since_tizen>
850 /// Whether the view is now visible or not.
852 /// <since_tizen> 3 </since_tizen>
853 public bool Visibility
866 /// Whether the view's visible property has changed or a parent's.
868 /// <since_tizen> 3 </since_tizen>
869 public VisibilityChangeType Type
882 private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
883 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
884 private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
885 private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
888 /// An event for visibility change which can be used to subscribe or unsubscribe the event handler.<br />
889 /// This signal is emitted when the visible property of this or a parent view is changed.<br />
891 /// <since_tizen> 3 </since_tizen>
892 public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
896 if (_visibilityChangedEventHandler == null)
898 _visibilityChangedEventCallback = OnVisibilityChanged;
899 VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
902 _visibilityChangedEventHandler += value;
907 _visibilityChangedEventHandler -= value;
909 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
911 VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
916 // Callback for View visibility change signal
917 private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
919 VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
922 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
924 e.Visibility = visibility;
927 if (_visibilityChangedEventHandler != null)
929 _visibilityChangedEventHandler(this, e);
935 /// Event arguments of layout direction changed.
937 /// <since_tizen> 4 </since_tizen>
938 public class LayoutDirectionChangedEventArgs : EventArgs
941 private ViewLayoutDirectionType _type;
944 /// The view, or child of view, whose layout direction has changed.
946 /// <since_tizen> 4 </since_tizen>
960 /// Whether the view's layout direction property has changed or a parent's.
962 /// <since_tizen> 4 </since_tizen>
963 public ViewLayoutDirectionType Type
976 private EventHandler<LayoutDirectionChangedEventArgs> _layoutDirectionChangedEventHandler;
977 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
978 private delegate void LayoutDirectionChangedEventCallbackType(IntPtr data, ViewLayoutDirectionType type);
979 private LayoutDirectionChangedEventCallbackType _layoutDirectionChangedEventCallback;
982 /// Event for layout direction change which can be used to subscribe/unsubscribe the event handler.<br />
983 /// This signal is emitted when the layout direction property of this or a parent view is changed.<br />
985 /// <since_tizen> 4 </since_tizen>
986 public event EventHandler<LayoutDirectionChangedEventArgs> LayoutDirectionChanged
990 if (_layoutDirectionChangedEventHandler == null)
992 _layoutDirectionChangedEventCallback = OnLayoutDirectionChanged;
993 LayoutDirectionChangedSignal(this).Connect(_layoutDirectionChangedEventCallback);
996 _layoutDirectionChangedEventHandler += value;
1001 _layoutDirectionChangedEventHandler -= value;
1003 if (_layoutDirectionChangedEventHandler == null && LayoutDirectionChangedSignal(this).Empty() == false)
1005 LayoutDirectionChangedSignal(this).Disconnect(_layoutDirectionChangedEventCallback);
1010 // Callback for View layout direction change signal
1011 private void OnLayoutDirectionChanged(IntPtr data, ViewLayoutDirectionType type)
1013 LayoutDirectionChangedEventArgs e = new LayoutDirectionChangedEventArgs();
1016 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
1020 if (_layoutDirectionChangedEventHandler != null)
1022 _layoutDirectionChangedEventHandler(this, e);
1032 // Resource Ready Signal
1034 private EventHandler _resourcesLoadedEventHandler;
1035 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1036 private delegate void ResourcesLoadedCallbackType(IntPtr control);
1037 private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
1040 /// An event for the ResourcesLoadedSignal signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1041 /// This signal is emitted after all resources required by a view are loaded and ready.<br />
1043 /// <since_tizen> 3 </since_tizen>
1044 public event EventHandler ResourcesLoaded
1048 if (_resourcesLoadedEventHandler == null)
1050 _ResourcesLoadedCallback = OnResourcesLoaded;
1051 this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
1054 _resourcesLoadedEventHandler += value;
1059 _resourcesLoadedEventHandler -= value;
1061 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
1063 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
1068 private void OnResourcesLoaded(IntPtr view)
1070 if (_resourcesLoadedEventHandler != null)
1072 _resourcesLoadedEventHandler(this, null);
1076 internal IntPtr GetPtrfromView()
1078 return (IntPtr)swigCPtr;
1081 internal class Property
1083 internal static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get();
1084 internal static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get();
1085 internal static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get();
1086 internal static readonly int LEFT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
1087 internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
1088 internal static readonly int UP_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
1089 internal static readonly int DOWN_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
1090 internal static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get();
1091 internal static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get();
1092 internal static readonly int SIBLING_ORDER = NDalicManualPINVOKE.Actor_Property_SIBLING_ORDER_get();
1093 internal static readonly int OPACITY = NDalicManualPINVOKE.Actor_Property_OPACITY_get();
1094 internal static readonly int SCREEN_POSITION = NDalicManualPINVOKE.Actor_Property_SCREEN_POSITION_get();
1095 internal static readonly int POSITION_USES_ANCHOR_POINT = NDalicManualPINVOKE.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
1096 internal static readonly int PARENT_ORIGIN = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_get();
1097 internal static readonly int PARENT_ORIGIN_X = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_X_get();
1098 internal static readonly int PARENT_ORIGIN_Y = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Y_get();
1099 internal static readonly int PARENT_ORIGIN_Z = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Z_get();
1100 internal static readonly int ANCHOR_POINT = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_get();
1101 internal static readonly int ANCHOR_POINT_X = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_X_get();
1102 internal static readonly int ANCHOR_POINT_Y = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Y_get();
1103 internal static readonly int ANCHOR_POINT_Z = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Z_get();
1104 internal static readonly int SIZE = NDalicPINVOKE.Actor_Property_SIZE_get();
1105 internal static readonly int SIZE_WIDTH = NDalicPINVOKE.Actor_Property_SIZE_WIDTH_get();
1106 internal static readonly int SIZE_HEIGHT = NDalicPINVOKE.Actor_Property_SIZE_HEIGHT_get();
1107 internal static readonly int SIZE_DEPTH = NDalicPINVOKE.Actor_Property_SIZE_DEPTH_get();
1108 internal static readonly int POSITION = NDalicPINVOKE.Actor_Property_POSITION_get();
1109 internal static readonly int POSITION_X = NDalicPINVOKE.Actor_Property_POSITION_X_get();
1110 internal static readonly int POSITION_Y = NDalicPINVOKE.Actor_Property_POSITION_Y_get();
1111 internal static readonly int POSITION_Z = NDalicPINVOKE.Actor_Property_POSITION_Z_get();
1112 internal static readonly int WORLD_POSITION = NDalicPINVOKE.Actor_Property_WORLD_POSITION_get();
1113 internal static readonly int WORLD_POSITION_X = NDalicPINVOKE.Actor_Property_WORLD_POSITION_X_get();
1114 internal static readonly int WORLD_POSITION_Y = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Y_get();
1115 internal static readonly int WORLD_POSITION_Z = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Z_get();
1116 internal static readonly int ORIENTATION = NDalicPINVOKE.Actor_Property_ORIENTATION_get();
1117 internal static readonly int WORLD_ORIENTATION = NDalicPINVOKE.Actor_Property_WORLD_ORIENTATION_get();
1118 internal static readonly int SCALE = NDalicPINVOKE.Actor_Property_SCALE_get();
1119 internal static readonly int SCALE_X = NDalicPINVOKE.Actor_Property_SCALE_X_get();
1120 internal static readonly int SCALE_Y = NDalicPINVOKE.Actor_Property_SCALE_Y_get();
1121 internal static readonly int SCALE_Z = NDalicPINVOKE.Actor_Property_SCALE_Z_get();
1122 internal static readonly int WORLD_SCALE = NDalicPINVOKE.Actor_Property_WORLD_SCALE_get();
1123 internal static readonly int VISIBLE = NDalicPINVOKE.Actor_Property_VISIBLE_get();
1124 internal static readonly int WORLD_COLOR = NDalicPINVOKE.Actor_Property_WORLD_COLOR_get();
1125 internal static readonly int WORLD_MATRIX = NDalicPINVOKE.Actor_Property_WORLD_MATRIX_get();
1126 internal static readonly int NAME = NDalicPINVOKE.Actor_Property_NAME_get();
1127 internal static readonly int SENSITIVE = NDalicPINVOKE.Actor_Property_SENSITIVE_get();
1128 internal static readonly int LEAVE_REQUIRED = NDalicPINVOKE.Actor_Property_LEAVE_REQUIRED_get();
1129 internal static readonly int INHERIT_ORIENTATION = NDalicPINVOKE.Actor_Property_INHERIT_ORIENTATION_get();
1130 internal static readonly int INHERIT_SCALE = NDalicPINVOKE.Actor_Property_INHERIT_SCALE_get();
1131 internal static readonly int DRAW_MODE = NDalicPINVOKE.Actor_Property_DRAW_MODE_get();
1132 internal static readonly int SIZE_MODE_FACTOR = NDalicPINVOKE.Actor_Property_SIZE_MODE_FACTOR_get();
1133 internal static readonly int WIDTH_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_WIDTH_RESIZE_POLICY_get();
1134 internal static readonly int HEIGHT_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_HEIGHT_RESIZE_POLICY_get();
1135 internal static readonly int SIZE_SCALE_POLICY = NDalicPINVOKE.Actor_Property_SIZE_SCALE_POLICY_get();
1136 internal static readonly int WIDTH_FOR_HEIGHT = NDalicPINVOKE.Actor_Property_WIDTH_FOR_HEIGHT_get();
1137 internal static readonly int HEIGHT_FOR_WIDTH = NDalicPINVOKE.Actor_Property_HEIGHT_FOR_WIDTH_get();
1138 internal static readonly int MINIMUM_SIZE = NDalicPINVOKE.Actor_Property_MINIMUM_SIZE_get();
1139 internal static readonly int MAXIMUM_SIZE = NDalicPINVOKE.Actor_Property_MAXIMUM_SIZE_get();
1140 internal static readonly int INHERIT_POSITION = NDalicPINVOKE.Actor_Property_INHERIT_POSITION_get();
1141 internal static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
1142 internal static readonly int INHERIT_LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_INHERIT_LAYOUT_DIRECTION_get();
1143 internal static readonly int LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_LAYOUT_DIRECTION_get();
1144 internal static readonly int MARGIN = NDalicPINVOKE.View_Property_MARGIN_get();
1145 internal static readonly int PADDING = NDalicPINVOKE.View_Property_PADDING_get();
1149 /// Describes the direction to move the focus towards.
1151 /// <since_tizen> 3 </since_tizen>
1152 public enum FocusDirection
1155 /// Move keyboard focus towards the left direction.
1157 /// <since_tizen> 3 </since_tizen>
1160 /// Move keyboard focus towards the right direction.
1162 /// <since_tizen> 3 </since_tizen>
1165 /// Move keyboard focus towards the up direction.
1167 /// <since_tizen> 3 </since_tizen>
1170 /// Move keyboard focus towards the down direction.
1172 /// <since_tizen> 3 </since_tizen>
1175 /// Move keyboard focus towards the previous page direction.
1177 /// <since_tizen> 3 </since_tizen>
1180 /// Move keyboard focus towards the next page direction.
1182 /// <since_tizen> 3 </since_tizen>
1187 /// Creates a new instance of a view.
1189 /// <since_tizen> 3 </since_tizen>
1190 public View() : this(NDalicPINVOKE.View_New(), true)
1192 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1195 internal View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true)
1197 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1200 private View ConvertIdToView(uint id)
1203 if (GetParent() is View)
1205 View parentView = GetParent() as View;
1206 view = parentView.FindChildById(id);
1211 view = Window.Instance.GetRootLayer().FindChildById(id);
1217 internal void SetKeyInputFocus()
1219 NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
1220 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1224 /// Queries whether the view has a focus.
1226 /// <returns>True if this view has a focus.</returns>
1227 /// <since_tizen> 3 </since_tizen>
1228 public bool HasFocus()
1230 bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
1231 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1235 internal void ClearKeyInputFocus()
1237 NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
1238 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1241 internal PinchGestureDetector GetPinchGestureDetector()
1243 PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
1244 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1248 internal PanGestureDetector GetPanGestureDetector()
1250 PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
1251 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1255 internal TapGestureDetector GetTapGestureDetector()
1257 TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
1258 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1262 internal LongPressGestureDetector GetLongPressGestureDetector()
1264 LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
1265 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1270 /// Sets the name of the style to be applied to the view.
1272 /// <param name="styleName">A string matching a style described in a stylesheet.</param>
1273 /// <since_tizen> 3 </since_tizen>
1274 public void SetStyleName(string styleName)
1276 NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
1277 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1281 /// Retrieves the name of the style to be applied to the view (if any).
1283 /// <returns>A string matching a style, or an empty string.</returns>
1284 /// <since_tizen> 3 </since_tizen>
1285 public string GetStyleName()
1287 string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
1288 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1292 internal void SetBackgroundColor(Vector4 color)
1294 NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
1295 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1298 internal Vector4 GetBackgroundColor()
1300 Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
1301 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1305 internal void SetBackgroundImage(Image image)
1307 NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
1308 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1312 /// Clears the background.
1314 /// <since_tizen> 3 </since_tizen>
1315 public void ClearBackground()
1317 NDalicPINVOKE.View_ClearBackground(swigCPtr);
1318 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1321 internal ControlKeySignal KeyEventSignal()
1323 ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
1324 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1328 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
1330 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
1331 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1335 internal KeyInputFocusSignal KeyInputFocusLostSignal()
1337 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
1338 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1342 internal View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
1344 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1347 internal enum PropertyRange
1349 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
1350 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
1351 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
1355 /// The StyleName, type string.
1357 /// <since_tizen> 3 </since_tizen>
1358 public string StyleName
1363 GetProperty(View.Property.STYLE_NAME).Get(out temp);
1368 SetProperty(View.Property.STYLE_NAME, new Tizen.NUI.PropertyValue(value));
1373 /// The mutually exclusive with BACKGROUND_IMAGE and BACKGROUND type Vector4.
1375 /// <since_tizen> 3 </since_tizen>
1376 public Color BackgroundColor
1380 Color backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1382 Tizen.NUI.PropertyMap background = Background;
1384 background.Find(Visual.Property.Type)?.Get(out visualType);
1385 if (visualType == (int)Visual.Type.Color)
1387 background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor);
1390 return backgroundColor;
1394 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1399 /// Creates an animation to animate the background color visual. If there is no
1400 /// background visual, creates one with transparent black as it's mixColor.
1402 /// <since_tizen> 3 </since_tizen>
1403 public Animation AnimateBackgroundColor(object destinationValue,
1406 AlphaFunction.BuiltinFunctions? alphaFunction = null,
1407 object initialValue = null)
1409 Tizen.NUI.PropertyMap background = Background;
1411 if (background.Empty())
1413 // If there is no background yet, ensure there is a transparent
1415 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1416 background = Background;
1418 return AnimateColor("background", destinationValue, startTime, endTime, alphaFunction, initialValue);
1422 /// Creates an animation to animate the mixColor of the named visual.
1424 /// <since_tizen> 3 </since_tizen>
1425 public Animation AnimateColor(string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null)
1427 Animation animation = null;
1429 PropertyMap _animator = new PropertyMap();
1430 if (alphaFunction != null)
1432 _animator.Add("alphaFunction", new PropertyValue(AlphaFunction.BuiltinToPropertyKey(alphaFunction)));
1435 PropertyMap _timePeriod = new PropertyMap();
1436 _timePeriod.Add("duration", new PropertyValue((endTime - startTime) / 1000.0f));
1437 _timePeriod.Add("delay", new PropertyValue(startTime / 1000.0f));
1438 _animator.Add("timePeriod", new PropertyValue(_timePeriod));
1440 PropertyMap _transition = new PropertyMap();
1441 _transition.Add("animator", new PropertyValue(_animator));
1442 _transition.Add("target", new PropertyValue(targetVisual));
1443 _transition.Add("property", new PropertyValue("mixColor"));
1445 if (initialColor != null)
1447 PropertyValue initValue = PropertyValue.CreateFromObject(initialColor);
1448 _transition.Add("initialValue", initValue);
1451 PropertyValue destValue = PropertyValue.CreateFromObject(destinationColor);
1452 _transition.Add("targetValue", destValue);
1453 TransitionData _transitionData = new TransitionData(_transition);
1455 animation = new Animation(NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true);
1456 if (NDalicPINVOKE.SWIGPendingException.Pending)
1457 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1463 /// The mutually exclusive with BACKGROUND_COLOR and BACKGROUND type Map.
1465 /// <since_tizen> 3 </since_tizen>
1466 public string BackgroundImage
1470 string backgroundImage = "";
1472 Tizen.NUI.PropertyMap background = Background;
1474 background.Find(Visual.Property.Type)?.Get(out visualType);
1475 if (visualType == (int)Visual.Type.Image)
1477 background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
1480 return backgroundImage;
1484 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1489 /// The background of view.
1491 /// <since_tizen> 3 </since_tizen>
1492 public Tizen.NUI.PropertyMap Background
1496 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1497 GetProperty(View.Property.BACKGROUND).Get(temp);
1502 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1508 /// The current state of the view.
1510 /// <since_tizen> 3 </since_tizen>
1516 if (GetProperty(View.Property.STATE).Get(out temp) == false)
1518 NUILog.Error("State get error!");
1524 return States.Normal;
1528 return States.Focused;
1532 return States.Disabled;
1536 return States.Normal;
1542 SetProperty(View.Property.STATE, new Tizen.NUI.PropertyValue((int)value));
1547 /// The current sub state of the view.
1549 /// <since_tizen> 3 </since_tizen>
1550 public States SubState
1555 if (GetProperty(View.Property.SUB_STATE).Get(out temp) == false)
1557 NUILog.Error("subState get error!");
1562 return States.Normal;
1564 return States.Focused;
1566 return States.Disabled;
1568 return States.Normal;
1573 string valueToString = "";
1578 valueToString = "NORMAL";
1581 case States.Focused:
1583 valueToString = "FOCUSED";
1586 case States.Disabled:
1588 valueToString = "DISABLED";
1593 valueToString = "NORMAL";
1597 SetProperty(View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
1602 /// Displays a tooltip
1604 /// <since_tizen> 3 </since_tizen>
1605 public Tizen.NUI.PropertyMap Tooltip
1609 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1610 GetProperty(View.Property.TOOLTIP).Get(temp);
1615 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1620 /// Displays a tooltip as a text.
1622 /// <since_tizen> 3 </since_tizen>
1623 public string TooltipText
1627 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1631 private int LeftFocusableViewId
1636 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
1641 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1645 private int RightFocusableViewId
1650 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
1655 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1659 private int UpFocusableViewId
1664 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
1669 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1673 private int DownFocusableViewId
1678 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
1683 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1688 /// The Child property of FlexContainer.<br />
1689 /// The proportion of the free space in the container, the flex item will receive.<br />
1690 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br />
1692 /// <since_tizen> 3 </since_tizen>
1698 GetProperty(FlexContainer.ChildProperty.FLEX).Get(out temp);
1703 SetProperty(FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue(value));
1708 /// The Child property of FlexContainer.<br />
1709 /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br />
1711 /// <since_tizen> 3 </since_tizen>
1712 public int AlignSelf
1717 GetProperty(FlexContainer.ChildProperty.ALIGN_SELF).Get(out temp);
1722 SetProperty(FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue(value));
1727 /// The Child property of FlexContainer.<br />
1728 /// The space around the flex item.<br />
1730 /// <since_tizen> 3 </since_tizen>
1731 public Vector4 FlexMargin
1735 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1736 GetProperty(FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
1741 SetProperty(FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue(value));
1746 /// The top-left cell this child occupies, if not set, the first available cell is used.
1748 /// <since_tizen> 3 </since_tizen>
1749 public Vector2 CellIndex
1753 Vector2 temp = new Vector2(0.0f, 0.0f);
1754 GetProperty(TableView.ChildProperty.CELL_INDEX).Get(temp);
1759 SetProperty(TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue(value));
1764 /// The number of rows this child occupies, if not set, the default value is 1.
1766 /// <since_tizen> 3 </since_tizen>
1767 public float RowSpan
1772 GetProperty(TableView.ChildProperty.ROW_SPAN).Get(out temp);
1777 SetProperty(TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue(value));
1782 /// The number of columns this child occupies, if not set, the default value is 1.
1784 /// <since_tizen> 3 </since_tizen>
1785 public float ColumnSpan
1790 GetProperty(TableView.ChildProperty.COLUMN_SPAN).Get(out temp);
1795 SetProperty(TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue(value));
1800 /// The horizontal alignment of this child inside the cells, if not set, the default value is 'left'.
1802 /// <since_tizen> 3 </since_tizen>
1803 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
1808 if (GetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
1810 NUILog.Error("CellHorizontalAlignment get error!");
1816 return Tizen.NUI.HorizontalAlignmentType.Left;
1818 return Tizen.NUI.HorizontalAlignmentType.Center;
1820 return Tizen.NUI.HorizontalAlignmentType.Right;
1822 return Tizen.NUI.HorizontalAlignmentType.Left;
1827 string valueToString = "";
1830 case Tizen.NUI.HorizontalAlignmentType.Left:
1832 valueToString = "left";
1835 case Tizen.NUI.HorizontalAlignmentType.Center:
1837 valueToString = "center";
1840 case Tizen.NUI.HorizontalAlignmentType.Right:
1842 valueToString = "right";
1847 valueToString = "left";
1851 SetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1856 /// The vertical alignment of this child inside the cells, if not set, the default value is 'top'.
1858 /// <since_tizen> 3 </since_tizen>
1859 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
1864 GetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
1866 NUILog.Error("CellVerticalAlignment get error!");
1872 return Tizen.NUI.VerticalAlignmentType.Top;
1874 return Tizen.NUI.VerticalAlignmentType.Center;
1876 return Tizen.NUI.VerticalAlignmentType.Bottom;
1878 return Tizen.NUI.VerticalAlignmentType.Top;
1883 string valueToString = "";
1886 case Tizen.NUI.VerticalAlignmentType.Top:
1888 valueToString = "top";
1891 case Tizen.NUI.VerticalAlignmentType.Center:
1893 valueToString = "center";
1896 case Tizen.NUI.VerticalAlignmentType.Bottom:
1898 valueToString = "bottom";
1903 valueToString = "top";
1907 SetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1912 /// The left focusable view.<br />
1913 /// This will return null if not set.<br />
1914 /// This will also return null if the specified left focusable view is not on a window.<br />
1916 /// <since_tizen> 3 </since_tizen>
1917 public View LeftFocusableView
1919 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1922 if (LeftFocusableViewId >= 0)
1924 return ConvertIdToView((uint)LeftFocusableViewId);
1932 LeftFocusableViewId = (int)value.GetId();
1936 LeftFocusableViewId = -1;
1942 /// The right focusable view.<br />
1943 /// This will return null if not set.<br />
1944 /// This will also return null if the specified right focusable view is not on a window.<br />
1946 /// <since_tizen> 3 </since_tizen>
1947 public View RightFocusableView
1949 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1952 if (RightFocusableViewId >= 0)
1954 return ConvertIdToView((uint)RightFocusableViewId);
1962 RightFocusableViewId = (int)value.GetId();
1966 RightFocusableViewId = -1;
1972 /// The up focusable view.<br />
1973 /// This will return null if not set.<br />
1974 /// This will also return null if the specified up focusable view is not on a window.<br />
1976 /// <since_tizen> 3 </since_tizen>
1977 public View UpFocusableView
1979 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1982 if (UpFocusableViewId >= 0)
1984 return ConvertIdToView((uint)UpFocusableViewId);
1992 UpFocusableViewId = (int)value.GetId();
1996 UpFocusableViewId = -1;
2002 /// The down focusable view.<br />
2003 /// This will return null if not set.<br />
2004 /// This will also return null if the specified down focusable view is not on a window.<br />
2006 /// <since_tizen> 3 </since_tizen>
2007 public View DownFocusableView
2009 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2012 if (DownFocusableViewId >= 0)
2014 return ConvertIdToView((uint)DownFocusableViewId);
2022 DownFocusableViewId = (int)value.GetId();
2026 DownFocusableViewId = -1;
2032 /// Whether the view should be focusable by keyboard navigation.
2034 /// <since_tizen> 3 </since_tizen>
2035 public bool Focusable
2039 SetKeyboardFocusable(value);
2043 return IsKeyboardFocusable();
2048 /// Enumeration for describing the states of the view.
2050 /// <since_tizen> 3 </since_tizen>
2054 /// The normal state.
2058 /// The focused state.
2062 /// The disabled state.
2068 /// Retrieves the position of the view.<br />
2069 /// The coordinates are relative to the view's parent.<br />
2071 /// <since_tizen> 3 </since_tizen>
2072 public Position CurrentPosition
2076 return GetCurrentPosition();
2081 /// Sets the size of a view for the width and the height.<br />
2082 /// Geometry can be scaled to fit within this area.<br />
2083 /// This does not interfere with the view's scale factor.<br />
2084 /// The views default depth is the minimum of width and height.<br />
2086 /// <since_tizen> 3 </since_tizen>
2087 public Size2D Size2D
2091 Size temp = new Size(0.0f, 0.0f, 0.0f);
2092 GetProperty(View.Property.SIZE).Get(temp);
2093 Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
2098 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(new Size(value)));
2103 /// Retrieves the size of the view.<br />
2104 /// The coordinates are relative to the view's parent.<br />
2106 /// <since_tizen> 3 </since_tizen>
2107 public Size2D CurrentSize
2111 return GetCurrentSize();
2116 /// Retrieves and sets the view's opacity.<br />
2118 /// <since_tizen> 3 </since_tizen>
2119 public float Opacity
2124 GetProperty(View.Property.OPACITY).Get(out temp);
2129 SetProperty(View.Property.OPACITY, new Tizen.NUI.PropertyValue(value));
2134 /// Sets the position of the view for X and Y.<br />
2135 /// By default, sets the position vector between the parent origin and the pivot point (default).<br />
2136 /// If the position inheritance is disabled, sets the world position.<br />
2138 /// <since_tizen> 3 </since_tizen>
2139 public Position2D Position2D
2143 Position temp = new Position(0.0f, 0.0f, 0.0f);
2144 GetProperty(View.Property.POSITION).Get(temp);
2145 return new Position2D(temp);
2149 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(new Position(value)));
2154 /// Retrieves the screen postion of the view.<br />
2156 /// <since_tizen> 3 </since_tizen>
2157 public Vector2 ScreenPosition
2161 Vector2 temp = new Vector2(0.0f, 0.0f);
2162 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
2168 /// Determines whether the pivot point should be used to determine the position of the view.
2169 /// This is true by default.
2171 /// <remarks>If false, then the top-left of the view is used for the position.
2172 /// Setting this to false will allow scaling or rotation around the anchor-point without affecting the view's position.
2174 /// <since_tizen> 3 </since_tizen>
2175 public bool PositionUsesPivotPoint
2180 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
2185 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
2190 /// Please do not use! this will be deprecated.
2192 /// Please do not use! this will be deprecated!
2193 /// Instead please use PositionUsesPivotPoint.
2194 /// <since_tizen> 3 </since_tizen>
2195 [Obsolete("Please do not use! This will be deprecated! Please use PositionUsesPivotPoint instead! " +
2197 "View view = new View(); " +
2198 "view.PivotPoint = PivotPoint.Center; " +
2199 "view.PositionUsesPivotPoint = true;")]
2200 [EditorBrowsable(EditorBrowsableState.Never)]
2201 public bool PositionUsesAnchorPoint
2206 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
2211 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
2215 internal bool FocusState
2219 return IsKeyboardFocusable();
2223 SetKeyboardFocusable(value);
2228 /// Queries whether the view is connected to the stage.<br />
2229 /// When a view is connected, it will be directly or indirectly parented to the root view.<br />
2231 /// <since_tizen> 3 </since_tizen>
2232 public bool IsOnWindow
2241 /// Gets the depth in the hierarchy for the view.
2243 /// <since_tizen> 3 </since_tizen>
2244 public int HierarchyDepth
2248 return GetHierarchyDepth();
2253 /// Sets the sibling order of the view so the depth position can be defined within the same parent.
2256 /// Note the initial value is 0. SiblingOrder should be bigger than 0 or equal to 0.
2257 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove, and LowerBelow will override the sibling order.
2258 /// The values set by this property will likely change.
2260 /// <since_tizen> 3 </since_tizen>
2261 public int SiblingOrder
2265 var parentChildren = GetParent()?.Children;
2266 int currentOrder = 0;
2267 if (parentChildren != null)
2269 currentOrder = parentChildren.IndexOf(this);
2271 if (currentOrder < 0)
2275 else if (currentOrder < parentChildren.Count)
2277 return currentOrder;
2287 NUILog.Error("SiblingOrder should be bigger than 0 or equal to 0.");
2290 var siblings = GetParent()?.Children;
2291 if (siblings != null)
2293 int currentOrder = siblings.IndexOf(this);
2294 if (value != currentOrder)
2300 else if (value < siblings.Count - 1)
2302 if (value > currentOrder)
2304 RaiseAbove(siblings[value]);
2308 LowerBelow(siblings[value]);
2321 /// Returns the natural size of the view.
2324 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
2326 /// /// Please do not use! this will be deprecated!
2327 /// Instead please use NaturalSize2D.
2328 /// <since_tizen> 3 </since_tizen>
2329 [Obsolete("Please do not use! This will be deprecated! Please use NaturalSize2D instead! " +
2331 "TextLabel label = new TextLabel(\"Hello World!\"); " +
2332 "Size2D size = label.NaturalSize2D;")]
2333 [EditorBrowsable(EditorBrowsableState.Never)]
2334 public Vector3 NaturalSize
2338 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2339 if (NDalicPINVOKE.SWIGPendingException.Pending)
2340 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2346 /// Returns the natural size (Size2D) of the view.
2349 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
2351 /// <since_tizen> 4 </since_tizen>
2352 public Size2D NaturalSize2D
2356 Vector3 temp = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2357 if (NDalicPINVOKE.SWIGPendingException.Pending)
2358 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2360 return new Size2D((int)temp.Width, (int)temp.Height);
2365 /// Set the layout on this control.
2369 /// <since_tizen> 5 </since_tizen>
2370 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
2371 [EditorBrowsable(EditorBrowsableState.Never)]
2372 public LayoutItem Layout
2376 IntPtr cPtr = Tizen.NUI.NDalicManualPINVOKE.GetLayout__SWIG_1(View.getCPtr(this));
2378 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
2379 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
2380 NDalicPINVOKE.delete_BaseHandle(CPtr);
2381 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
2383 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2385 return basehandle as LayoutItem;
2389 Tizen.NUI.NDalicManualPINVOKE.SetLayout__SWIG_1(View.getCPtr(this), LayoutItem.getCPtr(value));
2397 /// This is an asynchronous method.
2399 /// <since_tizen> 3 </since_tizen>
2409 /// This is an asynchronous method.
2410 /// If the view is hidden, then the view and its children will not be rendered.
2411 /// This is regardless of the individual visibility of the children, i.e., the view will only be rendered if all of its parents are shown.
2413 /// <since_tizen> 3 </since_tizen>
2419 internal void Raise()
2421 var parentChildren = GetParent()?.Children;
2423 if (parentChildren != null)
2425 int currentIndex = parentChildren.IndexOf(this);
2427 // If the view is not already the last item in the list.
2428 if (currentIndex >= 0 && currentIndex < parentChildren.Count - 1)
2430 View temp = parentChildren[currentIndex + 1];
2431 parentChildren[currentIndex + 1] = this;
2432 parentChildren[currentIndex] = temp;
2434 NDalicPINVOKE.Raise(swigCPtr);
2435 if (NDalicPINVOKE.SWIGPendingException.Pending)
2436 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2442 internal void Lower()
2444 var parentChildren = GetParent()?.Children;
2446 if (parentChildren != null)
2448 int currentIndex = parentChildren.IndexOf(this);
2450 // If the view is not already the first item in the list.
2451 if (currentIndex > 0 && currentIndex < parentChildren.Count)
2453 View temp = parentChildren[currentIndex - 1];
2454 parentChildren[currentIndex - 1] = this;
2455 parentChildren[currentIndex] = temp;
2457 NDalicPINVOKE.Lower(swigCPtr);
2458 if (NDalicPINVOKE.SWIGPendingException.Pending)
2459 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2465 /// Raises the view above all other views.
2468 /// Sibling order of views within the parent will be updated automatically.
2469 /// Once a raise or lower API is used, that view will then have an exclusive sibling order independent of insertion.
2471 /// <since_tizen> 3 </since_tizen>
2472 public void RaiseToTop()
2474 var parentChildren = GetParent()?.Children;
2476 if (parentChildren != null)
2478 parentChildren.Remove(this);
2479 parentChildren.Add(this);
2481 NDalicPINVOKE.RaiseToTop(swigCPtr);
2482 if (NDalicPINVOKE.SWIGPendingException.Pending)
2483 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2489 /// Lowers the view to the bottom of all views.
2492 /// The sibling order of views within the parent will be updated automatically.
2493 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2495 /// <since_tizen> 3 </since_tizen>
2496 public void LowerToBottom()
2498 var parentChildren = GetParent()?.Children;
2500 if (parentChildren != null)
2502 parentChildren.Remove(this);
2503 parentChildren.Insert(0, this);
2505 NDalicPINVOKE.LowerToBottom(swigCPtr);
2506 if (NDalicPINVOKE.SWIGPendingException.Pending)
2507 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2512 /// Queries if all resources required by a view are loaded and ready.
2514 /// <remarks>Most resources are only loaded when the control is placed on the stage.
2516 /// <since_tizen> 3 </since_tizen>
2517 public bool IsResourceReady()
2519 bool ret = NDalicPINVOKE.IsResourceReady(swigCPtr);
2520 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2525 /// Raises the view to above the target view.
2527 /// <remarks>The sibling order of views within the parent will be updated automatically.
2528 /// Views on the level above the target view will still be shown above this view.
2529 /// Raising this view above views with the same sibling order as each other will raise this view above them.
2530 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2532 /// <param name="target">Will be raised above this view.</param>
2533 internal void RaiseAbove(View target)
2535 var parentChildren = GetParent()?.Children;
2537 if (parentChildren != null)
2539 int currentIndex = parentChildren.IndexOf(this);
2540 int targetIndex = parentChildren.IndexOf(target);
2542 if (currentIndex < 0 || targetIndex < 0 ||
2543 currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
2545 NUILog.Error("index should be bigger than 0 and less than children of layer count");
2548 // If the currentIndex is less than the target index and the target has the same parent.
2549 if (currentIndex < targetIndex)
2551 parentChildren.Remove(this);
2552 parentChildren.Insert(targetIndex, this);
2554 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
2555 if (NDalicPINVOKE.SWIGPendingException.Pending)
2556 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2563 /// Lowers the view to below the target view.
2565 /// <remarks>The sibling order of views within the parent will be updated automatically.
2566 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
2567 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2569 /// <param name="target">Will be lowered below this view.</param>
2570 internal void LowerBelow(View target)
2572 var parentChildren = GetParent()?.Children;
2574 if (parentChildren != null)
2576 int currentIndex = parentChildren.IndexOf(this);
2577 int targetIndex = parentChildren.IndexOf(target);
2578 if (currentIndex < 0 || targetIndex < 0 ||
2579 currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
2581 NUILog.Error("index should be bigger than 0 and less than children of layer count");
2585 // If the currentIndex is not already the 0th index and the target has the same parent.
2586 if ((currentIndex != 0) && (targetIndex != -1) &&
2587 (currentIndex > targetIndex))
2589 parentChildren.Remove(this);
2590 parentChildren.Insert(targetIndex, this);
2592 NDalicPINVOKE.LowerBelow(swigCPtr, View.getCPtr(target));
2593 if (NDalicPINVOKE.SWIGPendingException.Pending)
2594 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2600 internal string GetName()
2602 string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);
2603 if (NDalicPINVOKE.SWIGPendingException.Pending)
2604 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2608 internal void SetName(string name)
2610 NDalicPINVOKE.Actor_SetName(swigCPtr, name);
2611 if (NDalicPINVOKE.SWIGPendingException.Pending)
2612 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2615 internal uint GetId()
2617 uint ret = NDalicPINVOKE.Actor_GetId(swigCPtr);
2618 if (NDalicPINVOKE.SWIGPendingException.Pending)
2619 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2623 internal bool IsRoot()
2625 bool ret = NDalicPINVOKE.Actor_IsRoot(swigCPtr);
2626 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2630 internal bool OnWindow()
2632 bool ret = NDalicPINVOKE.Actor_OnStage(swigCPtr);
2633 if (NDalicPINVOKE.SWIGPendingException.Pending)
2634 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2639 /// Gets the parent layer of this view.If a view has no parent, this method does nothing.
2641 /// <pre>The view has been initialized. </pre>
2642 /// <returns>the parent layer of view </returns>
2643 /// <since_tizen> 5 </since_tizen>
2644 public Layer GetLayer()
2646 //to fix memory leak issue, match the handle count with native side.
2647 IntPtr cPtr = NDalicPINVOKE.Actor_GetLayer(swigCPtr);
2648 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
2649 Layer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Layer;
2650 NDalicPINVOKE.delete_BaseHandle(CPtr);
2651 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
2653 if (NDalicPINVOKE.SWIGPendingException.Pending)
2654 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2659 /// Removes a view from its parent view or layer. If a view has no parent, this method does nothing.
2661 /// <pre>The (child) view has been initialized. </pre>
2662 /// <since_tizen> 4 </since_tizen>
2663 public void Unparent()
2665 GetParent()?.Remove(this);
2669 /// Search through this view's hierarchy for a view with the given name.
2670 /// The view itself is also considered in the search.
2672 /// <pre>The view has been initialized.</pre>
2673 /// <param name="viewName">The name of the view to find.</param>
2674 /// <returns>A handle to the view if found, or an empty handle if not.</returns>
2675 /// <since_tizen> 3 </since_tizen>
2676 public View FindChildByName(string viewName)
2678 //to fix memory leak issue, match the handle count with native side.
2679 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
2680 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
2681 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
2682 NDalicPINVOKE.delete_BaseHandle(CPtr);
2683 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
2685 if (NDalicPINVOKE.SWIGPendingException.Pending)
2686 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2690 internal View FindChildById(uint id)
2692 //to fix memory leak issue, match the handle count with native side.
2693 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
2694 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
2695 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
2696 NDalicPINVOKE.delete_BaseHandle(CPtr);
2697 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
2699 if (NDalicPINVOKE.SWIGPendingException.Pending)
2700 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2704 internal void SetParentOrigin(Vector3 origin)
2706 NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
2707 if (NDalicPINVOKE.SWIGPendingException.Pending)
2708 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2711 internal Vector3 GetCurrentParentOrigin()
2713 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentParentOrigin(swigCPtr), true);
2714 if (NDalicPINVOKE.SWIGPendingException.Pending)
2715 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2719 internal void SetAnchorPoint(Vector3 anchorPoint)
2721 NDalicPINVOKE.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
2722 if (NDalicPINVOKE.SWIGPendingException.Pending)
2723 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2726 internal Vector3 GetCurrentAnchorPoint()
2728 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentAnchorPoint(swigCPtr), true);
2729 if (NDalicPINVOKE.SWIGPendingException.Pending)
2730 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2734 internal void SetSize(float width, float height)
2736 NDalicPINVOKE.Actor_SetSize__SWIG_0(swigCPtr, width, height);
2737 if (NDalicPINVOKE.SWIGPendingException.Pending)
2738 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2741 internal void SetSize(float width, float height, float depth)
2743 NDalicPINVOKE.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
2744 if (NDalicPINVOKE.SWIGPendingException.Pending)
2745 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2748 internal void SetSize(Vector2 size)
2750 NDalicPINVOKE.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
2751 if (NDalicPINVOKE.SWIGPendingException.Pending)
2752 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2755 internal void SetSize(Vector3 size)
2757 NDalicPINVOKE.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
2758 if (NDalicPINVOKE.SWIGPendingException.Pending)
2759 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2762 internal Vector3 GetTargetSize()
2764 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetTargetSize(swigCPtr), true);
2765 if (NDalicPINVOKE.SWIGPendingException.Pending)
2766 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2770 internal Size2D GetCurrentSize()
2772 Size ret = new Size(NDalicPINVOKE.Actor_GetCurrentSize(swigCPtr), true);
2773 if (NDalicPINVOKE.SWIGPendingException.Pending)
2774 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2775 Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
2779 internal Vector3 GetNaturalSize()
2781 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2782 if (NDalicPINVOKE.SWIGPendingException.Pending)
2783 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2787 internal void SetPosition(float x, float y)
2789 NDalicPINVOKE.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
2790 if (NDalicPINVOKE.SWIGPendingException.Pending)
2791 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2794 internal void SetPosition(float x, float y, float z)
2796 NDalicPINVOKE.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
2797 if (NDalicPINVOKE.SWIGPendingException.Pending)
2798 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2801 internal void SetPosition(Vector3 position)
2803 NDalicPINVOKE.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
2804 if (NDalicPINVOKE.SWIGPendingException.Pending)
2805 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2808 internal void SetX(float x)
2810 NDalicPINVOKE.Actor_SetX(swigCPtr, x);
2811 if (NDalicPINVOKE.SWIGPendingException.Pending)
2812 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2815 internal void SetY(float y)
2817 NDalicPINVOKE.Actor_SetY(swigCPtr, y);
2818 if (NDalicPINVOKE.SWIGPendingException.Pending)
2819 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2822 internal void SetZ(float z)
2824 NDalicPINVOKE.Actor_SetZ(swigCPtr, z);
2825 if (NDalicPINVOKE.SWIGPendingException.Pending)
2826 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2829 internal void TranslateBy(Vector3 distance)
2831 NDalicPINVOKE.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
2832 if (NDalicPINVOKE.SWIGPendingException.Pending)
2833 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2836 internal Position GetCurrentPosition()
2838 Position ret = new Position(NDalicPINVOKE.Actor_GetCurrentPosition(swigCPtr), true);
2839 if (NDalicPINVOKE.SWIGPendingException.Pending)
2840 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2844 internal Vector3 GetCurrentWorldPosition()
2846 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldPosition(swigCPtr), true);
2847 if (NDalicPINVOKE.SWIGPendingException.Pending)
2848 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2852 internal void SetInheritPosition(bool inherit)
2854 NDalicPINVOKE.Actor_SetInheritPosition(swigCPtr, inherit);
2855 if (NDalicPINVOKE.SWIGPendingException.Pending)
2856 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2859 internal bool IsPositionInherited()
2861 bool ret = NDalicPINVOKE.Actor_IsPositionInherited(swigCPtr);
2862 if (NDalicPINVOKE.SWIGPendingException.Pending)
2863 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2867 internal void SetOrientation(Degree angle, Vector3 axis)
2869 NDalicPINVOKE.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2870 if (NDalicPINVOKE.SWIGPendingException.Pending)
2871 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2874 internal void SetOrientation(Radian angle, Vector3 axis)
2876 NDalicPINVOKE.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2877 if (NDalicPINVOKE.SWIGPendingException.Pending)
2878 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2881 internal void SetOrientation(Rotation orientation)
2883 NDalicPINVOKE.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
2884 if (NDalicPINVOKE.SWIGPendingException.Pending)
2885 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2888 internal void RotateBy(Degree angle, Vector3 axis)
2890 NDalicPINVOKE.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2891 if (NDalicPINVOKE.SWIGPendingException.Pending)
2892 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2895 internal void RotateBy(Radian angle, Vector3 axis)
2897 NDalicPINVOKE.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2898 if (NDalicPINVOKE.SWIGPendingException.Pending)
2899 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2902 internal void RotateBy(Rotation relativeRotation)
2904 NDalicPINVOKE.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
2905 if (NDalicPINVOKE.SWIGPendingException.Pending)
2906 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2909 internal Rotation GetCurrentOrientation()
2911 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentOrientation(swigCPtr), true);
2912 if (NDalicPINVOKE.SWIGPendingException.Pending)
2913 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2917 internal void SetInheritOrientation(bool inherit)
2919 NDalicPINVOKE.Actor_SetInheritOrientation(swigCPtr, inherit);
2920 if (NDalicPINVOKE.SWIGPendingException.Pending)
2921 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2924 internal bool IsOrientationInherited()
2926 bool ret = NDalicPINVOKE.Actor_IsOrientationInherited(swigCPtr);
2927 if (NDalicPINVOKE.SWIGPendingException.Pending)
2928 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2932 internal Rotation GetCurrentWorldOrientation()
2934 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentWorldOrientation(swigCPtr), true);
2935 if (NDalicPINVOKE.SWIGPendingException.Pending)
2936 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2940 internal void SetScale(float scale)
2942 NDalicPINVOKE.Actor_SetScale__SWIG_0(swigCPtr, scale);
2943 if (NDalicPINVOKE.SWIGPendingException.Pending)
2944 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2947 internal void SetScale(float scaleX, float scaleY, float scaleZ)
2949 NDalicPINVOKE.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
2950 if (NDalicPINVOKE.SWIGPendingException.Pending)
2951 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2954 internal void SetScale(Vector3 scale)
2956 NDalicPINVOKE.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
2957 if (NDalicPINVOKE.SWIGPendingException.Pending)
2958 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2961 internal void ScaleBy(Vector3 relativeScale)
2963 NDalicPINVOKE.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
2964 if (NDalicPINVOKE.SWIGPendingException.Pending)
2965 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2968 internal Vector3 GetCurrentScale()
2970 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentScale(swigCPtr), true);
2971 if (NDalicPINVOKE.SWIGPendingException.Pending)
2972 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2976 internal Vector3 GetCurrentWorldScale()
2978 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldScale(swigCPtr), true);
2979 if (NDalicPINVOKE.SWIGPendingException.Pending)
2980 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2984 internal void SetInheritScale(bool inherit)
2986 NDalicPINVOKE.Actor_SetInheritScale(swigCPtr, inherit);
2987 if (NDalicPINVOKE.SWIGPendingException.Pending)
2988 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2991 internal bool IsScaleInherited()
2993 bool ret = NDalicPINVOKE.Actor_IsScaleInherited(swigCPtr);
2994 if (NDalicPINVOKE.SWIGPendingException.Pending)
2995 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2999 internal Matrix GetCurrentWorldMatrix()
3001 Matrix ret = new Matrix(NDalicPINVOKE.Actor_GetCurrentWorldMatrix(swigCPtr), true);
3002 if (NDalicPINVOKE.SWIGPendingException.Pending)
3003 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3007 internal void SetVisible(bool visible)
3009 NDalicPINVOKE.Actor_SetVisible(swigCPtr, visible);
3010 if (NDalicPINVOKE.SWIGPendingException.Pending)
3011 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3014 internal bool IsVisible()
3016 bool ret = NDalicPINVOKE.Actor_IsVisible(swigCPtr);
3017 if (NDalicPINVOKE.SWIGPendingException.Pending)
3018 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3022 internal void SetOpacity(float opacity)
3024 NDalicPINVOKE.Actor_SetOpacity(swigCPtr, opacity);
3025 if (NDalicPINVOKE.SWIGPendingException.Pending)
3026 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3029 internal float GetCurrentOpacity()
3031 float ret = NDalicPINVOKE.Actor_GetCurrentOpacity(swigCPtr);
3032 if (NDalicPINVOKE.SWIGPendingException.Pending)
3033 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3037 internal void SetColor(Vector4 color)
3039 NDalicPINVOKE.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
3040 if (NDalicPINVOKE.SWIGPendingException.Pending)
3041 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3044 internal Vector4 GetCurrentColor()
3046 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentColor(swigCPtr), true);
3047 if (NDalicPINVOKE.SWIGPendingException.Pending)
3048 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3052 internal void SetColorMode(ColorMode colorMode)
3054 NDalicPINVOKE.Actor_SetColorMode(swigCPtr, (int)colorMode);
3055 if (NDalicPINVOKE.SWIGPendingException.Pending)
3056 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3059 internal ColorMode GetColorMode()
3061 ColorMode ret = (ColorMode)NDalicPINVOKE.Actor_GetColorMode(swigCPtr);
3062 if (NDalicPINVOKE.SWIGPendingException.Pending)
3063 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3067 internal Vector4 GetCurrentWorldColor()
3069 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentWorldColor(swigCPtr), true);
3070 if (NDalicPINVOKE.SWIGPendingException.Pending)
3071 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3075 internal void SetDrawMode(DrawModeType drawMode)
3077 NDalicPINVOKE.Actor_SetDrawMode(swigCPtr, (int)drawMode);
3078 if (NDalicPINVOKE.SWIGPendingException.Pending)
3079 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3082 internal DrawModeType GetDrawMode()
3084 DrawModeType ret = (DrawModeType)NDalicPINVOKE.Actor_GetDrawMode(swigCPtr);
3085 if (NDalicPINVOKE.SWIGPendingException.Pending)
3086 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3091 /// Converts screen coordinates into the view's coordinate system using the default camera.
3093 /// <pre>The view has been initialized.</pre>
3094 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5).</remarks>
3095 /// <param name="localX">On return, the X-coordinate relative to the view.</param>
3096 /// <param name="localY">On return, the Y-coordinate relative to the view.</param>
3097 /// <param name="screenX">The screen X-coordinate.</param>
3098 /// <param name="screenY">The screen Y-coordinate.</param>
3099 /// <returns>True if the conversion succeeded.</returns>
3100 /// <since_tizen> 3 </since_tizen>
3101 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
3103 bool ret = NDalicPINVOKE.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
3104 if (NDalicPINVOKE.SWIGPendingException.Pending)
3105 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3109 internal void SetKeyboardFocusable(bool focusable)
3111 NDalicPINVOKE.Actor_SetKeyboardFocusable(swigCPtr, focusable);
3112 if (NDalicPINVOKE.SWIGPendingException.Pending)
3113 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3116 internal bool IsKeyboardFocusable()
3118 bool ret = NDalicPINVOKE.Actor_IsKeyboardFocusable(swigCPtr);
3119 if (NDalicPINVOKE.SWIGPendingException.Pending)
3120 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3124 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
3126 NDalicPINVOKE.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
3127 if (NDalicPINVOKE.SWIGPendingException.Pending)
3128 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3131 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
3133 ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.Actor_GetResizePolicy(swigCPtr, (int)dimension);
3134 if (NDalicPINVOKE.SWIGPendingException.Pending)
3135 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3140 /// Sets the relative to parent size factor of the view.<br />
3141 /// This factor is only used when ResizePolicy is set to either:
3142 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br />
3143 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br />
3145 /// <pre>The view has been initialized.</pre>
3146 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis.</param>
3147 /// <since_tizen> 3 </since_tizen>
3148 public void SetSizeModeFactor(Vector3 factor)
3150 NDalicPINVOKE.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
3151 if (NDalicPINVOKE.SWIGPendingException.Pending)
3152 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3155 internal Vector3 GetSizeModeFactor()
3157 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetSizeModeFactor(swigCPtr), true);
3158 if (NDalicPINVOKE.SWIGPendingException.Pending)
3159 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3164 /// Calculates the height of the view given a width.<br />
3165 /// The natural size is used for default calculation.<br />
3166 /// Size 0 is treated as aspect ratio 1:1.<br />
3168 /// <param name="width">The width to use.</param>
3169 /// <returns>The height based on the width.</returns>
3170 /// <since_tizen> 3 </since_tizen>
3171 public float GetHeightForWidth(float width)
3173 float ret = NDalicPINVOKE.Actor_GetHeightForWidth(swigCPtr, width);
3174 if (NDalicPINVOKE.SWIGPendingException.Pending)
3175 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3180 /// Calculates the width of the view given a height.<br />
3181 /// The natural size is used for default calculation.<br />
3182 /// Size 0 is treated as aspect ratio 1:1.<br />
3184 /// <param name="height">The height to use.</param>
3185 /// <returns>The width based on the height.</returns>
3186 /// <since_tizen> 3 </since_tizen>
3187 public float GetWidthForHeight(float height)
3189 float ret = NDalicPINVOKE.Actor_GetWidthForHeight(swigCPtr, height);
3190 if (NDalicPINVOKE.SWIGPendingException.Pending)
3191 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3196 /// Return the amount of size allocated for relayout.
3198 /// <param name="dimension">The dimension to retrieve.</param>
3199 /// <returns>Return the size.</returns>
3200 /// <since_tizen> 3 </since_tizen>
3201 public float GetRelayoutSize(DimensionType dimension)
3203 float ret = NDalicPINVOKE.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
3204 if (NDalicPINVOKE.SWIGPendingException.Pending)
3205 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3210 /// Set the padding for the view.
3212 /// <param name="padding">Padding for the view.</param>
3213 /// <since_tizen> 3 </since_tizen>
3214 public void SetPadding(PaddingType padding)
3216 NDalicPINVOKE.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
3217 if (NDalicPINVOKE.SWIGPendingException.Pending)
3218 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3222 /// Return the value of padding for the view.
3224 /// <param name="paddingOut">the value of padding for the view</param>
3225 /// <since_tizen> 3 </since_tizen>
3226 public void GetPadding(PaddingType paddingOut)
3228 NDalicPINVOKE.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
3229 if (NDalicPINVOKE.SWIGPendingException.Pending)
3230 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3233 internal void SetMinimumSize(Vector2 size)
3235 NDalicPINVOKE.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
3236 if (NDalicPINVOKE.SWIGPendingException.Pending)
3237 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3240 internal Vector2 GetMinimumSize()
3242 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMinimumSize(swigCPtr), true);
3243 if (NDalicPINVOKE.SWIGPendingException.Pending)
3244 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3248 internal void SetMaximumSize(Vector2 size)
3250 NDalicPINVOKE.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
3251 if (NDalicPINVOKE.SWIGPendingException.Pending)
3252 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3255 internal Vector2 GetMaximumSize()
3257 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMaximumSize(swigCPtr), true);
3258 if (NDalicPINVOKE.SWIGPendingException.Pending)
3259 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3263 internal int GetHierarchyDepth()
3265 int ret = NDalicPINVOKE.Actor_GetHierarchyDepth(swigCPtr);
3266 if (NDalicPINVOKE.SWIGPendingException.Pending)
3267 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3271 /// <since_tizen> 3 </since_tizen>
3272 public uint AddRenderer(Renderer renderer)
3274 uint ret = NDalicPINVOKE.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
3275 if (NDalicPINVOKE.SWIGPendingException.Pending)
3276 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3280 internal uint GetRendererCount()
3282 uint ret = NDalicPINVOKE.Actor_GetRendererCount(swigCPtr);
3283 if (NDalicPINVOKE.SWIGPendingException.Pending)
3284 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3288 /// <since_tizen> 3 </since_tizen>
3289 public Renderer GetRendererAt(uint index)
3291 //to fix memory leak issue, match the handle count with native side.
3292 IntPtr cPtr = NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index);
3293 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3294 Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Renderer;
3295 NDalicPINVOKE.delete_BaseHandle(CPtr);
3296 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3298 if (NDalicPINVOKE.SWIGPendingException.Pending)
3299 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3303 /// <since_tizen> 3 </since_tizen>
3304 public void RemoveRenderer(Renderer renderer)
3306 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
3307 if (NDalicPINVOKE.SWIGPendingException.Pending)
3308 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3311 /// <since_tizen> 3 </since_tizen>
3312 public void RemoveRenderer(uint index)
3314 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
3315 if (NDalicPINVOKE.SWIGPendingException.Pending)
3316 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3319 internal TouchDataSignal TouchSignal()
3321 TouchDataSignal ret = new TouchDataSignal(NDalicPINVOKE.Actor_TouchSignal(swigCPtr), false);
3322 if (NDalicPINVOKE.SWIGPendingException.Pending)
3323 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3327 internal HoverSignal HoveredSignal()
3329 HoverSignal ret = new HoverSignal(NDalicPINVOKE.Actor_HoveredSignal(swigCPtr), false);
3330 if (NDalicPINVOKE.SWIGPendingException.Pending)
3331 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3335 internal WheelSignal WheelEventSignal()
3337 WheelSignal ret = new WheelSignal(NDalicPINVOKE.Actor_WheelEventSignal(swigCPtr), false);
3338 if (NDalicPINVOKE.SWIGPendingException.Pending)
3339 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3343 internal ViewSignal OnWindowSignal()
3345 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnStageSignal(swigCPtr), false);
3346 if (NDalicPINVOKE.SWIGPendingException.Pending)
3347 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3351 internal ViewSignal OffWindowSignal()
3353 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OffStageSignal(swigCPtr), false);
3354 if (NDalicPINVOKE.SWIGPendingException.Pending)
3355 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3359 internal ViewSignal OnRelayoutSignal()
3361 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnRelayoutSignal(swigCPtr), false);
3362 if (NDalicPINVOKE.SWIGPendingException.Pending)
3363 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3367 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view)
3369 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
3370 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3375 internal ViewLayoutDirectionChangedSignal LayoutDirectionChangedSignal(View view)
3377 ViewLayoutDirectionChangedSignal ret = new ViewLayoutDirectionChangedSignal(NDalicManualPINVOKE.LayoutDirectionChangedSignal(View.getCPtr(view)), false);
3378 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3383 internal ViewSignal ResourcesLoadedSignal()
3385 ViewSignal ret = new ViewSignal(NDalicPINVOKE.ResourceReadySignal(swigCPtr), false);
3386 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3391 /// Gets or sets the origin of a view within its parent's area.<br />
3392 /// 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 />
3393 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br />
3394 /// A view's position is the distance between this origin and the view's anchor-point.<br />
3396 /// <pre>The view has been initialized.</pre>
3397 /// <since_tizen> 3 </since_tizen>
3398 public Position ParentOrigin
3402 Position temp = new Position(0.0f, 0.0f, 0.0f);
3403 GetProperty(View.Property.PARENT_ORIGIN).Get(temp);
3408 SetProperty(View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue(value));
3412 internal float ParentOriginX
3417 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
3422 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
3426 internal float ParentOriginY
3431 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
3436 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
3440 internal float ParentOriginZ
3445 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
3450 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
3455 /// Gets or sets the anchor-point of a view.<br />
3456 /// 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 />
3457 /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br />
3458 /// A view position is the distance between its parent-origin and this anchor-point.<br />
3459 /// A view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br />
3460 /// <pre>The view has been initialized.</pre>
3462 /// <since_tizen> 3 </since_tizen>
3463 public Position PivotPoint
3467 Position temp = new Position(0.0f, 0.0f, 0.0f);
3468 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
3473 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3477 internal float PivotPointX
3482 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
3487 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
3491 internal float PivotPointY
3496 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
3501 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
3505 internal float PivotPointZ
3510 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
3515 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
3520 /// Gets or sets the size width of the view.
3522 /// <since_tizen> 3 </since_tizen>
3523 public float SizeWidth
3528 GetProperty(View.Property.SIZE_WIDTH).Get(out temp);
3533 SetProperty(View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue(value));
3538 /// Gets or sets the size height of the view.
3540 /// <since_tizen> 3 </since_tizen>
3541 public float SizeHeight
3546 GetProperty(View.Property.SIZE_HEIGHT).Get(out temp);
3551 SetProperty(View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue(value));
3556 /// Gets or sets the position of the view.<br />
3557 /// By default, sets the position vector between the parent origin and pivot point (default).<br />
3558 /// If the position inheritance is disabled, sets the world position.<br />
3560 /// <since_tizen> 3 </since_tizen>
3561 public Position Position
3565 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3566 GetProperty(View.Property.POSITION).Get(temp);
3571 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(value));
3576 /// Gets or sets the position X of the view.
3578 /// <since_tizen> 3 </since_tizen>
3579 public float PositionX
3584 GetProperty(View.Property.POSITION_X).Get(out temp);
3589 SetProperty(View.Property.POSITION_X, new Tizen.NUI.PropertyValue(value));
3594 /// Gets or sets the position Y of the view.
3596 /// <since_tizen> 3 </since_tizen>
3597 public float PositionY
3602 GetProperty(View.Property.POSITION_Y).Get(out temp);
3607 SetProperty(View.Property.POSITION_Y, new Tizen.NUI.PropertyValue(value));
3612 /// Gets or sets the position Z of the view.
3614 /// <since_tizen> 3 </since_tizen>
3615 public float PositionZ
3620 GetProperty(View.Property.POSITION_Z).Get(out temp);
3625 SetProperty(View.Property.POSITION_Z, new Tizen.NUI.PropertyValue(value));
3630 /// Gets or sets the world position of the view.
3632 /// <since_tizen> 3 </since_tizen>
3633 public Vector3 WorldPosition
3637 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3638 GetProperty(View.Property.WORLD_POSITION).Get(temp);
3643 internal float WorldPositionX
3648 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
3653 internal float WorldPositionY
3658 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
3663 internal float WorldPositionZ
3668 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
3674 /// Gets or sets the orientation of the view.<br />
3675 /// The view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br />
3677 /// <remarks>This is an asynchronous method.</remarks>
3678 /// <since_tizen> 3 </since_tizen>
3679 public Rotation Orientation
3683 Rotation temp = new Rotation();
3684 GetProperty(View.Property.ORIENTATION).Get(temp);
3689 SetProperty(View.Property.ORIENTATION, new Tizen.NUI.PropertyValue(value));
3694 /// Gets or sets the world orientation of the view.<br />
3696 /// <since_tizen> 3 </since_tizen>
3697 public Rotation WorldOrientation
3701 Rotation temp = new Rotation();
3702 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
3708 /// Gets or sets the scale factor applied to the view.<br />
3710 /// <since_tizen> 3 </since_tizen>
3711 public Vector3 Scale
3715 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3716 GetProperty(View.Property.SCALE).Get(temp);
3721 SetProperty(View.Property.SCALE, new Tizen.NUI.PropertyValue(value));
3726 /// Gets or sets the scale X factor applied to the view.
3728 /// <since_tizen> 3 </since_tizen>
3734 GetProperty(View.Property.SCALE_X).Get(out temp);
3739 SetProperty(View.Property.SCALE_X, new Tizen.NUI.PropertyValue(value));
3744 /// Gets or sets the scale Y factor applied to the view.
3746 /// <since_tizen> 3 </since_tizen>
3752 GetProperty(View.Property.SCALE_Y).Get(out temp);
3757 SetProperty(View.Property.SCALE_Y, new Tizen.NUI.PropertyValue(value));
3762 /// Gets or sets the scale Z factor applied to the view.
3764 /// <since_tizen> 3 </since_tizen>
3770 GetProperty(View.Property.SCALE_Z).Get(out temp);
3775 SetProperty(View.Property.SCALE_Z, new Tizen.NUI.PropertyValue(value));
3780 /// Gets the world scale of the view.
3782 /// <since_tizen> 3 </since_tizen>
3783 public Vector3 WorldScale
3787 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3788 GetProperty(View.Property.WORLD_SCALE).Get(temp);
3794 /// Retrieves the visibility flag of the view.
3797 /// If the view is not visible, then the view and its children will not be rendered.
3798 /// This is regardless of the individual visibility values of the children, i.e., the view will only be rendered if all of its parents have visibility set to true.
3800 /// <since_tizen> 3 </since_tizen>
3801 public bool Visibility
3806 GetProperty(View.Property.VISIBLE).Get(out temp);
3812 /// Gets the view's world color.
3814 /// <since_tizen> 3 </since_tizen>
3815 public Vector4 WorldColor
3819 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3820 GetProperty(View.Property.WORLD_COLOR).Get(temp);
3825 internal Matrix WorldMatrix
3829 Matrix temp = new Matrix();
3830 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
3836 /// Gets or sets the view's name.
3838 /// <since_tizen> 3 </since_tizen>
3844 GetProperty(View.Property.NAME).Get(out temp);
3849 SetProperty(View.Property.NAME, new Tizen.NUI.PropertyValue(value));
3854 /// Get the number of children held by the view.
3856 /// <since_tizen> 3 </since_tizen>
3857 public new uint ChildCount
3861 return GetChildCount();
3866 /// Gets the view's ID.
3869 /// <since_tizen> 3 </since_tizen>
3879 /// Gets or sets the status of whether the view should emit touch or hover signals.
3881 /// <since_tizen> 3 </since_tizen>
3882 public bool Sensitive
3887 GetProperty(View.Property.SENSITIVE).Get(out temp);
3892 SetProperty(View.Property.SENSITIVE, new Tizen.NUI.PropertyValue(value));
3897 /// Gets or sets the status of whether the view should receive a notification when touch or hover motion events leave the boundary of the view.
3899 /// <since_tizen> 3 </since_tizen>
3900 public bool LeaveRequired
3905 GetProperty(View.Property.LEAVE_REQUIRED).Get(out temp);
3910 SetProperty(View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue(value));
3915 /// Gets or sets the status of whether a child view inherits it's parent's orientation.
3917 /// <since_tizen> 3 </since_tizen>
3918 public bool InheritOrientation
3923 GetProperty(View.Property.INHERIT_ORIENTATION).Get(out temp);
3928 SetProperty(View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue(value));
3933 /// Gets or sets the status of whether a child view inherits it's parent's scale.
3935 /// <since_tizen> 3 </since_tizen>
3936 public bool InheritScale
3941 GetProperty(View.Property.INHERIT_SCALE).Get(out temp);
3946 SetProperty(View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue(value));
3951 /// Gets or sets the status of how the view and its children should be drawn.<br />
3952 /// Not all views are renderable, but DrawMode can be inherited from any view.<br />
3953 /// 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 />
3954 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br />
3955 /// Overlay views are drawn in a separate pass, after all non-overlay views within the layer.<br />
3956 /// For overlay views, the drawing order is with respect to tree levels of views, and depth-testing will not be used.<br />
3958 /// <since_tizen> 3 </since_tizen>
3959 public DrawModeType DrawMode
3964 if (GetProperty(View.Property.DRAW_MODE).Get(out temp) == false)
3966 NUILog.Error("DrawMode get error!");
3971 return DrawModeType.Normal;
3973 return DrawModeType.Overlay2D;
3975 return DrawModeType.Stencil;
3977 return DrawModeType.Normal;
3982 SetProperty(View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)value));
3987 /// Gets or sets the relative to parent size factor of the view.<br />
3988 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br />
3989 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br />
3991 /// <since_tizen> 3 </since_tizen>
3992 public Vector3 SizeModeFactor
3996 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3997 GetProperty(View.Property.SIZE_MODE_FACTOR).Get(temp);
4002 SetProperty(View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue(value));
4007 /// Gets or sets the width resize policy to be used.
4009 /// <since_tizen> 3 </since_tizen>
4010 public ResizePolicyType WidthResizePolicy
4015 if (GetProperty(View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
4017 NUILog.Error("WidthResizePolicy get error!");
4022 return ResizePolicyType.Fixed;
4023 case "USE_NATURAL_SIZE":
4024 return ResizePolicyType.UseNaturalSize;
4025 case "FILL_TO_PARENT":
4026 return ResizePolicyType.FillToParent;
4027 case "SIZE_RELATIVE_TO_PARENT":
4028 return ResizePolicyType.SizeRelativeToParent;
4029 case "SIZE_FIXED_OFFSET_FROM_PARENT":
4030 return ResizePolicyType.SizeFixedOffsetFromParent;
4031 case "FIT_TO_CHILDREN":
4032 return ResizePolicyType.FitToChildren;
4033 case "DIMENSION_DEPENDENCY":
4034 return ResizePolicyType.DimensionDependency;
4035 case "USE_ASSIGNED_SIZE":
4036 return ResizePolicyType.UseAssignedSize;
4038 return ResizePolicyType.Fixed;
4043 SetProperty(View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
4048 /// Gets or sets the height resize policy to be used.
4050 /// <since_tizen> 3 </since_tizen>
4051 public ResizePolicyType HeightResizePolicy
4056 if (GetProperty(View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
4058 NUILog.Error("HeightResizePolicy get error!");
4063 return ResizePolicyType.Fixed;
4064 case "USE_NATURAL_SIZE":
4065 return ResizePolicyType.UseNaturalSize;
4066 case "FILL_TO_PARENT":
4067 return ResizePolicyType.FillToParent;
4068 case "SIZE_RELATIVE_TO_PARENT":
4069 return ResizePolicyType.SizeRelativeToParent;
4070 case "SIZE_FIXED_OFFSET_FROM_PARENT":
4071 return ResizePolicyType.SizeFixedOffsetFromParent;
4072 case "FIT_TO_CHILDREN":
4073 return ResizePolicyType.FitToChildren;
4074 case "DIMENSION_DEPENDENCY":
4075 return ResizePolicyType.DimensionDependency;
4076 case "USE_ASSIGNED_SIZE":
4077 return ResizePolicyType.UseAssignedSize;
4079 return ResizePolicyType.Fixed;
4084 SetProperty(View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
4089 /// Gets or sets the policy to use when setting size with size negotiation.<br />
4090 /// Defaults to SizeScalePolicyType.UseSizeSet.<br />
4092 /// <since_tizen> 3 </since_tizen>
4093 public SizeScalePolicyType SizeScalePolicy
4098 if (GetProperty(View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
4100 NUILog.Error("SizeScalePolicy get error!");
4104 case "USE_SIZE_SET":
4105 return SizeScalePolicyType.UseSizeSet;
4106 case "FIT_WITH_ASPECT_RATIO":
4107 return SizeScalePolicyType.FitWithAspectRatio;
4108 case "FILL_WITH_ASPECT_RATIO":
4109 return SizeScalePolicyType.FillWithAspectRatio;
4111 return SizeScalePolicyType.UseSizeSet;
4116 string valueToString = "";
4119 case SizeScalePolicyType.UseSizeSet:
4121 valueToString = "USE_SIZE_SET";
4124 case SizeScalePolicyType.FitWithAspectRatio:
4126 valueToString = "FIT_WITH_ASPECT_RATIO";
4129 case SizeScalePolicyType.FillWithAspectRatio:
4131 valueToString = "FILL_WITH_ASPECT_RATIO";
4136 valueToString = "USE_SIZE_SET";
4140 SetProperty(View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
4145 /// Gets or sets the status of whether the width size is dependent on the height size.
4147 /// <since_tizen> 3 </since_tizen>
4148 public bool WidthForHeight
4153 GetProperty(View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
4158 SetProperty(View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue(value));
4163 /// Gets or sets the status of whether the height size is dependent on the width size.
4165 /// <since_tizen> 3 </since_tizen>
4166 public bool HeightForWidth
4171 GetProperty(View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
4176 SetProperty(View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue(value));
4181 /// Gets or sets the padding for use in layout.
4183 /// <since_tizen> 5 </since_tizen>
4184 public Extents Padding
4188 Extents temp = new Extents(0, 0, 0, 0);
4189 GetProperty(View.Property.PADDING).Get(temp);
4194 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
4199 /// Gets or sets the minimum size the view can be assigned in size negotiation.
4201 /// <since_tizen> 3 </since_tizen>
4202 public Size2D MinimumSize
4206 Size2D temp = new Size2D(0, 0);
4207 GetProperty(View.Property.MINIMUM_SIZE).Get(temp);
4212 SetProperty(View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
4217 /// Gets or sets the maximum size the view can be assigned in size negotiation.
4219 /// <since_tizen> 3 </since_tizen>
4220 public Size2D MaximumSize
4224 Size2D temp = new Size2D(0, 0);
4225 GetProperty(View.Property.MAXIMUM_SIZE).Get(temp);
4230 SetProperty(View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
4235 /// Gets or sets whether a child view inherits it's parent's position.<br />
4236 /// Default is to inherit.<br />
4237 /// 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 />
4239 /// <since_tizen> 3 </since_tizen>
4240 public bool InheritPosition
4245 GetProperty(View.Property.INHERIT_POSITION).Get(out temp);
4250 SetProperty(View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue(value));
4255 /// Gets or sets the clipping behavior (mode) of it's children.
4257 /// <since_tizen> 3 </since_tizen>
4258 public ClippingModeType ClippingMode
4263 if (GetProperty(View.Property.CLIPPING_MODE).Get(out temp) == false)
4265 NUILog.Error("ClippingMode get error!");
4270 return ClippingModeType.Disabled;
4271 case "CLIP_CHILDREN":
4272 return ClippingModeType.ClipChildren;
4273 case "CLIP_TO_BOUNDING_BOX":
4274 return ClippingModeType.ClipToBoundingBox;
4276 return ClippingModeType.Disabled;
4281 SetProperty(View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)value));
4286 /// Gets the number of renderers held by the view.
4288 /// <since_tizen> 3 </since_tizen>
4289 public uint RendererCount
4293 return GetRendererCount();
4298 /// [Obsolete("Please do not use! this will be deprecated")]
4300 /// <since_tizen> 3 </since_tizen>
4301 /// Please do not use! this will be deprecated!
4302 /// Instead please use PivotPoint.
4303 [Obsolete("Please do not use! This will be deprecated! Please use PivotPoint instead! " +
4305 "View view = new View(); " +
4306 "view.PivotPoint = PivotPoint.Center; " +
4307 "view.PositionUsesPivotPoint = true;")]
4308 [EditorBrowsable(EditorBrowsableState.Never)]
4309 public Position AnchorPoint
4313 Position temp = new Position(0.0f, 0.0f, 0.0f);
4314 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
4319 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
4324 /// [Obsolete("Please do not use! this will be deprecated")]
4326 /// <since_tizen> 3 </since_tizen>
4327 [Obsolete("Please do not use! This will be deprecated! Please use Size2D instead! " +
4329 "View view = new View(); " +
4330 "view.Size2D = new Size2D(100, 100);")]
4331 [EditorBrowsable(EditorBrowsableState.Never)]
4336 Size temp = new Size(0.0f, 0.0f, 0.0f);
4337 GetProperty(View.Property.SIZE).Get(temp);
4342 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(value));
4347 /// "Please DO NOT use! This will be deprecated! Please use 'Container GetParent() for derived class' instead!"
4349 /// <since_tizen> 3 </since_tizen>
4350 [Obsolete("Please do not use! This will be deprecated! Please use 'Container GetParent() for derived class' instead! " +
4352 "Container parent = view.GetParent(); " +
4353 "View view = parent as View;")]
4354 [EditorBrowsable(EditorBrowsableState.Never)]
4355 public new View Parent
4360 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
4361 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4362 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
4364 if (basehandle is Layer layer)
4366 ret = new View(Layer.getCPtr(layer).Handle, false);
4367 NUILog.Error("This Parent property is deprecated, shoud do not be used");
4371 ret = basehandle as View;
4374 NDalicPINVOKE.delete_BaseHandle(CPtr);
4375 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4377 if (NDalicPINVOKE.SWIGPendingException.Pending)
4378 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4384 /// Gets/Sets whether inherit parent's the layout Direction.
4386 /// <since_tizen> 4 </since_tizen>
4387 public bool InheritLayoutDirection
4392 GetProperty(View.Property.INHERIT_LAYOUT_DIRECTION).Get(out temp);
4397 SetProperty(View.Property.INHERIT_LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue(value));
4402 /// Gets/Sets the layout Direction.
4404 /// <since_tizen> 4 </since_tizen>
4405 public ViewLayoutDirectionType LayoutDirection
4410 if (GetProperty(View.Property.LAYOUT_DIRECTION).Get(out temp) == false)
4412 NUILog.Error("LAYOUT_DIRECTION get error!");
4414 return (ViewLayoutDirectionType)temp;
4418 SetProperty(View.Property.LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((int)value));
4423 /// Gets or sets the Margin for use in layout.
4425 /// <since_tizen> 4 </since_tizen>
4426 public Extents Margin
4430 Extents temp = new Extents(0, 0, 0, 0);
4431 GetProperty(View.Property.MARGIN).Get(temp);
4436 SetProperty(View.Property.MARGIN, new Tizen.NUI.PropertyValue(value));
4441 /// [Obsolete("Please do not use! this will be deprecated")]
4443 /// Please do not use! this will be deprecated!
4444 /// Instead please use Padding.
4445 /// <since_tizen> 4 </since_tizen>
4446 [Obsolete("Please do not use! this will be deprecated, instead please use Padding.")]
4447 [EditorBrowsable(EditorBrowsableState.Never)]
4448 public Extents PaddingEX
4452 Extents temp = new Extents(0, 0, 0, 0);
4453 GetProperty(View.Property.PADDING).Get(temp);
4458 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
4463 /// Perform an action on a visual registered to this view. <br />
4464 /// Visuals will have actions, this API is used to perform one of these actions with the given attributes.
4466 /// <param name="propertyIndexOfVisual">The Property index of the visual.</param>
4467 /// <param name="propertyIndexOfActionId">The action to perform. See Visual to find supported actions.</param>
4468 /// <param name="attributes">Optional attributes for the action.</param>
4469 /// <since_tizen> 5 </since_tizen>
4470 public void DoAction(int propertyIndexOfVisual, int propertyIndexOfActionId, PropertyValue attributes)
4472 NDalicManualPINVOKE.View_DoAction(swigCPtr, propertyIndexOfVisual, propertyIndexOfActionId, PropertyValue.getCPtr(attributes));
4473 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4479 /// The View layout Direction type.
4481 /// <since_tizen> 4 </since_tizen>
4482 public enum ViewLayoutDirectionType
4487 /// <since_tizen> 4 </since_tizen>
4492 /// <since_tizen> 4 </since_tizen>