1 /** Copyright (c) 2017 Samsung Electronics Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
17 namespace Tizen.NUI.BaseComponents
21 using System.Runtime.InteropServices;
24 /// View is the base class for all views.
26 public class View : Container
28 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
31 internal View(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.View_SWIGUpcast(cPtr), cMemoryOwn)
33 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
34 PositionUsesPivotPoint = false;
37 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
39 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
42 // From Container Base class
45 /// Adds a child view to this view.
47 /// <seealso cref="Container::Add()">
49 public override void Add(View child)
51 NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
52 if (NDalicPINVOKE.SWIGPendingException.Pending)
53 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
59 /// Removes a child view from this View. If the view was not a child of this view, this is a no-op.
61 /// <seealso cref="Container::Remove()">
63 public override void Remove(View child)
65 NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
66 if (NDalicPINVOKE.SWIGPendingException.Pending)
67 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
69 Children.Remove(child);
73 /// Retrieves a child view by index.
75 /// <seealso cref="Container::GetChildAt()">
77 public override View GetChildAt(uint index)
79 if (index < Children.Count)
81 return Children[Convert.ToInt32(index)];
90 /// Retrieves the number of children held by the view.
92 /// <seealso cref="Container::GetChildCount()">
94 protected override uint GetChildCount()
96 return Convert.ToUInt32(Children.Count);
100 /// Gets the views parent.
102 /// <seealso cref="Container::GetParent()">
103 protected override Container GetParent()
105 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
107 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(cPtr);
109 if (NDalicPINVOKE.SWIGPendingException.Pending)
110 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
112 return basehandle as Container;
115 [Obsolete("This is temporal API. Currently Parent returns View but Container class has been introduced so 'View Parent' will be changed 'Container Parent' later soon, then this will be removed")]
116 public Container GetContainerParent()
118 return this.GetParent();
121 internal bool IsTopLevelView()
123 if(GetContainerParent() is Layer)
130 // you can override it to clean-up your own resources.
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);
163 // Dispose all Children of this View.
164 foreach (View childView in Children)
166 childView?.Dispose();
171 private void DisConnectFromSignals()
173 // Save current CPtr.
174 global::System.Runtime.InteropServices.HandleRef currentCPtr = swigCPtr;
176 // Use BaseHandle CPtr as current might have been deleted already in derived classes.
177 swigCPtr = GetBaseHandleCPtrHandleRef;
179 if (_onRelayoutEventCallback != null)
181 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
184 if (_offWindowEventCallback != null)
186 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
189 if (_onWindowEventCallback != null)
191 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
194 if (_wheelEventCallback != null)
196 this.WheelEventSignal().Disconnect(_wheelEventCallback);
199 if (_hoverEventCallback != null)
201 this.HoveredSignal().Disconnect(_hoverEventCallback);
204 if (_touchDataCallback != null)
206 this.TouchSignal().Disconnect(_touchDataCallback);
209 if (_ResourcesLoadedCallback != null)
211 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
214 if (_offWindowEventCallback != null)
216 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
219 if (_onWindowEventCallback != null)
221 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
224 if (_wheelEventCallback != null)
226 this.WheelEventSignal().Disconnect(_wheelEventCallback);
229 if (_hoverEventCallback != null)
231 this.HoveredSignal().Disconnect(_hoverEventCallback);
234 if (_touchDataCallback != null)
236 this.TouchSignal().Disconnect(_touchDataCallback);
239 if (_onRelayoutEventCallback != null)
241 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
244 if (_keyCallback != null)
246 this.KeyEventSignal().Disconnect(_keyCallback);
249 if (_keyInputFocusLostCallback != null)
251 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
254 if (_keyInputFocusGainedCallback != null)
256 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
259 // BaseHandle CPtr is used in Registry and there is danger of deletion if we keep using it here.
260 // Restore current CPtr.
261 swigCPtr = currentCPtr;
264 private EventHandler _keyInputFocusGainedEventHandler;
265 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
266 private delegate void KeyInputFocusGainedCallbackType(IntPtr control);
267 private KeyInputFocusGainedCallbackType _keyInputFocusGainedCallback;
270 /// An event for the KeyInputFocusGained signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br>
271 /// The KeyInputFocusGained signal is emitted when the control gets the key input focus.<br>
273 public event EventHandler FocusGained
277 if (_keyInputFocusGainedEventHandler == null)
279 _keyInputFocusGainedCallback = OnKeyInputFocusGained;
280 this.KeyInputFocusGainedSignal().Connect(_keyInputFocusGainedCallback);
283 _keyInputFocusGainedEventHandler += value;
288 _keyInputFocusGainedEventHandler -= value;
290 if (_keyInputFocusGainedEventHandler == null && KeyInputFocusGainedSignal().Empty() == false)
292 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
297 private void OnKeyInputFocusGained(IntPtr view)
299 if (_keyInputFocusGainedEventHandler != null)
301 _keyInputFocusGainedEventHandler(this, null);
306 private EventHandler _keyInputFocusLostEventHandler;
307 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
308 private delegate void KeyInputFocusLostCallbackType(IntPtr control);
309 private KeyInputFocusLostCallbackType _keyInputFocusLostCallback;
312 /// An event for the KeyInputFocusLost signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br>
313 /// The KeyInputFocusLost signal is emitted when the control loses the key input focus.<br>
315 public event EventHandler FocusLost
319 if (_keyInputFocusLostEventHandler == null)
321 _keyInputFocusLostCallback = OnKeyInputFocusLost;
322 this.KeyInputFocusLostSignal().Connect(_keyInputFocusLostCallback);
325 _keyInputFocusLostEventHandler += value;
330 _keyInputFocusLostEventHandler -= value;
332 if (_keyInputFocusLostEventHandler == null && KeyInputFocusLostSignal().Empty() == false)
334 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
339 private void OnKeyInputFocusLost(IntPtr view)
341 if (_keyInputFocusLostEventHandler != null)
343 _keyInputFocusLostEventHandler(this, null);
348 /// Event arguments that passed via the KeyEvent signal.
350 public class KeyEventArgs : EventArgs
355 /// Key - is the key sent to the view.
370 private EventHandlerWithReturnType<object, KeyEventArgs, bool> _keyEventHandler;
371 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
372 private delegate bool KeyCallbackType(IntPtr control, IntPtr keyEvent);
373 private KeyCallbackType _keyCallback;
376 /// An event for the KeyPressed signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br>
377 /// The KeyPressed signal is emitted when the key event is received.<br>
379 public event EventHandlerWithReturnType<object, KeyEventArgs, bool> KeyEvent
383 if (_keyEventHandler == null)
385 _keyCallback = OnKeyEvent;
386 this.KeyEventSignal().Connect(_keyCallback);
389 _keyEventHandler += value;
394 _keyEventHandler -= value;
396 if (_keyEventHandler == null && KeyEventSignal().Empty() == false)
398 this.KeyEventSignal().Disconnect(_keyCallback);
403 private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
405 KeyEventArgs e = new KeyEventArgs();
409 e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
411 if (_keyEventHandler != null)
413 Delegate[] delegateList = _keyEventHandler.GetInvocationList();
415 // Oring the result of each callback.
416 foreach ( EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList )
418 result |= del( this, e );
425 private EventHandler _onRelayoutEventHandler;
426 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
427 private delegate void OnRelayoutEventCallbackType(IntPtr control);
428 private OnRelayoutEventCallbackType _onRelayoutEventCallback;
431 /// An event for the OnRelayout signal which can be used to subscribe or unsubscribe the event handler.<br>
432 /// The OnRelayout signal is emitted after the size has been set on the view during relayout.<br>
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 public class TouchEventArgs : EventArgs
473 private Touch _touch;
476 /// Touch - contains the information of touch points.
491 private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
492 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
493 private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
494 private TouchDataCallbackType _touchDataCallback;
497 /// An event for the touched signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br>
498 /// The touched signal is emitted when the touch input is received.<br>
500 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
504 if (_touchDataEventHandler == null)
506 _touchDataCallback = OnTouch;
507 this.TouchSignal().Connect(_touchDataCallback);
510 _touchDataEventHandler += value;
515 _touchDataEventHandler -= value;
517 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
519 this.TouchSignal().Disconnect(_touchDataCallback);
525 // Callback for View TouchSignal
526 private bool OnTouch(IntPtr view, IntPtr touchData)
528 TouchEventArgs e = new TouchEventArgs();
530 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
532 if (_touchDataEventHandler != null)
534 return _touchDataEventHandler(this, e);
541 /// Event arguments that passed via the hover signal.
543 public class HoverEventArgs : EventArgs
545 private Hover _hover;
548 /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
563 private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
564 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
565 private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
566 private HoverEventCallbackType _hoverEventCallback;
569 /// An event for the hovered signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br>
570 /// The hovered signal is emitted when the hover input is received.<br>
572 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
576 if (_hoverEventHandler == null)
578 _hoverEventCallback = OnHoverEvent;
579 this.HoveredSignal().Connect(_hoverEventCallback);
582 _hoverEventHandler += value;
587 _hoverEventHandler -= value;
589 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
591 this.HoveredSignal().Disconnect(_hoverEventCallback);
597 // Callback for View Hover signal
598 private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
600 HoverEventArgs e = new HoverEventArgs();
602 e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
604 if (_hoverEventHandler != null)
606 return _hoverEventHandler(this, e);
613 /// Event arguments that passed via the wheel signal.
615 public class WheelEventArgs : EventArgs
617 private Wheel _wheel;
620 /// WheelEvent - store a wheel rolling type: MOUSE_WHEEL or CUSTOM_WHEEL.
635 private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
636 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
637 private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
638 private WheelEventCallbackType _wheelEventCallback;
641 /// An event for the WheelMoved signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br>
642 /// The WheelMoved signal is emitted when the wheel event is received.<br>
644 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
648 if (_wheelEventHandler == null)
650 _wheelEventCallback = OnWheelEvent;
651 this.WheelEventSignal().Connect(_wheelEventCallback);
654 _wheelEventHandler += value;
659 _wheelEventHandler -= value;
661 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
663 this.WheelEventSignal().Disconnect(_wheelEventCallback);
669 // Callback for View Wheel signal
670 private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
672 WheelEventArgs e = new WheelEventArgs();
674 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
676 if (_wheelEventHandler != null)
678 return _wheelEventHandler(this, e);
684 private EventHandler _onWindowEventHandler;
685 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
686 private delegate void OnWindowEventCallbackType(IntPtr control);
687 private OnWindowEventCallbackType _onWindowEventCallback;
690 /// An event for the OnWindow signal which can be used to subscribe or unsubscribe the event handler.<br>
691 /// The OnWindow signal is emitted after the view has been connected to the window.<br>
693 public event EventHandler AddedToWindow
697 if (_onWindowEventHandler == null)
699 _onWindowEventCallback = OnWindow;
700 this.OnWindowSignal().Connect(_onWindowEventCallback);
703 _onWindowEventHandler += value;
708 _onWindowEventHandler -= value;
710 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
712 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
717 // Callback for View OnWindow signal
718 private void OnWindow(IntPtr data)
720 if (_onWindowEventHandler != null)
722 _onWindowEventHandler(this, null);
727 private EventHandler _offWindowEventHandler;
728 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
729 private delegate void OffWindowEventCallbackType(IntPtr control);
730 private OffWindowEventCallbackType _offWindowEventCallback;
733 /// An event for the OffWindow signal, which can be used to subscribe or unsubscribe the event handler.<br>
734 /// OffWindow signal is emitted after the view has been disconnected from the window.<br>
736 public event EventHandler RemovedFromWindow
740 if (_offWindowEventHandler == null)
742 _offWindowEventCallback = OffWindow;
743 this.OffWindowSignal().Connect(_offWindowEventCallback);
746 _offWindowEventHandler += value;
751 _offWindowEventHandler -= value;
753 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
755 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
760 // Callback for View OffWindow signal
761 private void OffWindow(IntPtr data)
763 if (_offWindowEventHandler != null)
765 _offWindowEventHandler(this, null);
770 /// Event arguments of visibility changed.
772 public class VisibilityChangedEventArgs : EventArgs
775 private bool _visibility;
776 private VisibilityChangeType _type;
779 /// The view, or child of view, whose visibility has changed.
794 /// Whether the view is now visible or not.
796 public bool Visibility
809 /// Whether the view's visible property has changed or a parent's.
811 public VisibilityChangeType Type
824 private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
825 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
826 private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
827 private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
830 /// An event for visibility change which can be used to subscribe or unsubscribe the event handler.<br>
831 /// This signal is emitted when the visible property of this or a parent view is changed.<br>
833 public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
837 if (_visibilityChangedEventHandler == null)
839 _visibilityChangedEventCallback = OnVisibilityChanged;
840 VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
843 _visibilityChangedEventHandler += value;
848 _visibilityChangedEventHandler -= value;
850 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
852 VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
857 // Callback for View visibility change signal
858 private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
860 VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
863 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
865 e.Visibility = visibility;
868 if (_visibilityChangedEventHandler != null)
870 _visibilityChangedEventHandler(this, e);
876 /// Event arguments of layout direction changed.
878 public class LayoutDirectionChangedEventArgs : EventArgs
881 private ViewLayoutDirectionType _type;
884 /// The view, or child of view, whose layout direction has changed.
899 /// Whether the view's layout direction property has changed or a parent's.
901 public ViewLayoutDirectionType Type
914 private EventHandler<LayoutDirectionChangedEventArgs> _layoutDirectionChangedEventHandler;
915 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
916 private delegate void LayoutDirectionChangedEventCallbackType(IntPtr data, ViewLayoutDirectionType type);
917 private LayoutDirectionChangedEventCallbackType _layoutDirectionChangedEventCallback;
920 /// Event for layout direction change which can be used to subscribe/unsubscribe the event handler.<br>
921 /// This signal is emitted when the layout direction property of this or a parent view is changed.<br>
923 public event EventHandler<LayoutDirectionChangedEventArgs> LayoutDirectionChanged
927 if (_layoutDirectionChangedEventHandler == null)
929 _layoutDirectionChangedEventCallback = OnLayoutDirectionChanged;
930 LayoutDirectionChangedSignal(this).Connect(_layoutDirectionChangedEventCallback);
933 _layoutDirectionChangedEventHandler += value;
938 _layoutDirectionChangedEventHandler -= value;
940 if (_layoutDirectionChangedEventHandler == null && LayoutDirectionChangedSignal(this).Empty() == false)
942 LayoutDirectionChangedSignal(this).Disconnect(_layoutDirectionChangedEventCallback);
947 // Callback for View layout direction change signal
948 private void OnLayoutDirectionChanged(IntPtr data, ViewLayoutDirectionType type)
950 LayoutDirectionChangedEventArgs e = new LayoutDirectionChangedEventArgs();
953 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
957 if (_layoutDirectionChangedEventHandler != null)
959 _layoutDirectionChangedEventHandler(this, e);
969 // Resource Ready Signal
971 private EventHandler _resourcesLoadedEventHandler;
972 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
973 private delegate void ResourcesLoadedCallbackType(IntPtr control);
974 private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
977 /// An event for the ResourcesLoadedSignal signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br>
978 /// This signal is emitted after all resources required by a view are loaded and ready.<br>
980 public event EventHandler ResourcesLoaded
984 if (_resourcesLoadedEventHandler == null)
986 _ResourcesLoadedCallback = OnResourcesLoaded;
987 this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
990 _resourcesLoadedEventHandler += value;
995 _resourcesLoadedEventHandler -= value;
997 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
999 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
1004 private void OnResourcesLoaded(IntPtr view)
1006 if (_resourcesLoadedEventHandler != null)
1008 _resourcesLoadedEventHandler(this, null);
1012 internal IntPtr GetPtrfromView()
1014 return (IntPtr)swigCPtr;
1017 internal class Property
1019 internal static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get();
1020 internal static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get();
1021 internal static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get();
1022 internal static readonly int LEFT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
1023 internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
1024 internal static readonly int UP_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
1025 internal static readonly int DOWN_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
1026 internal static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get();
1027 internal static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get();
1028 internal static readonly int SIBLING_ORDER = NDalicManualPINVOKE.Actor_Property_SIBLING_ORDER_get();
1029 internal static readonly int OPACITY = NDalicManualPINVOKE.Actor_Property_OPACITY_get();
1030 internal static readonly int SCREEN_POSITION = NDalicManualPINVOKE.Actor_Property_SCREEN_POSITION_get();
1031 internal static readonly int POSITION_USES_ANCHOR_POINT = NDalicManualPINVOKE.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
1032 internal static readonly int PARENT_ORIGIN = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_get();
1033 internal static readonly int PARENT_ORIGIN_X = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_X_get();
1034 internal static readonly int PARENT_ORIGIN_Y = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Y_get();
1035 internal static readonly int PARENT_ORIGIN_Z = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Z_get();
1036 internal static readonly int ANCHOR_POINT = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_get();
1037 internal static readonly int ANCHOR_POINT_X = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_X_get();
1038 internal static readonly int ANCHOR_POINT_Y = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Y_get();
1039 internal static readonly int ANCHOR_POINT_Z = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Z_get();
1040 internal static readonly int SIZE = NDalicPINVOKE.Actor_Property_SIZE_get();
1041 internal static readonly int SIZE_WIDTH = NDalicPINVOKE.Actor_Property_SIZE_WIDTH_get();
1042 internal static readonly int SIZE_HEIGHT = NDalicPINVOKE.Actor_Property_SIZE_HEIGHT_get();
1043 internal static readonly int SIZE_DEPTH = NDalicPINVOKE.Actor_Property_SIZE_DEPTH_get();
1044 internal static readonly int POSITION = NDalicPINVOKE.Actor_Property_POSITION_get();
1045 internal static readonly int POSITION_X = NDalicPINVOKE.Actor_Property_POSITION_X_get();
1046 internal static readonly int POSITION_Y = NDalicPINVOKE.Actor_Property_POSITION_Y_get();
1047 internal static readonly int POSITION_Z = NDalicPINVOKE.Actor_Property_POSITION_Z_get();
1048 internal static readonly int WORLD_POSITION = NDalicPINVOKE.Actor_Property_WORLD_POSITION_get();
1049 internal static readonly int WORLD_POSITION_X = NDalicPINVOKE.Actor_Property_WORLD_POSITION_X_get();
1050 internal static readonly int WORLD_POSITION_Y = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Y_get();
1051 internal static readonly int WORLD_POSITION_Z = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Z_get();
1052 internal static readonly int ORIENTATION = NDalicPINVOKE.Actor_Property_ORIENTATION_get();
1053 internal static readonly int WORLD_ORIENTATION = NDalicPINVOKE.Actor_Property_WORLD_ORIENTATION_get();
1054 internal static readonly int SCALE = NDalicPINVOKE.Actor_Property_SCALE_get();
1055 internal static readonly int SCALE_X = NDalicPINVOKE.Actor_Property_SCALE_X_get();
1056 internal static readonly int SCALE_Y = NDalicPINVOKE.Actor_Property_SCALE_Y_get();
1057 internal static readonly int SCALE_Z = NDalicPINVOKE.Actor_Property_SCALE_Z_get();
1058 internal static readonly int WORLD_SCALE = NDalicPINVOKE.Actor_Property_WORLD_SCALE_get();
1059 internal static readonly int VISIBLE = NDalicPINVOKE.Actor_Property_VISIBLE_get();
1060 internal static readonly int WORLD_COLOR = NDalicPINVOKE.Actor_Property_WORLD_COLOR_get();
1061 internal static readonly int WORLD_MATRIX = NDalicPINVOKE.Actor_Property_WORLD_MATRIX_get();
1062 internal static readonly int NAME = NDalicPINVOKE.Actor_Property_NAME_get();
1063 internal static readonly int SENSITIVE = NDalicPINVOKE.Actor_Property_SENSITIVE_get();
1064 internal static readonly int LEAVE_REQUIRED = NDalicPINVOKE.Actor_Property_LEAVE_REQUIRED_get();
1065 internal static readonly int INHERIT_ORIENTATION = NDalicPINVOKE.Actor_Property_INHERIT_ORIENTATION_get();
1066 internal static readonly int INHERIT_SCALE = NDalicPINVOKE.Actor_Property_INHERIT_SCALE_get();
1067 internal static readonly int DRAW_MODE = NDalicPINVOKE.Actor_Property_DRAW_MODE_get();
1068 internal static readonly int SIZE_MODE_FACTOR = NDalicPINVOKE.Actor_Property_SIZE_MODE_FACTOR_get();
1069 internal static readonly int WIDTH_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_WIDTH_RESIZE_POLICY_get();
1070 internal static readonly int HEIGHT_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_HEIGHT_RESIZE_POLICY_get();
1071 internal static readonly int SIZE_SCALE_POLICY = NDalicPINVOKE.Actor_Property_SIZE_SCALE_POLICY_get();
1072 internal static readonly int WIDTH_FOR_HEIGHT = NDalicPINVOKE.Actor_Property_WIDTH_FOR_HEIGHT_get();
1073 internal static readonly int HEIGHT_FOR_WIDTH = NDalicPINVOKE.Actor_Property_HEIGHT_FOR_WIDTH_get();
1074 internal static readonly int PADDING = NDalicPINVOKE.Actor_Property_PADDING_get();
1075 internal static readonly int MINIMUM_SIZE = NDalicPINVOKE.Actor_Property_MINIMUM_SIZE_get();
1076 internal static readonly int MAXIMUM_SIZE = NDalicPINVOKE.Actor_Property_MAXIMUM_SIZE_get();
1077 internal static readonly int INHERIT_POSITION = NDalicPINVOKE.Actor_Property_INHERIT_POSITION_get();
1078 internal static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
1079 internal static readonly int INHERIT_LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_INHERIT_LAYOUT_DIRECTION_get();
1080 internal static readonly int LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_LAYOUT_DIRECTION_get();
1084 /// Describes the direction to move the focus towards.
1086 public enum FocusDirection
1097 /// Creates a new instance of a view.
1099 public View() : this(NDalicPINVOKE.View_New(), true)
1101 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1104 internal View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true)
1106 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1110 /// Downcasts a handle to view handle.<br>
1111 /// If handle points to a view, the downcast produces a valid handle.<br>
1112 /// If not, the returned handle is left uninitialized.<br>
1114 /// <param name="handle">A handle to an object.</param>
1115 /// <returns>A handle to a view or an uninitialized handle.</returns>
1116 [Obsolete("Please do not use! this will be deprecated, instead please use as keyword.")]
1117 public static View DownCast(BaseHandle handle)
1119 View ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as View;
1120 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1124 [Obsolete("Please do not use! this will be deprecated, instead please use as keyword.")]
1125 public static T DownCast<T>(View view) where T : View
1127 T ret = Registry.GetManagedBaseHandleFromNativePtr(view) as T;
1135 private View ConvertIdToView(uint id)
1141 View parentView = Parent as View;
1142 view = parentView.FindChildById(id);
1147 view = Window.Instance.GetRootLayer().FindChildById(id);
1153 internal void SetKeyInputFocus()
1155 NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
1156 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1160 /// Queries whether the view has a focus.
1162 /// <returns>True if this view has a focus.</returns>
1163 public bool HasFocus()
1165 bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
1166 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1170 internal void ClearKeyInputFocus()
1172 NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
1173 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1176 internal PinchGestureDetector GetPinchGestureDetector()
1178 PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
1179 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1183 internal PanGestureDetector GetPanGestureDetector()
1185 PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
1186 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1190 internal TapGestureDetector GetTapGestureDetector()
1192 TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
1193 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1197 internal LongPressGestureDetector GetLongPressGestureDetector()
1199 LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
1200 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1205 /// Sets the name of the style to be applied to the view.
1207 /// <param name="styleName">A string matching a style described in a stylesheet.</param>
1208 public void SetStyleName(string styleName)
1210 NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
1211 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1215 /// Retrieves the name of the style to be applied to the view (if any).
1217 /// <returns>A string matching a style, or an empty string.</returns>
1218 public string GetStyleName()
1220 string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
1221 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1225 internal void SetBackgroundColor(Vector4 color)
1227 NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
1228 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1231 internal Vector4 GetBackgroundColor()
1233 Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
1234 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1238 internal void SetBackgroundImage(Image image)
1240 NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
1241 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1245 /// Clears the background.
1247 public void ClearBackground()
1249 NDalicPINVOKE.View_ClearBackground(swigCPtr);
1250 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1253 internal ControlKeySignal KeyEventSignal()
1255 ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
1256 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1260 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
1262 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
1263 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1267 internal KeyInputFocusSignal KeyInputFocusLostSignal()
1269 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
1270 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1274 internal View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
1276 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1279 internal enum PropertyRange
1281 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
1282 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
1283 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
1287 /// The StyleName, type string.
1289 public string StyleName
1294 GetProperty(View.Property.STYLE_NAME).Get(out temp);
1299 SetProperty(View.Property.STYLE_NAME, new Tizen.NUI.PropertyValue(value));
1304 /// The mutually exclusive with BACKGROUND_IMAGE & BACKGROUND type Vector4.
1306 public Color BackgroundColor
1310 Color backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1312 Tizen.NUI.PropertyMap background = Background;
1314 background.Find(Visual.Property.Type)?.Get(out visualType);
1315 if (visualType == (int)Visual.Type.Color)
1317 background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor);
1320 return backgroundColor;
1324 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1329 /// Creates an animation to animate the background color visual. If there is no
1330 /// background visual, creates one with transparent black as it's mixColor.
1332 public Animation AnimateBackgroundColor( object destinationValue,
1335 AlphaFunction.BuiltinFunctions? alphaFunction = null,
1336 object initialValue = null)
1338 Tizen.NUI.PropertyMap background = Background;
1340 if( background.Empty() )
1342 // If there is no background yet, ensure there is a transparent
1344 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1345 background = Background;
1347 return AnimateColor( "background", destinationValue, startTime, endTime, alphaFunction, initialValue );
1351 /// Creates an animation to animate the mixColor of the named visual.
1353 public Animation AnimateColor( string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null )
1355 Animation animation = null;
1357 PropertyMap _animator = new PropertyMap();
1358 if( alphaFunction != null )
1360 _animator.Add("alphaFunction", new PropertyValue( AlphaFunction.BuiltinToPropertyKey(alphaFunction) ) );
1363 PropertyMap _timePeriod = new PropertyMap();
1364 _timePeriod.Add( "duration", new PropertyValue((endTime-startTime)/1000.0f) );
1365 _timePeriod.Add( "delay", new PropertyValue( startTime/1000.0f ) );
1366 _animator.Add( "timePeriod", new PropertyValue( _timePeriod ) );
1368 PropertyMap _transition = new PropertyMap();
1369 _transition.Add( "animator", new PropertyValue( _animator ) );
1370 _transition.Add( "target", new PropertyValue( targetVisual ) );
1371 _transition.Add( "property", new PropertyValue( "mixColor" ) );
1373 if( initialColor != null )
1375 PropertyValue initValue = PropertyValue.CreateFromObject( initialColor );
1376 _transition.Add( "initialValue", initValue );
1379 PropertyValue destValue = PropertyValue.CreateFromObject( destinationColor );
1380 _transition.Add( "targetValue", destValue );
1381 TransitionData _transitionData = new TransitionData( _transition );
1383 animation = new Animation( NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true );
1384 if (NDalicPINVOKE.SWIGPendingException.Pending)
1385 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1391 /// The mutually exclusive with BACKGROUND_COLOR & BACKGROUND type Map.
1393 public string BackgroundImage
1397 string backgroundImage = "";
1399 Tizen.NUI.PropertyMap background = Background;
1401 background.Find(Visual.Property.Type)?.Get(out visualType);
1402 if (visualType == (int)Visual.Type.Image)
1404 background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
1407 return backgroundImage;
1411 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1415 public Tizen.NUI.PropertyMap Background
1419 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1420 GetProperty( View.Property.BACKGROUND ).Get(temp);
1425 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1431 /// The current state of the view.
1438 if (GetProperty(View.Property.STATE).Get(out temp) == false)
1440 NUILog.Error("State get error!");
1446 return States.Normal;
1450 return States.Focused;
1454 return States.Disabled;
1458 return States.Normal;
1464 SetProperty(View.Property.STATE, new Tizen.NUI.PropertyValue((int)value));
1469 /// The current sub state of the view.
1471 public States SubState
1476 if (GetProperty(View.Property.SUB_STATE).Get(out temp) == false)
1478 NUILog.Error("subState get error!");
1483 return States.Normal;
1485 return States.Focused;
1487 return States.Disabled;
1489 return States.Normal;
1494 string valueToString = "";
1499 valueToString = "NORMAL";
1502 case States.Focused:
1504 valueToString = "FOCUSED";
1507 case States.Disabled:
1509 valueToString = "DISABLED";
1514 valueToString = "NORMAL";
1518 SetProperty(View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
1523 /// Displays a tooltip
1525 public Tizen.NUI.PropertyMap Tooltip
1529 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1530 GetProperty(View.Property.TOOLTIP).Get(temp);
1535 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1540 /// Displays a tooltip as a text.
1542 public string TooltipText
1546 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1550 private int LeftFocusableViewId
1555 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
1560 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1564 private int RightFocusableViewId
1569 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
1574 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1578 private int UpFocusableViewId
1583 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
1588 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1592 private int DownFocusableViewId
1597 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
1602 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1607 /// The Child property of FlexContainer.<br>
1608 /// The proportion of the free space in the container, the flex item will receive.<br>
1609 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br>
1616 GetProperty(FlexContainer.ChildProperty.FLEX).Get(out temp);
1621 SetProperty(FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue(value));
1626 /// The Child property of FlexContainer.<br>
1627 /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br>
1629 public int AlignSelf
1634 GetProperty(FlexContainer.ChildProperty.ALIGN_SELF).Get(out temp);
1639 SetProperty(FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue(value));
1644 /// The Child property of FlexContainer.<br>
1645 /// The space around the flex item.<br>
1647 public Vector4 FlexMargin
1651 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1652 GetProperty(FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
1657 SetProperty(FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue(value));
1662 /// The top-left cell this child occupies, if not set, the first available cell is used.
1664 public Vector2 CellIndex
1668 Vector2 temp = new Vector2(0.0f, 0.0f);
1669 GetProperty(TableView.ChildProperty.CELL_INDEX).Get(temp);
1674 SetProperty(TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue(value));
1679 /// The number of rows this child occupies, if not set, the default value is 1.
1681 public float RowSpan
1686 GetProperty(TableView.ChildProperty.ROW_SPAN).Get(out temp);
1691 SetProperty(TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue(value));
1696 /// The number of columns this child occupies, if not set, the default value is 1.
1698 public float ColumnSpan
1703 GetProperty(TableView.ChildProperty.COLUMN_SPAN).Get(out temp);
1708 SetProperty(TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue(value));
1713 /// The horizontal alignment of this child inside the cells, if not set, the default value is 'left'.
1715 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
1720 if (GetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
1722 NUILog.Error("CellHorizontalAlignment get error!");
1728 return Tizen.NUI.HorizontalAlignmentType.Left;
1730 return Tizen.NUI.HorizontalAlignmentType.Center;
1732 return Tizen.NUI.HorizontalAlignmentType.Right;
1734 return Tizen.NUI.HorizontalAlignmentType.Left;
1739 string valueToString = "";
1742 case Tizen.NUI.HorizontalAlignmentType.Left:
1744 valueToString = "left";
1747 case Tizen.NUI.HorizontalAlignmentType.Center:
1749 valueToString = "center";
1752 case Tizen.NUI.HorizontalAlignmentType.Right:
1754 valueToString = "right";
1759 valueToString = "left";
1763 SetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1768 /// The vertical alignment of this child inside the cells, if not set, the default value is 'top'.
1770 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
1775 GetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
1777 NUILog.Error("CellVerticalAlignment get error!");
1783 return Tizen.NUI.VerticalAlignmentType.Top;
1785 return Tizen.NUI.VerticalAlignmentType.Center;
1787 return Tizen.NUI.VerticalAlignmentType.Bottom;
1789 return Tizen.NUI.VerticalAlignmentType.Top;
1794 string valueToString = "";
1797 case Tizen.NUI.VerticalAlignmentType.Top:
1799 valueToString = "top";
1802 case Tizen.NUI.VerticalAlignmentType.Center:
1804 valueToString = "center";
1807 case Tizen.NUI.VerticalAlignmentType.Bottom:
1809 valueToString = "bottom";
1814 valueToString = "top";
1818 SetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1823 /// The left focusable view.<br>
1824 /// This will return null if not set.<br>
1825 /// This will also return null if the specified left focusable view is not on a window.<br>
1827 public View LeftFocusableView
1829 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1832 if (LeftFocusableViewId >= 0)
1834 return ConvertIdToView((uint)LeftFocusableViewId);
1840 LeftFocusableViewId = (int)value.GetId();
1845 /// The right focusable view.<br>
1846 /// This will return null if not set.<br>
1847 /// This will also return null if the specified right focusable view is not on a window.<br>
1849 public View RightFocusableView
1851 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1854 if (RightFocusableViewId >= 0)
1856 return ConvertIdToView((uint)RightFocusableViewId);
1862 RightFocusableViewId = (int)value.GetId();
1867 /// The up focusable view.<br>
1868 /// This will return null if not set.<br>
1869 /// This will also return null if the specified up focusable view is not on a window.<br>
1871 public View UpFocusableView
1873 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1876 if (UpFocusableViewId >= 0)
1878 return ConvertIdToView((uint)UpFocusableViewId);
1884 UpFocusableViewId = (int)value.GetId();
1889 /// The down focusable view.<br>
1890 /// This will return null if not set.<br>
1891 /// This will also return null if the specified down focusable view is not on a window.<br>
1893 public View DownFocusableView
1895 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1898 if (DownFocusableViewId >= 0)
1900 return ConvertIdToView((uint)DownFocusableViewId);
1906 DownFocusableViewId = (int)value.GetId();
1911 /// Whether the view should be focusable by keyboard navigation.
1913 public bool Focusable
1917 SetKeyboardFocusable(value);
1921 return IsKeyboardFocusable();
1926 /// Enumeration for describing the states of the view.
1931 /// The normal state.
1935 /// The focused state.
1939 /// The disabled state.
1945 /// Retrieves the position of the view.<br>
1946 /// The coordinates are relative to the view's parent.<br>
1948 public Position CurrentPosition
1952 return GetCurrentPosition();
1957 /// Sets the size of a view for the width and the height.<br>
1958 /// Geometry can be scaled to fit within this area.<br>
1959 /// This does not interfere with the view's scale factor.<br>
1960 /// The views default depth is the minimum of width and height.<br>
1962 public Size2D Size2D
1966 Size temp = new Size(0.0f, 0.0f, 0.0f);
1967 GetProperty(View.Property.SIZE).Get(temp);
1968 Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
1973 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(new Size(value)));
1978 /// Retrieves the size of the view.<br>
1979 /// The coordinates are relative to the view's parent.<br>
1981 public Size2D CurrentSize
1985 return GetCurrentSize();
1989 [Obsolete("Please do not use! this will be deprecated. Please use Visibility instead.")]
1999 /// Retrieves and sets the view's opacity.<br>
2001 public float Opacity
2006 GetProperty(View.Property.OPACITY).Get(out temp);
2011 SetProperty(View.Property.OPACITY, new Tizen.NUI.PropertyValue(value));
2016 /// Sets the position of the view for X and Y.<br>
2017 /// By default, sets the position vector between the parent origin and the pivot point (default).<br>
2018 /// If the position inheritance is disabled, sets the world position.<br>
2020 public Position2D Position2D
2024 Position temp = new Position(0.0f, 0.0f, 0.0f);
2025 GetProperty(View.Property.POSITION).Get(temp);
2026 return new Position2D(temp);
2030 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(new Position(value)));
2035 /// Retrieves the screen postion of the view.<br>
2037 public Vector2 ScreenPosition
2041 Vector2 temp = new Vector2(0.0f, 0.0f);
2042 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
2048 /// Determines whether the pivot point should be used to determine the position of the view.
2049 /// This is true by default.
2051 /// <remarks>If false, then the top-left of the view is used for the position.
2052 /// Setting this to false will allow scaling or rotation around the anchor-point without affecting the view's position.
2054 public bool PositionUsesPivotPoint
2059 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
2064 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
2068 [Obsolete("Please do not use! this will be deprecated")]
2069 public bool PositionUsesAnchorPoint
2074 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
2079 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
2083 internal bool FocusState
2087 return IsKeyboardFocusable();
2091 SetKeyboardFocusable(value);
2096 /// Queries whether the view is connected to the stage.<br>
2097 /// When a view is connected, it will be directly or indirectly parented to the root view.<br>
2099 public bool IsOnWindow
2108 /// Gets the depth in the hierarchy for the view.
2110 public int HierarchyDepth
2114 return GetHierarchyDepth();
2119 /// Sets the sibling order of the view so the depth position can be defined within the same parent.
2122 /// Note the initial value is 0.
2123 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove, and LowerBelow will override the sibling order.
2124 /// The values set by this property will likely change.
2126 public int SiblingOrder
2131 GetProperty(View.Property.SIBLING_ORDER).Get(out temp);
2136 SetProperty(View.Property.SIBLING_ORDER, new Tizen.NUI.PropertyValue(value));
2141 /// Returns the natural size of the view.
2144 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
2146 [Obsolete("Please do not use! this will be deprecated, please use NaturalSize2D instead")]
2147 public Vector3 NaturalSize
2151 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2152 if (NDalicPINVOKE.SWIGPendingException.Pending)
2153 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2159 /// Returns the natural size (Size2D) of the view.
2162 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
2164 public Size2D NaturalSize2D
2168 Vector3 temp = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2169 if (NDalicPINVOKE.SWIGPendingException.Pending)
2170 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2172 return new Size2D((int)temp.Width, (int)temp.Height);
2180 /// This is an asynchronous method.
2191 /// This is an asynchronous method.
2192 /// If the view is hidden, then the view and its children will not be rendered.
2193 /// 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.
2200 internal void Raise()
2202 var parentChildren = Parent?.Children;
2204 if (parentChildren != null)
2206 int currentIndex = parentChildren.IndexOf(this);
2208 // If the view is not already the last item in the list.
2209 if (currentIndex != parentChildren.Count -1)
2211 View temp = parentChildren[currentIndex + 1];
2212 parentChildren[currentIndex + 1] = this;
2213 parentChildren[currentIndex] = temp;
2217 NDalicPINVOKE.Raise(swigCPtr);
2218 if (NDalicPINVOKE.SWIGPendingException.Pending)
2219 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2222 internal void Lower()
2224 var parentChildren = Parent?.Children;
2226 if (parentChildren != null)
2228 int currentIndex = parentChildren.IndexOf(this);
2230 // If the view is not already the first item in the list.
2231 if (currentIndex > 0)
2233 View temp = parentChildren[currentIndex - 1];
2234 parentChildren[currentIndex - 1] = this;
2235 parentChildren[currentIndex] = temp;
2239 NDalicPINVOKE.Lower(swigCPtr);
2240 if (NDalicPINVOKE.SWIGPendingException.Pending)
2241 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2245 /// Raises the view above all other views.
2248 /// Sibling order of views within the parent will be updated automatically.
2249 /// Once a raise or lower API is used, that view will then have an exclusive sibling order independent of insertion.
2251 public void RaiseToTop()
2253 var parentChildren = Parent?.Children;
2255 if (parentChildren != null)
2257 parentChildren.Remove(this);
2258 parentChildren.Add(this);
2261 NDalicPINVOKE.RaiseToTop(swigCPtr);
2262 if (NDalicPINVOKE.SWIGPendingException.Pending)
2263 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2267 /// Lowers the view to the bottom of all views.
2270 /// The sibling order of views within the parent will be updated automatically.
2271 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2273 public void LowerToBottom()
2275 var parentChildren = Parent?.Children;
2277 if (parentChildren != null)
2279 parentChildren.Remove(this);
2280 parentChildren.Insert(0, this);
2283 NDalicPINVOKE.LowerToBottom(swigCPtr);
2284 if (NDalicPINVOKE.SWIGPendingException.Pending)
2285 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2289 /// Queries if all resources required by a view are loaded and ready.
2291 /// <remarks>Most resources are only loaded when the control is placed on the stage.
2293 public bool IsResourceReady()
2295 bool ret = NDalicPINVOKE.IsResourceReady(swigCPtr);
2296 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2301 /// Raises the view to above the target view.
2303 /// <remarks>The sibling order of views within the parent will be updated automatically.
2304 /// Views on the level above the target view will still be shown above this view.
2305 /// Raising this view above views with the same sibling order as each other will raise this view above them.
2306 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2308 /// <param name="target">Will be raised above this view.</param>
2309 internal void RaiseAbove(View target)
2311 var parentChildren = Parent?.Children;
2313 if (parentChildren != null)
2315 int currentIndex = parentChildren.IndexOf(this);
2316 int targetIndex = parentChildren.IndexOf(target);
2318 // If the currentIndex is less than the target index and the target has the same parent.
2319 if (currentIndex < targetIndex)
2321 parentChildren.Remove(this);
2322 parentChildren.Insert(targetIndex, this);
2326 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
2327 if (NDalicPINVOKE.SWIGPendingException.Pending)
2328 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2332 /// Lowers the view to below the target view.
2334 /// <remarks>The sibling order of views within the parent will be updated automatically.
2335 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
2336 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2338 /// <param name="target">Will be lowered below this view.</param>
2339 internal void LowerBelow(View target)
2341 var parentChildren = Parent?.Children;
2343 if (parentChildren != null)
2345 int currentIndex = parentChildren.IndexOf(this);
2346 int targetIndex = parentChildren.IndexOf(target);
2348 // If the currentIndex is not already the 0th index and the target has the same parent.
2349 if ((currentIndex != 0) && (targetIndex != -1) &&
2350 (currentIndex > targetIndex))
2352 parentChildren.Remove(this);
2353 parentChildren.Insert(targetIndex, this);
2357 NDalicPINVOKE.LowerBelow(swigCPtr, View.getCPtr(target));
2358 if (NDalicPINVOKE.SWIGPendingException.Pending)
2359 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2362 internal string GetName()
2364 string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);
2365 if (NDalicPINVOKE.SWIGPendingException.Pending)
2366 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2370 internal void SetName(string name)
2372 NDalicPINVOKE.Actor_SetName(swigCPtr, name);
2373 if (NDalicPINVOKE.SWIGPendingException.Pending)
2374 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2377 internal uint GetId()
2379 uint ret = NDalicPINVOKE.Actor_GetId(swigCPtr);
2380 if (NDalicPINVOKE.SWIGPendingException.Pending)
2381 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2385 internal bool IsRoot()
2387 bool ret = NDalicPINVOKE.Actor_IsRoot(swigCPtr);
2388 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2392 internal bool OnWindow()
2394 bool ret = NDalicPINVOKE.Actor_OnStage(swigCPtr);
2395 if (NDalicPINVOKE.SWIGPendingException.Pending)
2396 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2400 internal Layer GetLayer()
2402 IntPtr cPtr = NDalicPINVOKE.Actor_GetLayer(swigCPtr);
2403 Layer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Layer;
2405 if (NDalicPINVOKE.SWIGPendingException.Pending)
2406 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2411 /// Removes a view from its parent view or layer. If a view has no parent, this method does nothing.
2413 /// <pre>The (child) view has been initialized. </pre>
2414 public void Unparent()
2416 GetParent()?.Remove(this);
2420 /// Search through this view's hierarchy for a view with the given name.
2421 /// The view itself is also considered in the search.
2423 /// <pre>The view has been initialized.</pre>
2424 /// <param name="viewName">The name of the view to find.</param>
2425 /// <returns>A handle to the view if found, or an empty handle if not.</returns>
2426 public View FindChildByName(string viewName)
2428 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
2430 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2432 if (NDalicPINVOKE.SWIGPendingException.Pending)
2433 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2437 internal View FindChildById(uint id)
2439 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
2441 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2443 if (NDalicPINVOKE.SWIGPendingException.Pending)
2444 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2448 internal void SetParentOrigin(Vector3 origin)
2450 NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
2451 if (NDalicPINVOKE.SWIGPendingException.Pending)
2452 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2455 internal Vector3 GetCurrentParentOrigin()
2457 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentParentOrigin(swigCPtr), true);
2458 if (NDalicPINVOKE.SWIGPendingException.Pending)
2459 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2463 internal void SetAnchorPoint(Vector3 anchorPoint)
2465 NDalicPINVOKE.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
2466 if (NDalicPINVOKE.SWIGPendingException.Pending)
2467 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2470 internal Vector3 GetCurrentAnchorPoint()
2472 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentAnchorPoint(swigCPtr), true);
2473 if (NDalicPINVOKE.SWIGPendingException.Pending)
2474 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2478 internal void SetSize(float width, float height)
2480 NDalicPINVOKE.Actor_SetSize__SWIG_0(swigCPtr, width, height);
2481 if (NDalicPINVOKE.SWIGPendingException.Pending)
2482 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2485 internal void SetSize(float width, float height, float depth)
2487 NDalicPINVOKE.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
2488 if (NDalicPINVOKE.SWIGPendingException.Pending)
2489 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2492 internal void SetSize(Vector2 size)
2494 NDalicPINVOKE.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
2495 if (NDalicPINVOKE.SWIGPendingException.Pending)
2496 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2499 internal void SetSize(Vector3 size)
2501 NDalicPINVOKE.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
2502 if (NDalicPINVOKE.SWIGPendingException.Pending)
2503 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2506 internal Vector3 GetTargetSize()
2508 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetTargetSize(swigCPtr), true);
2509 if (NDalicPINVOKE.SWIGPendingException.Pending)
2510 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2514 internal Size2D GetCurrentSize()
2516 Size ret = new Size(NDalicPINVOKE.Actor_GetCurrentSize(swigCPtr), true);
2517 if (NDalicPINVOKE.SWIGPendingException.Pending)
2518 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2519 Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
2523 internal Vector3 GetNaturalSize()
2525 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2526 if (NDalicPINVOKE.SWIGPendingException.Pending)
2527 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2531 internal void SetPosition(float x, float y)
2533 NDalicPINVOKE.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
2534 if (NDalicPINVOKE.SWIGPendingException.Pending)
2535 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2538 internal void SetPosition(float x, float y, float z)
2540 NDalicPINVOKE.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
2541 if (NDalicPINVOKE.SWIGPendingException.Pending)
2542 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2545 internal void SetPosition(Vector3 position)
2547 NDalicPINVOKE.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
2548 if (NDalicPINVOKE.SWIGPendingException.Pending)
2549 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2552 internal void SetX(float x)
2554 NDalicPINVOKE.Actor_SetX(swigCPtr, x);
2555 if (NDalicPINVOKE.SWIGPendingException.Pending)
2556 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2559 internal void SetY(float y)
2561 NDalicPINVOKE.Actor_SetY(swigCPtr, y);
2562 if (NDalicPINVOKE.SWIGPendingException.Pending)
2563 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2566 internal void SetZ(float z)
2568 NDalicPINVOKE.Actor_SetZ(swigCPtr, z);
2569 if (NDalicPINVOKE.SWIGPendingException.Pending)
2570 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2573 internal void TranslateBy(Vector3 distance)
2575 NDalicPINVOKE.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
2576 if (NDalicPINVOKE.SWIGPendingException.Pending)
2577 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2580 internal Position GetCurrentPosition()
2582 Position ret = new Position(NDalicPINVOKE.Actor_GetCurrentPosition(swigCPtr), true);
2583 if (NDalicPINVOKE.SWIGPendingException.Pending)
2584 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2588 internal Vector3 GetCurrentWorldPosition()
2590 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldPosition(swigCPtr), true);
2591 if (NDalicPINVOKE.SWIGPendingException.Pending)
2592 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2596 internal void SetInheritPosition(bool inherit)
2598 NDalicPINVOKE.Actor_SetInheritPosition(swigCPtr, inherit);
2599 if (NDalicPINVOKE.SWIGPendingException.Pending)
2600 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2603 internal bool IsPositionInherited()
2605 bool ret = NDalicPINVOKE.Actor_IsPositionInherited(swigCPtr);
2606 if (NDalicPINVOKE.SWIGPendingException.Pending)
2607 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2611 internal void SetOrientation(Degree angle, Vector3 axis)
2613 NDalicPINVOKE.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2614 if (NDalicPINVOKE.SWIGPendingException.Pending)
2615 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2618 internal void SetOrientation(Radian angle, Vector3 axis)
2620 NDalicPINVOKE.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2621 if (NDalicPINVOKE.SWIGPendingException.Pending)
2622 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2625 internal void SetOrientation(Rotation orientation)
2627 NDalicPINVOKE.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
2628 if (NDalicPINVOKE.SWIGPendingException.Pending)
2629 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2632 internal void RotateBy(Degree angle, Vector3 axis)
2634 NDalicPINVOKE.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2635 if (NDalicPINVOKE.SWIGPendingException.Pending)
2636 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2639 internal void RotateBy(Radian angle, Vector3 axis)
2641 NDalicPINVOKE.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2642 if (NDalicPINVOKE.SWIGPendingException.Pending)
2643 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2646 internal void RotateBy(Rotation relativeRotation)
2648 NDalicPINVOKE.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
2649 if (NDalicPINVOKE.SWIGPendingException.Pending)
2650 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2653 internal Rotation GetCurrentOrientation()
2655 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentOrientation(swigCPtr), true);
2656 if (NDalicPINVOKE.SWIGPendingException.Pending)
2657 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2661 internal void SetInheritOrientation(bool inherit)
2663 NDalicPINVOKE.Actor_SetInheritOrientation(swigCPtr, inherit);
2664 if (NDalicPINVOKE.SWIGPendingException.Pending)
2665 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2668 internal bool IsOrientationInherited()
2670 bool ret = NDalicPINVOKE.Actor_IsOrientationInherited(swigCPtr);
2671 if (NDalicPINVOKE.SWIGPendingException.Pending)
2672 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2676 internal Rotation GetCurrentWorldOrientation()
2678 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentWorldOrientation(swigCPtr), true);
2679 if (NDalicPINVOKE.SWIGPendingException.Pending)
2680 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2684 internal void SetScale(float scale)
2686 NDalicPINVOKE.Actor_SetScale__SWIG_0(swigCPtr, scale);
2687 if (NDalicPINVOKE.SWIGPendingException.Pending)
2688 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2691 internal void SetScale(float scaleX, float scaleY, float scaleZ)
2693 NDalicPINVOKE.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
2694 if (NDalicPINVOKE.SWIGPendingException.Pending)
2695 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2698 internal void SetScale(Vector3 scale)
2700 NDalicPINVOKE.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
2701 if (NDalicPINVOKE.SWIGPendingException.Pending)
2702 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2705 internal void ScaleBy(Vector3 relativeScale)
2707 NDalicPINVOKE.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
2708 if (NDalicPINVOKE.SWIGPendingException.Pending)
2709 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2712 internal Vector3 GetCurrentScale()
2714 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentScale(swigCPtr), true);
2715 if (NDalicPINVOKE.SWIGPendingException.Pending)
2716 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2720 internal Vector3 GetCurrentWorldScale()
2722 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldScale(swigCPtr), true);
2723 if (NDalicPINVOKE.SWIGPendingException.Pending)
2724 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2728 internal void SetInheritScale(bool inherit)
2730 NDalicPINVOKE.Actor_SetInheritScale(swigCPtr, inherit);
2731 if (NDalicPINVOKE.SWIGPendingException.Pending)
2732 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2735 internal bool IsScaleInherited()
2737 bool ret = NDalicPINVOKE.Actor_IsScaleInherited(swigCPtr);
2738 if (NDalicPINVOKE.SWIGPendingException.Pending)
2739 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2743 internal Matrix GetCurrentWorldMatrix()
2745 Matrix ret = new Matrix(NDalicPINVOKE.Actor_GetCurrentWorldMatrix(swigCPtr), true);
2746 if (NDalicPINVOKE.SWIGPendingException.Pending)
2747 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2751 internal void SetVisible(bool visible)
2753 NDalicPINVOKE.Actor_SetVisible(swigCPtr, visible);
2754 if (NDalicPINVOKE.SWIGPendingException.Pending)
2755 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2758 internal bool IsVisible()
2760 bool ret = NDalicPINVOKE.Actor_IsVisible(swigCPtr);
2761 if (NDalicPINVOKE.SWIGPendingException.Pending)
2762 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2766 internal void SetOpacity(float opacity)
2768 NDalicPINVOKE.Actor_SetOpacity(swigCPtr, opacity);
2769 if (NDalicPINVOKE.SWIGPendingException.Pending)
2770 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2773 internal float GetCurrentOpacity()
2775 float ret = NDalicPINVOKE.Actor_GetCurrentOpacity(swigCPtr);
2776 if (NDalicPINVOKE.SWIGPendingException.Pending)
2777 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2781 internal void SetColor(Vector4 color)
2783 NDalicPINVOKE.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
2784 if (NDalicPINVOKE.SWIGPendingException.Pending)
2785 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2788 internal Vector4 GetCurrentColor()
2790 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentColor(swigCPtr), true);
2791 if (NDalicPINVOKE.SWIGPendingException.Pending)
2792 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2796 internal void SetColorMode(ColorMode colorMode)
2798 NDalicPINVOKE.Actor_SetColorMode(swigCPtr, (int)colorMode);
2799 if (NDalicPINVOKE.SWIGPendingException.Pending)
2800 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2803 internal ColorMode GetColorMode()
2805 ColorMode ret = (ColorMode)NDalicPINVOKE.Actor_GetColorMode(swigCPtr);
2806 if (NDalicPINVOKE.SWIGPendingException.Pending)
2807 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2811 internal Vector4 GetCurrentWorldColor()
2813 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentWorldColor(swigCPtr), true);
2814 if (NDalicPINVOKE.SWIGPendingException.Pending)
2815 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2819 internal void SetDrawMode(DrawModeType drawMode)
2821 NDalicPINVOKE.Actor_SetDrawMode(swigCPtr, (int)drawMode);
2822 if (NDalicPINVOKE.SWIGPendingException.Pending)
2823 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2826 internal DrawModeType GetDrawMode()
2828 DrawModeType ret = (DrawModeType)NDalicPINVOKE.Actor_GetDrawMode(swigCPtr);
2829 if (NDalicPINVOKE.SWIGPendingException.Pending)
2830 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2835 /// Converts screen coordinates into the view's coordinate system using the default camera.
2837 /// <pre>The view has been initialized.</pre>
2838 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5).</remarks>
2839 /// <param name="localX">On return, the X-coordinate relative to the view.</param>
2840 /// <param name="localY">On return, the Y-coordinate relative to the view.</param>
2841 /// <param name="screenX">The screen X-coordinate.</param>
2842 /// <param name="screenY">The screen Y-coordinate.</param>
2843 /// <returns>True if the conversion succeeded.</returns>
2844 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
2846 bool ret = NDalicPINVOKE.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
2847 if (NDalicPINVOKE.SWIGPendingException.Pending)
2848 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2852 internal void SetKeyboardFocusable(bool focusable)
2854 NDalicPINVOKE.Actor_SetKeyboardFocusable(swigCPtr, focusable);
2855 if (NDalicPINVOKE.SWIGPendingException.Pending)
2856 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2859 internal bool IsKeyboardFocusable()
2861 bool ret = NDalicPINVOKE.Actor_IsKeyboardFocusable(swigCPtr);
2862 if (NDalicPINVOKE.SWIGPendingException.Pending)
2863 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2867 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
2869 NDalicPINVOKE.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
2870 if (NDalicPINVOKE.SWIGPendingException.Pending)
2871 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2874 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
2876 ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.Actor_GetResizePolicy(swigCPtr, (int)dimension);
2877 if (NDalicPINVOKE.SWIGPendingException.Pending)
2878 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2883 /// Sets the relative to parent size factor of the view.<br>
2884 /// This factor is only used when ResizePolicy is set to either:
2885 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br>
2886 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br>
2888 /// <pre>The view has been initialized.</pre>
2889 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis.</param>
2890 public void SetSizeModeFactor(Vector3 factor)
2892 NDalicPINVOKE.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
2893 if (NDalicPINVOKE.SWIGPendingException.Pending)
2894 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2897 internal Vector3 GetSizeModeFactor()
2899 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetSizeModeFactor(swigCPtr), true);
2900 if (NDalicPINVOKE.SWIGPendingException.Pending)
2901 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2906 /// Calculates the height of the view given a width.<br>
2907 /// The natural size is used for default calculation.<br>
2908 /// Size 0 is treated as aspect ratio 1:1.<br>
2910 /// <param name="width">The width to use.</param>
2911 /// <returns>The height based on the width.</returns>
2912 public float GetHeightForWidth(float width)
2914 float ret = NDalicPINVOKE.Actor_GetHeightForWidth(swigCPtr, width);
2915 if (NDalicPINVOKE.SWIGPendingException.Pending)
2916 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2921 /// Calculates the width of the view given a height.<br>
2922 /// The natural size is used for default calculation.<br>
2923 /// Size 0 is treated as aspect ratio 1:1.<br>
2925 /// <param name="height">The height to use.</param>
2926 /// <returns>The width based on the height.</returns>
2927 public float GetWidthForHeight(float height)
2929 float ret = NDalicPINVOKE.Actor_GetWidthForHeight(swigCPtr, height);
2930 if (NDalicPINVOKE.SWIGPendingException.Pending)
2931 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2935 public float GetRelayoutSize(DimensionType dimension)
2937 float ret = NDalicPINVOKE.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
2938 if (NDalicPINVOKE.SWIGPendingException.Pending)
2939 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2943 public void SetPadding(PaddingType padding)
2945 NDalicPINVOKE.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
2946 if (NDalicPINVOKE.SWIGPendingException.Pending)
2947 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2950 public void GetPadding(PaddingType paddingOut)
2952 NDalicPINVOKE.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
2953 if (NDalicPINVOKE.SWIGPendingException.Pending)
2954 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2957 internal void SetMinimumSize(Vector2 size)
2959 NDalicPINVOKE.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
2960 if (NDalicPINVOKE.SWIGPendingException.Pending)
2961 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2964 internal Vector2 GetMinimumSize()
2966 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMinimumSize(swigCPtr), true);
2967 if (NDalicPINVOKE.SWIGPendingException.Pending)
2968 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2972 internal void SetMaximumSize(Vector2 size)
2974 NDalicPINVOKE.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
2975 if (NDalicPINVOKE.SWIGPendingException.Pending)
2976 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2979 internal Vector2 GetMaximumSize()
2981 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMaximumSize(swigCPtr), true);
2982 if (NDalicPINVOKE.SWIGPendingException.Pending)
2983 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2987 internal int GetHierarchyDepth()
2989 int ret = NDalicPINVOKE.Actor_GetHierarchyDepth(swigCPtr);
2990 if (NDalicPINVOKE.SWIGPendingException.Pending)
2991 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2995 public uint AddRenderer(Renderer renderer)
2997 uint ret = NDalicPINVOKE.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
2998 if (NDalicPINVOKE.SWIGPendingException.Pending)
2999 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3003 internal uint GetRendererCount()
3005 uint ret = NDalicPINVOKE.Actor_GetRendererCount(swigCPtr);
3006 if (NDalicPINVOKE.SWIGPendingException.Pending)
3007 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3011 public Renderer GetRendererAt(uint index)
3013 IntPtr cPtr = NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index);
3014 Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Renderer;
3016 if (NDalicPINVOKE.SWIGPendingException.Pending)
3017 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3021 public void RemoveRenderer(Renderer renderer)
3023 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
3024 if (NDalicPINVOKE.SWIGPendingException.Pending)
3025 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3028 public void RemoveRenderer(uint index)
3030 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
3031 if (NDalicPINVOKE.SWIGPendingException.Pending)
3032 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3035 internal TouchDataSignal TouchSignal()
3037 TouchDataSignal ret = new TouchDataSignal(NDalicPINVOKE.Actor_TouchSignal(swigCPtr), false);
3038 if (NDalicPINVOKE.SWIGPendingException.Pending)
3039 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3043 internal HoverSignal HoveredSignal()
3045 HoverSignal ret = new HoverSignal(NDalicPINVOKE.Actor_HoveredSignal(swigCPtr), false);
3046 if (NDalicPINVOKE.SWIGPendingException.Pending)
3047 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3051 internal WheelSignal WheelEventSignal()
3053 WheelSignal ret = new WheelSignal(NDalicPINVOKE.Actor_WheelEventSignal(swigCPtr), false);
3054 if (NDalicPINVOKE.SWIGPendingException.Pending)
3055 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3059 internal ViewSignal OnWindowSignal()
3061 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnStageSignal(swigCPtr), false);
3062 if (NDalicPINVOKE.SWIGPendingException.Pending)
3063 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3067 internal ViewSignal OffWindowSignal()
3069 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OffStageSignal(swigCPtr), false);
3070 if (NDalicPINVOKE.SWIGPendingException.Pending)
3071 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3075 internal ViewSignal OnRelayoutSignal()
3077 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnRelayoutSignal(swigCPtr), false);
3078 if (NDalicPINVOKE.SWIGPendingException.Pending)
3079 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3083 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view) {
3084 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
3085 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3090 internal ViewLayoutDirectionChangedSignal LayoutDirectionChangedSignal(View view) {
3091 ViewLayoutDirectionChangedSignal ret = new ViewLayoutDirectionChangedSignal(NDalicManualPINVOKE.LayoutDirectionChangedSignal(View.getCPtr(view)), false);
3092 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3097 internal ViewSignal ResourcesLoadedSignal()
3099 ViewSignal ret = new ViewSignal(NDalicPINVOKE.ResourceReadySignal(swigCPtr), false);
3100 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3105 /// Gets or sets the origin of a view within its parent's area.<br>
3106 /// 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>
3107 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br>
3108 /// A view's position is the distance between this origin and the view's anchor-point.<br>
3110 /// <pre>The view has been initialized.</pre>
3111 public Position ParentOrigin
3115 Position temp = new Position(0.0f, 0.0f, 0.0f);
3116 GetProperty(View.Property.PARENT_ORIGIN).Get(temp);
3121 SetProperty(View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue(value));
3125 internal float ParentOriginX
3130 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
3135 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
3139 internal float ParentOriginY
3144 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
3149 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
3153 internal float ParentOriginZ
3158 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
3163 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
3168 /// Gets or sets the anchor-point of a view.<br>
3169 /// 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>
3170 /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br>
3171 /// A view position is the distance between its parent-origin and this anchor-point.<br>
3172 /// A view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br>
3173 /// <pre>The view has been initialized.</pre>
3175 public Position PivotPoint
3179 Position temp = new Position(0.0f, 0.0f, 0.0f);
3180 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
3185 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3189 internal float PivotPointX
3194 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
3199 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
3203 internal float PivotPointY
3208 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
3213 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
3217 internal float PivotPointZ
3222 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
3227 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
3232 /// Gets or sets the size width of the view.
3234 public float SizeWidth
3239 GetProperty(View.Property.SIZE_WIDTH).Get(out temp);
3244 SetProperty(View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue(value));
3249 /// Gets or sets the size height of the view.
3251 public float SizeHeight
3256 GetProperty(View.Property.SIZE_HEIGHT).Get(out temp);
3261 SetProperty(View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue(value));
3266 /// Gets or sets the position of the view.<br>
3267 /// By default, sets the position vector between the parent origin and pivot point (default).<br>
3268 /// If the position inheritance is disabled, sets the world position.<br>
3270 public Position Position
3274 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3275 GetProperty(View.Property.POSITION).Get(temp);
3280 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(value));
3285 /// Gets or sets the position X of the view.
3287 public float PositionX
3292 GetProperty(View.Property.POSITION_X).Get(out temp);
3297 SetProperty(View.Property.POSITION_X, new Tizen.NUI.PropertyValue(value));
3302 /// Gets or sets the position Y of the view.
3304 public float PositionY
3309 GetProperty(View.Property.POSITION_Y).Get(out temp);
3314 SetProperty(View.Property.POSITION_Y, new Tizen.NUI.PropertyValue(value));
3319 /// Gets or sets the position Z of the view.
3321 public float PositionZ
3326 GetProperty(View.Property.POSITION_Z).Get(out temp);
3331 SetProperty(View.Property.POSITION_Z, new Tizen.NUI.PropertyValue(value));
3336 /// Gets or sets the world position of the view.
3338 public Vector3 WorldPosition
3342 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3343 GetProperty(View.Property.WORLD_POSITION).Get(temp);
3348 internal float WorldPositionX
3353 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
3358 internal float WorldPositionY
3363 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
3368 internal float WorldPositionZ
3373 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
3379 /// Gets or sets the orientation of the view.<br>
3380 /// The view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br>
3382 /// <remarks>This is an asynchronous method.</remarks>
3383 public Rotation Orientation
3387 Rotation temp = new Rotation();
3388 GetProperty(View.Property.ORIENTATION).Get(temp);
3393 SetProperty(View.Property.ORIENTATION, new Tizen.NUI.PropertyValue(value));
3398 /// Gets or sets the world orientation of the view.<br>
3400 public Rotation WorldOrientation
3404 Rotation temp = new Rotation();
3405 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
3411 /// Gets or sets the scale factor applied to the view.<br>
3413 public Vector3 Scale
3417 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3418 GetProperty(View.Property.SCALE).Get(temp);
3423 SetProperty(View.Property.SCALE, new Tizen.NUI.PropertyValue(value));
3428 /// Gets or sets the scale X factor applied to the view.
3435 GetProperty(View.Property.SCALE_X).Get(out temp);
3440 SetProperty(View.Property.SCALE_X, new Tizen.NUI.PropertyValue(value));
3445 /// Gets or sets the scale Y factor applied to the view.
3452 GetProperty(View.Property.SCALE_Y).Get(out temp);
3457 SetProperty(View.Property.SCALE_Y, new Tizen.NUI.PropertyValue(value));
3462 /// Gets or sets the scale Z factor applied to the view.
3469 GetProperty(View.Property.SCALE_Z).Get(out temp);
3474 SetProperty(View.Property.SCALE_Z, new Tizen.NUI.PropertyValue(value));
3479 /// Gets the world scale of the view.
3481 public Vector3 WorldScale
3485 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3486 GetProperty(View.Property.WORLD_SCALE).Get(temp);
3492 /// Retrieves the visibility flag of the view.
3495 /// If the view is not visible, then the view and its children will not be rendered.
3496 /// 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.
3498 public bool Visibility
3503 GetProperty(View.Property.VISIBLE).Get(out temp);
3509 /// Gets the view's world color.
3511 public Vector4 WorldColor
3515 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3516 GetProperty(View.Property.WORLD_COLOR).Get(temp);
3521 internal Matrix WorldMatrix
3525 Matrix temp = new Matrix();
3526 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
3532 /// Gets or sets the view's name.
3539 GetProperty(View.Property.NAME).Get(out temp);
3544 SetProperty(View.Property.NAME, new Tizen.NUI.PropertyValue(value));
3549 /// Get the number of children held by the view.
3551 public uint ChildCount
3555 return GetChildCount();
3560 /// Gets the view's ID.
3572 /// Gets or sets the status of whether the view should emit touch or hover signals.
3574 public bool Sensitive
3579 GetProperty(View.Property.SENSITIVE).Get(out temp);
3584 SetProperty(View.Property.SENSITIVE, new Tizen.NUI.PropertyValue(value));
3589 /// 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.
3591 public bool LeaveRequired
3596 GetProperty(View.Property.LEAVE_REQUIRED).Get(out temp);
3601 SetProperty(View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue(value));
3606 /// Gets or sets the status of whether a child view inherits it's parent's orientation.
3608 public bool InheritOrientation
3613 GetProperty(View.Property.INHERIT_ORIENTATION).Get(out temp);
3618 SetProperty(View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue(value));
3623 /// Gets or sets the status of whether a child view inherits it's parent's scale.
3625 public bool InheritScale
3630 GetProperty(View.Property.INHERIT_SCALE).Get(out temp);
3635 SetProperty(View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue(value));
3640 /// Gets or sets the status of how the view and its children should be drawn.<br>
3641 /// Not all views are renderable, but DrawMode can be inherited from any view.<br>
3642 /// 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>
3643 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br>
3644 /// Overlay views are drawn in a separate pass, after all non-overlay views within the layer.<br>
3645 /// For overlay views, the drawing order is with respect to tree levels of views, and depth-testing will not be used.<br>
3647 public DrawModeType DrawMode
3652 if (GetProperty(View.Property.DRAW_MODE).Get(out temp) == false)
3654 NUILog.Error("DrawMode get error!");
3659 return DrawModeType.Normal;
3661 return DrawModeType.Overlay2D;
3663 return DrawModeType.Stencil;
3665 return DrawModeType.Normal;
3670 SetProperty(View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)value));
3675 /// Gets or sets the relative to parent size factor of the view.<br>
3676 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br>
3677 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br>
3679 public Vector3 SizeModeFactor
3683 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3684 GetProperty(View.Property.SIZE_MODE_FACTOR).Get(temp);
3689 SetProperty(View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue(value));
3694 /// Gets or sets the width resize policy to be used.
3696 public ResizePolicyType WidthResizePolicy
3701 if (GetProperty(View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
3703 NUILog.Error("WidthResizePolicy get error!");
3708 return ResizePolicyType.Fixed;
3709 case "USE_NATURAL_SIZE":
3710 return ResizePolicyType.UseNaturalSize;
3711 case "FILL_TO_PARENT":
3712 return ResizePolicyType.FillToParent;
3713 case "SIZE_RELATIVE_TO_PARENT":
3714 return ResizePolicyType.SizeRelativeToParent;
3715 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3716 return ResizePolicyType.SizeFixedOffsetFromParent;
3717 case "FIT_TO_CHILDREN":
3718 return ResizePolicyType.FitToChildren;
3719 case "DIMENSION_DEPENDENCY":
3720 return ResizePolicyType.DimensionDependency;
3721 case "USE_ASSIGNED_SIZE":
3722 return ResizePolicyType.UseAssignedSize;
3724 return ResizePolicyType.Fixed;
3729 SetProperty(View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3734 /// Gets or sets the height resize policy to be used.
3736 public ResizePolicyType HeightResizePolicy
3741 if (GetProperty(View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
3743 NUILog.Error("HeightResizePolicy get error!");
3748 return ResizePolicyType.Fixed;
3749 case "USE_NATURAL_SIZE":
3750 return ResizePolicyType.UseNaturalSize;
3751 case "FILL_TO_PARENT":
3752 return ResizePolicyType.FillToParent;
3753 case "SIZE_RELATIVE_TO_PARENT":
3754 return ResizePolicyType.SizeRelativeToParent;
3755 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3756 return ResizePolicyType.SizeFixedOffsetFromParent;
3757 case "FIT_TO_CHILDREN":
3758 return ResizePolicyType.FitToChildren;
3759 case "DIMENSION_DEPENDENCY":
3760 return ResizePolicyType.DimensionDependency;
3761 case "USE_ASSIGNED_SIZE":
3762 return ResizePolicyType.UseAssignedSize;
3764 return ResizePolicyType.Fixed;
3769 SetProperty(View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3774 /// Gets or sets the policy to use when setting size with size negotiation.<br>
3775 /// Defaults to SizeScalePolicyType.UseSizeSet.<br>
3777 public SizeScalePolicyType SizeScalePolicy
3782 if (GetProperty(View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
3784 NUILog.Error("SizeScalePolicy get error!");
3788 case "USE_SIZE_SET":
3789 return SizeScalePolicyType.UseSizeSet;
3790 case "FIT_WITH_ASPECT_RATIO":
3791 return SizeScalePolicyType.FitWithAspectRatio;
3792 case "FILL_WITH_ASPECT_RATIO":
3793 return SizeScalePolicyType.FillWithAspectRatio;
3795 return SizeScalePolicyType.UseSizeSet;
3800 string valueToString = "";
3803 case SizeScalePolicyType.UseSizeSet:
3805 valueToString = "USE_SIZE_SET";
3808 case SizeScalePolicyType.FitWithAspectRatio:
3810 valueToString = "FIT_WITH_ASPECT_RATIO";
3813 case SizeScalePolicyType.FillWithAspectRatio:
3815 valueToString = "FILL_WITH_ASPECT_RATIO";
3820 valueToString = "USE_SIZE_SET";
3824 SetProperty(View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
3829 /// Gets or sets the status of whether the width size is dependent on the height size.
3831 public bool WidthForHeight
3836 GetProperty(View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
3841 SetProperty(View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue(value));
3846 /// Gets or sets the status of whether the height size is dependent on the width size.
3848 public bool HeightForWidth
3853 GetProperty(View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
3858 SetProperty(View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue(value));
3863 /// Gets or sets the padding for use in layout.
3865 public Vector4 Padding
3869 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3870 GetProperty(View.Property.PADDING).Get(temp);
3875 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
3880 /// Gets or sets the minimum size the view can be assigned in size negotiation.
3882 public Size2D MinimumSize
3886 Size2D temp = new Size2D(0, 0);
3887 GetProperty(View.Property.MINIMUM_SIZE).Get(temp);
3892 SetProperty(View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3897 /// Gets or sets the maximum size the view can be assigned in size negotiation.
3899 public Size2D MaximumSize
3903 Size2D temp = new Size2D(0, 0);
3904 GetProperty(View.Property.MAXIMUM_SIZE).Get(temp);
3909 SetProperty(View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3914 /// Gets or sets whether a child view inherits it's parent's position.<br>
3915 /// Default is to inherit.<br>
3916 /// 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>
3918 public bool InheritPosition
3923 GetProperty(View.Property.INHERIT_POSITION).Get(out temp);
3928 SetProperty(View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue(value));
3933 /// Gets or sets the clipping behavior (mode) of it's children.
3935 public ClippingModeType ClippingMode
3940 if (GetProperty(View.Property.CLIPPING_MODE).Get(out temp) == false)
3942 NUILog.Error("ClippingMode get error!");
3947 return ClippingModeType.Disabled;
3948 case "CLIP_CHILDREN":
3949 return ClippingModeType.ClipChildren;
3950 case "CLIP_TO_BOUNDING_BOX":
3951 return ClippingModeType.ClipToBoundingBox;
3953 return ClippingModeType.Disabled;
3958 SetProperty(View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)value));
3963 /// Gets the number of renderers held by the view.
3965 public uint RendererCount
3969 return GetRendererCount();
3976 [Obsolete("Please do not use! this will be deprecated")]
3977 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> Touched
3981 if (_touchDataEventHandler == null)
3983 _touchDataCallback = OnTouch;
3984 this.TouchSignal().Connect(_touchDataCallback);
3987 _touchDataEventHandler += value;
3992 _touchDataEventHandler -= value;
3994 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
3996 this.TouchSignal().Disconnect(_touchDataCallback);
4002 [Obsolete("Please do not use! this will be deprecated")]
4003 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> Hovered
4007 if (_hoverEventHandler == null)
4009 _hoverEventCallback = OnHoverEvent;
4010 this.HoveredSignal().Connect(_hoverEventCallback);
4013 _hoverEventHandler += value;
4018 _hoverEventHandler -= value;
4020 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
4022 this.HoveredSignal().Disconnect(_hoverEventCallback);
4028 [Obsolete("Please do not use! this will be deprecated")]
4029 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelMoved
4033 if (_wheelEventHandler == null)
4035 _wheelEventCallback = OnWheelEvent;
4036 this.WheelEventSignal().Connect(_wheelEventCallback);
4039 _wheelEventHandler += value;
4044 _wheelEventHandler -= value;
4046 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
4048 this.WheelEventSignal().Disconnect(_wheelEventCallback);
4054 [Obsolete("Please do not use! this will be deprecated")]
4055 public Position AnchorPoint
4059 Position temp = new Position(0.0f, 0.0f, 0.0f);
4060 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
4065 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
4069 [Obsolete("Please do not use! this will be deprecated, please use Size2D instead")]
4074 Size temp = new Size(0.0f, 0.0f, 0.0f);
4075 GetProperty(View.Property.SIZE).Get(temp);
4080 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(value));
4084 [Obsolete("Please do not use! this will be deprecated")]
4085 public event EventHandler OnWindowEvent
4089 if (_onWindowEventHandler == null)
4091 _onWindowEventCallback = OnWindow;
4092 this.OnWindowSignal().Connect(_onWindowEventCallback);
4095 _onWindowEventHandler += value;
4100 _onWindowEventHandler -= value;
4102 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
4104 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
4109 [Obsolete("Please do not use! this will be deprecated")]
4110 public event EventHandler OffWindowEvent
4114 if (_offWindowEventHandler == null)
4116 _offWindowEventCallback = OffWindow;
4117 this.OffWindowSignal().Connect(_offWindowEventCallback);
4120 _offWindowEventHandler += value;
4125 _offWindowEventHandler -= value;
4127 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
4129 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
4134 [Obsolete("Please do not use! this will be deprecated")]
4135 public event EventHandler OnRelayoutEvent
4139 if (_onRelayoutEventHandler == null)
4141 _onRelayoutEventCallback = OnRelayout;
4142 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
4145 _onRelayoutEventHandler += value;
4150 _onRelayoutEventHandler -= value;
4152 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
4154 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
4160 [Obsolete("Please DO NOT use! This will be deprecated! Please use 'Container GetParent() for derived class' instead!")]
4166 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
4168 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(cPtr);
4170 if (basehandle is Layer)
4172 ret = new View(cPtr, false);
4176 ret = basehandle as View;
4179 if (NDalicPINVOKE.SWIGPendingException.Pending)
4180 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4185 public bool InheritLayoutDirection
4190 GetProperty(View.Property.INHERIT_LAYOUT_DIRECTION).Get(out temp);
4195 SetProperty(View.Property.INHERIT_LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue(value));
4199 public ViewLayoutDirectionType LayoutDirection
4204 if (GetProperty(View.Property.LAYOUT_DIRECTION).Get(out temp) == false)
4206 NUILog.Error("LAYOUT_DIRECTION get error!");
4208 return (ViewLayoutDirectionType)temp;
4212 SetProperty(View.Property.LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((int)value));
4217 public enum ViewLayoutDirectionType