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 NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
53 if (NDalicPINVOKE.SWIGPendingException.Pending)
54 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
60 /// Removes a child view from this View. If the view was not a child of this view, this is a no-op.
62 /// <seealso cref="Container.Remove" />
63 /// <since_tizen> 4 </since_tizen>
64 public override void Remove(View child)
66 NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
67 if (NDalicPINVOKE.SWIGPendingException.Pending)
68 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
70 Children.Remove(child);
74 /// Retrieves a child view by index.
76 /// <seealso cref="Container.GetChildAt" />
77 /// <since_tizen> 4 </since_tizen>
78 public override View GetChildAt(uint index)
80 if (index < Children.Count)
82 return Children[Convert.ToInt32(index)];
91 /// Retrieves the number of children held by the view.
93 /// <seealso cref="Container.GetChildCount" />
94 /// <since_tizen> 4 </since_tizen>
95 public override uint GetChildCount()
97 return Convert.ToUInt32(Children.Count);
101 /// Gets the views parent.
103 /// <seealso cref="Container.GetParent()" />
104 /// <since_tizen> 4 </since_tizen>
105 public override Container GetParent()
107 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
109 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(cPtr);
111 if (NDalicPINVOKE.SWIGPendingException.Pending)
112 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
114 return basehandle as Container;
117 internal bool IsTopLevelView()
119 if(GetParent() is Layer)
127 /// you can override it to clean-up your own resources.
129 /// <param name="type">DisposeTypes</param>
130 /// <since_tizen> 3 </since_tizen>
131 protected override void Dispose(DisposeTypes type)
138 if(type == DisposeTypes.Explicit)
141 //Release your own managed resources here.
142 //You should release all of your own disposable objects here.
145 //Release your own unmanaged resources here.
146 //You should not access any managed member here except static instance.
147 //because the execution order of Finalizes is non-deterministic.
149 DisConnectFromSignals();
151 if (swigCPtr.Handle != global::System.IntPtr.Zero)
156 NDalicPINVOKE.delete_View(swigCPtr);
158 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
165 private void DisConnectFromSignals()
167 // Save current CPtr.
168 global::System.Runtime.InteropServices.HandleRef currentCPtr = swigCPtr;
170 // Use BaseHandle CPtr as current might have been deleted already in derived classes.
171 swigCPtr = GetBaseHandleCPtrHandleRef;
173 if (_onRelayoutEventCallback != null)
175 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
178 if (_offWindowEventCallback != null)
180 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
183 if (_onWindowEventCallback != null)
185 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
188 if (_wheelEventCallback != null)
190 this.WheelEventSignal().Disconnect(_wheelEventCallback);
193 if (_hoverEventCallback != null)
195 this.HoveredSignal().Disconnect(_hoverEventCallback);
198 if (_touchDataCallback != null)
200 this.TouchSignal().Disconnect(_touchDataCallback);
203 if (_ResourcesLoadedCallback != null)
205 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
208 if (_offWindowEventCallback != null)
210 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
213 if (_onWindowEventCallback != null)
215 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
218 if (_wheelEventCallback != null)
220 this.WheelEventSignal().Disconnect(_wheelEventCallback);
223 if (_hoverEventCallback != null)
225 this.HoveredSignal().Disconnect(_hoverEventCallback);
228 if (_touchDataCallback != null)
230 this.TouchSignal().Disconnect(_touchDataCallback);
233 if (_onRelayoutEventCallback != null)
235 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
238 if (_keyCallback != null)
240 this.KeyEventSignal().Disconnect(_keyCallback);
243 if (_keyInputFocusLostCallback != null)
245 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
248 if (_keyInputFocusGainedCallback != null)
250 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
253 // BaseHandle CPtr is used in Registry and there is danger of deletion if we keep using it here.
254 // Restore current CPtr.
255 swigCPtr = currentCPtr;
258 private EventHandler _keyInputFocusGainedEventHandler;
259 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
260 private delegate void KeyInputFocusGainedCallbackType(IntPtr control);
261 private KeyInputFocusGainedCallbackType _keyInputFocusGainedCallback;
264 /// An event for the KeyInputFocusGained signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
265 /// The KeyInputFocusGained signal is emitted when the control gets the key input focus.<br />
267 /// <since_tizen> 3 </since_tizen>
268 public event EventHandler FocusGained
272 if (_keyInputFocusGainedEventHandler == null)
274 _keyInputFocusGainedCallback = OnKeyInputFocusGained;
275 this.KeyInputFocusGainedSignal().Connect(_keyInputFocusGainedCallback);
278 _keyInputFocusGainedEventHandler += value;
283 _keyInputFocusGainedEventHandler -= value;
285 if (_keyInputFocusGainedEventHandler == null && KeyInputFocusGainedSignal().Empty() == false)
287 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
292 private void OnKeyInputFocusGained(IntPtr view)
294 if (_keyInputFocusGainedEventHandler != null)
296 _keyInputFocusGainedEventHandler(this, null);
301 private EventHandler _keyInputFocusLostEventHandler;
302 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
303 private delegate void KeyInputFocusLostCallbackType(IntPtr control);
304 private KeyInputFocusLostCallbackType _keyInputFocusLostCallback;
307 /// An event for the KeyInputFocusLost signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
308 /// The KeyInputFocusLost signal is emitted when the control loses the key input focus.<br />
310 /// <since_tizen> 3 </since_tizen>
311 public event EventHandler FocusLost
315 if (_keyInputFocusLostEventHandler == null)
317 _keyInputFocusLostCallback = OnKeyInputFocusLost;
318 this.KeyInputFocusLostSignal().Connect(_keyInputFocusLostCallback);
321 _keyInputFocusLostEventHandler += value;
326 _keyInputFocusLostEventHandler -= value;
328 if (_keyInputFocusLostEventHandler == null && KeyInputFocusLostSignal().Empty() == false)
330 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
335 private void OnKeyInputFocusLost(IntPtr view)
337 if (_keyInputFocusLostEventHandler != null)
339 _keyInputFocusLostEventHandler(this, null);
344 /// Event arguments that passed via the KeyEvent signal.
346 /// <since_tizen> 3 </since_tizen>
347 public class KeyEventArgs : EventArgs
352 /// Key - is the key sent to the view.
354 /// <since_tizen> 3 </since_tizen>
368 private EventHandlerWithReturnType<object, KeyEventArgs, bool> _keyEventHandler;
369 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
370 private delegate bool KeyCallbackType(IntPtr control, IntPtr keyEvent);
371 private KeyCallbackType _keyCallback;
374 /// An event for the KeyPressed signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
375 /// The KeyPressed signal is emitted when the key event is received.<br />
377 /// <since_tizen> 3 </since_tizen>
378 public event EventHandlerWithReturnType<object, KeyEventArgs, bool> KeyEvent
382 if (_keyEventHandler == null)
384 _keyCallback = OnKeyEvent;
385 this.KeyEventSignal().Connect(_keyCallback);
388 _keyEventHandler += value;
393 _keyEventHandler -= value;
395 if (_keyEventHandler == null && KeyEventSignal().Empty() == false)
397 this.KeyEventSignal().Disconnect(_keyCallback);
402 private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
404 KeyEventArgs e = new KeyEventArgs();
408 e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
410 if (_keyEventHandler != null)
412 Delegate[] delegateList = _keyEventHandler.GetInvocationList();
414 // Oring the result of each callback.
415 foreach ( EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList )
417 result |= del( this, e );
424 private EventHandler _onRelayoutEventHandler;
425 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
426 private delegate void OnRelayoutEventCallbackType(IntPtr control);
427 private OnRelayoutEventCallbackType _onRelayoutEventCallback;
430 /// An event for the OnRelayout signal which can be used to subscribe or unsubscribe the event handler.<br />
431 /// The OnRelayout signal is emitted after the size has been set on the view during relayout.<br />
433 /// <since_tizen> 3 </since_tizen>
434 public event EventHandler Relayout
438 if (_onRelayoutEventHandler == null)
440 _onRelayoutEventCallback = OnRelayout;
441 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
444 _onRelayoutEventHandler += value;
449 _onRelayoutEventHandler -= value;
451 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
453 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
459 // Callback for View OnRelayout signal
460 private void OnRelayout(IntPtr data)
462 if (_onRelayoutEventHandler != null)
464 _onRelayoutEventHandler(this, null);
469 /// Event arguments that passed via the touch signal.
471 /// <since_tizen> 3 </since_tizen>
472 public class TouchEventArgs : EventArgs
474 private Touch _touch;
477 /// Touch - contains the information of touch points.
479 /// <since_tizen> 3 </since_tizen>
493 private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
494 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
495 private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
496 private TouchDataCallbackType _touchDataCallback;
499 /// An event for the touched signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
500 /// The touched signal is emitted when the touch input is received.<br />
502 /// <since_tizen> 3 </since_tizen>
503 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
507 if (_touchDataEventHandler == null)
509 _touchDataCallback = OnTouch;
510 this.TouchSignal().Connect(_touchDataCallback);
513 _touchDataEventHandler += value;
518 _touchDataEventHandler -= value;
520 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
522 this.TouchSignal().Disconnect(_touchDataCallback);
528 // Callback for View TouchSignal
529 private bool OnTouch(IntPtr view, IntPtr touchData)
531 TouchEventArgs e = new TouchEventArgs();
533 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
535 if (_touchDataEventHandler != null)
537 return _touchDataEventHandler(this, e);
544 /// Event arguments that passed via the hover signal.
546 /// <since_tizen> 3 </since_tizen>
547 public class HoverEventArgs : EventArgs
549 private Hover _hover;
552 /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
554 /// <since_tizen> 3 </since_tizen>
568 private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
569 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
570 private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
571 private HoverEventCallbackType _hoverEventCallback;
574 /// An event for the hovered signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
575 /// The hovered signal is emitted when the hover input is received.<br />
577 /// <since_tizen> 3 </since_tizen>
578 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
582 if (_hoverEventHandler == null)
584 _hoverEventCallback = OnHoverEvent;
585 this.HoveredSignal().Connect(_hoverEventCallback);
588 _hoverEventHandler += value;
593 _hoverEventHandler -= value;
595 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
597 this.HoveredSignal().Disconnect(_hoverEventCallback);
603 // Callback for View Hover signal
604 private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
606 HoverEventArgs e = new HoverEventArgs();
608 e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
610 if (_hoverEventHandler != null)
612 return _hoverEventHandler(this, e);
619 /// Event arguments that passed via the wheel signal.
621 /// <since_tizen> 3 </since_tizen>
622 public class WheelEventArgs : EventArgs
624 private Wheel _wheel;
627 /// WheelEvent - store a wheel rolling type: MOUSE_WHEEL or CUSTOM_WHEEL.
629 /// <since_tizen> 3 </since_tizen>
643 private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
644 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
645 private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
646 private WheelEventCallbackType _wheelEventCallback;
649 /// An event for the WheelMoved signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
650 /// The WheelMoved signal is emitted when the wheel event is received.<br />
652 /// <since_tizen> 3 </since_tizen>
653 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
657 if (_wheelEventHandler == null)
659 _wheelEventCallback = OnWheelEvent;
660 this.WheelEventSignal().Connect(_wheelEventCallback);
663 _wheelEventHandler += value;
668 _wheelEventHandler -= value;
670 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
672 this.WheelEventSignal().Disconnect(_wheelEventCallback);
678 // Callback for View Wheel signal
679 private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
681 WheelEventArgs e = new WheelEventArgs();
683 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
685 if (_wheelEventHandler != null)
687 return _wheelEventHandler(this, e);
693 private EventHandler _onWindowEventHandler;
694 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
695 private delegate void OnWindowEventCallbackType(IntPtr control);
696 private OnWindowEventCallbackType _onWindowEventCallback;
699 /// An event for the OnWindow signal which can be used to subscribe or unsubscribe the event handler.<br />
700 /// The OnWindow signal is emitted after the view has been connected to the window.<br />
702 /// <since_tizen> 3 </since_tizen>
703 public event EventHandler AddedToWindow
707 if (_onWindowEventHandler == null)
709 _onWindowEventCallback = OnWindow;
710 this.OnWindowSignal().Connect(_onWindowEventCallback);
713 _onWindowEventHandler += value;
718 _onWindowEventHandler -= value;
720 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
722 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
727 // Callback for View OnWindow signal
728 private void OnWindow(IntPtr data)
730 if (_onWindowEventHandler != null)
732 _onWindowEventHandler(this, null);
737 private EventHandler _offWindowEventHandler;
738 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
739 private delegate void OffWindowEventCallbackType(IntPtr control);
740 private OffWindowEventCallbackType _offWindowEventCallback;
743 /// An event for the OffWindow signal, which can be used to subscribe or unsubscribe the event handler.<br />
744 /// OffWindow signal is emitted after the view has been disconnected from the window.<br />
746 /// <since_tizen> 3 </since_tizen>
747 public event EventHandler RemovedFromWindow
751 if (_offWindowEventHandler == null)
753 _offWindowEventCallback = OffWindow;
754 this.OffWindowSignal().Connect(_offWindowEventCallback);
757 _offWindowEventHandler += value;
762 _offWindowEventHandler -= value;
764 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
766 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
771 // Callback for View OffWindow signal
772 private void OffWindow(IntPtr data)
774 if (_offWindowEventHandler != null)
776 _offWindowEventHandler(this, null);
781 /// Event arguments of visibility changed.
783 /// <since_tizen> 3 </since_tizen>
784 public class VisibilityChangedEventArgs : EventArgs
787 private bool _visibility;
788 private VisibilityChangeType _type;
791 /// The view, or child of view, whose visibility has changed.
793 /// <since_tizen> 3 </since_tizen>
807 /// Whether the view is now visible or not.
809 /// <since_tizen> 3 </since_tizen>
810 public bool Visibility
823 /// Whether the view's visible property has changed or a parent's.
825 /// <since_tizen> 3 </since_tizen>
826 public VisibilityChangeType Type
839 private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
840 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
841 private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
842 private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
845 /// An event for visibility change which can be used to subscribe or unsubscribe the event handler.<br />
846 /// This signal is emitted when the visible property of this or a parent view is changed.<br />
848 /// <since_tizen> 3 </since_tizen>
849 public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
853 if (_visibilityChangedEventHandler == null)
855 _visibilityChangedEventCallback = OnVisibilityChanged;
856 VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
859 _visibilityChangedEventHandler += value;
864 _visibilityChangedEventHandler -= value;
866 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
868 VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
873 // Callback for View visibility change signal
874 private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
876 VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
879 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
881 e.Visibility = visibility;
884 if (_visibilityChangedEventHandler != null)
886 _visibilityChangedEventHandler(this, e);
892 /// Event arguments of layout direction changed.
894 /// <since_tizen> 4 </since_tizen>
895 public class LayoutDirectionChangedEventArgs : EventArgs
898 private ViewLayoutDirectionType _type;
901 /// The view, or child of view, whose layout direction has changed.
903 /// <since_tizen> 4 </since_tizen>
917 /// Whether the view's layout direction property has changed or a parent's.
919 /// <since_tizen> 4 </since_tizen>
920 public ViewLayoutDirectionType Type
933 private EventHandler<LayoutDirectionChangedEventArgs> _layoutDirectionChangedEventHandler;
934 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
935 private delegate void LayoutDirectionChangedEventCallbackType(IntPtr data, ViewLayoutDirectionType type);
936 private LayoutDirectionChangedEventCallbackType _layoutDirectionChangedEventCallback;
939 /// Event for layout direction change which can be used to subscribe/unsubscribe the event handler.<br />
940 /// This signal is emitted when the layout direction property of this or a parent view is changed.<br />
942 /// <since_tizen> 4 </since_tizen>
943 public event EventHandler<LayoutDirectionChangedEventArgs> LayoutDirectionChanged
947 if (_layoutDirectionChangedEventHandler == null)
949 _layoutDirectionChangedEventCallback = OnLayoutDirectionChanged;
950 LayoutDirectionChangedSignal(this).Connect(_layoutDirectionChangedEventCallback);
953 _layoutDirectionChangedEventHandler += value;
958 _layoutDirectionChangedEventHandler -= value;
960 if (_layoutDirectionChangedEventHandler == null && LayoutDirectionChangedSignal(this).Empty() == false)
962 LayoutDirectionChangedSignal(this).Disconnect(_layoutDirectionChangedEventCallback);
967 // Callback for View layout direction change signal
968 private void OnLayoutDirectionChanged(IntPtr data, ViewLayoutDirectionType type)
970 LayoutDirectionChangedEventArgs e = new LayoutDirectionChangedEventArgs();
973 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
977 if (_layoutDirectionChangedEventHandler != null)
979 _layoutDirectionChangedEventHandler(this, e);
989 // Resource Ready Signal
991 private EventHandler _resourcesLoadedEventHandler;
992 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
993 private delegate void ResourcesLoadedCallbackType(IntPtr control);
994 private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
997 /// An event for the ResourcesLoadedSignal signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
998 /// This signal is emitted after all resources required by a view are loaded and ready.<br />
1000 /// <since_tizen> 3 </since_tizen>
1001 public event EventHandler ResourcesLoaded
1005 if (_resourcesLoadedEventHandler == null)
1007 _ResourcesLoadedCallback = OnResourcesLoaded;
1008 this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
1011 _resourcesLoadedEventHandler += value;
1016 _resourcesLoadedEventHandler -= value;
1018 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
1020 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
1025 private void OnResourcesLoaded(IntPtr view)
1027 if (_resourcesLoadedEventHandler != null)
1029 _resourcesLoadedEventHandler(this, null);
1033 internal IntPtr GetPtrfromView()
1035 return (IntPtr)swigCPtr;
1038 internal class Property
1040 internal static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get();
1041 internal static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get();
1042 internal static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get();
1043 internal static readonly int LEFT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
1044 internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
1045 internal static readonly int UP_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
1046 internal static readonly int DOWN_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
1047 internal static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get();
1048 internal static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get();
1049 internal static readonly int SIBLING_ORDER = NDalicManualPINVOKE.Actor_Property_SIBLING_ORDER_get();
1050 internal static readonly int OPACITY = NDalicManualPINVOKE.Actor_Property_OPACITY_get();
1051 internal static readonly int SCREEN_POSITION = NDalicManualPINVOKE.Actor_Property_SCREEN_POSITION_get();
1052 internal static readonly int POSITION_USES_ANCHOR_POINT = NDalicManualPINVOKE.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
1053 internal static readonly int PARENT_ORIGIN = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_get();
1054 internal static readonly int PARENT_ORIGIN_X = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_X_get();
1055 internal static readonly int PARENT_ORIGIN_Y = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Y_get();
1056 internal static readonly int PARENT_ORIGIN_Z = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Z_get();
1057 internal static readonly int ANCHOR_POINT = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_get();
1058 internal static readonly int ANCHOR_POINT_X = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_X_get();
1059 internal static readonly int ANCHOR_POINT_Y = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Y_get();
1060 internal static readonly int ANCHOR_POINT_Z = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Z_get();
1061 internal static readonly int SIZE = NDalicPINVOKE.Actor_Property_SIZE_get();
1062 internal static readonly int SIZE_WIDTH = NDalicPINVOKE.Actor_Property_SIZE_WIDTH_get();
1063 internal static readonly int SIZE_HEIGHT = NDalicPINVOKE.Actor_Property_SIZE_HEIGHT_get();
1064 internal static readonly int SIZE_DEPTH = NDalicPINVOKE.Actor_Property_SIZE_DEPTH_get();
1065 internal static readonly int POSITION = NDalicPINVOKE.Actor_Property_POSITION_get();
1066 internal static readonly int POSITION_X = NDalicPINVOKE.Actor_Property_POSITION_X_get();
1067 internal static readonly int POSITION_Y = NDalicPINVOKE.Actor_Property_POSITION_Y_get();
1068 internal static readonly int POSITION_Z = NDalicPINVOKE.Actor_Property_POSITION_Z_get();
1069 internal static readonly int WORLD_POSITION = NDalicPINVOKE.Actor_Property_WORLD_POSITION_get();
1070 internal static readonly int WORLD_POSITION_X = NDalicPINVOKE.Actor_Property_WORLD_POSITION_X_get();
1071 internal static readonly int WORLD_POSITION_Y = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Y_get();
1072 internal static readonly int WORLD_POSITION_Z = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Z_get();
1073 internal static readonly int ORIENTATION = NDalicPINVOKE.Actor_Property_ORIENTATION_get();
1074 internal static readonly int WORLD_ORIENTATION = NDalicPINVOKE.Actor_Property_WORLD_ORIENTATION_get();
1075 internal static readonly int SCALE = NDalicPINVOKE.Actor_Property_SCALE_get();
1076 internal static readonly int SCALE_X = NDalicPINVOKE.Actor_Property_SCALE_X_get();
1077 internal static readonly int SCALE_Y = NDalicPINVOKE.Actor_Property_SCALE_Y_get();
1078 internal static readonly int SCALE_Z = NDalicPINVOKE.Actor_Property_SCALE_Z_get();
1079 internal static readonly int WORLD_SCALE = NDalicPINVOKE.Actor_Property_WORLD_SCALE_get();
1080 internal static readonly int VISIBLE = NDalicPINVOKE.Actor_Property_VISIBLE_get();
1081 internal static readonly int WORLD_COLOR = NDalicPINVOKE.Actor_Property_WORLD_COLOR_get();
1082 internal static readonly int WORLD_MATRIX = NDalicPINVOKE.Actor_Property_WORLD_MATRIX_get();
1083 internal static readonly int NAME = NDalicPINVOKE.Actor_Property_NAME_get();
1084 internal static readonly int SENSITIVE = NDalicPINVOKE.Actor_Property_SENSITIVE_get();
1085 internal static readonly int LEAVE_REQUIRED = NDalicPINVOKE.Actor_Property_LEAVE_REQUIRED_get();
1086 internal static readonly int INHERIT_ORIENTATION = NDalicPINVOKE.Actor_Property_INHERIT_ORIENTATION_get();
1087 internal static readonly int INHERIT_SCALE = NDalicPINVOKE.Actor_Property_INHERIT_SCALE_get();
1088 internal static readonly int DRAW_MODE = NDalicPINVOKE.Actor_Property_DRAW_MODE_get();
1089 internal static readonly int SIZE_MODE_FACTOR = NDalicPINVOKE.Actor_Property_SIZE_MODE_FACTOR_get();
1090 internal static readonly int WIDTH_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_WIDTH_RESIZE_POLICY_get();
1091 internal static readonly int HEIGHT_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_HEIGHT_RESIZE_POLICY_get();
1092 internal static readonly int SIZE_SCALE_POLICY = NDalicPINVOKE.Actor_Property_SIZE_SCALE_POLICY_get();
1093 internal static readonly int WIDTH_FOR_HEIGHT = NDalicPINVOKE.Actor_Property_WIDTH_FOR_HEIGHT_get();
1094 internal static readonly int HEIGHT_FOR_WIDTH = NDalicPINVOKE.Actor_Property_HEIGHT_FOR_WIDTH_get();
1095 internal static readonly int MINIMUM_SIZE = NDalicPINVOKE.Actor_Property_MINIMUM_SIZE_get();
1096 internal static readonly int MAXIMUM_SIZE = NDalicPINVOKE.Actor_Property_MAXIMUM_SIZE_get();
1097 internal static readonly int INHERIT_POSITION = NDalicPINVOKE.Actor_Property_INHERIT_POSITION_get();
1098 internal static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
1099 internal static readonly int INHERIT_LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_INHERIT_LAYOUT_DIRECTION_get();
1100 internal static readonly int LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_LAYOUT_DIRECTION_get();
1101 internal static readonly int MARGIN = NDalicPINVOKE.View_Property_MARGIN_get();
1102 internal static readonly int PADDING = NDalicPINVOKE.View_Property_PADDING_get();
1106 /// Describes the direction to move the focus towards.
1108 /// <since_tizen> 3 </since_tizen>
1109 public enum FocusDirection
1112 /// Move keyboard focus towards the left direction.
1114 /// <since_tizen> 3 </since_tizen>
1117 /// Move keyboard focus towards the right direction.
1119 /// <since_tizen> 3 </since_tizen>
1122 /// Move keyboard focus towards the up direction.
1124 /// <since_tizen> 3 </since_tizen>
1127 /// Move keyboard focus towards the down direction.
1129 /// <since_tizen> 3 </since_tizen>
1132 /// Move keyboard focus towards the previous page direction.
1134 /// <since_tizen> 3 </since_tizen>
1137 /// Move keyboard focus towards the next page direction.
1139 /// <since_tizen> 3 </since_tizen>
1144 /// Creates a new instance of a view.
1146 /// <since_tizen> 3 </since_tizen>
1147 public View() : this(NDalicPINVOKE.View_New(), true)
1149 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1152 internal View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true)
1154 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1158 /// Downcasts a handle to view handle.<br />
1159 /// If handle points to a view, the downcast produces a valid handle.<br />
1160 /// If not, the returned handle is left uninitialized.<br />
1162 /// <param name="handle">A handle to an object.</param>
1163 /// <returns>A handle to a view or an uninitialized handle.</returns>
1164 /// <since_tizen> 3 </since_tizen>
1165 [Obsolete("Please do not use! This will be deprecated! Please use as keyword instead!")]
1166 [EditorBrowsable(EditorBrowsableState.Never)]
1167 public static View DownCast(BaseHandle handle)
1169 View ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as View;
1170 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1175 /// [Obsolete("Please do not use! this will be deprecated, instead please use as keyword.")]
1177 /// <since_tizen> 3 </since_tizen>
1178 [Obsolete("Please do not use! This will be deprecated! Please use as keyword instead!")]
1179 [EditorBrowsable(EditorBrowsableState.Never)]
1180 public static T DownCast<T>(View view) where T : View
1182 T ret = Registry.GetManagedBaseHandleFromNativePtr(view) as T;
1190 private View ConvertIdToView(uint id)
1196 View parentView = Parent as View;
1197 view = parentView.FindChildById(id);
1202 view = Window.Instance.GetRootLayer().FindChildById(id);
1208 internal void SetKeyInputFocus()
1210 NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
1211 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1215 /// Queries whether the view has a focus.
1217 /// <returns>True if this view has a focus.</returns>
1218 /// <since_tizen> 3 </since_tizen>
1219 public bool HasFocus()
1221 bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
1222 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1226 internal void ClearKeyInputFocus()
1228 NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
1229 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1232 internal PinchGestureDetector GetPinchGestureDetector()
1234 PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
1235 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1239 internal PanGestureDetector GetPanGestureDetector()
1241 PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
1242 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1246 internal TapGestureDetector GetTapGestureDetector()
1248 TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
1249 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1253 internal LongPressGestureDetector GetLongPressGestureDetector()
1255 LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
1256 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1261 /// Sets the name of the style to be applied to the view.
1263 /// <param name="styleName">A string matching a style described in a stylesheet.</param>
1264 /// <since_tizen> 3 </since_tizen>
1265 public void SetStyleName(string styleName)
1267 NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
1268 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1272 /// Retrieves the name of the style to be applied to the view (if any).
1274 /// <returns>A string matching a style, or an empty string.</returns>
1275 /// <since_tizen> 3 </since_tizen>
1276 public string GetStyleName()
1278 string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
1279 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1283 internal void SetBackgroundColor(Vector4 color)
1285 NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
1286 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1289 internal Vector4 GetBackgroundColor()
1291 Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
1292 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1296 internal void SetBackgroundImage(Image image)
1298 NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
1299 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1303 /// Clears the background.
1305 /// <since_tizen> 3 </since_tizen>
1306 public void ClearBackground()
1308 NDalicPINVOKE.View_ClearBackground(swigCPtr);
1309 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1312 internal ControlKeySignal KeyEventSignal()
1314 ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
1315 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1319 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
1321 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
1322 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1326 internal KeyInputFocusSignal KeyInputFocusLostSignal()
1328 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
1329 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1333 internal View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
1335 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1338 internal enum PropertyRange
1340 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
1341 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
1342 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
1346 /// The StyleName, type string.
1348 /// <since_tizen> 3 </since_tizen>
1349 public string StyleName
1354 GetProperty(View.Property.STYLE_NAME).Get(out temp);
1359 SetProperty(View.Property.STYLE_NAME, new Tizen.NUI.PropertyValue(value));
1364 /// The mutually exclusive with BACKGROUND_IMAGE and BACKGROUND type Vector4.
1366 /// <since_tizen> 3 </since_tizen>
1367 public Color BackgroundColor
1371 Color backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1373 Tizen.NUI.PropertyMap background = Background;
1375 background.Find(Visual.Property.Type)?.Get(out visualType);
1376 if (visualType == (int)Visual.Type.Color)
1378 background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor);
1381 return backgroundColor;
1385 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1390 /// Creates an animation to animate the background color visual. If there is no
1391 /// background visual, creates one with transparent black as it's mixColor.
1393 /// <since_tizen> 3 </since_tizen>
1394 public Animation AnimateBackgroundColor( object destinationValue,
1397 AlphaFunction.BuiltinFunctions? alphaFunction = null,
1398 object initialValue = null)
1400 Tizen.NUI.PropertyMap background = Background;
1402 if( background.Empty() )
1404 // If there is no background yet, ensure there is a transparent
1406 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1407 background = Background;
1409 return AnimateColor( "background", destinationValue, startTime, endTime, alphaFunction, initialValue );
1413 /// Creates an animation to animate the mixColor of the named visual.
1415 /// <since_tizen> 3 </since_tizen>
1416 public Animation AnimateColor( string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null )
1418 Animation animation = null;
1420 PropertyMap _animator = new PropertyMap();
1421 if( alphaFunction != null )
1423 _animator.Add("alphaFunction", new PropertyValue( AlphaFunction.BuiltinToPropertyKey(alphaFunction) ) );
1426 PropertyMap _timePeriod = new PropertyMap();
1427 _timePeriod.Add( "duration", new PropertyValue((endTime-startTime)/1000.0f) );
1428 _timePeriod.Add( "delay", new PropertyValue( startTime/1000.0f ) );
1429 _animator.Add( "timePeriod", new PropertyValue( _timePeriod ) );
1431 PropertyMap _transition = new PropertyMap();
1432 _transition.Add( "animator", new PropertyValue( _animator ) );
1433 _transition.Add( "target", new PropertyValue( targetVisual ) );
1434 _transition.Add( "property", new PropertyValue( "mixColor" ) );
1436 if( initialColor != null )
1438 PropertyValue initValue = PropertyValue.CreateFromObject( initialColor );
1439 _transition.Add( "initialValue", initValue );
1442 PropertyValue destValue = PropertyValue.CreateFromObject( destinationColor );
1443 _transition.Add( "targetValue", destValue );
1444 TransitionData _transitionData = new TransitionData( _transition );
1446 animation = new Animation( NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true );
1447 if (NDalicPINVOKE.SWIGPendingException.Pending)
1448 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1454 /// The mutually exclusive with BACKGROUND_COLOR and BACKGROUND type Map.
1456 /// <since_tizen> 3 </since_tizen>
1457 public string BackgroundImage
1461 string backgroundImage = "";
1463 Tizen.NUI.PropertyMap background = Background;
1465 background.Find(Visual.Property.Type)?.Get(out visualType);
1466 if (visualType == (int)Visual.Type.Image)
1468 background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
1471 return backgroundImage;
1475 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1480 /// The background of view.
1482 /// <since_tizen> 3 </since_tizen>
1483 public Tizen.NUI.PropertyMap Background
1487 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1488 GetProperty( View.Property.BACKGROUND ).Get(temp);
1493 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1499 /// The current state of the view.
1501 /// <since_tizen> 3 </since_tizen>
1507 if (GetProperty(View.Property.STATE).Get(out temp) == false)
1509 NUILog.Error("State get error!");
1515 return States.Normal;
1519 return States.Focused;
1523 return States.Disabled;
1527 return States.Normal;
1533 SetProperty(View.Property.STATE, new Tizen.NUI.PropertyValue((int)value));
1538 /// The current sub state of the view.
1540 /// <since_tizen> 3 </since_tizen>
1541 public States SubState
1546 if (GetProperty(View.Property.SUB_STATE).Get(out temp) == false)
1548 NUILog.Error("subState get error!");
1553 return States.Normal;
1555 return States.Focused;
1557 return States.Disabled;
1559 return States.Normal;
1564 string valueToString = "";
1569 valueToString = "NORMAL";
1572 case States.Focused:
1574 valueToString = "FOCUSED";
1577 case States.Disabled:
1579 valueToString = "DISABLED";
1584 valueToString = "NORMAL";
1588 SetProperty(View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
1593 /// Displays a tooltip
1595 /// <since_tizen> 3 </since_tizen>
1596 public Tizen.NUI.PropertyMap Tooltip
1600 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1601 GetProperty(View.Property.TOOLTIP).Get(temp);
1606 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1611 /// Displays a tooltip as a text.
1613 /// <since_tizen> 3 </since_tizen>
1614 public string TooltipText
1618 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1622 private int LeftFocusableViewId
1627 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
1632 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1636 private int RightFocusableViewId
1641 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
1646 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1650 private int UpFocusableViewId
1655 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
1660 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1664 private int DownFocusableViewId
1669 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
1674 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1679 /// The Child property of FlexContainer.<br />
1680 /// The proportion of the free space in the container, the flex item will receive.<br />
1681 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br />
1683 /// <since_tizen> 3 </since_tizen>
1689 GetProperty(FlexContainer.ChildProperty.FLEX).Get(out temp);
1694 SetProperty(FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue(value));
1699 /// The Child property of FlexContainer.<br />
1700 /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br />
1702 /// <since_tizen> 3 </since_tizen>
1703 public int AlignSelf
1708 GetProperty(FlexContainer.ChildProperty.ALIGN_SELF).Get(out temp);
1713 SetProperty(FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue(value));
1718 /// The Child property of FlexContainer.<br />
1719 /// The space around the flex item.<br />
1721 /// <since_tizen> 3 </since_tizen>
1722 public Vector4 FlexMargin
1726 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1727 GetProperty(FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
1732 SetProperty(FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue(value));
1737 /// The top-left cell this child occupies, if not set, the first available cell is used.
1739 /// <since_tizen> 3 </since_tizen>
1740 public Vector2 CellIndex
1744 Vector2 temp = new Vector2(0.0f, 0.0f);
1745 GetProperty(TableView.ChildProperty.CELL_INDEX).Get(temp);
1750 SetProperty(TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue(value));
1755 /// The number of rows this child occupies, if not set, the default value is 1.
1757 /// <since_tizen> 3 </since_tizen>
1758 public float RowSpan
1763 GetProperty(TableView.ChildProperty.ROW_SPAN).Get(out temp);
1768 SetProperty(TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue(value));
1773 /// The number of columns this child occupies, if not set, the default value is 1.
1775 /// <since_tizen> 3 </since_tizen>
1776 public float ColumnSpan
1781 GetProperty(TableView.ChildProperty.COLUMN_SPAN).Get(out temp);
1786 SetProperty(TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue(value));
1791 /// The horizontal alignment of this child inside the cells, if not set, the default value is 'left'.
1793 /// <since_tizen> 3 </since_tizen>
1794 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
1799 if (GetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
1801 NUILog.Error("CellHorizontalAlignment get error!");
1807 return Tizen.NUI.HorizontalAlignmentType.Left;
1809 return Tizen.NUI.HorizontalAlignmentType.Center;
1811 return Tizen.NUI.HorizontalAlignmentType.Right;
1813 return Tizen.NUI.HorizontalAlignmentType.Left;
1818 string valueToString = "";
1821 case Tizen.NUI.HorizontalAlignmentType.Left:
1823 valueToString = "left";
1826 case Tizen.NUI.HorizontalAlignmentType.Center:
1828 valueToString = "center";
1831 case Tizen.NUI.HorizontalAlignmentType.Right:
1833 valueToString = "right";
1838 valueToString = "left";
1842 SetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1847 /// The vertical alignment of this child inside the cells, if not set, the default value is 'top'.
1849 /// <since_tizen> 3 </since_tizen>
1850 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
1855 GetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
1857 NUILog.Error("CellVerticalAlignment get error!");
1863 return Tizen.NUI.VerticalAlignmentType.Top;
1865 return Tizen.NUI.VerticalAlignmentType.Center;
1867 return Tizen.NUI.VerticalAlignmentType.Bottom;
1869 return Tizen.NUI.VerticalAlignmentType.Top;
1874 string valueToString = "";
1877 case Tizen.NUI.VerticalAlignmentType.Top:
1879 valueToString = "top";
1882 case Tizen.NUI.VerticalAlignmentType.Center:
1884 valueToString = "center";
1887 case Tizen.NUI.VerticalAlignmentType.Bottom:
1889 valueToString = "bottom";
1894 valueToString = "top";
1898 SetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1903 /// The left focusable view.<br />
1904 /// This will return null if not set.<br />
1905 /// This will also return null if the specified left focusable view is not on a window.<br />
1907 /// <since_tizen> 3 </since_tizen>
1908 public View LeftFocusableView
1910 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1913 if (LeftFocusableViewId >= 0)
1915 return ConvertIdToView((uint)LeftFocusableViewId);
1923 LeftFocusableViewId = (int)value.GetId();
1927 LeftFocusableViewId = -1;
1933 /// The right focusable view.<br />
1934 /// This will return null if not set.<br />
1935 /// This will also return null if the specified right focusable view is not on a window.<br />
1937 /// <since_tizen> 3 </since_tizen>
1938 public View RightFocusableView
1940 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1943 if (RightFocusableViewId >= 0)
1945 return ConvertIdToView((uint)RightFocusableViewId);
1953 RightFocusableViewId = (int)value.GetId();
1957 RightFocusableViewId = -1;
1963 /// The up focusable view.<br />
1964 /// This will return null if not set.<br />
1965 /// This will also return null if the specified up focusable view is not on a window.<br />
1967 /// <since_tizen> 3 </since_tizen>
1968 public View UpFocusableView
1970 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1973 if (UpFocusableViewId >= 0)
1975 return ConvertIdToView((uint)UpFocusableViewId);
1983 UpFocusableViewId = (int)value.GetId();
1987 UpFocusableViewId = -1;
1993 /// The down focusable view.<br />
1994 /// This will return null if not set.<br />
1995 /// This will also return null if the specified down focusable view is not on a window.<br />
1997 /// <since_tizen> 3 </since_tizen>
1998 public View DownFocusableView
2000 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2003 if (DownFocusableViewId >= 0)
2005 return ConvertIdToView((uint)DownFocusableViewId);
2013 DownFocusableViewId = (int)value.GetId();
2017 DownFocusableViewId = -1;
2023 /// Whether the view should be focusable by keyboard navigation.
2025 /// <since_tizen> 3 </since_tizen>
2026 public bool Focusable
2030 SetKeyboardFocusable(value);
2034 return IsKeyboardFocusable();
2039 /// Enumeration for describing the states of the view.
2041 /// <since_tizen> 3 </since_tizen>
2045 /// The normal state.
2049 /// The focused state.
2053 /// The disabled state.
2059 /// Retrieves the position of the view.<br />
2060 /// The coordinates are relative to the view's parent.<br />
2062 /// <since_tizen> 3 </since_tizen>
2063 public Position CurrentPosition
2067 return GetCurrentPosition();
2072 /// Sets the size of a view for the width and the height.<br />
2073 /// Geometry can be scaled to fit within this area.<br />
2074 /// This does not interfere with the view's scale factor.<br />
2075 /// The views default depth is the minimum of width and height.<br />
2077 /// <since_tizen> 3 </since_tizen>
2078 public Size2D Size2D
2082 Size temp = new Size(0.0f, 0.0f, 0.0f);
2083 GetProperty(View.Property.SIZE).Get(temp);
2084 Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
2089 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(new Size(value)));
2094 /// Retrieves the size of the view.<br />
2095 /// The coordinates are relative to the view's parent.<br />
2097 /// <since_tizen> 3 </since_tizen>
2098 public Size2D CurrentSize
2102 return GetCurrentSize();
2107 /// [Obsolete("Please do not use! this will be deprecated. Please use Visibility instead.")]
2109 /// <since_tizen> 3 </since_tizen>
2110 [Obsolete("Please do not use! This will be deprecated! Please use Visibility instead!")]
2111 [EditorBrowsable(EditorBrowsableState.Never)]
2121 /// Retrieves and sets the view's opacity.<br />
2123 /// <since_tizen> 3 </since_tizen>
2124 public float Opacity
2129 GetProperty(View.Property.OPACITY).Get(out temp);
2134 SetProperty(View.Property.OPACITY, new Tizen.NUI.PropertyValue(value));
2139 /// Sets the position of the view for X and Y.<br />
2140 /// By default, sets the position vector between the parent origin and the pivot point (default).<br />
2141 /// If the position inheritance is disabled, sets the world position.<br />
2143 /// <since_tizen> 3 </since_tizen>
2144 public Position2D Position2D
2148 Position temp = new Position(0.0f, 0.0f, 0.0f);
2149 GetProperty(View.Property.POSITION).Get(temp);
2150 return new Position2D(temp);
2154 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(new Position(value)));
2159 /// Retrieves the screen postion of the view.<br />
2161 /// <since_tizen> 3 </since_tizen>
2162 public Vector2 ScreenPosition
2166 Vector2 temp = new Vector2(0.0f, 0.0f);
2167 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
2173 /// Determines whether the pivot point should be used to determine the position of the view.
2174 /// This is true by default.
2176 /// <remarks>If false, then the top-left of the view is used for the position.
2177 /// Setting this to false will allow scaling or rotation around the anchor-point without affecting the view's position.
2179 /// <since_tizen> 3 </since_tizen>
2180 public bool PositionUsesPivotPoint
2185 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
2190 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
2195 /// Please do not use! this will be deprecated.
2197 /// Please do not use! this will be deprecated!
2198 /// Instead please use PositionUsesPivotPoint.
2199 /// <since_tizen> 3 </since_tizen>
2200 [Obsolete("Please do not use! This will be deprecated! Please use PositionUsesPivotPoint instead! " +
2202 "View view = new View(); " +
2203 "view.PivotPoint = PivotPoint.Center; " +
2204 "view.PositionUsesPivotPoint = true;")]
2205 [EditorBrowsable(EditorBrowsableState.Never)]
2206 public bool PositionUsesAnchorPoint
2211 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
2216 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
2220 internal bool FocusState
2224 return IsKeyboardFocusable();
2228 SetKeyboardFocusable(value);
2233 /// Queries whether the view is connected to the stage.<br />
2234 /// When a view is connected, it will be directly or indirectly parented to the root view.<br />
2236 /// <since_tizen> 3 </since_tizen>
2237 public bool IsOnWindow
2246 /// Gets the depth in the hierarchy for the view.
2248 /// <since_tizen> 3 </since_tizen>
2249 public int HierarchyDepth
2253 return GetHierarchyDepth();
2258 /// Sets the sibling order of the view so the depth position can be defined within the same parent.
2261 /// Note the initial value is 0.
2262 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove, and LowerBelow will override the sibling order.
2263 /// The values set by this property will likely change.
2265 /// <since_tizen> 3 </since_tizen>
2266 public int SiblingOrder
2271 GetProperty(View.Property.SIBLING_ORDER).Get(out temp);
2276 SetProperty(View.Property.SIBLING_ORDER, new Tizen.NUI.PropertyValue(value));
2281 /// Returns the natural size of the view.
2284 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
2286 /// /// Please do not use! this will be deprecated!
2287 /// Instead please use NaturalSize2D.
2288 /// <since_tizen> 3 </since_tizen>
2289 [Obsolete("Please do not use! This will be deprecated! Please use NaturalSize2D instead! " +
2291 "TextLabel label = new TextLabel(\"Hello World!\"); " +
2292 "Size2D size = label.NaturalSize2D;")]
2293 [EditorBrowsable(EditorBrowsableState.Never)]
2294 public Vector3 NaturalSize
2298 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2299 if (NDalicPINVOKE.SWIGPendingException.Pending)
2300 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2306 /// Returns the natural size (Size2D) of the view.
2309 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
2311 /// <since_tizen> 4 </since_tizen>
2312 public Size2D NaturalSize2D
2316 Vector3 temp = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2317 if (NDalicPINVOKE.SWIGPendingException.Pending)
2318 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2320 return new Size2D((int)temp.Width, (int)temp.Height);
2328 /// This is an asynchronous method.
2330 /// <since_tizen> 3 </since_tizen>
2340 /// This is an asynchronous method.
2341 /// If the view is hidden, then the view and its children will not be rendered.
2342 /// 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.
2344 /// <since_tizen> 3 </since_tizen>
2350 internal void Raise()
2352 var parentChildren = Parent?.Children;
2354 if (parentChildren != null)
2356 int currentIndex = parentChildren.IndexOf(this);
2358 // If the view is not already the last item in the list.
2359 if (currentIndex != parentChildren.Count -1)
2361 View temp = parentChildren[currentIndex + 1];
2362 parentChildren[currentIndex + 1] = this;
2363 parentChildren[currentIndex] = temp;
2367 NDalicPINVOKE.Raise(swigCPtr);
2368 if (NDalicPINVOKE.SWIGPendingException.Pending)
2369 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2372 internal void Lower()
2374 var parentChildren = Parent?.Children;
2376 if (parentChildren != null)
2378 int currentIndex = parentChildren.IndexOf(this);
2380 // If the view is not already the first item in the list.
2381 if (currentIndex > 0)
2383 View temp = parentChildren[currentIndex - 1];
2384 parentChildren[currentIndex - 1] = this;
2385 parentChildren[currentIndex] = temp;
2389 NDalicPINVOKE.Lower(swigCPtr);
2390 if (NDalicPINVOKE.SWIGPendingException.Pending)
2391 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2395 /// Raises the view above all other views.
2398 /// Sibling order of views within the parent will be updated automatically.
2399 /// Once a raise or lower API is used, that view will then have an exclusive sibling order independent of insertion.
2401 /// <since_tizen> 3 </since_tizen>
2402 public void RaiseToTop()
2404 var parentChildren = Parent?.Children;
2406 if (parentChildren != null)
2408 parentChildren.Remove(this);
2409 parentChildren.Add(this);
2412 NDalicPINVOKE.RaiseToTop(swigCPtr);
2413 if (NDalicPINVOKE.SWIGPendingException.Pending)
2414 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2418 /// Lowers the view to the bottom of all views.
2421 /// The sibling order of views within the parent will be updated automatically.
2422 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2424 /// <since_tizen> 3 </since_tizen>
2425 public void LowerToBottom()
2427 var parentChildren = Parent?.Children;
2429 if (parentChildren != null)
2431 parentChildren.Remove(this);
2432 parentChildren.Insert(0, this);
2435 NDalicPINVOKE.LowerToBottom(swigCPtr);
2436 if (NDalicPINVOKE.SWIGPendingException.Pending)
2437 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2441 /// Queries if all resources required by a view are loaded and ready.
2443 /// <remarks>Most resources are only loaded when the control is placed on the stage.
2445 /// <since_tizen> 3 </since_tizen>
2446 public bool IsResourceReady()
2448 bool ret = NDalicPINVOKE.IsResourceReady(swigCPtr);
2449 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2454 /// Raises the view to above the target view.
2456 /// <remarks>The sibling order of views within the parent will be updated automatically.
2457 /// Views on the level above the target view will still be shown above this view.
2458 /// Raising this view above views with the same sibling order as each other will raise this view above them.
2459 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2461 /// <param name="target">Will be raised above this view.</param>
2462 internal void RaiseAbove(View target)
2464 var parentChildren = Parent?.Children;
2466 if (parentChildren != null)
2468 int currentIndex = parentChildren.IndexOf(this);
2469 int targetIndex = parentChildren.IndexOf(target);
2471 // If the currentIndex is less than the target index and the target has the same parent.
2472 if (currentIndex < targetIndex)
2474 parentChildren.Remove(this);
2475 parentChildren.Insert(targetIndex, this);
2479 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
2480 if (NDalicPINVOKE.SWIGPendingException.Pending)
2481 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2485 /// Lowers the view to below the target view.
2487 /// <remarks>The sibling order of views within the parent will be updated automatically.
2488 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
2489 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2491 /// <param name="target">Will be lowered below this view.</param>
2492 internal void LowerBelow(View target)
2494 var parentChildren = Parent?.Children;
2496 if (parentChildren != null)
2498 int currentIndex = parentChildren.IndexOf(this);
2499 int targetIndex = parentChildren.IndexOf(target);
2501 // If the currentIndex is not already the 0th index and the target has the same parent.
2502 if ((currentIndex != 0) && (targetIndex != -1) &&
2503 (currentIndex > targetIndex))
2505 parentChildren.Remove(this);
2506 parentChildren.Insert(targetIndex, this);
2510 NDalicPINVOKE.LowerBelow(swigCPtr, View.getCPtr(target));
2511 if (NDalicPINVOKE.SWIGPendingException.Pending)
2512 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2515 internal string GetName()
2517 string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);
2518 if (NDalicPINVOKE.SWIGPendingException.Pending)
2519 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2523 internal void SetName(string name)
2525 NDalicPINVOKE.Actor_SetName(swigCPtr, name);
2526 if (NDalicPINVOKE.SWIGPendingException.Pending)
2527 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2530 internal uint GetId()
2532 uint ret = NDalicPINVOKE.Actor_GetId(swigCPtr);
2533 if (NDalicPINVOKE.SWIGPendingException.Pending)
2534 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2538 internal bool IsRoot()
2540 bool ret = NDalicPINVOKE.Actor_IsRoot(swigCPtr);
2541 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2545 internal bool OnWindow()
2547 bool ret = NDalicPINVOKE.Actor_OnStage(swigCPtr);
2548 if (NDalicPINVOKE.SWIGPendingException.Pending)
2549 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2554 /// Gets the parent layer of this view.If a view has no parent, this method does nothing.
2556 /// <pre>The view has been initialized. </pre>
2557 /// <returns>the parent layer of view </returns>
2558 /// <since_tizen> 5 </since_tizen>
2559 public Layer GetLayer()
2561 IntPtr cPtr = NDalicPINVOKE.Actor_GetLayer(swigCPtr);
2562 Layer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Layer;
2564 if (NDalicPINVOKE.SWIGPendingException.Pending)
2565 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2570 /// Removes a view from its parent view or layer. If a view has no parent, this method does nothing.
2572 /// <pre>The (child) view has been initialized. </pre>
2573 /// <since_tizen> 4 </since_tizen>
2574 public void Unparent()
2576 GetParent()?.Remove(this);
2580 /// Search through this view's hierarchy for a view with the given name.
2581 /// The view itself is also considered in the search.
2583 /// <pre>The view has been initialized.</pre>
2584 /// <param name="viewName">The name of the view to find.</param>
2585 /// <returns>A handle to the view if found, or an empty handle if not.</returns>
2586 /// <since_tizen> 3 </since_tizen>
2587 public View FindChildByName(string viewName)
2589 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
2591 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2593 if (NDalicPINVOKE.SWIGPendingException.Pending)
2594 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2598 internal View FindChildById(uint id)
2600 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
2602 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2604 if (NDalicPINVOKE.SWIGPendingException.Pending)
2605 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2609 internal void SetParentOrigin(Vector3 origin)
2611 NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
2612 if (NDalicPINVOKE.SWIGPendingException.Pending)
2613 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2616 internal Vector3 GetCurrentParentOrigin()
2618 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentParentOrigin(swigCPtr), true);
2619 if (NDalicPINVOKE.SWIGPendingException.Pending)
2620 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2624 internal void SetAnchorPoint(Vector3 anchorPoint)
2626 NDalicPINVOKE.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
2627 if (NDalicPINVOKE.SWIGPendingException.Pending)
2628 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2631 internal Vector3 GetCurrentAnchorPoint()
2633 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentAnchorPoint(swigCPtr), true);
2634 if (NDalicPINVOKE.SWIGPendingException.Pending)
2635 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2639 internal void SetSize(float width, float height)
2641 NDalicPINVOKE.Actor_SetSize__SWIG_0(swigCPtr, width, height);
2642 if (NDalicPINVOKE.SWIGPendingException.Pending)
2643 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2646 internal void SetSize(float width, float height, float depth)
2648 NDalicPINVOKE.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
2649 if (NDalicPINVOKE.SWIGPendingException.Pending)
2650 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2653 internal void SetSize(Vector2 size)
2655 NDalicPINVOKE.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
2656 if (NDalicPINVOKE.SWIGPendingException.Pending)
2657 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2660 internal void SetSize(Vector3 size)
2662 NDalicPINVOKE.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
2663 if (NDalicPINVOKE.SWIGPendingException.Pending)
2664 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2667 internal Vector3 GetTargetSize()
2669 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetTargetSize(swigCPtr), true);
2670 if (NDalicPINVOKE.SWIGPendingException.Pending)
2671 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2675 internal Size2D GetCurrentSize()
2677 Size ret = new Size(NDalicPINVOKE.Actor_GetCurrentSize(swigCPtr), true);
2678 if (NDalicPINVOKE.SWIGPendingException.Pending)
2679 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2680 Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
2684 internal Vector3 GetNaturalSize()
2686 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2687 if (NDalicPINVOKE.SWIGPendingException.Pending)
2688 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2692 internal void SetPosition(float x, float y)
2694 NDalicPINVOKE.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
2695 if (NDalicPINVOKE.SWIGPendingException.Pending)
2696 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2699 internal void SetPosition(float x, float y, float z)
2701 NDalicPINVOKE.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
2702 if (NDalicPINVOKE.SWIGPendingException.Pending)
2703 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2706 internal void SetPosition(Vector3 position)
2708 NDalicPINVOKE.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
2709 if (NDalicPINVOKE.SWIGPendingException.Pending)
2710 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2713 internal void SetX(float x)
2715 NDalicPINVOKE.Actor_SetX(swigCPtr, x);
2716 if (NDalicPINVOKE.SWIGPendingException.Pending)
2717 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2720 internal void SetY(float y)
2722 NDalicPINVOKE.Actor_SetY(swigCPtr, y);
2723 if (NDalicPINVOKE.SWIGPendingException.Pending)
2724 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2727 internal void SetZ(float z)
2729 NDalicPINVOKE.Actor_SetZ(swigCPtr, z);
2730 if (NDalicPINVOKE.SWIGPendingException.Pending)
2731 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2734 internal void TranslateBy(Vector3 distance)
2736 NDalicPINVOKE.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
2737 if (NDalicPINVOKE.SWIGPendingException.Pending)
2738 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2741 internal Position GetCurrentPosition()
2743 Position ret = new Position(NDalicPINVOKE.Actor_GetCurrentPosition(swigCPtr), true);
2744 if (NDalicPINVOKE.SWIGPendingException.Pending)
2745 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2749 internal Vector3 GetCurrentWorldPosition()
2751 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldPosition(swigCPtr), true);
2752 if (NDalicPINVOKE.SWIGPendingException.Pending)
2753 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2757 internal void SetInheritPosition(bool inherit)
2759 NDalicPINVOKE.Actor_SetInheritPosition(swigCPtr, inherit);
2760 if (NDalicPINVOKE.SWIGPendingException.Pending)
2761 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2764 internal bool IsPositionInherited()
2766 bool ret = NDalicPINVOKE.Actor_IsPositionInherited(swigCPtr);
2767 if (NDalicPINVOKE.SWIGPendingException.Pending)
2768 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2772 internal void SetOrientation(Degree angle, Vector3 axis)
2774 NDalicPINVOKE.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2775 if (NDalicPINVOKE.SWIGPendingException.Pending)
2776 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2779 internal void SetOrientation(Radian angle, Vector3 axis)
2781 NDalicPINVOKE.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2782 if (NDalicPINVOKE.SWIGPendingException.Pending)
2783 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2786 internal void SetOrientation(Rotation orientation)
2788 NDalicPINVOKE.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
2789 if (NDalicPINVOKE.SWIGPendingException.Pending)
2790 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2793 internal void RotateBy(Degree angle, Vector3 axis)
2795 NDalicPINVOKE.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2796 if (NDalicPINVOKE.SWIGPendingException.Pending)
2797 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2800 internal void RotateBy(Radian angle, Vector3 axis)
2802 NDalicPINVOKE.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2803 if (NDalicPINVOKE.SWIGPendingException.Pending)
2804 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2807 internal void RotateBy(Rotation relativeRotation)
2809 NDalicPINVOKE.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
2810 if (NDalicPINVOKE.SWIGPendingException.Pending)
2811 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2814 internal Rotation GetCurrentOrientation()
2816 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentOrientation(swigCPtr), true);
2817 if (NDalicPINVOKE.SWIGPendingException.Pending)
2818 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2822 internal void SetInheritOrientation(bool inherit)
2824 NDalicPINVOKE.Actor_SetInheritOrientation(swigCPtr, inherit);
2825 if (NDalicPINVOKE.SWIGPendingException.Pending)
2826 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2829 internal bool IsOrientationInherited()
2831 bool ret = NDalicPINVOKE.Actor_IsOrientationInherited(swigCPtr);
2832 if (NDalicPINVOKE.SWIGPendingException.Pending)
2833 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2837 internal Rotation GetCurrentWorldOrientation()
2839 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentWorldOrientation(swigCPtr), true);
2840 if (NDalicPINVOKE.SWIGPendingException.Pending)
2841 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2845 internal void SetScale(float scale)
2847 NDalicPINVOKE.Actor_SetScale__SWIG_0(swigCPtr, scale);
2848 if (NDalicPINVOKE.SWIGPendingException.Pending)
2849 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2852 internal void SetScale(float scaleX, float scaleY, float scaleZ)
2854 NDalicPINVOKE.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
2855 if (NDalicPINVOKE.SWIGPendingException.Pending)
2856 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2859 internal void SetScale(Vector3 scale)
2861 NDalicPINVOKE.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
2862 if (NDalicPINVOKE.SWIGPendingException.Pending)
2863 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2866 internal void ScaleBy(Vector3 relativeScale)
2868 NDalicPINVOKE.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
2869 if (NDalicPINVOKE.SWIGPendingException.Pending)
2870 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2873 internal Vector3 GetCurrentScale()
2875 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentScale(swigCPtr), true);
2876 if (NDalicPINVOKE.SWIGPendingException.Pending)
2877 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2881 internal Vector3 GetCurrentWorldScale()
2883 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldScale(swigCPtr), true);
2884 if (NDalicPINVOKE.SWIGPendingException.Pending)
2885 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2889 internal void SetInheritScale(bool inherit)
2891 NDalicPINVOKE.Actor_SetInheritScale(swigCPtr, inherit);
2892 if (NDalicPINVOKE.SWIGPendingException.Pending)
2893 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2896 internal bool IsScaleInherited()
2898 bool ret = NDalicPINVOKE.Actor_IsScaleInherited(swigCPtr);
2899 if (NDalicPINVOKE.SWIGPendingException.Pending)
2900 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2904 internal Matrix GetCurrentWorldMatrix()
2906 Matrix ret = new Matrix(NDalicPINVOKE.Actor_GetCurrentWorldMatrix(swigCPtr), true);
2907 if (NDalicPINVOKE.SWIGPendingException.Pending)
2908 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2912 internal void SetVisible(bool visible)
2914 NDalicPINVOKE.Actor_SetVisible(swigCPtr, visible);
2915 if (NDalicPINVOKE.SWIGPendingException.Pending)
2916 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2919 internal bool IsVisible()
2921 bool ret = NDalicPINVOKE.Actor_IsVisible(swigCPtr);
2922 if (NDalicPINVOKE.SWIGPendingException.Pending)
2923 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2927 internal void SetOpacity(float opacity)
2929 NDalicPINVOKE.Actor_SetOpacity(swigCPtr, opacity);
2930 if (NDalicPINVOKE.SWIGPendingException.Pending)
2931 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2934 internal float GetCurrentOpacity()
2936 float ret = NDalicPINVOKE.Actor_GetCurrentOpacity(swigCPtr);
2937 if (NDalicPINVOKE.SWIGPendingException.Pending)
2938 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2942 internal void SetColor(Vector4 color)
2944 NDalicPINVOKE.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
2945 if (NDalicPINVOKE.SWIGPendingException.Pending)
2946 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2949 internal Vector4 GetCurrentColor()
2951 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentColor(swigCPtr), true);
2952 if (NDalicPINVOKE.SWIGPendingException.Pending)
2953 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2957 internal void SetColorMode(ColorMode colorMode)
2959 NDalicPINVOKE.Actor_SetColorMode(swigCPtr, (int)colorMode);
2960 if (NDalicPINVOKE.SWIGPendingException.Pending)
2961 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2964 internal ColorMode GetColorMode()
2966 ColorMode ret = (ColorMode)NDalicPINVOKE.Actor_GetColorMode(swigCPtr);
2967 if (NDalicPINVOKE.SWIGPendingException.Pending)
2968 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2972 internal Vector4 GetCurrentWorldColor()
2974 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentWorldColor(swigCPtr), true);
2975 if (NDalicPINVOKE.SWIGPendingException.Pending)
2976 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2980 internal void SetDrawMode(DrawModeType drawMode)
2982 NDalicPINVOKE.Actor_SetDrawMode(swigCPtr, (int)drawMode);
2983 if (NDalicPINVOKE.SWIGPendingException.Pending)
2984 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2987 internal DrawModeType GetDrawMode()
2989 DrawModeType ret = (DrawModeType)NDalicPINVOKE.Actor_GetDrawMode(swigCPtr);
2990 if (NDalicPINVOKE.SWIGPendingException.Pending)
2991 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2996 /// Converts screen coordinates into the view's coordinate system using the default camera.
2998 /// <pre>The view has been initialized.</pre>
2999 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5).</remarks>
3000 /// <param name="localX">On return, the X-coordinate relative to the view.</param>
3001 /// <param name="localY">On return, the Y-coordinate relative to the view.</param>
3002 /// <param name="screenX">The screen X-coordinate.</param>
3003 /// <param name="screenY">The screen Y-coordinate.</param>
3004 /// <returns>True if the conversion succeeded.</returns>
3005 /// <since_tizen> 3 </since_tizen>
3006 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
3008 bool ret = NDalicPINVOKE.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
3009 if (NDalicPINVOKE.SWIGPendingException.Pending)
3010 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3014 internal void SetKeyboardFocusable(bool focusable)
3016 NDalicPINVOKE.Actor_SetKeyboardFocusable(swigCPtr, focusable);
3017 if (NDalicPINVOKE.SWIGPendingException.Pending)
3018 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3021 internal bool IsKeyboardFocusable()
3023 bool ret = NDalicPINVOKE.Actor_IsKeyboardFocusable(swigCPtr);
3024 if (NDalicPINVOKE.SWIGPendingException.Pending)
3025 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3029 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
3031 NDalicPINVOKE.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
3032 if (NDalicPINVOKE.SWIGPendingException.Pending)
3033 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3036 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
3038 ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.Actor_GetResizePolicy(swigCPtr, (int)dimension);
3039 if (NDalicPINVOKE.SWIGPendingException.Pending)
3040 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3045 /// Sets the relative to parent size factor of the view.<br />
3046 /// This factor is only used when ResizePolicy is set to either:
3047 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br />
3048 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br />
3050 /// <pre>The view has been initialized.</pre>
3051 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis.</param>
3052 /// <since_tizen> 3 </since_tizen>
3053 public void SetSizeModeFactor(Vector3 factor)
3055 NDalicPINVOKE.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
3056 if (NDalicPINVOKE.SWIGPendingException.Pending)
3057 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3060 internal Vector3 GetSizeModeFactor()
3062 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetSizeModeFactor(swigCPtr), true);
3063 if (NDalicPINVOKE.SWIGPendingException.Pending)
3064 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3069 /// Calculates the height of the view given a width.<br />
3070 /// The natural size is used for default calculation.<br />
3071 /// Size 0 is treated as aspect ratio 1:1.<br />
3073 /// <param name="width">The width to use.</param>
3074 /// <returns>The height based on the width.</returns>
3075 /// <since_tizen> 3 </since_tizen>
3076 public float GetHeightForWidth(float width)
3078 float ret = NDalicPINVOKE.Actor_GetHeightForWidth(swigCPtr, width);
3079 if (NDalicPINVOKE.SWIGPendingException.Pending)
3080 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3085 /// Calculates the width of the view given a height.<br />
3086 /// The natural size is used for default calculation.<br />
3087 /// Size 0 is treated as aspect ratio 1:1.<br />
3089 /// <param name="height">The height to use.</param>
3090 /// <returns>The width based on the height.</returns>
3091 /// <since_tizen> 3 </since_tizen>
3092 public float GetWidthForHeight(float height)
3094 float ret = NDalicPINVOKE.Actor_GetWidthForHeight(swigCPtr, height);
3095 if (NDalicPINVOKE.SWIGPendingException.Pending)
3096 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3101 /// Return the amount of size allocated for relayout.
3103 /// <param name="dimension">The dimension to retrieve.</param>
3104 /// <returns>Return the size.</returns>
3105 /// <since_tizen> 3 </since_tizen>
3106 public float GetRelayoutSize(DimensionType dimension)
3108 float ret = NDalicPINVOKE.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
3109 if (NDalicPINVOKE.SWIGPendingException.Pending)
3110 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3115 /// Set the padding for the view.
3117 /// <param name="padding">Padding for the view.</param>
3118 /// <since_tizen> 3 </since_tizen>
3119 public void SetPadding(PaddingType padding)
3121 NDalicPINVOKE.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
3122 if (NDalicPINVOKE.SWIGPendingException.Pending)
3123 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3127 /// Return the value of padding for the view.
3129 /// <param name="paddingOut">the value of padding for the view</param>
3130 /// <since_tizen> 3 </since_tizen>
3131 public void GetPadding(PaddingType paddingOut)
3133 NDalicPINVOKE.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
3134 if (NDalicPINVOKE.SWIGPendingException.Pending)
3135 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3138 internal void SetMinimumSize(Vector2 size)
3140 NDalicPINVOKE.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
3141 if (NDalicPINVOKE.SWIGPendingException.Pending)
3142 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3145 internal Vector2 GetMinimumSize()
3147 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMinimumSize(swigCPtr), true);
3148 if (NDalicPINVOKE.SWIGPendingException.Pending)
3149 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3153 internal void SetMaximumSize(Vector2 size)
3155 NDalicPINVOKE.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
3156 if (NDalicPINVOKE.SWIGPendingException.Pending)
3157 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3160 internal Vector2 GetMaximumSize()
3162 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMaximumSize(swigCPtr), true);
3163 if (NDalicPINVOKE.SWIGPendingException.Pending)
3164 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3168 internal int GetHierarchyDepth()
3170 int ret = NDalicPINVOKE.Actor_GetHierarchyDepth(swigCPtr);
3171 if (NDalicPINVOKE.SWIGPendingException.Pending)
3172 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3176 /// <since_tizen> 3 </since_tizen>
3177 public uint AddRenderer(Renderer renderer)
3179 uint ret = NDalicPINVOKE.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
3180 if (NDalicPINVOKE.SWIGPendingException.Pending)
3181 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3185 internal uint GetRendererCount()
3187 uint ret = NDalicPINVOKE.Actor_GetRendererCount(swigCPtr);
3188 if (NDalicPINVOKE.SWIGPendingException.Pending)
3189 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3193 /// <since_tizen> 3 </since_tizen>
3194 public Renderer GetRendererAt(uint index)
3196 IntPtr cPtr = NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index);
3197 Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Renderer;
3199 if (NDalicPINVOKE.SWIGPendingException.Pending)
3200 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3204 /// <since_tizen> 3 </since_tizen>
3205 public void RemoveRenderer(Renderer renderer)
3207 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
3208 if (NDalicPINVOKE.SWIGPendingException.Pending)
3209 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3212 /// <since_tizen> 3 </since_tizen>
3213 public void RemoveRenderer(uint index)
3215 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
3216 if (NDalicPINVOKE.SWIGPendingException.Pending)
3217 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3220 internal TouchDataSignal TouchSignal()
3222 TouchDataSignal ret = new TouchDataSignal(NDalicPINVOKE.Actor_TouchSignal(swigCPtr), false);
3223 if (NDalicPINVOKE.SWIGPendingException.Pending)
3224 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3228 internal HoverSignal HoveredSignal()
3230 HoverSignal ret = new HoverSignal(NDalicPINVOKE.Actor_HoveredSignal(swigCPtr), false);
3231 if (NDalicPINVOKE.SWIGPendingException.Pending)
3232 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3236 internal WheelSignal WheelEventSignal()
3238 WheelSignal ret = new WheelSignal(NDalicPINVOKE.Actor_WheelEventSignal(swigCPtr), false);
3239 if (NDalicPINVOKE.SWIGPendingException.Pending)
3240 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3244 internal ViewSignal OnWindowSignal()
3246 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnStageSignal(swigCPtr), false);
3247 if (NDalicPINVOKE.SWIGPendingException.Pending)
3248 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3252 internal ViewSignal OffWindowSignal()
3254 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OffStageSignal(swigCPtr), false);
3255 if (NDalicPINVOKE.SWIGPendingException.Pending)
3256 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3260 internal ViewSignal OnRelayoutSignal()
3262 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnRelayoutSignal(swigCPtr), false);
3263 if (NDalicPINVOKE.SWIGPendingException.Pending)
3264 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3268 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view) {
3269 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
3270 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3275 internal ViewLayoutDirectionChangedSignal LayoutDirectionChangedSignal(View view) {
3276 ViewLayoutDirectionChangedSignal ret = new ViewLayoutDirectionChangedSignal(NDalicManualPINVOKE.LayoutDirectionChangedSignal(View.getCPtr(view)), false);
3277 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3282 internal ViewSignal ResourcesLoadedSignal()
3284 ViewSignal ret = new ViewSignal(NDalicPINVOKE.ResourceReadySignal(swigCPtr), false);
3285 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3290 /// Gets or sets the origin of a view within its parent's area.<br />
3291 /// 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 />
3292 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br />
3293 /// A view's position is the distance between this origin and the view's anchor-point.<br />
3295 /// <pre>The view has been initialized.</pre>
3296 /// <since_tizen> 3 </since_tizen>
3297 public Position ParentOrigin
3301 Position temp = new Position(0.0f, 0.0f, 0.0f);
3302 GetProperty(View.Property.PARENT_ORIGIN).Get(temp);
3307 SetProperty(View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue(value));
3311 internal float ParentOriginX
3316 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
3321 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
3325 internal float ParentOriginY
3330 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
3335 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
3339 internal float ParentOriginZ
3344 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
3349 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
3354 /// Gets or sets the anchor-point of a view.<br />
3355 /// 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 />
3356 /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br />
3357 /// A view position is the distance between its parent-origin and this anchor-point.<br />
3358 /// A view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br />
3359 /// <pre>The view has been initialized.</pre>
3361 /// <since_tizen> 3 </since_tizen>
3362 public Position PivotPoint
3366 Position temp = new Position(0.0f, 0.0f, 0.0f);
3367 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
3372 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3376 internal float PivotPointX
3381 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
3386 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
3390 internal float PivotPointY
3395 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
3400 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
3404 internal float PivotPointZ
3409 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
3414 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
3419 /// Gets or sets the size width of the view.
3421 /// <since_tizen> 3 </since_tizen>
3422 public float SizeWidth
3427 GetProperty(View.Property.SIZE_WIDTH).Get(out temp);
3432 SetProperty(View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue(value));
3437 /// Gets or sets the size height of the view.
3439 /// <since_tizen> 3 </since_tizen>
3440 public float SizeHeight
3445 GetProperty(View.Property.SIZE_HEIGHT).Get(out temp);
3450 SetProperty(View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue(value));
3455 /// Gets or sets the position of the view.<br />
3456 /// By default, sets the position vector between the parent origin and pivot point (default).<br />
3457 /// If the position inheritance is disabled, sets the world position.<br />
3459 /// <since_tizen> 3 </since_tizen>
3460 public Position Position
3464 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3465 GetProperty(View.Property.POSITION).Get(temp);
3470 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(value));
3475 /// Gets or sets the position X of the view.
3477 /// <since_tizen> 3 </since_tizen>
3478 public float PositionX
3483 GetProperty(View.Property.POSITION_X).Get(out temp);
3488 SetProperty(View.Property.POSITION_X, new Tizen.NUI.PropertyValue(value));
3493 /// Gets or sets the position Y of the view.
3495 /// <since_tizen> 3 </since_tizen>
3496 public float PositionY
3501 GetProperty(View.Property.POSITION_Y).Get(out temp);
3506 SetProperty(View.Property.POSITION_Y, new Tizen.NUI.PropertyValue(value));
3511 /// Gets or sets the position Z of the view.
3513 /// <since_tizen> 3 </since_tizen>
3514 public float PositionZ
3519 GetProperty(View.Property.POSITION_Z).Get(out temp);
3524 SetProperty(View.Property.POSITION_Z, new Tizen.NUI.PropertyValue(value));
3529 /// Gets or sets the world position of the view.
3531 /// <since_tizen> 3 </since_tizen>
3532 public Vector3 WorldPosition
3536 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3537 GetProperty(View.Property.WORLD_POSITION).Get(temp);
3542 internal float WorldPositionX
3547 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
3552 internal float WorldPositionY
3557 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
3562 internal float WorldPositionZ
3567 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
3573 /// Gets or sets the orientation of the view.<br />
3574 /// The view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br />
3576 /// <remarks>This is an asynchronous method.</remarks>
3577 /// <since_tizen> 3 </since_tizen>
3578 public Rotation Orientation
3582 Rotation temp = new Rotation();
3583 GetProperty(View.Property.ORIENTATION).Get(temp);
3588 SetProperty(View.Property.ORIENTATION, new Tizen.NUI.PropertyValue(value));
3593 /// Gets or sets the world orientation of the view.<br />
3595 /// <since_tizen> 3 </since_tizen>
3596 public Rotation WorldOrientation
3600 Rotation temp = new Rotation();
3601 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
3607 /// Gets or sets the scale factor applied to the view.<br />
3609 /// <since_tizen> 3 </since_tizen>
3610 public Vector3 Scale
3614 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3615 GetProperty(View.Property.SCALE).Get(temp);
3620 SetProperty(View.Property.SCALE, new Tizen.NUI.PropertyValue(value));
3625 /// Gets or sets the scale X factor applied to the view.
3627 /// <since_tizen> 3 </since_tizen>
3633 GetProperty(View.Property.SCALE_X).Get(out temp);
3638 SetProperty(View.Property.SCALE_X, new Tizen.NUI.PropertyValue(value));
3643 /// Gets or sets the scale Y factor applied to the view.
3645 /// <since_tizen> 3 </since_tizen>
3651 GetProperty(View.Property.SCALE_Y).Get(out temp);
3656 SetProperty(View.Property.SCALE_Y, new Tizen.NUI.PropertyValue(value));
3661 /// Gets or sets the scale Z factor applied to the view.
3663 /// <since_tizen> 3 </since_tizen>
3669 GetProperty(View.Property.SCALE_Z).Get(out temp);
3674 SetProperty(View.Property.SCALE_Z, new Tizen.NUI.PropertyValue(value));
3679 /// Gets the world scale of the view.
3681 /// <since_tizen> 3 </since_tizen>
3682 public Vector3 WorldScale
3686 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3687 GetProperty(View.Property.WORLD_SCALE).Get(temp);
3693 /// Retrieves the visibility flag of the view.
3696 /// If the view is not visible, then the view and its children will not be rendered.
3697 /// 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.
3699 /// <since_tizen> 3 </since_tizen>
3700 public bool Visibility
3705 GetProperty(View.Property.VISIBLE).Get(out temp);
3711 /// Gets the view's world color.
3713 /// <since_tizen> 3 </since_tizen>
3714 public Vector4 WorldColor
3718 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3719 GetProperty(View.Property.WORLD_COLOR).Get(temp);
3724 internal Matrix WorldMatrix
3728 Matrix temp = new Matrix();
3729 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
3735 /// Gets or sets the view's name.
3737 /// <since_tizen> 3 </since_tizen>
3743 GetProperty(View.Property.NAME).Get(out temp);
3748 SetProperty(View.Property.NAME, new Tizen.NUI.PropertyValue(value));
3753 /// Get the number of children held by the view.
3755 /// <since_tizen> 3 </since_tizen>
3756 public new uint ChildCount
3760 return GetChildCount();
3765 /// Gets the view's ID.
3768 /// <since_tizen> 3 </since_tizen>
3778 /// Gets or sets the status of whether the view should emit touch or hover signals.
3780 /// <since_tizen> 3 </since_tizen>
3781 public bool Sensitive
3786 GetProperty(View.Property.SENSITIVE).Get(out temp);
3791 SetProperty(View.Property.SENSITIVE, new Tizen.NUI.PropertyValue(value));
3796 /// 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.
3798 /// <since_tizen> 3 </since_tizen>
3799 public bool LeaveRequired
3804 GetProperty(View.Property.LEAVE_REQUIRED).Get(out temp);
3809 SetProperty(View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue(value));
3814 /// Gets or sets the status of whether a child view inherits it's parent's orientation.
3816 /// <since_tizen> 3 </since_tizen>
3817 public bool InheritOrientation
3822 GetProperty(View.Property.INHERIT_ORIENTATION).Get(out temp);
3827 SetProperty(View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue(value));
3832 /// Gets or sets the status of whether a child view inherits it's parent's scale.
3834 /// <since_tizen> 3 </since_tizen>
3835 public bool InheritScale
3840 GetProperty(View.Property.INHERIT_SCALE).Get(out temp);
3845 SetProperty(View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue(value));
3850 /// Gets or sets the status of how the view and its children should be drawn.<br />
3851 /// Not all views are renderable, but DrawMode can be inherited from any view.<br />
3852 /// 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 />
3853 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br />
3854 /// Overlay views are drawn in a separate pass, after all non-overlay views within the layer.<br />
3855 /// For overlay views, the drawing order is with respect to tree levels of views, and depth-testing will not be used.<br />
3857 /// <since_tizen> 3 </since_tizen>
3858 public DrawModeType DrawMode
3863 if (GetProperty(View.Property.DRAW_MODE).Get(out temp) == false)
3865 NUILog.Error("DrawMode get error!");
3870 return DrawModeType.Normal;
3872 return DrawModeType.Overlay2D;
3874 return DrawModeType.Stencil;
3876 return DrawModeType.Normal;
3881 SetProperty(View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)value));
3886 /// Gets or sets the relative to parent size factor of the view.<br />
3887 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br />
3888 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br />
3890 /// <since_tizen> 3 </since_tizen>
3891 public Vector3 SizeModeFactor
3895 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3896 GetProperty(View.Property.SIZE_MODE_FACTOR).Get(temp);
3901 SetProperty(View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue(value));
3906 /// Gets or sets the width resize policy to be used.
3908 /// <since_tizen> 3 </since_tizen>
3909 public ResizePolicyType WidthResizePolicy
3914 if (GetProperty(View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
3916 NUILog.Error("WidthResizePolicy get error!");
3921 return ResizePolicyType.Fixed;
3922 case "USE_NATURAL_SIZE":
3923 return ResizePolicyType.UseNaturalSize;
3924 case "FILL_TO_PARENT":
3925 return ResizePolicyType.FillToParent;
3926 case "SIZE_RELATIVE_TO_PARENT":
3927 return ResizePolicyType.SizeRelativeToParent;
3928 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3929 return ResizePolicyType.SizeFixedOffsetFromParent;
3930 case "FIT_TO_CHILDREN":
3931 return ResizePolicyType.FitToChildren;
3932 case "DIMENSION_DEPENDENCY":
3933 return ResizePolicyType.DimensionDependency;
3934 case "USE_ASSIGNED_SIZE":
3935 return ResizePolicyType.UseAssignedSize;
3937 return ResizePolicyType.Fixed;
3942 SetProperty(View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3947 /// Gets or sets the height resize policy to be used.
3949 /// <since_tizen> 3 </since_tizen>
3950 public ResizePolicyType HeightResizePolicy
3955 if (GetProperty(View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
3957 NUILog.Error("HeightResizePolicy get error!");
3962 return ResizePolicyType.Fixed;
3963 case "USE_NATURAL_SIZE":
3964 return ResizePolicyType.UseNaturalSize;
3965 case "FILL_TO_PARENT":
3966 return ResizePolicyType.FillToParent;
3967 case "SIZE_RELATIVE_TO_PARENT":
3968 return ResizePolicyType.SizeRelativeToParent;
3969 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3970 return ResizePolicyType.SizeFixedOffsetFromParent;
3971 case "FIT_TO_CHILDREN":
3972 return ResizePolicyType.FitToChildren;
3973 case "DIMENSION_DEPENDENCY":
3974 return ResizePolicyType.DimensionDependency;
3975 case "USE_ASSIGNED_SIZE":
3976 return ResizePolicyType.UseAssignedSize;
3978 return ResizePolicyType.Fixed;
3983 SetProperty(View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3988 /// Gets or sets the policy to use when setting size with size negotiation.<br />
3989 /// Defaults to SizeScalePolicyType.UseSizeSet.<br />
3991 /// <since_tizen> 3 </since_tizen>
3992 public SizeScalePolicyType SizeScalePolicy
3997 if (GetProperty(View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
3999 NUILog.Error("SizeScalePolicy get error!");
4003 case "USE_SIZE_SET":
4004 return SizeScalePolicyType.UseSizeSet;
4005 case "FIT_WITH_ASPECT_RATIO":
4006 return SizeScalePolicyType.FitWithAspectRatio;
4007 case "FILL_WITH_ASPECT_RATIO":
4008 return SizeScalePolicyType.FillWithAspectRatio;
4010 return SizeScalePolicyType.UseSizeSet;
4015 string valueToString = "";
4018 case SizeScalePolicyType.UseSizeSet:
4020 valueToString = "USE_SIZE_SET";
4023 case SizeScalePolicyType.FitWithAspectRatio:
4025 valueToString = "FIT_WITH_ASPECT_RATIO";
4028 case SizeScalePolicyType.FillWithAspectRatio:
4030 valueToString = "FILL_WITH_ASPECT_RATIO";
4035 valueToString = "USE_SIZE_SET";
4039 SetProperty(View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
4044 /// Gets or sets the status of whether the width size is dependent on the height size.
4046 /// <since_tizen> 3 </since_tizen>
4047 public bool WidthForHeight
4052 GetProperty(View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
4057 SetProperty(View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue(value));
4062 /// Gets or sets the status of whether the height size is dependent on the width size.
4064 /// <since_tizen> 3 </since_tizen>
4065 public bool HeightForWidth
4070 GetProperty(View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
4075 SetProperty(View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue(value));
4080 /// Gets or sets the padding for use in layout.
4082 /// <since_tizen> 5 </since_tizen>
4083 public Extents Padding
4087 Extents temp = new Extents(0, 0, 0, 0);
4088 GetProperty(View.Property.PADDING).Get(temp);
4093 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
4098 /// Gets or sets the minimum size the view can be assigned in size negotiation.
4100 /// <since_tizen> 3 </since_tizen>
4101 public Size2D MinimumSize
4105 Size2D temp = new Size2D(0, 0);
4106 GetProperty(View.Property.MINIMUM_SIZE).Get(temp);
4111 SetProperty(View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
4116 /// Gets or sets the maximum size the view can be assigned in size negotiation.
4118 /// <since_tizen> 3 </since_tizen>
4119 public Size2D MaximumSize
4123 Size2D temp = new Size2D(0, 0);
4124 GetProperty(View.Property.MAXIMUM_SIZE).Get(temp);
4129 SetProperty(View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
4134 /// Gets or sets whether a child view inherits it's parent's position.<br />
4135 /// Default is to inherit.<br />
4136 /// 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 />
4138 /// <since_tizen> 3 </since_tizen>
4139 public bool InheritPosition
4144 GetProperty(View.Property.INHERIT_POSITION).Get(out temp);
4149 SetProperty(View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue(value));
4154 /// Gets or sets the clipping behavior (mode) of it's children.
4156 /// <since_tizen> 3 </since_tizen>
4157 public ClippingModeType ClippingMode
4162 if (GetProperty(View.Property.CLIPPING_MODE).Get(out temp) == false)
4164 NUILog.Error("ClippingMode get error!");
4169 return ClippingModeType.Disabled;
4170 case "CLIP_CHILDREN":
4171 return ClippingModeType.ClipChildren;
4172 case "CLIP_TO_BOUNDING_BOX":
4173 return ClippingModeType.ClipToBoundingBox;
4175 return ClippingModeType.Disabled;
4180 SetProperty(View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)value));
4185 /// Gets the number of renderers held by the view.
4187 /// <since_tizen> 3 </since_tizen>
4188 public uint RendererCount
4192 return GetRendererCount();
4199 /// [Obsolete("Please do not use! this will be deprecated")]
4201 /// <since_tizen> 3 </since_tizen>
4202 /// Please do not use! this will be deprecated!
4203 /// Instead please use TouchEvent.
4204 [Obsolete("Please do not use! This will be deprecated! Please use TouchEvent instead!")]
4205 [EditorBrowsable(EditorBrowsableState.Never)]
4206 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> Touched
4210 if (_touchDataEventHandler == null)
4212 _touchDataCallback = OnTouch;
4213 this.TouchSignal().Connect(_touchDataCallback);
4216 _touchDataEventHandler += value;
4221 _touchDataEventHandler -= value;
4223 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
4225 this.TouchSignal().Disconnect(_touchDataCallback);
4232 /// [Obsolete("Please do not use! this will be deprecated")]
4234 /// <since_tizen> 3 </since_tizen>
4235 /// Please do not use! this will be deprecated!
4236 /// Instead please use HoverEvent.
4237 [Obsolete("Please do not use! This will be deprecated! Please use HoverEvent instead!")]
4238 [EditorBrowsable(EditorBrowsableState.Never)]
4239 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> Hovered
4243 if (_hoverEventHandler == null)
4245 _hoverEventCallback = OnHoverEvent;
4246 this.HoveredSignal().Connect(_hoverEventCallback);
4249 _hoverEventHandler += value;
4254 _hoverEventHandler -= value;
4256 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
4258 this.HoveredSignal().Disconnect(_hoverEventCallback);
4265 /// Please do not use! this will be deprecated.
4267 /// <since_tizen> 3 </since_tizen>
4268 /// Please do not use! this will be deprecated!
4269 /// Instead please use WheelEvent.
4270 [Obsolete("Please do not use! This will be deprecated! Please use WheelEvent instead!")]
4271 [EditorBrowsable(EditorBrowsableState.Never)]
4272 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelMoved
4276 if (_wheelEventHandler == null)
4278 _wheelEventCallback = OnWheelEvent;
4279 this.WheelEventSignal().Connect(_wheelEventCallback);
4282 _wheelEventHandler += value;
4287 _wheelEventHandler -= value;
4289 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
4291 this.WheelEventSignal().Disconnect(_wheelEventCallback);
4298 /// [Obsolete("Please do not use! this will be deprecated")]
4300 /// <since_tizen> 3 </since_tizen>
4301 /// Please do not use! this will be deprecated!
4302 /// Instead please use PivotPoint.
4303 [Obsolete("Please do not use! This will be deprecated! Please use PivotPoint instead! " +
4305 "View view = new View(); " +
4306 "view.PivotPoint = PivotPoint.Center; " +
4307 "view.PositionUsesPivotPoint = true;")]
4308 [EditorBrowsable(EditorBrowsableState.Never)]
4309 public Position AnchorPoint
4313 Position temp = new Position(0.0f, 0.0f, 0.0f);
4314 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
4319 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
4324 /// [Obsolete("Please do not use! this will be deprecated")]
4326 /// <since_tizen> 3 </since_tizen>
4327 [Obsolete("Please do not use! This will be deprecated! Please use Size2D instead! " +
4329 "View view = new View(); " +
4330 "view.Size2D = new Size2D(100, 100);")]
4331 [EditorBrowsable(EditorBrowsableState.Never)]
4336 Size temp = new Size(0.0f, 0.0f, 0.0f);
4337 GetProperty(View.Property.SIZE).Get(temp);
4342 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(value));
4347 /// [Obsolete("Please do not use! this will be deprecated")]
4349 /// <since_tizen> 3 </since_tizen>
4350 /// Please do not use! this will be deprecated!
4351 /// Instead please use AddedToWindow.
4352 [Obsolete("Please do not use! This will be deprecated! Please use AddedToWindow instead!")]
4353 [EditorBrowsable(EditorBrowsableState.Never)]
4354 public event EventHandler OnWindowEvent
4358 if (_onWindowEventHandler == null)
4360 _onWindowEventCallback = OnWindow;
4361 this.OnWindowSignal().Connect(_onWindowEventCallback);
4364 _onWindowEventHandler += value;
4369 _onWindowEventHandler -= value;
4371 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
4373 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
4379 /// [Obsolete("Please do not use! this will be deprecated")]
4381 /// <since_tizen> 3 </since_tizen>
4382 /// Please do not use! this will be deprecated!
4383 /// Instead please use RemovedFromWindow.
4384 [Obsolete("Please do not use! This will be deprecated! Please use RemovedFromWindow instead!")]
4385 [EditorBrowsable(EditorBrowsableState.Never)]
4386 public event EventHandler OffWindowEvent
4390 if (_offWindowEventHandler == null)
4392 _offWindowEventCallback = OffWindow;
4393 this.OffWindowSignal().Connect(_offWindowEventCallback);
4396 _offWindowEventHandler += value;
4401 _offWindowEventHandler -= value;
4403 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
4405 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
4411 /// [Obsolete("Please do not use! this will be deprecated")]
4413 /// <since_tizen> 3 </since_tizen>
4414 /// Please do not use! this will be deprecated!
4415 /// Instead please use Relayout.
4416 [Obsolete("Please do not use! This will be deprecated! Please use Relayout instead!")]
4417 [EditorBrowsable(EditorBrowsableState.Never)]
4418 public event EventHandler OnRelayoutEvent
4422 if (_onRelayoutEventHandler == null)
4424 _onRelayoutEventCallback = OnRelayout;
4425 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
4428 _onRelayoutEventHandler += value;
4433 _onRelayoutEventHandler -= value;
4435 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
4437 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
4444 /// "Please DO NOT use! This will be deprecated! Please use 'Container GetParent() for derived class' instead!"
4446 /// <since_tizen> 3 </since_tizen>
4447 [Obsolete("Please do not use! This will be deprecated! Please use 'Container GetParent() for derived class' instead! " +
4449 "Container parent = view.GetParent(); " +
4450 "View view = parent as View;")]
4451 [EditorBrowsable(EditorBrowsableState.Never)]
4452 public new View Parent
4457 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
4459 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(cPtr);
4461 if (basehandle is Layer)
4463 ret = new View(cPtr, false);
4467 ret = basehandle as View;
4470 if (NDalicPINVOKE.SWIGPendingException.Pending)
4471 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4477 /// Gets/Sets whether inherit parent's the layout Direction.
4479 /// <since_tizen> 4 </since_tizen>
4480 public bool InheritLayoutDirection
4485 GetProperty(View.Property.INHERIT_LAYOUT_DIRECTION).Get(out temp);
4490 SetProperty(View.Property.INHERIT_LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue(value));
4495 /// Gets/Sets the layout Direction.
4497 /// <since_tizen> 4 </since_tizen>
4498 public ViewLayoutDirectionType LayoutDirection
4503 if (GetProperty(View.Property.LAYOUT_DIRECTION).Get(out temp) == false)
4505 NUILog.Error("LAYOUT_DIRECTION get error!");
4507 return (ViewLayoutDirectionType)temp;
4511 SetProperty(View.Property.LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((int)value));
4516 /// Gets or sets the Margin for use in layout.
4518 /// <since_tizen> 4 </since_tizen>
4519 public Extents Margin
4523 Extents temp = new Extents(0, 0, 0, 0);
4524 GetProperty(View.Property.MARGIN).Get(temp);
4529 SetProperty(View.Property.MARGIN, new Tizen.NUI.PropertyValue(value));
4534 /// [Obsolete("Please do not use! this will be deprecated")]
4536 /// Please do not use! this will be deprecated!
4537 /// Instead please use Padding.
4538 /// <since_tizen> 4 </since_tizen>
4539 [Obsolete("Please do not use! this will be deprecated, instead please use Padding.")]
4540 [EditorBrowsable(EditorBrowsableState.Never)]
4541 public Extents PaddingEX
4545 Extents temp = new Extents(0, 0, 0, 0);
4546 GetProperty(View.Property.PADDING).Get(temp);
4551 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
4557 /// The View layout Direction type.
4559 /// <since_tizen> 4 </since_tizen>
4560 public enum ViewLayoutDirectionType
4565 /// <since_tizen> 4 </since_tizen>
4570 /// <since_tizen> 4 </since_tizen>