2 * Copyright(c) 2017 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);
35 PositionUsesPivotPoint = false;
38 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
40 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
43 // From Container Base class
46 /// Adds a child view to this view.
48 /// <seealso cref="Container.Add" />
49 /// <since_tizen> 4 </since_tizen>
50 public override void Add(View child)
52 Container oldParent = child.Parent;
55 if (oldParent != null)
57 oldParent.Remove(child);
59 NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
60 if (NDalicPINVOKE.SWIGPendingException.Pending)
61 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
67 /// Removes a child view from this View. If the view was not a child of this view, this is a no-op.
69 /// <seealso cref="Container.Remove" />
70 /// <since_tizen> 4 </since_tizen>
71 public override void Remove(View child)
73 NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
74 if (NDalicPINVOKE.SWIGPendingException.Pending)
75 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
77 Children.Remove(child);
81 /// Retrieves a child view by index.
83 /// <seealso cref="Container.GetChildAt" />
84 /// <since_tizen> 4 </since_tizen>
85 public override View GetChildAt(uint index)
87 if (index < Children.Count)
89 return Children[Convert.ToInt32(index)];
98 /// Retrieves the number of children held by the view.
100 /// <seealso cref="Container.GetChildCount" />
101 /// <since_tizen> 4 </since_tizen>
102 public override uint GetChildCount()
104 return Convert.ToUInt32(Children.Count);
108 /// Gets the views parent.
110 /// <seealso cref="Container.GetParent()" />
111 /// <since_tizen> 4 </since_tizen>
112 public override Container GetParent()
114 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
115 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
116 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
117 NDalicPINVOKE.delete_BaseHandle(CPtr);
118 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
120 if (NDalicPINVOKE.SWIGPendingException.Pending)
121 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
123 return basehandle as Container;
126 internal bool IsTopLevelView()
128 if(GetParent() is Layer)
136 /// you can override it to clean-up your own resources.
138 /// <param name="type">DisposeTypes</param>
139 /// <since_tizen> 3 </since_tizen>
140 protected override void Dispose(DisposeTypes type)
147 if(type == DisposeTypes.Explicit)
150 //Release your own managed resources here.
151 //You should release all of your own disposable objects here.
154 //Release your own unmanaged resources here.
155 //You should not access any managed member here except static instance.
156 //because the execution order of Finalizes is non-deterministic.
159 DisConnectFromSignals();
162 if (swigCPtr.Handle != global::System.IntPtr.Zero)
167 NDalicPINVOKE.delete_View(swigCPtr);
169 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
176 private void DisConnectFromSignals()
178 // Save current CPtr.
179 global::System.Runtime.InteropServices.HandleRef currentCPtr = swigCPtr;
181 // Use BaseHandle CPtr as current might have been deleted already in derived classes.
182 swigCPtr = GetBaseHandleCPtrHandleRef;
184 if (_onRelayoutEventCallback != null)
186 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
189 if (_offWindowEventCallback != null)
191 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
194 if (_onWindowEventCallback != null)
196 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
199 if (_wheelEventCallback != null)
201 this.WheelEventSignal().Disconnect(_wheelEventCallback);
204 if (_hoverEventCallback != null)
206 this.HoveredSignal().Disconnect(_hoverEventCallback);
209 if (_touchDataCallback != null)
211 this.TouchSignal().Disconnect(_touchDataCallback);
214 if (_ResourcesLoadedCallback != null)
216 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
219 if (_offWindowEventCallback != null)
221 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
224 if (_onWindowEventCallback != null)
226 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
229 if (_wheelEventCallback != null)
231 this.WheelEventSignal().Disconnect(_wheelEventCallback);
234 if (_hoverEventCallback != null)
236 this.HoveredSignal().Disconnect(_hoverEventCallback);
239 if (_touchDataCallback != null)
241 this.TouchSignal().Disconnect(_touchDataCallback);
244 if (_onRelayoutEventCallback != null)
246 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
249 if (_keyCallback != null)
251 this.KeyEventSignal().Disconnect(_keyCallback);
254 if (_keyInputFocusLostCallback != null)
256 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
259 if (_keyInputFocusGainedCallback != null)
261 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
264 // BaseHandle CPtr is used in Registry and there is danger of deletion if we keep using it here.
265 // Restore current CPtr.
266 swigCPtr = currentCPtr;
269 private EventHandler _keyInputFocusGainedEventHandler;
270 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
271 private delegate void KeyInputFocusGainedCallbackType(IntPtr control);
272 private KeyInputFocusGainedCallbackType _keyInputFocusGainedCallback;
275 /// An event for the KeyInputFocusGained signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
276 /// The KeyInputFocusGained signal is emitted when the control gets the key input focus.<br />
278 /// <since_tizen> 3 </since_tizen>
279 public event EventHandler FocusGained
283 if (_keyInputFocusGainedEventHandler == null)
285 _keyInputFocusGainedCallback = OnKeyInputFocusGained;
286 this.KeyInputFocusGainedSignal().Connect(_keyInputFocusGainedCallback);
289 _keyInputFocusGainedEventHandler += value;
294 _keyInputFocusGainedEventHandler -= value;
296 if (_keyInputFocusGainedEventHandler == null && KeyInputFocusGainedSignal().Empty() == false)
298 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
303 private void OnKeyInputFocusGained(IntPtr view)
305 if (_keyInputFocusGainedEventHandler != null)
307 _keyInputFocusGainedEventHandler(this, null);
312 private EventHandler _keyInputFocusLostEventHandler;
313 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
314 private delegate void KeyInputFocusLostCallbackType(IntPtr control);
315 private KeyInputFocusLostCallbackType _keyInputFocusLostCallback;
318 /// An event for the KeyInputFocusLost signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
319 /// The KeyInputFocusLost signal is emitted when the control loses the key input focus.<br />
321 /// <since_tizen> 3 </since_tizen>
322 public event EventHandler FocusLost
326 if (_keyInputFocusLostEventHandler == null)
328 _keyInputFocusLostCallback = OnKeyInputFocusLost;
329 this.KeyInputFocusLostSignal().Connect(_keyInputFocusLostCallback);
332 _keyInputFocusLostEventHandler += value;
337 _keyInputFocusLostEventHandler -= value;
339 if (_keyInputFocusLostEventHandler == null && KeyInputFocusLostSignal().Empty() == false)
341 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
346 private void OnKeyInputFocusLost(IntPtr view)
348 if (_keyInputFocusLostEventHandler != null)
350 _keyInputFocusLostEventHandler(this, null);
355 /// Event arguments that passed via the KeyEvent signal.
357 /// <since_tizen> 3 </since_tizen>
358 public class KeyEventArgs : EventArgs
363 /// Key - is the key sent to the view.
365 /// <since_tizen> 3 </since_tizen>
379 private EventHandlerWithReturnType<object, KeyEventArgs, bool> _keyEventHandler;
380 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
381 private delegate bool KeyCallbackType(IntPtr control, IntPtr keyEvent);
382 private KeyCallbackType _keyCallback;
385 /// An event for the KeyPressed signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
386 /// The KeyPressed signal is emitted when the key event is received.<br />
388 /// <since_tizen> 3 </since_tizen>
389 public event EventHandlerWithReturnType<object, KeyEventArgs, bool> KeyEvent
393 if (_keyEventHandler == null)
395 _keyCallback = OnKeyEvent;
396 this.KeyEventSignal().Connect(_keyCallback);
399 _keyEventHandler += value;
404 _keyEventHandler -= value;
406 if (_keyEventHandler == null && KeyEventSignal().Empty() == false)
408 this.KeyEventSignal().Disconnect(_keyCallback);
413 private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
415 if (keyEvent == global::System.IntPtr.Zero)
417 NUILog.Error("keyEvent should not be null!");
421 KeyEventArgs e = new KeyEventArgs();
425 e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
427 if (_keyEventHandler != null)
429 Delegate[] delegateList = _keyEventHandler.GetInvocationList();
431 // Oring the result of each callback.
432 foreach ( EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList )
434 result |= del( this, e );
441 private EventHandler _onRelayoutEventHandler;
442 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
443 private delegate void OnRelayoutEventCallbackType(IntPtr control);
444 private OnRelayoutEventCallbackType _onRelayoutEventCallback;
447 /// An event for the OnRelayout signal which can be used to subscribe or unsubscribe the event handler.<br />
448 /// The OnRelayout signal is emitted after the size has been set on the view during relayout.<br />
450 /// <since_tizen> 3 </since_tizen>
451 public event EventHandler Relayout
455 if (_onRelayoutEventHandler == null)
457 _onRelayoutEventCallback = OnRelayout;
458 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
461 _onRelayoutEventHandler += value;
466 _onRelayoutEventHandler -= value;
468 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
470 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
476 // Callback for View OnRelayout signal
477 private void OnRelayout(IntPtr data)
479 if (_onRelayoutEventHandler != null)
481 _onRelayoutEventHandler(this, null);
486 /// Event arguments that passed via the touch signal.
488 /// <since_tizen> 3 </since_tizen>
489 public class TouchEventArgs : EventArgs
491 private Touch _touch;
494 /// Touch - contains the information of touch points.
496 /// <since_tizen> 3 </since_tizen>
510 private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
511 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
512 private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
513 private TouchDataCallbackType _touchDataCallback;
516 /// An event for the touched signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
517 /// The touched signal is emitted when the touch input is received.<br />
519 /// <since_tizen> 3 </since_tizen>
520 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
524 if (_touchDataEventHandler == null)
526 _touchDataCallback = OnTouch;
527 this.TouchSignal().Connect(_touchDataCallback);
530 _touchDataEventHandler += value;
535 _touchDataEventHandler -= value;
537 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
539 this.TouchSignal().Disconnect(_touchDataCallback);
545 // Callback for View TouchSignal
546 private bool OnTouch(IntPtr view, IntPtr touchData)
548 if (touchData == global::System.IntPtr.Zero)
550 NUILog.Error("touchData should not be null!");
554 TouchEventArgs e = new TouchEventArgs();
556 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
558 if (_touchDataEventHandler != null)
560 return _touchDataEventHandler(this, e);
567 /// Event arguments that passed via the hover signal.
569 /// <since_tizen> 3 </since_tizen>
570 public class HoverEventArgs : EventArgs
572 private Hover _hover;
575 /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
577 /// <since_tizen> 3 </since_tizen>
591 private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
592 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
593 private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
594 private HoverEventCallbackType _hoverEventCallback;
597 /// An event for the hovered signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
598 /// The hovered signal is emitted when the hover input is received.<br />
600 /// <since_tizen> 3 </since_tizen>
601 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
605 if (_hoverEventHandler == null)
607 _hoverEventCallback = OnHoverEvent;
608 this.HoveredSignal().Connect(_hoverEventCallback);
611 _hoverEventHandler += value;
616 _hoverEventHandler -= value;
618 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
620 this.HoveredSignal().Disconnect(_hoverEventCallback);
626 // Callback for View Hover signal
627 private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
629 if (hoverEvent == global::System.IntPtr.Zero)
631 NUILog.Error("hoverEvent should not be null!");
635 HoverEventArgs e = new HoverEventArgs();
637 e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
639 if (_hoverEventHandler != null)
641 return _hoverEventHandler(this, e);
648 /// Event arguments that passed via the wheel signal.
650 /// <since_tizen> 3 </since_tizen>
651 public class WheelEventArgs : EventArgs
653 private Wheel _wheel;
656 /// WheelEvent - store a wheel rolling type: MOUSE_WHEEL or CUSTOM_WHEEL.
658 /// <since_tizen> 3 </since_tizen>
672 private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
673 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
674 private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
675 private WheelEventCallbackType _wheelEventCallback;
678 /// An event for the WheelMoved signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
679 /// The WheelMoved signal is emitted when the wheel event is received.<br />
681 /// <since_tizen> 3 </since_tizen>
682 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
686 if (_wheelEventHandler == null)
688 _wheelEventCallback = OnWheelEvent;
689 this.WheelEventSignal().Connect(_wheelEventCallback);
692 _wheelEventHandler += value;
697 _wheelEventHandler -= value;
699 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
701 this.WheelEventSignal().Disconnect(_wheelEventCallback);
707 // Callback for View Wheel signal
708 private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
710 if (wheelEvent == global::System.IntPtr.Zero)
712 NUILog.Error("wheelEvent should not be null!");
716 WheelEventArgs e = new WheelEventArgs();
718 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
720 if (_wheelEventHandler != null)
722 return _wheelEventHandler(this, e);
728 private EventHandler _onWindowEventHandler;
729 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
730 private delegate void OnWindowEventCallbackType(IntPtr control);
731 private OnWindowEventCallbackType _onWindowEventCallback;
734 /// An event for the OnWindow signal which can be used to subscribe or unsubscribe the event handler.<br />
735 /// The OnWindow signal is emitted after the view has been connected to the window.<br />
737 /// <since_tizen> 3 </since_tizen>
738 public event EventHandler AddedToWindow
742 if (_onWindowEventHandler == null)
744 _onWindowEventCallback = OnWindow;
745 this.OnWindowSignal().Connect(_onWindowEventCallback);
748 _onWindowEventHandler += value;
753 _onWindowEventHandler -= value;
755 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
757 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
762 // Callback for View OnWindow signal
763 private void OnWindow(IntPtr data)
765 if (_onWindowEventHandler != null)
767 _onWindowEventHandler(this, null);
772 private EventHandler _offWindowEventHandler;
773 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
774 private delegate void OffWindowEventCallbackType(IntPtr control);
775 private OffWindowEventCallbackType _offWindowEventCallback;
778 /// An event for the OffWindow signal, which can be used to subscribe or unsubscribe the event handler.<br />
779 /// OffWindow signal is emitted after the view has been disconnected from the window.<br />
781 /// <since_tizen> 3 </since_tizen>
782 public event EventHandler RemovedFromWindow
786 if (_offWindowEventHandler == null)
788 _offWindowEventCallback = OffWindow;
789 this.OffWindowSignal().Connect(_offWindowEventCallback);
792 _offWindowEventHandler += value;
797 _offWindowEventHandler -= value;
799 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
801 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
806 // Callback for View OffWindow signal
807 private void OffWindow(IntPtr data)
809 if (_offWindowEventHandler != null)
811 _offWindowEventHandler(this, null);
816 /// Event arguments of visibility changed.
818 /// <since_tizen> 3 </since_tizen>
819 public class VisibilityChangedEventArgs : EventArgs
822 private bool _visibility;
823 private VisibilityChangeType _type;
826 /// The view, or child of view, whose visibility has changed.
828 /// <since_tizen> 3 </since_tizen>
842 /// Whether the view is now visible or not.
844 /// <since_tizen> 3 </since_tizen>
845 public bool Visibility
858 /// Whether the view's visible property has changed or a parent's.
860 /// <since_tizen> 3 </since_tizen>
861 public VisibilityChangeType Type
874 private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
875 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
876 private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
877 private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
880 /// An event for visibility change which can be used to subscribe or unsubscribe the event handler.<br />
881 /// This signal is emitted when the visible property of this or a parent view is changed.<br />
883 /// <since_tizen> 3 </since_tizen>
884 public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
888 if (_visibilityChangedEventHandler == null)
890 _visibilityChangedEventCallback = OnVisibilityChanged;
891 VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
894 _visibilityChangedEventHandler += value;
899 _visibilityChangedEventHandler -= value;
901 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
903 VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
908 // Callback for View visibility change signal
909 private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
911 VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
914 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
916 e.Visibility = visibility;
919 if (_visibilityChangedEventHandler != null)
921 _visibilityChangedEventHandler(this, e);
927 /// Event arguments of layout direction changed.
929 /// <since_tizen> 4 </since_tizen>
930 public class LayoutDirectionChangedEventArgs : EventArgs
933 private ViewLayoutDirectionType _type;
936 /// The view, or child of view, whose layout direction has changed.
938 /// <since_tizen> 4 </since_tizen>
952 /// Whether the view's layout direction property has changed or a parent's.
954 /// <since_tizen> 4 </since_tizen>
955 public ViewLayoutDirectionType Type
968 private EventHandler<LayoutDirectionChangedEventArgs> _layoutDirectionChangedEventHandler;
969 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
970 private delegate void LayoutDirectionChangedEventCallbackType(IntPtr data, ViewLayoutDirectionType type);
971 private LayoutDirectionChangedEventCallbackType _layoutDirectionChangedEventCallback;
974 /// Event for layout direction change which can be used to subscribe/unsubscribe the event handler.<br />
975 /// This signal is emitted when the layout direction property of this or a parent view is changed.<br />
977 /// <since_tizen> 4 </since_tizen>
978 public event EventHandler<LayoutDirectionChangedEventArgs> LayoutDirectionChanged
982 if (_layoutDirectionChangedEventHandler == null)
984 _layoutDirectionChangedEventCallback = OnLayoutDirectionChanged;
985 LayoutDirectionChangedSignal(this).Connect(_layoutDirectionChangedEventCallback);
988 _layoutDirectionChangedEventHandler += value;
993 _layoutDirectionChangedEventHandler -= value;
995 if (_layoutDirectionChangedEventHandler == null && LayoutDirectionChangedSignal(this).Empty() == false)
997 LayoutDirectionChangedSignal(this).Disconnect(_layoutDirectionChangedEventCallback);
1002 // Callback for View layout direction change signal
1003 private void OnLayoutDirectionChanged(IntPtr data, ViewLayoutDirectionType type)
1005 LayoutDirectionChangedEventArgs e = new LayoutDirectionChangedEventArgs();
1008 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
1012 if (_layoutDirectionChangedEventHandler != null)
1014 _layoutDirectionChangedEventHandler(this, e);
1024 // Resource Ready Signal
1026 private EventHandler _resourcesLoadedEventHandler;
1027 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1028 private delegate void ResourcesLoadedCallbackType(IntPtr control);
1029 private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
1032 /// An event for the ResourcesLoadedSignal signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1033 /// This signal is emitted after all resources required by a view are loaded and ready.<br />
1035 /// <since_tizen> 3 </since_tizen>
1036 public event EventHandler ResourcesLoaded
1040 if (_resourcesLoadedEventHandler == null)
1042 _ResourcesLoadedCallback = OnResourcesLoaded;
1043 this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
1046 _resourcesLoadedEventHandler += value;
1051 _resourcesLoadedEventHandler -= value;
1053 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
1055 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
1060 private void OnResourcesLoaded(IntPtr view)
1062 if (_resourcesLoadedEventHandler != null)
1064 _resourcesLoadedEventHandler(this, null);
1068 internal IntPtr GetPtrfromView()
1070 return (IntPtr)swigCPtr;
1073 internal class Property
1075 internal static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get();
1076 internal static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get();
1077 internal static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get();
1078 internal static readonly int LEFT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
1079 internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
1080 internal static readonly int UP_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
1081 internal static readonly int DOWN_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
1082 internal static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get();
1083 internal static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get();
1084 internal static readonly int SIBLING_ORDER = NDalicManualPINVOKE.Actor_Property_SIBLING_ORDER_get();
1085 internal static readonly int OPACITY = NDalicManualPINVOKE.Actor_Property_OPACITY_get();
1086 internal static readonly int SCREEN_POSITION = NDalicManualPINVOKE.Actor_Property_SCREEN_POSITION_get();
1087 internal static readonly int POSITION_USES_ANCHOR_POINT = NDalicManualPINVOKE.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
1088 internal static readonly int PARENT_ORIGIN = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_get();
1089 internal static readonly int PARENT_ORIGIN_X = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_X_get();
1090 internal static readonly int PARENT_ORIGIN_Y = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Y_get();
1091 internal static readonly int PARENT_ORIGIN_Z = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Z_get();
1092 internal static readonly int ANCHOR_POINT = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_get();
1093 internal static readonly int ANCHOR_POINT_X = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_X_get();
1094 internal static readonly int ANCHOR_POINT_Y = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Y_get();
1095 internal static readonly int ANCHOR_POINT_Z = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Z_get();
1096 internal static readonly int SIZE = NDalicPINVOKE.Actor_Property_SIZE_get();
1097 internal static readonly int SIZE_WIDTH = NDalicPINVOKE.Actor_Property_SIZE_WIDTH_get();
1098 internal static readonly int SIZE_HEIGHT = NDalicPINVOKE.Actor_Property_SIZE_HEIGHT_get();
1099 internal static readonly int SIZE_DEPTH = NDalicPINVOKE.Actor_Property_SIZE_DEPTH_get();
1100 internal static readonly int POSITION = NDalicPINVOKE.Actor_Property_POSITION_get();
1101 internal static readonly int POSITION_X = NDalicPINVOKE.Actor_Property_POSITION_X_get();
1102 internal static readonly int POSITION_Y = NDalicPINVOKE.Actor_Property_POSITION_Y_get();
1103 internal static readonly int POSITION_Z = NDalicPINVOKE.Actor_Property_POSITION_Z_get();
1104 internal static readonly int WORLD_POSITION = NDalicPINVOKE.Actor_Property_WORLD_POSITION_get();
1105 internal static readonly int WORLD_POSITION_X = NDalicPINVOKE.Actor_Property_WORLD_POSITION_X_get();
1106 internal static readonly int WORLD_POSITION_Y = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Y_get();
1107 internal static readonly int WORLD_POSITION_Z = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Z_get();
1108 internal static readonly int ORIENTATION = NDalicPINVOKE.Actor_Property_ORIENTATION_get();
1109 internal static readonly int WORLD_ORIENTATION = NDalicPINVOKE.Actor_Property_WORLD_ORIENTATION_get();
1110 internal static readonly int SCALE = NDalicPINVOKE.Actor_Property_SCALE_get();
1111 internal static readonly int SCALE_X = NDalicPINVOKE.Actor_Property_SCALE_X_get();
1112 internal static readonly int SCALE_Y = NDalicPINVOKE.Actor_Property_SCALE_Y_get();
1113 internal static readonly int SCALE_Z = NDalicPINVOKE.Actor_Property_SCALE_Z_get();
1114 internal static readonly int WORLD_SCALE = NDalicPINVOKE.Actor_Property_WORLD_SCALE_get();
1115 internal static readonly int VISIBLE = NDalicPINVOKE.Actor_Property_VISIBLE_get();
1116 internal static readonly int WORLD_COLOR = NDalicPINVOKE.Actor_Property_WORLD_COLOR_get();
1117 internal static readonly int WORLD_MATRIX = NDalicPINVOKE.Actor_Property_WORLD_MATRIX_get();
1118 internal static readonly int NAME = NDalicPINVOKE.Actor_Property_NAME_get();
1119 internal static readonly int SENSITIVE = NDalicPINVOKE.Actor_Property_SENSITIVE_get();
1120 internal static readonly int LEAVE_REQUIRED = NDalicPINVOKE.Actor_Property_LEAVE_REQUIRED_get();
1121 internal static readonly int INHERIT_ORIENTATION = NDalicPINVOKE.Actor_Property_INHERIT_ORIENTATION_get();
1122 internal static readonly int INHERIT_SCALE = NDalicPINVOKE.Actor_Property_INHERIT_SCALE_get();
1123 internal static readonly int DRAW_MODE = NDalicPINVOKE.Actor_Property_DRAW_MODE_get();
1124 internal static readonly int SIZE_MODE_FACTOR = NDalicPINVOKE.Actor_Property_SIZE_MODE_FACTOR_get();
1125 internal static readonly int WIDTH_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_WIDTH_RESIZE_POLICY_get();
1126 internal static readonly int HEIGHT_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_HEIGHT_RESIZE_POLICY_get();
1127 internal static readonly int SIZE_SCALE_POLICY = NDalicPINVOKE.Actor_Property_SIZE_SCALE_POLICY_get();
1128 internal static readonly int WIDTH_FOR_HEIGHT = NDalicPINVOKE.Actor_Property_WIDTH_FOR_HEIGHT_get();
1129 internal static readonly int HEIGHT_FOR_WIDTH = NDalicPINVOKE.Actor_Property_HEIGHT_FOR_WIDTH_get();
1130 internal static readonly int MINIMUM_SIZE = NDalicPINVOKE.Actor_Property_MINIMUM_SIZE_get();
1131 internal static readonly int MAXIMUM_SIZE = NDalicPINVOKE.Actor_Property_MAXIMUM_SIZE_get();
1132 internal static readonly int INHERIT_POSITION = NDalicPINVOKE.Actor_Property_INHERIT_POSITION_get();
1133 internal static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
1134 internal static readonly int INHERIT_LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_INHERIT_LAYOUT_DIRECTION_get();
1135 internal static readonly int LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_LAYOUT_DIRECTION_get();
1136 internal static readonly int MARGIN = NDalicPINVOKE.View_Property_MARGIN_get();
1137 internal static readonly int PADDING = NDalicPINVOKE.View_Property_PADDING_get();
1141 /// Describes the direction to move the focus towards.
1143 /// <since_tizen> 3 </since_tizen>
1144 public enum FocusDirection
1147 /// Move keyboard focus towards the left direction.
1149 /// <since_tizen> 3 </since_tizen>
1152 /// Move keyboard focus towards the right direction.
1154 /// <since_tizen> 3 </since_tizen>
1157 /// Move keyboard focus towards the up direction.
1159 /// <since_tizen> 3 </since_tizen>
1162 /// Move keyboard focus towards the down direction.
1164 /// <since_tizen> 3 </since_tizen>
1167 /// Move keyboard focus towards the previous page direction.
1169 /// <since_tizen> 3 </since_tizen>
1172 /// Move keyboard focus towards the next page direction.
1174 /// <since_tizen> 3 </since_tizen>
1179 /// Creates a new instance of a view.
1181 /// <since_tizen> 3 </since_tizen>
1182 public View() : this(NDalicPINVOKE.View_New(), true)
1184 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1187 internal View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true)
1189 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1192 private View ConvertIdToView(uint id)
1198 View parentView = Parent as View;
1199 view = parentView.FindChildById(id);
1204 view = Window.Instance.GetRootLayer().FindChildById(id);
1210 internal void SetKeyInputFocus()
1212 NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
1213 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1217 /// Queries whether the view has a focus.
1219 /// <returns>True if this view has a focus.</returns>
1220 /// <since_tizen> 3 </since_tizen>
1221 public bool HasFocus()
1223 bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
1224 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1228 internal void ClearKeyInputFocus()
1230 NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
1231 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1234 internal PinchGestureDetector GetPinchGestureDetector()
1236 PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
1237 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1241 internal PanGestureDetector GetPanGestureDetector()
1243 PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
1244 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1248 internal TapGestureDetector GetTapGestureDetector()
1250 TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
1251 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1255 internal LongPressGestureDetector GetLongPressGestureDetector()
1257 LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
1258 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1263 /// Sets the name of the style to be applied to the view.
1265 /// <param name="styleName">A string matching a style described in a stylesheet.</param>
1266 /// <since_tizen> 3 </since_tizen>
1267 public void SetStyleName(string styleName)
1269 NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
1270 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1274 /// Retrieves the name of the style to be applied to the view (if any).
1276 /// <returns>A string matching a style, or an empty string.</returns>
1277 /// <since_tizen> 3 </since_tizen>
1278 public string GetStyleName()
1280 string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
1281 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1285 internal void SetBackgroundColor(Vector4 color)
1287 NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
1288 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1291 internal Vector4 GetBackgroundColor()
1293 Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
1294 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1298 internal void SetBackgroundImage(Image image)
1300 NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
1301 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1305 /// Clears the background.
1307 /// <since_tizen> 3 </since_tizen>
1308 public void ClearBackground()
1310 NDalicPINVOKE.View_ClearBackground(swigCPtr);
1311 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1314 internal ControlKeySignal KeyEventSignal()
1316 ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
1317 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1321 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
1323 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
1324 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1328 internal KeyInputFocusSignal KeyInputFocusLostSignal()
1330 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
1331 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1335 internal View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
1337 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1340 internal enum PropertyRange
1342 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
1343 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
1344 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
1348 /// The StyleName, type string.
1350 /// <since_tizen> 3 </since_tizen>
1351 public string StyleName
1356 GetProperty(View.Property.STYLE_NAME).Get(out temp);
1361 SetProperty(View.Property.STYLE_NAME, new Tizen.NUI.PropertyValue(value));
1366 /// The mutually exclusive with BACKGROUND_IMAGE and BACKGROUND type Vector4.
1368 /// <since_tizen> 3 </since_tizen>
1369 public Color BackgroundColor
1373 Color backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1375 Tizen.NUI.PropertyMap background = Background;
1377 background.Find(Visual.Property.Type)?.Get(out visualType);
1378 if (visualType == (int)Visual.Type.Color)
1380 background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor);
1383 return backgroundColor;
1387 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1392 /// Creates an animation to animate the background color visual. If there is no
1393 /// background visual, creates one with transparent black as it's mixColor.
1395 /// <since_tizen> 3 </since_tizen>
1396 public Animation AnimateBackgroundColor( object destinationValue,
1399 AlphaFunction.BuiltinFunctions? alphaFunction = null,
1400 object initialValue = null)
1402 Tizen.NUI.PropertyMap background = Background;
1404 if( background.Empty() )
1406 // If there is no background yet, ensure there is a transparent
1408 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1409 background = Background;
1411 return AnimateColor( "background", destinationValue, startTime, endTime, alphaFunction, initialValue );
1415 /// Creates an animation to animate the mixColor of the named visual.
1417 /// <since_tizen> 3 </since_tizen>
1418 public Animation AnimateColor( string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null )
1420 Animation animation = null;
1422 PropertyMap _animator = new PropertyMap();
1423 if( alphaFunction != null )
1425 _animator.Add("alphaFunction", new PropertyValue( AlphaFunction.BuiltinToPropertyKey(alphaFunction) ) );
1428 PropertyMap _timePeriod = new PropertyMap();
1429 _timePeriod.Add( "duration", new PropertyValue((endTime-startTime)/1000.0f) );
1430 _timePeriod.Add( "delay", new PropertyValue( startTime/1000.0f ) );
1431 _animator.Add( "timePeriod", new PropertyValue( _timePeriod ) );
1433 PropertyMap _transition = new PropertyMap();
1434 _transition.Add( "animator", new PropertyValue( _animator ) );
1435 _transition.Add( "target", new PropertyValue( targetVisual ) );
1436 _transition.Add( "property", new PropertyValue( "mixColor" ) );
1438 if( initialColor != null )
1440 PropertyValue initValue = PropertyValue.CreateFromObject( initialColor );
1441 _transition.Add( "initialValue", initValue );
1444 PropertyValue destValue = PropertyValue.CreateFromObject( destinationColor );
1445 _transition.Add( "targetValue", destValue );
1446 TransitionData _transitionData = new TransitionData( _transition );
1448 animation = new Animation( NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true );
1449 if (NDalicPINVOKE.SWIGPendingException.Pending)
1450 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1456 /// The mutually exclusive with BACKGROUND_COLOR and BACKGROUND type Map.
1458 /// <since_tizen> 3 </since_tizen>
1459 public string BackgroundImage
1463 string backgroundImage = "";
1465 Tizen.NUI.PropertyMap background = Background;
1467 background.Find(Visual.Property.Type)?.Get(out visualType);
1468 if (visualType == (int)Visual.Type.Image)
1470 background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
1473 return backgroundImage;
1477 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1482 /// The background of view.
1484 /// <since_tizen> 3 </since_tizen>
1485 public Tizen.NUI.PropertyMap Background
1489 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1490 GetProperty( View.Property.BACKGROUND ).Get(temp);
1495 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1501 /// The current state of the view.
1503 /// <since_tizen> 3 </since_tizen>
1509 if (GetProperty(View.Property.STATE).Get(out temp) == false)
1511 NUILog.Error("State get error!");
1517 return States.Normal;
1521 return States.Focused;
1525 return States.Disabled;
1529 return States.Normal;
1535 SetProperty(View.Property.STATE, new Tizen.NUI.PropertyValue((int)value));
1540 /// The current sub state of the view.
1542 /// <since_tizen> 3 </since_tizen>
1543 public States SubState
1548 if (GetProperty(View.Property.SUB_STATE).Get(out temp) == false)
1550 NUILog.Error("subState get error!");
1555 return States.Normal;
1557 return States.Focused;
1559 return States.Disabled;
1561 return States.Normal;
1566 string valueToString = "";
1571 valueToString = "NORMAL";
1574 case States.Focused:
1576 valueToString = "FOCUSED";
1579 case States.Disabled:
1581 valueToString = "DISABLED";
1586 valueToString = "NORMAL";
1590 SetProperty(View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
1595 /// Displays a tooltip
1597 /// <since_tizen> 3 </since_tizen>
1598 public Tizen.NUI.PropertyMap Tooltip
1602 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1603 GetProperty(View.Property.TOOLTIP).Get(temp);
1608 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1613 /// Displays a tooltip as a text.
1615 /// <since_tizen> 3 </since_tizen>
1616 public string TooltipText
1620 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1624 private int LeftFocusableViewId
1629 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
1634 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1638 private int RightFocusableViewId
1643 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
1648 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1652 private int UpFocusableViewId
1657 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
1662 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1666 private int DownFocusableViewId
1671 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
1676 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1681 /// The Child property of FlexContainer.<br />
1682 /// The proportion of the free space in the container, the flex item will receive.<br />
1683 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br />
1685 /// <since_tizen> 3 </since_tizen>
1691 GetProperty(FlexContainer.ChildProperty.FLEX).Get(out temp);
1696 SetProperty(FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue(value));
1701 /// The Child property of FlexContainer.<br />
1702 /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br />
1704 /// <since_tizen> 3 </since_tizen>
1705 public int AlignSelf
1710 GetProperty(FlexContainer.ChildProperty.ALIGN_SELF).Get(out temp);
1715 SetProperty(FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue(value));
1720 /// The Child property of FlexContainer.<br />
1721 /// The space around the flex item.<br />
1723 /// <since_tizen> 3 </since_tizen>
1724 public Vector4 FlexMargin
1728 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1729 GetProperty(FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
1734 SetProperty(FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue(value));
1739 /// The top-left cell this child occupies, if not set, the first available cell is used.
1741 /// <since_tizen> 3 </since_tizen>
1742 public Vector2 CellIndex
1746 Vector2 temp = new Vector2(0.0f, 0.0f);
1747 GetProperty(TableView.ChildProperty.CELL_INDEX).Get(temp);
1752 SetProperty(TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue(value));
1757 /// The number of rows this child occupies, if not set, the default value is 1.
1759 /// <since_tizen> 3 </since_tizen>
1760 public float RowSpan
1765 GetProperty(TableView.ChildProperty.ROW_SPAN).Get(out temp);
1770 SetProperty(TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue(value));
1775 /// The number of columns this child occupies, if not set, the default value is 1.
1777 /// <since_tizen> 3 </since_tizen>
1778 public float ColumnSpan
1783 GetProperty(TableView.ChildProperty.COLUMN_SPAN).Get(out temp);
1788 SetProperty(TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue(value));
1793 /// The horizontal alignment of this child inside the cells, if not set, the default value is 'left'.
1795 /// <since_tizen> 3 </since_tizen>
1796 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
1801 if (GetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
1803 NUILog.Error("CellHorizontalAlignment get error!");
1809 return Tizen.NUI.HorizontalAlignmentType.Left;
1811 return Tizen.NUI.HorizontalAlignmentType.Center;
1813 return Tizen.NUI.HorizontalAlignmentType.Right;
1815 return Tizen.NUI.HorizontalAlignmentType.Left;
1820 string valueToString = "";
1823 case Tizen.NUI.HorizontalAlignmentType.Left:
1825 valueToString = "left";
1828 case Tizen.NUI.HorizontalAlignmentType.Center:
1830 valueToString = "center";
1833 case Tizen.NUI.HorizontalAlignmentType.Right:
1835 valueToString = "right";
1840 valueToString = "left";
1844 SetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1849 /// The vertical alignment of this child inside the cells, if not set, the default value is 'top'.
1851 /// <since_tizen> 3 </since_tizen>
1852 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
1857 GetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
1859 NUILog.Error("CellVerticalAlignment get error!");
1865 return Tizen.NUI.VerticalAlignmentType.Top;
1867 return Tizen.NUI.VerticalAlignmentType.Center;
1869 return Tizen.NUI.VerticalAlignmentType.Bottom;
1871 return Tizen.NUI.VerticalAlignmentType.Top;
1876 string valueToString = "";
1879 case Tizen.NUI.VerticalAlignmentType.Top:
1881 valueToString = "top";
1884 case Tizen.NUI.VerticalAlignmentType.Center:
1886 valueToString = "center";
1889 case Tizen.NUI.VerticalAlignmentType.Bottom:
1891 valueToString = "bottom";
1896 valueToString = "top";
1900 SetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1905 /// The left focusable view.<br />
1906 /// This will return null if not set.<br />
1907 /// This will also return null if the specified left focusable view is not on a window.<br />
1909 /// <since_tizen> 3 </since_tizen>
1910 public View LeftFocusableView
1912 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1915 if (LeftFocusableViewId >= 0)
1917 return ConvertIdToView((uint)LeftFocusableViewId);
1925 LeftFocusableViewId = (int)value.GetId();
1929 LeftFocusableViewId = -1;
1935 /// The right focusable view.<br />
1936 /// This will return null if not set.<br />
1937 /// This will also return null if the specified right focusable view is not on a window.<br />
1939 /// <since_tizen> 3 </since_tizen>
1940 public View RightFocusableView
1942 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1945 if (RightFocusableViewId >= 0)
1947 return ConvertIdToView((uint)RightFocusableViewId);
1955 RightFocusableViewId = (int)value.GetId();
1959 RightFocusableViewId = -1;
1965 /// The up focusable view.<br />
1966 /// This will return null if not set.<br />
1967 /// This will also return null if the specified up focusable view is not on a window.<br />
1969 /// <since_tizen> 3 </since_tizen>
1970 public View UpFocusableView
1972 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1975 if (UpFocusableViewId >= 0)
1977 return ConvertIdToView((uint)UpFocusableViewId);
1985 UpFocusableViewId = (int)value.GetId();
1989 UpFocusableViewId = -1;
1995 /// The down focusable view.<br />
1996 /// This will return null if not set.<br />
1997 /// This will also return null if the specified down focusable view is not on a window.<br />
1999 /// <since_tizen> 3 </since_tizen>
2000 public View DownFocusableView
2002 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2005 if (DownFocusableViewId >= 0)
2007 return ConvertIdToView((uint)DownFocusableViewId);
2015 DownFocusableViewId = (int)value.GetId();
2019 DownFocusableViewId = -1;
2025 /// Whether the view should be focusable by keyboard navigation.
2027 /// <since_tizen> 3 </since_tizen>
2028 public bool Focusable
2032 SetKeyboardFocusable(value);
2036 return IsKeyboardFocusable();
2041 /// Enumeration for describing the states of the view.
2043 /// <since_tizen> 3 </since_tizen>
2047 /// The normal state.
2051 /// The focused state.
2055 /// The disabled state.
2061 /// Retrieves the position of the view.<br />
2062 /// The coordinates are relative to the view's parent.<br />
2064 /// <since_tizen> 3 </since_tizen>
2065 public Position CurrentPosition
2069 return GetCurrentPosition();
2074 /// Sets the size of a view for the width and the height.<br />
2075 /// Geometry can be scaled to fit within this area.<br />
2076 /// This does not interfere with the view's scale factor.<br />
2077 /// The views default depth is the minimum of width and height.<br />
2079 /// <since_tizen> 3 </since_tizen>
2080 public Size2D Size2D
2084 Size temp = new Size(0.0f, 0.0f, 0.0f);
2085 GetProperty(View.Property.SIZE).Get(temp);
2086 Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
2091 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(new Size(value)));
2096 /// Retrieves the size of the view.<br />
2097 /// The coordinates are relative to the view's parent.<br />
2099 /// <since_tizen> 3 </since_tizen>
2100 public Size2D CurrentSize
2104 return GetCurrentSize();
2109 /// Retrieves and sets the view's opacity.<br />
2111 /// <since_tizen> 3 </since_tizen>
2112 public float Opacity
2117 GetProperty(View.Property.OPACITY).Get(out temp);
2122 SetProperty(View.Property.OPACITY, new Tizen.NUI.PropertyValue(value));
2127 /// Sets the position of the view for X and Y.<br />
2128 /// By default, sets the position vector between the parent origin and the pivot point (default).<br />
2129 /// If the position inheritance is disabled, sets the world position.<br />
2131 /// <since_tizen> 3 </since_tizen>
2132 public Position2D Position2D
2136 Position temp = new Position(0.0f, 0.0f, 0.0f);
2137 GetProperty(View.Property.POSITION).Get(temp);
2138 return new Position2D(temp);
2142 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(new Position(value)));
2147 /// Retrieves the screen postion of the view.<br />
2149 /// <since_tizen> 3 </since_tizen>
2150 public Vector2 ScreenPosition
2154 Vector2 temp = new Vector2(0.0f, 0.0f);
2155 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
2161 /// Determines whether the pivot point should be used to determine the position of the view.
2162 /// This is true by default.
2164 /// <remarks>If false, then the top-left of the view is used for the position.
2165 /// Setting this to false will allow scaling or rotation around the anchor-point without affecting the view's position.
2167 /// <since_tizen> 3 </since_tizen>
2168 public bool PositionUsesPivotPoint
2173 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
2178 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
2183 /// Please do not use! this will be deprecated.
2185 /// Please do not use! this will be deprecated!
2186 /// Instead please use PositionUsesPivotPoint.
2187 /// <since_tizen> 3 </since_tizen>
2188 [Obsolete("Please do not use! This will be deprecated! Please use PositionUsesPivotPoint instead! " +
2190 "View view = new View(); " +
2191 "view.PivotPoint = PivotPoint.Center; " +
2192 "view.PositionUsesPivotPoint = true;")]
2193 [EditorBrowsable(EditorBrowsableState.Never)]
2194 public bool PositionUsesAnchorPoint
2199 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
2204 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
2208 internal bool FocusState
2212 return IsKeyboardFocusable();
2216 SetKeyboardFocusable(value);
2221 /// Queries whether the view is connected to the stage.<br />
2222 /// When a view is connected, it will be directly or indirectly parented to the root view.<br />
2224 /// <since_tizen> 3 </since_tizen>
2225 public bool IsOnWindow
2234 /// Gets the depth in the hierarchy for the view.
2236 /// <since_tizen> 3 </since_tizen>
2237 public int HierarchyDepth
2241 return GetHierarchyDepth();
2246 /// Sets the sibling order of the view so the depth position can be defined within the same parent.
2249 /// Note the initial value is 0.
2250 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove, and LowerBelow will override the sibling order.
2251 /// The values set by this property will likely change.
2253 /// <since_tizen> 3 </since_tizen>
2254 public int SiblingOrder
2258 var parentChildren = Parent?.Children;
2259 int currentOrder = 0;
2260 if (parentChildren != null)
2262 currentOrder = parentChildren.IndexOf(this);
2264 if (currentOrder < 0)
2268 else if (currentOrder < parentChildren.Count)
2270 return currentOrder;
2278 var siblings = Parent?.Children;
2279 if (siblings != null)
2281 int currentOrder = siblings.IndexOf(this);
2283 if (value != currentOrder)
2289 else if (value < siblings.Count - 1)
2291 if (value > currentOrder)
2293 RaiseAbove(siblings[value]);
2297 LowerBelow(siblings[value]);
2310 /// Returns the natural size of the view.
2313 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
2315 /// /// Please do not use! this will be deprecated!
2316 /// Instead please use NaturalSize2D.
2317 /// <since_tizen> 3 </since_tizen>
2318 [Obsolete("Please do not use! This will be deprecated! Please use NaturalSize2D instead! " +
2320 "TextLabel label = new TextLabel(\"Hello World!\"); " +
2321 "Size2D size = label.NaturalSize2D;")]
2322 [EditorBrowsable(EditorBrowsableState.Never)]
2323 public Vector3 NaturalSize
2327 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2328 if (NDalicPINVOKE.SWIGPendingException.Pending)
2329 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2335 /// Returns the natural size (Size2D) of the view.
2338 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
2340 /// <since_tizen> 4 </since_tizen>
2341 public Size2D NaturalSize2D
2345 Vector3 temp = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2346 if (NDalicPINVOKE.SWIGPendingException.Pending)
2347 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2349 return new Size2D((int)temp.Width, (int)temp.Height);
2357 /// This is an asynchronous method.
2359 /// <since_tizen> 3 </since_tizen>
2369 /// This is an asynchronous method.
2370 /// If the view is hidden, then the view and its children will not be rendered.
2371 /// 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.
2373 /// <since_tizen> 3 </since_tizen>
2379 internal void Raise()
2381 var parentChildren = Parent?.Children;
2383 if (parentChildren != null)
2385 int currentIndex = parentChildren.IndexOf(this);
2387 // If the view is not already the last item in the list.
2388 if (currentIndex != parentChildren.Count -1)
2390 View temp = parentChildren[currentIndex + 1];
2391 parentChildren[currentIndex + 1] = this;
2392 parentChildren[currentIndex] = temp;
2396 NDalicPINVOKE.Raise(swigCPtr);
2397 if (NDalicPINVOKE.SWIGPendingException.Pending)
2398 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2401 internal void Lower()
2403 var parentChildren = Parent?.Children;
2405 if (parentChildren != null)
2407 int currentIndex = parentChildren.IndexOf(this);
2409 // If the view is not already the first item in the list.
2410 if (currentIndex > 0)
2412 View temp = parentChildren[currentIndex - 1];
2413 parentChildren[currentIndex - 1] = this;
2414 parentChildren[currentIndex] = temp;
2418 NDalicPINVOKE.Lower(swigCPtr);
2419 if (NDalicPINVOKE.SWIGPendingException.Pending)
2420 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2424 /// Raises the view above all other views.
2427 /// Sibling order of views within the parent will be updated automatically.
2428 /// Once a raise or lower API is used, that view will then have an exclusive sibling order independent of insertion.
2430 /// <since_tizen> 3 </since_tizen>
2431 public void RaiseToTop()
2433 var parentChildren = Parent?.Children;
2435 if (parentChildren != null)
2437 parentChildren.Remove(this);
2438 parentChildren.Add(this);
2441 NDalicPINVOKE.RaiseToTop(swigCPtr);
2442 if (NDalicPINVOKE.SWIGPendingException.Pending)
2443 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2447 /// Lowers the view to the bottom of all views.
2450 /// The sibling order of views within the parent will be updated automatically.
2451 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2453 /// <since_tizen> 3 </since_tizen>
2454 public void LowerToBottom()
2456 var parentChildren = Parent?.Children;
2458 if (parentChildren != null)
2460 parentChildren.Remove(this);
2461 parentChildren.Insert(0, this);
2464 NDalicPINVOKE.LowerToBottom(swigCPtr);
2465 if (NDalicPINVOKE.SWIGPendingException.Pending)
2466 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2470 /// Queries if all resources required by a view are loaded and ready.
2472 /// <remarks>Most resources are only loaded when the control is placed on the stage.
2474 /// <since_tizen> 3 </since_tizen>
2475 public bool IsResourceReady()
2477 bool ret = NDalicPINVOKE.IsResourceReady(swigCPtr);
2478 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2483 /// Raises the view to above the target view.
2485 /// <remarks>The sibling order of views within the parent will be updated automatically.
2486 /// Views on the level above the target view will still be shown above this view.
2487 /// Raising this view above views with the same sibling order as each other will raise this view above them.
2488 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2490 /// <param name="target">Will be raised above this view.</param>
2491 internal void RaiseAbove(View target)
2493 var parentChildren = Parent?.Children;
2495 if (parentChildren != null)
2497 int currentIndex = parentChildren.IndexOf(this);
2498 int targetIndex = parentChildren.IndexOf(target);
2500 // If the currentIndex is less than the target index and the target has the same parent.
2501 if (currentIndex < targetIndex)
2503 parentChildren.Remove(this);
2504 parentChildren.Insert(targetIndex, this);
2508 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
2509 if (NDalicPINVOKE.SWIGPendingException.Pending)
2510 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2514 /// Lowers the view to below the target view.
2516 /// <remarks>The sibling order of views within the parent will be updated automatically.
2517 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
2518 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2520 /// <param name="target">Will be lowered below this view.</param>
2521 internal void LowerBelow(View target)
2523 var parentChildren = Parent?.Children;
2525 if (parentChildren != null)
2527 int currentIndex = parentChildren.IndexOf(this);
2528 int targetIndex = parentChildren.IndexOf(target);
2530 // If the currentIndex is not already the 0th index and the target has the same parent.
2531 if ((currentIndex != 0) && (targetIndex != -1) &&
2532 (currentIndex > targetIndex))
2534 parentChildren.Remove(this);
2535 parentChildren.Insert(targetIndex, this);
2539 NDalicPINVOKE.LowerBelow(swigCPtr, View.getCPtr(target));
2540 if (NDalicPINVOKE.SWIGPendingException.Pending)
2541 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2544 internal string GetName()
2546 string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);
2547 if (NDalicPINVOKE.SWIGPendingException.Pending)
2548 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2552 internal void SetName(string name)
2554 NDalicPINVOKE.Actor_SetName(swigCPtr, name);
2555 if (NDalicPINVOKE.SWIGPendingException.Pending)
2556 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2559 internal uint GetId()
2561 uint ret = NDalicPINVOKE.Actor_GetId(swigCPtr);
2562 if (NDalicPINVOKE.SWIGPendingException.Pending)
2563 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2567 internal bool IsRoot()
2569 bool ret = NDalicPINVOKE.Actor_IsRoot(swigCPtr);
2570 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2574 internal bool OnWindow()
2576 bool ret = NDalicPINVOKE.Actor_OnStage(swigCPtr);
2577 if (NDalicPINVOKE.SWIGPendingException.Pending)
2578 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2583 /// Gets the parent layer of this view.If a view has no parent, this method does nothing.
2585 /// <pre>The view has been initialized. </pre>
2586 /// <returns>the parent layer of view </returns>
2587 /// <since_tizen> 5 </since_tizen>
2588 /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
2589 [EditorBrowsable(EditorBrowsableState.Never)]
2590 public Layer GetLayer()
2592 IntPtr cPtr = NDalicPINVOKE.Actor_GetLayer(swigCPtr);
2593 Layer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Layer;
2595 if (NDalicPINVOKE.SWIGPendingException.Pending)
2596 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2601 /// Removes a view from its parent view or layer. If a view has no parent, this method does nothing.
2603 /// <pre>The (child) view has been initialized. </pre>
2604 /// <since_tizen> 4 </since_tizen>
2605 public void Unparent()
2607 GetParent()?.Remove(this);
2611 /// Search through this view's hierarchy for a view with the given name.
2612 /// The view itself is also considered in the search.
2614 /// <pre>The view has been initialized.</pre>
2615 /// <param name="viewName">The name of the view to find.</param>
2616 /// <returns>A handle to the view if found, or an empty handle if not.</returns>
2617 /// <since_tizen> 3 </since_tizen>
2618 public View FindChildByName(string viewName)
2620 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
2621 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
2622 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
2623 NDalicPINVOKE.delete_BaseHandle(CPtr);
2624 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
2626 if (NDalicPINVOKE.SWIGPendingException.Pending)
2627 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2631 internal View FindChildById(uint id)
2633 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
2634 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
2635 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
2636 NDalicPINVOKE.delete_BaseHandle(CPtr);
2637 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
2639 if (NDalicPINVOKE.SWIGPendingException.Pending)
2640 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2644 internal void SetParentOrigin(Vector3 origin)
2646 NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
2647 if (NDalicPINVOKE.SWIGPendingException.Pending)
2648 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2651 internal Vector3 GetCurrentParentOrigin()
2653 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentParentOrigin(swigCPtr), true);
2654 if (NDalicPINVOKE.SWIGPendingException.Pending)
2655 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2659 internal void SetAnchorPoint(Vector3 anchorPoint)
2661 NDalicPINVOKE.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
2662 if (NDalicPINVOKE.SWIGPendingException.Pending)
2663 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2666 internal Vector3 GetCurrentAnchorPoint()
2668 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentAnchorPoint(swigCPtr), true);
2669 if (NDalicPINVOKE.SWIGPendingException.Pending)
2670 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2674 internal void SetSize(float width, float height)
2676 NDalicPINVOKE.Actor_SetSize__SWIG_0(swigCPtr, width, height);
2677 if (NDalicPINVOKE.SWIGPendingException.Pending)
2678 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2681 internal void SetSize(float width, float height, float depth)
2683 NDalicPINVOKE.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
2684 if (NDalicPINVOKE.SWIGPendingException.Pending)
2685 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2688 internal void SetSize(Vector2 size)
2690 NDalicPINVOKE.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
2691 if (NDalicPINVOKE.SWIGPendingException.Pending)
2692 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2695 internal void SetSize(Vector3 size)
2697 NDalicPINVOKE.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
2698 if (NDalicPINVOKE.SWIGPendingException.Pending)
2699 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2702 internal Vector3 GetTargetSize()
2704 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetTargetSize(swigCPtr), true);
2705 if (NDalicPINVOKE.SWIGPendingException.Pending)
2706 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2710 internal Size2D GetCurrentSize()
2712 Size ret = new Size(NDalicPINVOKE.Actor_GetCurrentSize(swigCPtr), true);
2713 if (NDalicPINVOKE.SWIGPendingException.Pending)
2714 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2715 Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
2719 internal Vector3 GetNaturalSize()
2721 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2722 if (NDalicPINVOKE.SWIGPendingException.Pending)
2723 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2727 internal void SetPosition(float x, float y)
2729 NDalicPINVOKE.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
2730 if (NDalicPINVOKE.SWIGPendingException.Pending)
2731 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2734 internal void SetPosition(float x, float y, float z)
2736 NDalicPINVOKE.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
2737 if (NDalicPINVOKE.SWIGPendingException.Pending)
2738 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2741 internal void SetPosition(Vector3 position)
2743 NDalicPINVOKE.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
2744 if (NDalicPINVOKE.SWIGPendingException.Pending)
2745 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2748 internal void SetX(float x)
2750 NDalicPINVOKE.Actor_SetX(swigCPtr, x);
2751 if (NDalicPINVOKE.SWIGPendingException.Pending)
2752 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2755 internal void SetY(float y)
2757 NDalicPINVOKE.Actor_SetY(swigCPtr, y);
2758 if (NDalicPINVOKE.SWIGPendingException.Pending)
2759 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2762 internal void SetZ(float z)
2764 NDalicPINVOKE.Actor_SetZ(swigCPtr, z);
2765 if (NDalicPINVOKE.SWIGPendingException.Pending)
2766 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2769 internal void TranslateBy(Vector3 distance)
2771 NDalicPINVOKE.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
2772 if (NDalicPINVOKE.SWIGPendingException.Pending)
2773 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2776 internal Position GetCurrentPosition()
2778 Position ret = new Position(NDalicPINVOKE.Actor_GetCurrentPosition(swigCPtr), true);
2779 if (NDalicPINVOKE.SWIGPendingException.Pending)
2780 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2784 internal Vector3 GetCurrentWorldPosition()
2786 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldPosition(swigCPtr), true);
2787 if (NDalicPINVOKE.SWIGPendingException.Pending)
2788 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2792 internal void SetInheritPosition(bool inherit)
2794 NDalicPINVOKE.Actor_SetInheritPosition(swigCPtr, inherit);
2795 if (NDalicPINVOKE.SWIGPendingException.Pending)
2796 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2799 internal bool IsPositionInherited()
2801 bool ret = NDalicPINVOKE.Actor_IsPositionInherited(swigCPtr);
2802 if (NDalicPINVOKE.SWIGPendingException.Pending)
2803 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2807 internal void SetOrientation(Degree angle, Vector3 axis)
2809 NDalicPINVOKE.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2810 if (NDalicPINVOKE.SWIGPendingException.Pending)
2811 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2814 internal void SetOrientation(Radian angle, Vector3 axis)
2816 NDalicPINVOKE.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2817 if (NDalicPINVOKE.SWIGPendingException.Pending)
2818 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2821 internal void SetOrientation(Rotation orientation)
2823 NDalicPINVOKE.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
2824 if (NDalicPINVOKE.SWIGPendingException.Pending)
2825 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2828 internal void RotateBy(Degree angle, Vector3 axis)
2830 NDalicPINVOKE.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2831 if (NDalicPINVOKE.SWIGPendingException.Pending)
2832 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2835 internal void RotateBy(Radian angle, Vector3 axis)
2837 NDalicPINVOKE.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2838 if (NDalicPINVOKE.SWIGPendingException.Pending)
2839 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2842 internal void RotateBy(Rotation relativeRotation)
2844 NDalicPINVOKE.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
2845 if (NDalicPINVOKE.SWIGPendingException.Pending)
2846 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2849 internal Rotation GetCurrentOrientation()
2851 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentOrientation(swigCPtr), true);
2852 if (NDalicPINVOKE.SWIGPendingException.Pending)
2853 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2857 internal void SetInheritOrientation(bool inherit)
2859 NDalicPINVOKE.Actor_SetInheritOrientation(swigCPtr, inherit);
2860 if (NDalicPINVOKE.SWIGPendingException.Pending)
2861 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2864 internal bool IsOrientationInherited()
2866 bool ret = NDalicPINVOKE.Actor_IsOrientationInherited(swigCPtr);
2867 if (NDalicPINVOKE.SWIGPendingException.Pending)
2868 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2872 internal Rotation GetCurrentWorldOrientation()
2874 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentWorldOrientation(swigCPtr), true);
2875 if (NDalicPINVOKE.SWIGPendingException.Pending)
2876 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2880 internal void SetScale(float scale)
2882 NDalicPINVOKE.Actor_SetScale__SWIG_0(swigCPtr, scale);
2883 if (NDalicPINVOKE.SWIGPendingException.Pending)
2884 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2887 internal void SetScale(float scaleX, float scaleY, float scaleZ)
2889 NDalicPINVOKE.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
2890 if (NDalicPINVOKE.SWIGPendingException.Pending)
2891 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2894 internal void SetScale(Vector3 scale)
2896 NDalicPINVOKE.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
2897 if (NDalicPINVOKE.SWIGPendingException.Pending)
2898 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2901 internal void ScaleBy(Vector3 relativeScale)
2903 NDalicPINVOKE.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
2904 if (NDalicPINVOKE.SWIGPendingException.Pending)
2905 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2908 internal Vector3 GetCurrentScale()
2910 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentScale(swigCPtr), true);
2911 if (NDalicPINVOKE.SWIGPendingException.Pending)
2912 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2916 internal Vector3 GetCurrentWorldScale()
2918 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldScale(swigCPtr), true);
2919 if (NDalicPINVOKE.SWIGPendingException.Pending)
2920 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2924 internal void SetInheritScale(bool inherit)
2926 NDalicPINVOKE.Actor_SetInheritScale(swigCPtr, inherit);
2927 if (NDalicPINVOKE.SWIGPendingException.Pending)
2928 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2931 internal bool IsScaleInherited()
2933 bool ret = NDalicPINVOKE.Actor_IsScaleInherited(swigCPtr);
2934 if (NDalicPINVOKE.SWIGPendingException.Pending)
2935 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2939 internal Matrix GetCurrentWorldMatrix()
2941 Matrix ret = new Matrix(NDalicPINVOKE.Actor_GetCurrentWorldMatrix(swigCPtr), true);
2942 if (NDalicPINVOKE.SWIGPendingException.Pending)
2943 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2947 internal void SetVisible(bool visible)
2949 NDalicPINVOKE.Actor_SetVisible(swigCPtr, visible);
2950 if (NDalicPINVOKE.SWIGPendingException.Pending)
2951 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2954 internal bool IsVisible()
2956 bool ret = NDalicPINVOKE.Actor_IsVisible(swigCPtr);
2957 if (NDalicPINVOKE.SWIGPendingException.Pending)
2958 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2962 internal void SetOpacity(float opacity)
2964 NDalicPINVOKE.Actor_SetOpacity(swigCPtr, opacity);
2965 if (NDalicPINVOKE.SWIGPendingException.Pending)
2966 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2969 internal float GetCurrentOpacity()
2971 float ret = NDalicPINVOKE.Actor_GetCurrentOpacity(swigCPtr);
2972 if (NDalicPINVOKE.SWIGPendingException.Pending)
2973 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2977 internal void SetColor(Vector4 color)
2979 NDalicPINVOKE.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
2980 if (NDalicPINVOKE.SWIGPendingException.Pending)
2981 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2984 internal Vector4 GetCurrentColor()
2986 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentColor(swigCPtr), true);
2987 if (NDalicPINVOKE.SWIGPendingException.Pending)
2988 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2992 internal void SetColorMode(ColorMode colorMode)
2994 NDalicPINVOKE.Actor_SetColorMode(swigCPtr, (int)colorMode);
2995 if (NDalicPINVOKE.SWIGPendingException.Pending)
2996 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2999 internal ColorMode GetColorMode()
3001 ColorMode ret = (ColorMode)NDalicPINVOKE.Actor_GetColorMode(swigCPtr);
3002 if (NDalicPINVOKE.SWIGPendingException.Pending)
3003 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3007 internal Vector4 GetCurrentWorldColor()
3009 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentWorldColor(swigCPtr), true);
3010 if (NDalicPINVOKE.SWIGPendingException.Pending)
3011 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3015 internal void SetDrawMode(DrawModeType drawMode)
3017 NDalicPINVOKE.Actor_SetDrawMode(swigCPtr, (int)drawMode);
3018 if (NDalicPINVOKE.SWIGPendingException.Pending)
3019 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3022 internal DrawModeType GetDrawMode()
3024 DrawModeType ret = (DrawModeType)NDalicPINVOKE.Actor_GetDrawMode(swigCPtr);
3025 if (NDalicPINVOKE.SWIGPendingException.Pending)
3026 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3031 /// Converts screen coordinates into the view's coordinate system using the default camera.
3033 /// <pre>The view has been initialized.</pre>
3034 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5).</remarks>
3035 /// <param name="localX">On return, the X-coordinate relative to the view.</param>
3036 /// <param name="localY">On return, the Y-coordinate relative to the view.</param>
3037 /// <param name="screenX">The screen X-coordinate.</param>
3038 /// <param name="screenY">The screen Y-coordinate.</param>
3039 /// <returns>True if the conversion succeeded.</returns>
3040 /// <since_tizen> 3 </since_tizen>
3041 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
3043 bool ret = NDalicPINVOKE.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
3044 if (NDalicPINVOKE.SWIGPendingException.Pending)
3045 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3049 internal void SetKeyboardFocusable(bool focusable)
3051 NDalicPINVOKE.Actor_SetKeyboardFocusable(swigCPtr, focusable);
3052 if (NDalicPINVOKE.SWIGPendingException.Pending)
3053 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3056 internal bool IsKeyboardFocusable()
3058 bool ret = NDalicPINVOKE.Actor_IsKeyboardFocusable(swigCPtr);
3059 if (NDalicPINVOKE.SWIGPendingException.Pending)
3060 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3064 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
3066 NDalicPINVOKE.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
3067 if (NDalicPINVOKE.SWIGPendingException.Pending)
3068 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3071 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
3073 ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.Actor_GetResizePolicy(swigCPtr, (int)dimension);
3074 if (NDalicPINVOKE.SWIGPendingException.Pending)
3075 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3080 /// Sets the relative to parent size factor of the view.<br />
3081 /// This factor is only used when ResizePolicy is set to either:
3082 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br />
3083 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br />
3085 /// <pre>The view has been initialized.</pre>
3086 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis.</param>
3087 /// <since_tizen> 3 </since_tizen>
3088 public void SetSizeModeFactor(Vector3 factor)
3090 NDalicPINVOKE.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
3091 if (NDalicPINVOKE.SWIGPendingException.Pending)
3092 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3095 internal Vector3 GetSizeModeFactor()
3097 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetSizeModeFactor(swigCPtr), true);
3098 if (NDalicPINVOKE.SWIGPendingException.Pending)
3099 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3104 /// Calculates the height of the view given a width.<br />
3105 /// The natural size is used for default calculation.<br />
3106 /// Size 0 is treated as aspect ratio 1:1.<br />
3108 /// <param name="width">The width to use.</param>
3109 /// <returns>The height based on the width.</returns>
3110 /// <since_tizen> 3 </since_tizen>
3111 public float GetHeightForWidth(float width)
3113 float ret = NDalicPINVOKE.Actor_GetHeightForWidth(swigCPtr, width);
3114 if (NDalicPINVOKE.SWIGPendingException.Pending)
3115 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3120 /// Calculates the width of the view given a height.<br />
3121 /// The natural size is used for default calculation.<br />
3122 /// Size 0 is treated as aspect ratio 1:1.<br />
3124 /// <param name="height">The height to use.</param>
3125 /// <returns>The width based on the height.</returns>
3126 /// <since_tizen> 3 </since_tizen>
3127 public float GetWidthForHeight(float height)
3129 float ret = NDalicPINVOKE.Actor_GetWidthForHeight(swigCPtr, height);
3130 if (NDalicPINVOKE.SWIGPendingException.Pending)
3131 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3136 /// Return the amount of size allocated for relayout.
3138 /// <param name="dimension">The dimension to retrieve.</param>
3139 /// <returns>Return the size.</returns>
3140 /// <since_tizen> 3 </since_tizen>
3141 public float GetRelayoutSize(DimensionType dimension)
3143 float ret = NDalicPINVOKE.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
3144 if (NDalicPINVOKE.SWIGPendingException.Pending)
3145 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3150 /// Set the padding for the view.
3152 /// <param name="padding">Padding for the view.</param>
3153 /// <since_tizen> 3 </since_tizen>
3154 public void SetPadding(PaddingType padding)
3156 NDalicPINVOKE.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
3157 if (NDalicPINVOKE.SWIGPendingException.Pending)
3158 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3162 /// Return the value of padding for the view.
3164 /// <param name="paddingOut">the value of padding for the view</param>
3165 /// <since_tizen> 3 </since_tizen>
3166 public void GetPadding(PaddingType paddingOut)
3168 NDalicPINVOKE.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
3169 if (NDalicPINVOKE.SWIGPendingException.Pending)
3170 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3173 internal void SetMinimumSize(Vector2 size)
3175 NDalicPINVOKE.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
3176 if (NDalicPINVOKE.SWIGPendingException.Pending)
3177 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3180 internal Vector2 GetMinimumSize()
3182 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMinimumSize(swigCPtr), true);
3183 if (NDalicPINVOKE.SWIGPendingException.Pending)
3184 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3188 internal void SetMaximumSize(Vector2 size)
3190 NDalicPINVOKE.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
3191 if (NDalicPINVOKE.SWIGPendingException.Pending)
3192 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3195 internal Vector2 GetMaximumSize()
3197 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMaximumSize(swigCPtr), true);
3198 if (NDalicPINVOKE.SWIGPendingException.Pending)
3199 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3203 internal int GetHierarchyDepth()
3205 int ret = NDalicPINVOKE.Actor_GetHierarchyDepth(swigCPtr);
3206 if (NDalicPINVOKE.SWIGPendingException.Pending)
3207 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3211 /// <since_tizen> 3 </since_tizen>
3212 public uint AddRenderer(Renderer renderer)
3214 uint ret = NDalicPINVOKE.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
3215 if (NDalicPINVOKE.SWIGPendingException.Pending)
3216 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3220 internal uint GetRendererCount()
3222 uint ret = NDalicPINVOKE.Actor_GetRendererCount(swigCPtr);
3223 if (NDalicPINVOKE.SWIGPendingException.Pending)
3224 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3228 /// <since_tizen> 3 </since_tizen>
3229 public Renderer GetRendererAt(uint index)
3231 IntPtr cPtr = NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index);
3232 Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Renderer;
3234 if (NDalicPINVOKE.SWIGPendingException.Pending)
3235 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3239 /// <since_tizen> 3 </since_tizen>
3240 public void RemoveRenderer(Renderer renderer)
3242 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
3243 if (NDalicPINVOKE.SWIGPendingException.Pending)
3244 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3247 /// <since_tizen> 3 </since_tizen>
3248 public void RemoveRenderer(uint index)
3250 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
3251 if (NDalicPINVOKE.SWIGPendingException.Pending)
3252 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3255 internal TouchDataSignal TouchSignal()
3257 TouchDataSignal ret = new TouchDataSignal(NDalicPINVOKE.Actor_TouchSignal(swigCPtr), false);
3258 if (NDalicPINVOKE.SWIGPendingException.Pending)
3259 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3263 internal HoverSignal HoveredSignal()
3265 HoverSignal ret = new HoverSignal(NDalicPINVOKE.Actor_HoveredSignal(swigCPtr), false);
3266 if (NDalicPINVOKE.SWIGPendingException.Pending)
3267 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3271 internal WheelSignal WheelEventSignal()
3273 WheelSignal ret = new WheelSignal(NDalicPINVOKE.Actor_WheelEventSignal(swigCPtr), false);
3274 if (NDalicPINVOKE.SWIGPendingException.Pending)
3275 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3279 internal ViewSignal OnWindowSignal()
3281 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnStageSignal(swigCPtr), false);
3282 if (NDalicPINVOKE.SWIGPendingException.Pending)
3283 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3287 internal ViewSignal OffWindowSignal()
3289 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OffStageSignal(swigCPtr), false);
3290 if (NDalicPINVOKE.SWIGPendingException.Pending)
3291 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3295 internal ViewSignal OnRelayoutSignal()
3297 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnRelayoutSignal(swigCPtr), false);
3298 if (NDalicPINVOKE.SWIGPendingException.Pending)
3299 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3303 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view)
3305 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
3306 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3311 internal ViewLayoutDirectionChangedSignal LayoutDirectionChangedSignal(View view)
3313 ViewLayoutDirectionChangedSignal ret = new ViewLayoutDirectionChangedSignal(NDalicManualPINVOKE.LayoutDirectionChangedSignal(View.getCPtr(view)), false);
3314 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3319 internal ViewSignal ResourcesLoadedSignal()
3321 ViewSignal ret = new ViewSignal(NDalicPINVOKE.ResourceReadySignal(swigCPtr), false);
3322 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3327 /// Gets or sets the origin of a view within its parent's area.<br />
3328 /// 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 />
3329 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br />
3330 /// A view's position is the distance between this origin and the view's anchor-point.<br />
3332 /// <pre>The view has been initialized.</pre>
3333 /// <since_tizen> 3 </since_tizen>
3334 public Position ParentOrigin
3338 Position temp = new Position(0.0f, 0.0f, 0.0f);
3339 GetProperty(View.Property.PARENT_ORIGIN).Get(temp);
3344 SetProperty(View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue(value));
3348 internal float ParentOriginX
3353 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
3358 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
3362 internal float ParentOriginY
3367 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
3372 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
3376 internal float ParentOriginZ
3381 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
3386 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
3391 /// Gets or sets the anchor-point of a view.<br />
3392 /// 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 />
3393 /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br />
3394 /// A view position is the distance between its parent-origin and this anchor-point.<br />
3395 /// A view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br />
3396 /// <pre>The view has been initialized.</pre>
3398 /// <since_tizen> 3 </since_tizen>
3399 public Position PivotPoint
3403 Position temp = new Position(0.0f, 0.0f, 0.0f);
3404 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
3409 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3413 internal float PivotPointX
3418 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
3423 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
3427 internal float PivotPointY
3432 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
3437 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
3441 internal float PivotPointZ
3446 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
3451 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
3456 /// Gets or sets the size width of the view.
3458 /// <since_tizen> 3 </since_tizen>
3459 public float SizeWidth
3464 GetProperty(View.Property.SIZE_WIDTH).Get(out temp);
3469 SetProperty(View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue(value));
3474 /// Gets or sets the size height of the view.
3476 /// <since_tizen> 3 </since_tizen>
3477 public float SizeHeight
3482 GetProperty(View.Property.SIZE_HEIGHT).Get(out temp);
3487 SetProperty(View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue(value));
3492 /// Gets or sets the position of the view.<br />
3493 /// By default, sets the position vector between the parent origin and pivot point (default).<br />
3494 /// If the position inheritance is disabled, sets the world position.<br />
3496 /// <since_tizen> 3 </since_tizen>
3497 public Position Position
3501 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3502 GetProperty(View.Property.POSITION).Get(temp);
3507 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(value));
3512 /// Gets or sets the position X of the view.
3514 /// <since_tizen> 3 </since_tizen>
3515 public float PositionX
3520 GetProperty(View.Property.POSITION_X).Get(out temp);
3525 SetProperty(View.Property.POSITION_X, new Tizen.NUI.PropertyValue(value));
3530 /// Gets or sets the position Y of the view.
3532 /// <since_tizen> 3 </since_tizen>
3533 public float PositionY
3538 GetProperty(View.Property.POSITION_Y).Get(out temp);
3543 SetProperty(View.Property.POSITION_Y, new Tizen.NUI.PropertyValue(value));
3548 /// Gets or sets the position Z of the view.
3550 /// <since_tizen> 3 </since_tizen>
3551 public float PositionZ
3556 GetProperty(View.Property.POSITION_Z).Get(out temp);
3561 SetProperty(View.Property.POSITION_Z, new Tizen.NUI.PropertyValue(value));
3566 /// Gets or sets the world position of the view.
3568 /// <since_tizen> 3 </since_tizen>
3569 public Vector3 WorldPosition
3573 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3574 GetProperty(View.Property.WORLD_POSITION).Get(temp);
3579 internal float WorldPositionX
3584 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
3589 internal float WorldPositionY
3594 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
3599 internal float WorldPositionZ
3604 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
3610 /// Gets or sets the orientation of the view.<br />
3611 /// The view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br />
3613 /// <remarks>This is an asynchronous method.</remarks>
3614 /// <since_tizen> 3 </since_tizen>
3615 public Rotation Orientation
3619 Rotation temp = new Rotation();
3620 GetProperty(View.Property.ORIENTATION).Get(temp);
3625 SetProperty(View.Property.ORIENTATION, new Tizen.NUI.PropertyValue(value));
3630 /// Gets or sets the world orientation of the view.<br />
3632 /// <since_tizen> 3 </since_tizen>
3633 public Rotation WorldOrientation
3637 Rotation temp = new Rotation();
3638 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
3644 /// Gets or sets the scale factor applied to the view.<br />
3646 /// <since_tizen> 3 </since_tizen>
3647 public Vector3 Scale
3651 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3652 GetProperty(View.Property.SCALE).Get(temp);
3657 SetProperty(View.Property.SCALE, new Tizen.NUI.PropertyValue(value));
3662 /// Gets or sets the scale X factor applied to the view.
3664 /// <since_tizen> 3 </since_tizen>
3670 GetProperty(View.Property.SCALE_X).Get(out temp);
3675 SetProperty(View.Property.SCALE_X, new Tizen.NUI.PropertyValue(value));
3680 /// Gets or sets the scale Y factor applied to the view.
3682 /// <since_tizen> 3 </since_tizen>
3688 GetProperty(View.Property.SCALE_Y).Get(out temp);
3693 SetProperty(View.Property.SCALE_Y, new Tizen.NUI.PropertyValue(value));
3698 /// Gets or sets the scale Z factor applied to the view.
3700 /// <since_tizen> 3 </since_tizen>
3706 GetProperty(View.Property.SCALE_Z).Get(out temp);
3711 SetProperty(View.Property.SCALE_Z, new Tizen.NUI.PropertyValue(value));
3716 /// Gets the world scale of the view.
3718 /// <since_tizen> 3 </since_tizen>
3719 public Vector3 WorldScale
3723 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3724 GetProperty(View.Property.WORLD_SCALE).Get(temp);
3730 /// Retrieves the visibility flag of the view.
3733 /// If the view is not visible, then the view and its children will not be rendered.
3734 /// 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.
3736 /// <since_tizen> 3 </since_tizen>
3737 public bool Visibility
3742 GetProperty(View.Property.VISIBLE).Get(out temp);
3749 /// [Obsolete("Please do not use! this will be deprecated. Please use Visibility instead.")]
3751 /// <since_tizen> 3 </since_tizen>
3752 [Obsolete("Please do not use! This will be deprecated! Please use Visibility instead!")]
3753 [EditorBrowsable(EditorBrowsableState.Never)]
3764 /// Gets the view's world color.
3766 /// <since_tizen> 3 </since_tizen>
3767 public Vector4 WorldColor
3771 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3772 GetProperty(View.Property.WORLD_COLOR).Get(temp);
3777 internal Matrix WorldMatrix
3781 Matrix temp = new Matrix();
3782 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
3788 /// Gets or sets the view's name.
3790 /// <since_tizen> 3 </since_tizen>
3796 GetProperty(View.Property.NAME).Get(out temp);
3801 SetProperty(View.Property.NAME, new Tizen.NUI.PropertyValue(value));
3806 /// Get the number of children held by the view.
3808 /// <since_tizen> 3 </since_tizen>
3809 public new uint ChildCount
3813 return GetChildCount();
3818 /// Gets the view's ID.
3821 /// <since_tizen> 3 </since_tizen>
3831 /// Gets or sets the status of whether the view should emit touch or hover signals.
3833 /// <since_tizen> 3 </since_tizen>
3834 public bool Sensitive
3839 GetProperty(View.Property.SENSITIVE).Get(out temp);
3844 SetProperty(View.Property.SENSITIVE, new Tizen.NUI.PropertyValue(value));
3849 /// 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.
3851 /// <since_tizen> 3 </since_tizen>
3852 public bool LeaveRequired
3857 GetProperty(View.Property.LEAVE_REQUIRED).Get(out temp);
3862 SetProperty(View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue(value));
3867 /// Gets or sets the status of whether a child view inherits it's parent's orientation.
3869 /// <since_tizen> 3 </since_tizen>
3870 public bool InheritOrientation
3875 GetProperty(View.Property.INHERIT_ORIENTATION).Get(out temp);
3880 SetProperty(View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue(value));
3885 /// Gets or sets the status of whether a child view inherits it's parent's scale.
3887 /// <since_tizen> 3 </since_tizen>
3888 public bool InheritScale
3893 GetProperty(View.Property.INHERIT_SCALE).Get(out temp);
3898 SetProperty(View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue(value));
3903 /// Gets or sets the status of how the view and its children should be drawn.<br />
3904 /// Not all views are renderable, but DrawMode can be inherited from any view.<br />
3905 /// 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 />
3906 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br />
3907 /// Overlay views are drawn in a separate pass, after all non-overlay views within the layer.<br />
3908 /// For overlay views, the drawing order is with respect to tree levels of views, and depth-testing will not be used.<br />
3910 /// <since_tizen> 3 </since_tizen>
3911 public DrawModeType DrawMode
3916 if (GetProperty(View.Property.DRAW_MODE).Get(out temp) == false)
3918 NUILog.Error("DrawMode get error!");
3923 return DrawModeType.Normal;
3925 return DrawModeType.Overlay2D;
3927 return DrawModeType.Stencil;
3929 return DrawModeType.Normal;
3934 SetProperty(View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)value));
3939 /// Gets or sets the relative to parent size factor of the view.<br />
3940 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br />
3941 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br />
3943 /// <since_tizen> 3 </since_tizen>
3944 public Vector3 SizeModeFactor
3948 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3949 GetProperty(View.Property.SIZE_MODE_FACTOR).Get(temp);
3954 SetProperty(View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue(value));
3959 /// Gets or sets the width resize policy to be used.
3961 /// <since_tizen> 3 </since_tizen>
3962 public ResizePolicyType WidthResizePolicy
3967 if (GetProperty(View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
3969 NUILog.Error("WidthResizePolicy get error!");
3974 return ResizePolicyType.Fixed;
3975 case "USE_NATURAL_SIZE":
3976 return ResizePolicyType.UseNaturalSize;
3977 case "FILL_TO_PARENT":
3978 return ResizePolicyType.FillToParent;
3979 case "SIZE_RELATIVE_TO_PARENT":
3980 return ResizePolicyType.SizeRelativeToParent;
3981 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3982 return ResizePolicyType.SizeFixedOffsetFromParent;
3983 case "FIT_TO_CHILDREN":
3984 return ResizePolicyType.FitToChildren;
3985 case "DIMENSION_DEPENDENCY":
3986 return ResizePolicyType.DimensionDependency;
3987 case "USE_ASSIGNED_SIZE":
3988 return ResizePolicyType.UseAssignedSize;
3990 return ResizePolicyType.Fixed;
3995 SetProperty(View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
4000 /// Gets or sets the height resize policy to be used.
4002 /// <since_tizen> 3 </since_tizen>
4003 public ResizePolicyType HeightResizePolicy
4008 if (GetProperty(View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
4010 NUILog.Error("HeightResizePolicy get error!");
4015 return ResizePolicyType.Fixed;
4016 case "USE_NATURAL_SIZE":
4017 return ResizePolicyType.UseNaturalSize;
4018 case "FILL_TO_PARENT":
4019 return ResizePolicyType.FillToParent;
4020 case "SIZE_RELATIVE_TO_PARENT":
4021 return ResizePolicyType.SizeRelativeToParent;
4022 case "SIZE_FIXED_OFFSET_FROM_PARENT":
4023 return ResizePolicyType.SizeFixedOffsetFromParent;
4024 case "FIT_TO_CHILDREN":
4025 return ResizePolicyType.FitToChildren;
4026 case "DIMENSION_DEPENDENCY":
4027 return ResizePolicyType.DimensionDependency;
4028 case "USE_ASSIGNED_SIZE":
4029 return ResizePolicyType.UseAssignedSize;
4031 return ResizePolicyType.Fixed;
4036 SetProperty(View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
4041 /// Gets or sets the policy to use when setting size with size negotiation.<br />
4042 /// Defaults to SizeScalePolicyType.UseSizeSet.<br />
4044 /// <since_tizen> 3 </since_tizen>
4045 public SizeScalePolicyType SizeScalePolicy
4050 if (GetProperty(View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
4052 NUILog.Error("SizeScalePolicy get error!");
4056 case "USE_SIZE_SET":
4057 return SizeScalePolicyType.UseSizeSet;
4058 case "FIT_WITH_ASPECT_RATIO":
4059 return SizeScalePolicyType.FitWithAspectRatio;
4060 case "FILL_WITH_ASPECT_RATIO":
4061 return SizeScalePolicyType.FillWithAspectRatio;
4063 return SizeScalePolicyType.UseSizeSet;
4068 string valueToString = "";
4071 case SizeScalePolicyType.UseSizeSet:
4073 valueToString = "USE_SIZE_SET";
4076 case SizeScalePolicyType.FitWithAspectRatio:
4078 valueToString = "FIT_WITH_ASPECT_RATIO";
4081 case SizeScalePolicyType.FillWithAspectRatio:
4083 valueToString = "FILL_WITH_ASPECT_RATIO";
4088 valueToString = "USE_SIZE_SET";
4092 SetProperty(View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
4097 /// Gets or sets the status of whether the width size is dependent on the height size.
4099 /// <since_tizen> 3 </since_tizen>
4100 public bool WidthForHeight
4105 GetProperty(View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
4110 SetProperty(View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue(value));
4115 /// Gets or sets the status of whether the height size is dependent on the width size.
4117 /// <since_tizen> 3 </since_tizen>
4118 public bool HeightForWidth
4123 GetProperty(View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
4128 SetProperty(View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue(value));
4133 /// Gets or sets the padding for use in layout.
4135 /// <since_tizen> 4 </since_tizen>
4136 public Extents Padding
4140 Extents temp = new Extents(0, 0, 0, 0);
4141 GetProperty(View.Property.PADDING).Get(temp);
4146 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
4151 /// Gets or sets the minimum size the view can be assigned in size negotiation.
4153 /// <since_tizen> 3 </since_tizen>
4154 public Size2D MinimumSize
4158 Size2D temp = new Size2D(0, 0);
4159 GetProperty(View.Property.MINIMUM_SIZE).Get(temp);
4164 SetProperty(View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
4169 /// Gets or sets the maximum size the view can be assigned in size negotiation.
4171 /// <since_tizen> 3 </since_tizen>
4172 public Size2D MaximumSize
4176 Size2D temp = new Size2D(0, 0);
4177 GetProperty(View.Property.MAXIMUM_SIZE).Get(temp);
4182 SetProperty(View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
4187 /// Gets or sets whether a child view inherits it's parent's position.<br />
4188 /// Default is to inherit.<br />
4189 /// 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 />
4191 /// <since_tizen> 3 </since_tizen>
4192 public bool InheritPosition
4197 GetProperty(View.Property.INHERIT_POSITION).Get(out temp);
4202 SetProperty(View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue(value));
4207 /// Gets or sets the clipping behavior (mode) of it's children.
4209 /// <since_tizen> 3 </since_tizen>
4210 public ClippingModeType ClippingMode
4215 if (GetProperty(View.Property.CLIPPING_MODE).Get(out temp) == false)
4217 NUILog.Error("ClippingMode get error!");
4222 return ClippingModeType.Disabled;
4223 case "CLIP_CHILDREN":
4224 return ClippingModeType.ClipChildren;
4225 case "CLIP_TO_BOUNDING_BOX":
4226 return ClippingModeType.ClipToBoundingBox;
4228 return ClippingModeType.Disabled;
4233 SetProperty(View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)value));
4238 /// Gets the number of renderers held by the view.
4240 /// <since_tizen> 3 </since_tizen>
4241 public uint RendererCount
4245 return GetRendererCount();
4250 /// [Obsolete("Please do not use! this will be deprecated")]
4252 /// <since_tizen> 3 </since_tizen>
4253 /// Please do not use! this will be deprecated!
4254 /// Instead please use PivotPoint.
4255 [Obsolete("Please do not use! This will be deprecated! Please use PivotPoint instead! " +
4257 "View view = new View(); " +
4258 "view.PivotPoint = PivotPoint.Center; " +
4259 "view.PositionUsesPivotPoint = true;")]
4260 [EditorBrowsable(EditorBrowsableState.Never)]
4261 public Position AnchorPoint
4265 Position temp = new Position(0.0f, 0.0f, 0.0f);
4266 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
4271 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
4276 /// [Obsolete("Please do not use! this will be deprecated")]
4278 /// <since_tizen> 3 </since_tizen>
4279 [Obsolete("Please do not use! This will be deprecated! Please use Size2D instead! " +
4281 "View view = new View(); " +
4282 "view.Size2D = new Size2D(100, 100);")]
4283 [EditorBrowsable(EditorBrowsableState.Never)]
4288 Size temp = new Size(0.0f, 0.0f, 0.0f);
4289 GetProperty(View.Property.SIZE).Get(temp);
4294 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(value));
4299 /// "Please DO NOT use! This will be deprecated! Please use 'Container GetParent() for derived class' instead!"
4301 /// <since_tizen> 3 </since_tizen>
4302 [Obsolete("Please do not use! This will be deprecated! Please use 'Container GetParent() for derived class' instead! " +
4304 "Container parent = view.GetParent(); " +
4305 "View view = parent as View;")]
4306 [EditorBrowsable(EditorBrowsableState.Never)]
4307 public new View Parent
4312 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
4313 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4314 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
4315 NDalicPINVOKE.delete_BaseHandle(CPtr);
4316 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4318 if (basehandle is Layer)
4320 ret = new View(cPtr, false);
4324 ret = basehandle as View;
4327 if (NDalicPINVOKE.SWIGPendingException.Pending)
4328 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4334 /// Gets/Sets whether inherit parent's the layout Direction.
4336 /// <since_tizen> 4 </since_tizen>
4337 public bool InheritLayoutDirection
4342 GetProperty(View.Property.INHERIT_LAYOUT_DIRECTION).Get(out temp);
4347 SetProperty(View.Property.INHERIT_LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue(value));
4352 /// Gets/Sets the layout Direction.
4354 /// <since_tizen> 4 </since_tizen>
4355 public ViewLayoutDirectionType LayoutDirection
4360 if (GetProperty(View.Property.LAYOUT_DIRECTION).Get(out temp) == false)
4362 NUILog.Error("LAYOUT_DIRECTION get error!");
4364 return (ViewLayoutDirectionType)temp;
4368 SetProperty(View.Property.LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((int)value));
4373 /// Gets or sets the Margin for use in layout.
4375 /// <since_tizen> 4 </since_tizen>
4376 public Extents Margin
4380 Extents temp = new Extents(0, 0, 0, 0);
4381 GetProperty(View.Property.MARGIN).Get(temp);
4386 SetProperty(View.Property.MARGIN, new Tizen.NUI.PropertyValue(value));
4391 /// [Obsolete("Please do not use! this will be deprecated")]
4393 /// Please do not use! this will be deprecated!
4394 /// Instead please use Padding.
4395 /// <since_tizen> 4 </since_tizen>
4396 [Obsolete("Please do not use! this will be deprecated, instead please use Padding.")]
4397 [EditorBrowsable(EditorBrowsableState.Never)]
4398 public Extents PaddingEX
4402 Extents temp = new Extents(0, 0, 0, 0);
4403 GetProperty(View.Property.PADDING).Get(temp);
4408 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
4413 /// Perform an action on a visual registered to this view. <br />
4414 /// Visuals will have actions, this API is used to perform one of these actions with the given attributes.
4416 /// <param name="propertyIndexOfVisual">The Property index of the visual.</param>
4417 /// <param name="propertyIndexOfActionId">The action to perform. See Visual to find supported actions.</param>
4418 /// <param name="attributes">Optional attributes for the action.</param>
4419 /// <since_tizen> 5 </since_tizen>
4420 /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
4421 [EditorBrowsable(EditorBrowsableState.Never)]
4422 public void DoAction(int propertyIndexOfVisual, int propertyIndexOfActionId, PropertyValue attributes)
4424 NDalicManualPINVOKE.View_DoAction(swigCPtr, propertyIndexOfVisual, propertyIndexOfActionId, PropertyValue.getCPtr(attributes));
4425 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4431 /// The View layout Direction type.
4433 /// <since_tizen> 4 </since_tizen>
4434 public enum ViewLayoutDirectionType
4439 /// <since_tizen> 4 </since_tizen>
4444 /// <since_tizen> 4 </since_tizen>