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;
30 internal View(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.View_SWIGUpcast(cPtr), cMemoryOwn)
32 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
33 PositionUsesPivotPoint = false;
36 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
38 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
41 // From Container Base class
44 /// Adds a child view to this view.
46 /// <seealso cref="Container.Add">
48 public override void Add(View child)
50 NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
51 if (NDalicPINVOKE.SWIGPendingException.Pending)
52 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
56 /// Removes a child view from this View. If the view was not a child of this view, this is a no-op.
58 /// <seealso cref="Container.Remove">
60 public override void Remove(View child)
62 NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
63 if (NDalicPINVOKE.SWIGPendingException.Pending)
64 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
68 /// Retrieves a child view by index.
70 /// <seealso cref="Container.GetChildAt">
72 public override View GetChildAt(uint index)
74 IntPtr cPtr = NDalicPINVOKE.Actor_GetChildAt(swigCPtr, index);
76 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
78 if (NDalicPINVOKE.SWIGPendingException.Pending)
79 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
84 /// Retrieves the number of children held by the view.
86 /// <seealso cref="Container.GetChildCount">
88 protected override uint GetChildCount()
90 uint ret = NDalicPINVOKE.Actor_GetChildCount(swigCPtr);
91 if (NDalicPINVOKE.SWIGPendingException.Pending)
92 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
97 /// Gets the views parent.
99 /// <seealso cref="Container.GetParent()">
100 protected override Container GetParent()
103 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
105 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(cPtr);
107 if(basehandle is Layer)
109 ret = basehandle as Layer;
113 ret = basehandle as View;
116 if (NDalicPINVOKE.SWIGPendingException.Pending)
117 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
121 //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
122 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
123 public Container GetContainerParent()
125 return this.GetParent();
128 internal bool IsTopLevelView()
130 if(GetContainerParent() is Layer)
137 // you can override it to clean-up your own resources.
138 protected override void Dispose(DisposeTypes type)
145 if(type == DisposeTypes.Explicit)
148 //Release your own managed resources here.
149 //You should release all of your own disposable objects here.
152 //Release your own unmanaged resources here.
153 //You should not access any managed member here except static instance.
154 //because the execution order of Finalizes is non-deterministic.
156 DisConnectFromSignals();
158 if (swigCPtr.Handle != global::System.IntPtr.Zero)
163 NDalicPINVOKE.delete_View(swigCPtr);
165 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
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 NDalicPINVOKE.Raise(swigCPtr);
2203 if (NDalicPINVOKE.SWIGPendingException.Pending)
2204 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2207 internal void Lower()
2209 NDalicPINVOKE.Lower(swigCPtr);
2210 if (NDalicPINVOKE.SWIGPendingException.Pending)
2211 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2215 /// Raises the view above all other views.
2218 /// Sibling order of views within the parent will be updated automatically.
2219 /// Once a raise or lower API is used, that view will then have an exclusive sibling order independent of insertion.
2221 public void RaiseToTop()
2223 NDalicPINVOKE.RaiseToTop(swigCPtr);
2224 if (NDalicPINVOKE.SWIGPendingException.Pending)
2225 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2229 /// Lowers the view to the bottom of all views.
2232 /// The sibling order of views within the parent will be updated automatically.
2233 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2235 public void LowerToBottom()
2237 NDalicPINVOKE.LowerToBottom(swigCPtr);
2238 if (NDalicPINVOKE.SWIGPendingException.Pending)
2239 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2243 /// Queries if all resources required by a view are loaded and ready.
2245 /// <remarks>Most resources are only loaded when the control is placed on the stage.
2247 public bool IsResourceReady()
2249 bool ret = NDalicPINVOKE.IsResourceReady(swigCPtr);
2250 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2255 /// Raises the view to above the target view.
2257 /// <remarks>The sibling order of views within the parent will be updated automatically.
2258 /// Views on the level above the target view will still be shown above this view.
2259 /// Raising this view above views with the same sibling order as each other will raise this view above them.
2260 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2262 /// <param name="target">Will be raised above this view.</param>
2263 internal void RaiseAbove(View target)
2265 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
2266 if (NDalicPINVOKE.SWIGPendingException.Pending)
2267 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2271 /// Lowers the view to below the target view.
2273 /// <remarks>The sibling order of views within the parent will be updated automatically.
2274 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
2275 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2277 /// <param name="target">Will be lowered below this view.</param>
2278 internal void LowerBelow(View target)
2280 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
2281 if (NDalicPINVOKE.SWIGPendingException.Pending)
2282 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2285 internal string GetName()
2287 string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);
2288 if (NDalicPINVOKE.SWIGPendingException.Pending)
2289 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2293 internal void SetName(string name)
2295 NDalicPINVOKE.Actor_SetName(swigCPtr, name);
2296 if (NDalicPINVOKE.SWIGPendingException.Pending)
2297 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2300 internal uint GetId()
2302 uint ret = NDalicPINVOKE.Actor_GetId(swigCPtr);
2303 if (NDalicPINVOKE.SWIGPendingException.Pending)
2304 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2308 internal bool IsRoot()
2310 bool ret = NDalicPINVOKE.Actor_IsRoot(swigCPtr);
2311 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2315 internal bool OnWindow()
2317 bool ret = NDalicPINVOKE.Actor_OnStage(swigCPtr);
2318 if (NDalicPINVOKE.SWIGPendingException.Pending)
2319 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2323 internal Layer GetLayer()
2325 IntPtr cPtr = NDalicPINVOKE.Actor_GetLayer(swigCPtr);
2326 Layer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Layer;
2328 if (NDalicPINVOKE.SWIGPendingException.Pending)
2329 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2334 /// Removes a view from its parent view or layer. If a view has no parent, this method does nothing.
2336 /// <pre>The (child) view has been initialized. </pre>
2337 public void Unparent()
2339 NDalicPINVOKE.Actor_Unparent(swigCPtr);
2340 if (NDalicPINVOKE.SWIGPendingException.Pending)
2341 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2345 /// Search through this view's hierarchy for a view with the given name.
2346 /// The view itself is also considered in the search.
2348 /// <pre>The view has been initialized.</pre>
2349 /// <param name="viewName">The name of the view to find.</param>
2350 /// <returns>A handle to the view if found, or an empty handle if not.</returns>
2351 public View FindChildByName(string viewName)
2353 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
2355 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2357 if (NDalicPINVOKE.SWIGPendingException.Pending)
2358 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2362 internal View FindChildById(uint id)
2364 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
2366 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2368 if (NDalicPINVOKE.SWIGPendingException.Pending)
2369 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2373 internal void SetParentOrigin(Vector3 origin)
2375 NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
2376 if (NDalicPINVOKE.SWIGPendingException.Pending)
2377 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2380 internal Vector3 GetCurrentParentOrigin()
2382 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentParentOrigin(swigCPtr), true);
2383 if (NDalicPINVOKE.SWIGPendingException.Pending)
2384 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2388 internal void SetAnchorPoint(Vector3 anchorPoint)
2390 NDalicPINVOKE.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
2391 if (NDalicPINVOKE.SWIGPendingException.Pending)
2392 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2395 internal Vector3 GetCurrentAnchorPoint()
2397 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentAnchorPoint(swigCPtr), true);
2398 if (NDalicPINVOKE.SWIGPendingException.Pending)
2399 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2403 internal void SetSize(float width, float height)
2405 NDalicPINVOKE.Actor_SetSize__SWIG_0(swigCPtr, width, height);
2406 if (NDalicPINVOKE.SWIGPendingException.Pending)
2407 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2410 internal void SetSize(float width, float height, float depth)
2412 NDalicPINVOKE.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
2413 if (NDalicPINVOKE.SWIGPendingException.Pending)
2414 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2417 internal void SetSize(Vector2 size)
2419 NDalicPINVOKE.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
2420 if (NDalicPINVOKE.SWIGPendingException.Pending)
2421 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2424 internal void SetSize(Vector3 size)
2426 NDalicPINVOKE.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
2427 if (NDalicPINVOKE.SWIGPendingException.Pending)
2428 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2431 internal Vector3 GetTargetSize()
2433 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetTargetSize(swigCPtr), true);
2434 if (NDalicPINVOKE.SWIGPendingException.Pending)
2435 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2439 internal Size2D GetCurrentSize()
2441 Size ret = new Size(NDalicPINVOKE.Actor_GetCurrentSize(swigCPtr), true);
2442 if (NDalicPINVOKE.SWIGPendingException.Pending)
2443 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2444 Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
2448 internal Vector3 GetNaturalSize()
2450 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2451 if (NDalicPINVOKE.SWIGPendingException.Pending)
2452 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2456 internal void SetPosition(float x, float y)
2458 NDalicPINVOKE.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
2459 if (NDalicPINVOKE.SWIGPendingException.Pending)
2460 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2463 internal void SetPosition(float x, float y, float z)
2465 NDalicPINVOKE.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
2466 if (NDalicPINVOKE.SWIGPendingException.Pending)
2467 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2470 internal void SetPosition(Vector3 position)
2472 NDalicPINVOKE.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
2473 if (NDalicPINVOKE.SWIGPendingException.Pending)
2474 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2477 internal void SetX(float x)
2479 NDalicPINVOKE.Actor_SetX(swigCPtr, x);
2480 if (NDalicPINVOKE.SWIGPendingException.Pending)
2481 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2484 internal void SetY(float y)
2486 NDalicPINVOKE.Actor_SetY(swigCPtr, y);
2487 if (NDalicPINVOKE.SWIGPendingException.Pending)
2488 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2491 internal void SetZ(float z)
2493 NDalicPINVOKE.Actor_SetZ(swigCPtr, z);
2494 if (NDalicPINVOKE.SWIGPendingException.Pending)
2495 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2498 internal void TranslateBy(Vector3 distance)
2500 NDalicPINVOKE.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
2501 if (NDalicPINVOKE.SWIGPendingException.Pending)
2502 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2505 internal Position GetCurrentPosition()
2507 Position ret = new Position(NDalicPINVOKE.Actor_GetCurrentPosition(swigCPtr), true);
2508 if (NDalicPINVOKE.SWIGPendingException.Pending)
2509 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2513 internal Vector3 GetCurrentWorldPosition()
2515 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldPosition(swigCPtr), true);
2516 if (NDalicPINVOKE.SWIGPendingException.Pending)
2517 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2521 internal void SetInheritPosition(bool inherit)
2523 NDalicPINVOKE.Actor_SetInheritPosition(swigCPtr, inherit);
2524 if (NDalicPINVOKE.SWIGPendingException.Pending)
2525 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2528 internal bool IsPositionInherited()
2530 bool ret = NDalicPINVOKE.Actor_IsPositionInherited(swigCPtr);
2531 if (NDalicPINVOKE.SWIGPendingException.Pending)
2532 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2536 internal void SetOrientation(Degree angle, Vector3 axis)
2538 NDalicPINVOKE.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2539 if (NDalicPINVOKE.SWIGPendingException.Pending)
2540 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2543 internal void SetOrientation(Radian angle, Vector3 axis)
2545 NDalicPINVOKE.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2546 if (NDalicPINVOKE.SWIGPendingException.Pending)
2547 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2550 internal void SetOrientation(Rotation orientation)
2552 NDalicPINVOKE.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
2553 if (NDalicPINVOKE.SWIGPendingException.Pending)
2554 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2557 internal void RotateBy(Degree angle, Vector3 axis)
2559 NDalicPINVOKE.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2560 if (NDalicPINVOKE.SWIGPendingException.Pending)
2561 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2564 internal void RotateBy(Radian angle, Vector3 axis)
2566 NDalicPINVOKE.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2567 if (NDalicPINVOKE.SWIGPendingException.Pending)
2568 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2571 internal void RotateBy(Rotation relativeRotation)
2573 NDalicPINVOKE.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
2574 if (NDalicPINVOKE.SWIGPendingException.Pending)
2575 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2578 internal Rotation GetCurrentOrientation()
2580 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentOrientation(swigCPtr), true);
2581 if (NDalicPINVOKE.SWIGPendingException.Pending)
2582 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2586 internal void SetInheritOrientation(bool inherit)
2588 NDalicPINVOKE.Actor_SetInheritOrientation(swigCPtr, inherit);
2589 if (NDalicPINVOKE.SWIGPendingException.Pending)
2590 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2593 internal bool IsOrientationInherited()
2595 bool ret = NDalicPINVOKE.Actor_IsOrientationInherited(swigCPtr);
2596 if (NDalicPINVOKE.SWIGPendingException.Pending)
2597 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2601 internal Rotation GetCurrentWorldOrientation()
2603 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentWorldOrientation(swigCPtr), true);
2604 if (NDalicPINVOKE.SWIGPendingException.Pending)
2605 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2609 internal void SetScale(float scale)
2611 NDalicPINVOKE.Actor_SetScale__SWIG_0(swigCPtr, scale);
2612 if (NDalicPINVOKE.SWIGPendingException.Pending)
2613 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2616 internal void SetScale(float scaleX, float scaleY, float scaleZ)
2618 NDalicPINVOKE.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
2619 if (NDalicPINVOKE.SWIGPendingException.Pending)
2620 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2623 internal void SetScale(Vector3 scale)
2625 NDalicPINVOKE.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
2626 if (NDalicPINVOKE.SWIGPendingException.Pending)
2627 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2630 internal void ScaleBy(Vector3 relativeScale)
2632 NDalicPINVOKE.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
2633 if (NDalicPINVOKE.SWIGPendingException.Pending)
2634 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2637 internal Vector3 GetCurrentScale()
2639 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentScale(swigCPtr), true);
2640 if (NDalicPINVOKE.SWIGPendingException.Pending)
2641 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2645 internal Vector3 GetCurrentWorldScale()
2647 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldScale(swigCPtr), true);
2648 if (NDalicPINVOKE.SWIGPendingException.Pending)
2649 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2653 internal void SetInheritScale(bool inherit)
2655 NDalicPINVOKE.Actor_SetInheritScale(swigCPtr, inherit);
2656 if (NDalicPINVOKE.SWIGPendingException.Pending)
2657 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2660 internal bool IsScaleInherited()
2662 bool ret = NDalicPINVOKE.Actor_IsScaleInherited(swigCPtr);
2663 if (NDalicPINVOKE.SWIGPendingException.Pending)
2664 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2668 internal Matrix GetCurrentWorldMatrix()
2670 Matrix ret = new Matrix(NDalicPINVOKE.Actor_GetCurrentWorldMatrix(swigCPtr), true);
2671 if (NDalicPINVOKE.SWIGPendingException.Pending)
2672 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2676 internal void SetVisible(bool visible)
2678 NDalicPINVOKE.Actor_SetVisible(swigCPtr, visible);
2679 if (NDalicPINVOKE.SWIGPendingException.Pending)
2680 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2683 internal bool IsVisible()
2685 bool ret = NDalicPINVOKE.Actor_IsVisible(swigCPtr);
2686 if (NDalicPINVOKE.SWIGPendingException.Pending)
2687 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2691 internal void SetOpacity(float opacity)
2693 NDalicPINVOKE.Actor_SetOpacity(swigCPtr, opacity);
2694 if (NDalicPINVOKE.SWIGPendingException.Pending)
2695 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2698 internal float GetCurrentOpacity()
2700 float ret = NDalicPINVOKE.Actor_GetCurrentOpacity(swigCPtr);
2701 if (NDalicPINVOKE.SWIGPendingException.Pending)
2702 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2706 internal void SetColor(Vector4 color)
2708 NDalicPINVOKE.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
2709 if (NDalicPINVOKE.SWIGPendingException.Pending)
2710 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2713 internal Vector4 GetCurrentColor()
2715 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentColor(swigCPtr), true);
2716 if (NDalicPINVOKE.SWIGPendingException.Pending)
2717 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2721 internal void SetColorMode(ColorMode colorMode)
2723 NDalicPINVOKE.Actor_SetColorMode(swigCPtr, (int)colorMode);
2724 if (NDalicPINVOKE.SWIGPendingException.Pending)
2725 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2728 internal ColorMode GetColorMode()
2730 ColorMode ret = (ColorMode)NDalicPINVOKE.Actor_GetColorMode(swigCPtr);
2731 if (NDalicPINVOKE.SWIGPendingException.Pending)
2732 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2736 internal Vector4 GetCurrentWorldColor()
2738 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentWorldColor(swigCPtr), true);
2739 if (NDalicPINVOKE.SWIGPendingException.Pending)
2740 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2744 internal void SetDrawMode(DrawModeType drawMode)
2746 NDalicPINVOKE.Actor_SetDrawMode(swigCPtr, (int)drawMode);
2747 if (NDalicPINVOKE.SWIGPendingException.Pending)
2748 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2751 internal DrawModeType GetDrawMode()
2753 DrawModeType ret = (DrawModeType)NDalicPINVOKE.Actor_GetDrawMode(swigCPtr);
2754 if (NDalicPINVOKE.SWIGPendingException.Pending)
2755 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2760 /// Converts screen coordinates into the view's coordinate system using the default camera.
2762 /// <pre>The view has been initialized.</pre>
2763 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5).</remarks>
2764 /// <param name="localX">On return, the X-coordinate relative to the view.</param>
2765 /// <param name="localY">On return, the Y-coordinate relative to the view.</param>
2766 /// <param name="screenX">The screen X-coordinate.</param>
2767 /// <param name="screenY">The screen Y-coordinate.</param>
2768 /// <returns>True if the conversion succeeded.</returns>
2769 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
2771 bool ret = NDalicPINVOKE.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
2772 if (NDalicPINVOKE.SWIGPendingException.Pending)
2773 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2777 internal void SetKeyboardFocusable(bool focusable)
2779 NDalicPINVOKE.Actor_SetKeyboardFocusable(swigCPtr, focusable);
2780 if (NDalicPINVOKE.SWIGPendingException.Pending)
2781 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2784 internal bool IsKeyboardFocusable()
2786 bool ret = NDalicPINVOKE.Actor_IsKeyboardFocusable(swigCPtr);
2787 if (NDalicPINVOKE.SWIGPendingException.Pending)
2788 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2792 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
2794 NDalicPINVOKE.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
2795 if (NDalicPINVOKE.SWIGPendingException.Pending)
2796 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2799 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
2801 ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.Actor_GetResizePolicy(swigCPtr, (int)dimension);
2802 if (NDalicPINVOKE.SWIGPendingException.Pending)
2803 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2808 /// Sets the relative to parent size factor of the view.<br>
2809 /// This factor is only used when ResizePolicy is set to either:
2810 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br>
2811 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br>
2813 /// <pre>The view has been initialized.</pre>
2814 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis.</param>
2815 public void SetSizeModeFactor(Vector3 factor)
2817 NDalicPINVOKE.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
2818 if (NDalicPINVOKE.SWIGPendingException.Pending)
2819 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2822 internal Vector3 GetSizeModeFactor()
2824 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetSizeModeFactor(swigCPtr), true);
2825 if (NDalicPINVOKE.SWIGPendingException.Pending)
2826 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2831 /// Calculates the height of the view given a width.<br>
2832 /// The natural size is used for default calculation.<br>
2833 /// Size 0 is treated as aspect ratio 1:1.<br>
2835 /// <param name="width">The width to use.</param>
2836 /// <returns>The height based on the width.</returns>
2837 public float GetHeightForWidth(float width)
2839 float ret = NDalicPINVOKE.Actor_GetHeightForWidth(swigCPtr, width);
2840 if (NDalicPINVOKE.SWIGPendingException.Pending)
2841 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2846 /// Calculates the width of the view given a height.<br>
2847 /// The natural size is used for default calculation.<br>
2848 /// Size 0 is treated as aspect ratio 1:1.<br>
2850 /// <param name="height">The height to use.</param>
2851 /// <returns>The width based on the height.</returns>
2852 public float GetWidthForHeight(float height)
2854 float ret = NDalicPINVOKE.Actor_GetWidthForHeight(swigCPtr, height);
2855 if (NDalicPINVOKE.SWIGPendingException.Pending)
2856 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2860 public float GetRelayoutSize(DimensionType dimension)
2862 float ret = NDalicPINVOKE.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
2863 if (NDalicPINVOKE.SWIGPendingException.Pending)
2864 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2868 public void SetPadding(PaddingType padding)
2870 NDalicPINVOKE.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
2871 if (NDalicPINVOKE.SWIGPendingException.Pending)
2872 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2875 public void GetPadding(PaddingType paddingOut)
2877 NDalicPINVOKE.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
2878 if (NDalicPINVOKE.SWIGPendingException.Pending)
2879 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2882 internal void SetMinimumSize(Vector2 size)
2884 NDalicPINVOKE.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
2885 if (NDalicPINVOKE.SWIGPendingException.Pending)
2886 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2889 internal Vector2 GetMinimumSize()
2891 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMinimumSize(swigCPtr), true);
2892 if (NDalicPINVOKE.SWIGPendingException.Pending)
2893 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2897 internal void SetMaximumSize(Vector2 size)
2899 NDalicPINVOKE.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
2900 if (NDalicPINVOKE.SWIGPendingException.Pending)
2901 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2904 internal Vector2 GetMaximumSize()
2906 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMaximumSize(swigCPtr), true);
2907 if (NDalicPINVOKE.SWIGPendingException.Pending)
2908 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2912 internal int GetHierarchyDepth()
2914 int ret = NDalicPINVOKE.Actor_GetHierarchyDepth(swigCPtr);
2915 if (NDalicPINVOKE.SWIGPendingException.Pending)
2916 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2920 public uint AddRenderer(Renderer renderer)
2922 uint ret = NDalicPINVOKE.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
2923 if (NDalicPINVOKE.SWIGPendingException.Pending)
2924 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2928 internal uint GetRendererCount()
2930 uint ret = NDalicPINVOKE.Actor_GetRendererCount(swigCPtr);
2931 if (NDalicPINVOKE.SWIGPendingException.Pending)
2932 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2936 public Renderer GetRendererAt(uint index)
2938 IntPtr cPtr = NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index);
2939 Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Renderer;
2941 if (NDalicPINVOKE.SWIGPendingException.Pending)
2942 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2946 public void RemoveRenderer(Renderer renderer)
2948 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
2949 if (NDalicPINVOKE.SWIGPendingException.Pending)
2950 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2953 public void RemoveRenderer(uint index)
2955 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
2956 if (NDalicPINVOKE.SWIGPendingException.Pending)
2957 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2960 internal TouchDataSignal TouchSignal()
2962 TouchDataSignal ret = new TouchDataSignal(NDalicPINVOKE.Actor_TouchSignal(swigCPtr), false);
2963 if (NDalicPINVOKE.SWIGPendingException.Pending)
2964 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2968 internal HoverSignal HoveredSignal()
2970 HoverSignal ret = new HoverSignal(NDalicPINVOKE.Actor_HoveredSignal(swigCPtr), false);
2971 if (NDalicPINVOKE.SWIGPendingException.Pending)
2972 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2976 internal WheelSignal WheelEventSignal()
2978 WheelSignal ret = new WheelSignal(NDalicPINVOKE.Actor_WheelEventSignal(swigCPtr), false);
2979 if (NDalicPINVOKE.SWIGPendingException.Pending)
2980 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2984 internal ViewSignal OnWindowSignal()
2986 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnStageSignal(swigCPtr), false);
2987 if (NDalicPINVOKE.SWIGPendingException.Pending)
2988 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2992 internal ViewSignal OffWindowSignal()
2994 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OffStageSignal(swigCPtr), false);
2995 if (NDalicPINVOKE.SWIGPendingException.Pending)
2996 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3000 internal ViewSignal OnRelayoutSignal()
3002 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnRelayoutSignal(swigCPtr), false);
3003 if (NDalicPINVOKE.SWIGPendingException.Pending)
3004 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3008 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view) {
3009 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
3010 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3015 internal ViewLayoutDirectionChangedSignal LayoutDirectionChangedSignal(View view) {
3016 ViewLayoutDirectionChangedSignal ret = new ViewLayoutDirectionChangedSignal(NDalicManualPINVOKE.LayoutDirectionChangedSignal(View.getCPtr(view)), false);
3017 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3022 internal ViewSignal ResourcesLoadedSignal()
3024 ViewSignal ret = new ViewSignal(NDalicPINVOKE.ResourceReadySignal(swigCPtr), false);
3025 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3030 /// Gets or sets the origin of a view within its parent's area.<br>
3031 /// 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>
3032 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br>
3033 /// A view's position is the distance between this origin and the view's anchor-point.<br>
3035 /// <pre>The view has been initialized.</pre>
3036 public Position ParentOrigin
3040 Position temp = new Position(0.0f, 0.0f, 0.0f);
3041 GetProperty(View.Property.PARENT_ORIGIN).Get(temp);
3046 SetProperty(View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue(value));
3050 internal float ParentOriginX
3055 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
3060 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
3064 internal float ParentOriginY
3069 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
3074 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
3078 internal float ParentOriginZ
3083 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
3088 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
3093 /// Gets or sets the anchor-point of a view.<br>
3094 /// 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>
3095 /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br>
3096 /// A view position is the distance between its parent-origin and this anchor-point.<br>
3097 /// A view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br>
3098 /// <pre>The view has been initialized.</pre>
3100 public Position PivotPoint
3104 Position temp = new Position(0.0f, 0.0f, 0.0f);
3105 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
3110 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3114 internal float PivotPointX
3119 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
3124 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
3128 internal float PivotPointY
3133 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
3138 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
3142 internal float PivotPointZ
3147 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
3152 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
3157 /// Gets or sets the size width of the view.
3159 public float SizeWidth
3164 GetProperty(View.Property.SIZE_WIDTH).Get(out temp);
3169 SetProperty(View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue(value));
3174 /// Gets or sets the size height of the view.
3176 public float SizeHeight
3181 GetProperty(View.Property.SIZE_HEIGHT).Get(out temp);
3186 SetProperty(View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue(value));
3191 /// Gets or sets the position of the view.<br>
3192 /// By default, sets the position vector between the parent origin and pivot point (default).<br>
3193 /// If the position inheritance is disabled, sets the world position.<br>
3195 public Position Position
3199 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3200 GetProperty(View.Property.POSITION).Get(temp);
3205 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(value));
3210 /// Gets or sets the position X of the view.
3212 public float PositionX
3217 GetProperty(View.Property.POSITION_X).Get(out temp);
3222 SetProperty(View.Property.POSITION_X, new Tizen.NUI.PropertyValue(value));
3227 /// Gets or sets the position Y of the view.
3229 public float PositionY
3234 GetProperty(View.Property.POSITION_Y).Get(out temp);
3239 SetProperty(View.Property.POSITION_Y, new Tizen.NUI.PropertyValue(value));
3244 /// Gets or sets the position Z of the view.
3246 public float PositionZ
3251 GetProperty(View.Property.POSITION_Z).Get(out temp);
3256 SetProperty(View.Property.POSITION_Z, new Tizen.NUI.PropertyValue(value));
3261 /// Gets or sets the world position of the view.
3263 public Vector3 WorldPosition
3267 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3268 GetProperty(View.Property.WORLD_POSITION).Get(temp);
3273 internal float WorldPositionX
3278 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
3283 internal float WorldPositionY
3288 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
3293 internal float WorldPositionZ
3298 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
3304 /// Gets or sets the orientation of the view.<br>
3305 /// The view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br>
3307 /// <remarks>This is an asynchronous method.</remarks>
3308 public Rotation Orientation
3312 Rotation temp = new Rotation();
3313 GetProperty(View.Property.ORIENTATION).Get(temp);
3318 SetProperty(View.Property.ORIENTATION, new Tizen.NUI.PropertyValue(value));
3323 /// Gets or sets the world orientation of the view.<br>
3325 public Rotation WorldOrientation
3329 Rotation temp = new Rotation();
3330 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
3336 /// Gets or sets the scale factor applied to the view.<br>
3338 public Vector3 Scale
3342 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3343 GetProperty(View.Property.SCALE).Get(temp);
3348 SetProperty(View.Property.SCALE, new Tizen.NUI.PropertyValue(value));
3353 /// Gets or sets the scale X factor applied to the view.
3360 GetProperty(View.Property.SCALE_X).Get(out temp);
3365 SetProperty(View.Property.SCALE_X, new Tizen.NUI.PropertyValue(value));
3370 /// Gets or sets the scale Y factor applied to the view.
3377 GetProperty(View.Property.SCALE_Y).Get(out temp);
3382 SetProperty(View.Property.SCALE_Y, new Tizen.NUI.PropertyValue(value));
3387 /// Gets or sets the scale Z factor applied to the view.
3394 GetProperty(View.Property.SCALE_Z).Get(out temp);
3399 SetProperty(View.Property.SCALE_Z, new Tizen.NUI.PropertyValue(value));
3404 /// Gets the world scale of the view.
3406 public Vector3 WorldScale
3410 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3411 GetProperty(View.Property.WORLD_SCALE).Get(temp);
3417 /// Retrieves the visibility flag of the view.
3420 /// If the view is not visible, then the view and its children will not be rendered.
3421 /// 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.
3423 public bool Visibility
3428 GetProperty(View.Property.VISIBLE).Get(out temp);
3434 /// Gets the view's world color.
3436 public Vector4 WorldColor
3440 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3441 GetProperty(View.Property.WORLD_COLOR).Get(temp);
3446 internal Matrix WorldMatrix
3450 Matrix temp = new Matrix();
3451 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
3457 /// Gets or sets the view's name.
3464 GetProperty(View.Property.NAME).Get(out temp);
3469 SetProperty(View.Property.NAME, new Tizen.NUI.PropertyValue(value));
3474 /// Get the number of children held by the view.
3476 public new uint ChildCount
3480 return GetChildCount();
3485 /// Gets the view's ID.
3497 /// Gets or sets the status of whether the view should emit touch or hover signals.
3499 public bool Sensitive
3504 GetProperty(View.Property.SENSITIVE).Get(out temp);
3509 SetProperty(View.Property.SENSITIVE, new Tizen.NUI.PropertyValue(value));
3514 /// 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.
3516 public bool LeaveRequired
3521 GetProperty(View.Property.LEAVE_REQUIRED).Get(out temp);
3526 SetProperty(View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue(value));
3531 /// Gets or sets the status of whether a child view inherits it's parent's orientation.
3533 public bool InheritOrientation
3538 GetProperty(View.Property.INHERIT_ORIENTATION).Get(out temp);
3543 SetProperty(View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue(value));
3548 /// Gets or sets the status of whether a child view inherits it's parent's scale.
3550 public bool InheritScale
3555 GetProperty(View.Property.INHERIT_SCALE).Get(out temp);
3560 SetProperty(View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue(value));
3565 /// Gets or sets the status of how the view and its children should be drawn.<br>
3566 /// Not all views are renderable, but DrawMode can be inherited from any view.<br>
3567 /// 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>
3568 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br>
3569 /// Overlay views are drawn in a separate pass, after all non-overlay views within the layer.<br>
3570 /// For overlay views, the drawing order is with respect to tree levels of views, and depth-testing will not be used.<br>
3572 public DrawModeType DrawMode
3577 if (GetProperty(View.Property.DRAW_MODE).Get(out temp) == false)
3579 NUILog.Error("DrawMode get error!");
3584 return DrawModeType.Normal;
3586 return DrawModeType.Overlay2D;
3588 return DrawModeType.Stencil;
3590 return DrawModeType.Normal;
3595 SetProperty(View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)value));
3600 /// Gets or sets the relative to parent size factor of the view.<br>
3601 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br>
3602 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br>
3604 public Vector3 SizeModeFactor
3608 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3609 GetProperty(View.Property.SIZE_MODE_FACTOR).Get(temp);
3614 SetProperty(View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue(value));
3619 /// Gets or sets the width resize policy to be used.
3621 public ResizePolicyType WidthResizePolicy
3626 if (GetProperty(View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
3628 NUILog.Error("WidthResizePolicy get error!");
3633 return ResizePolicyType.Fixed;
3634 case "USE_NATURAL_SIZE":
3635 return ResizePolicyType.UseNaturalSize;
3636 case "FILL_TO_PARENT":
3637 return ResizePolicyType.FillToParent;
3638 case "SIZE_RELATIVE_TO_PARENT":
3639 return ResizePolicyType.SizeRelativeToParent;
3640 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3641 return ResizePolicyType.SizeFixedOffsetFromParent;
3642 case "FIT_TO_CHILDREN":
3643 return ResizePolicyType.FitToChildren;
3644 case "DIMENSION_DEPENDENCY":
3645 return ResizePolicyType.DimensionDependency;
3646 case "USE_ASSIGNED_SIZE":
3647 return ResizePolicyType.UseAssignedSize;
3649 return ResizePolicyType.Fixed;
3654 SetProperty(View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3659 /// Gets or sets the height resize policy to be used.
3661 public ResizePolicyType HeightResizePolicy
3666 if (GetProperty(View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
3668 NUILog.Error("HeightResizePolicy get error!");
3673 return ResizePolicyType.Fixed;
3674 case "USE_NATURAL_SIZE":
3675 return ResizePolicyType.UseNaturalSize;
3676 case "FILL_TO_PARENT":
3677 return ResizePolicyType.FillToParent;
3678 case "SIZE_RELATIVE_TO_PARENT":
3679 return ResizePolicyType.SizeRelativeToParent;
3680 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3681 return ResizePolicyType.SizeFixedOffsetFromParent;
3682 case "FIT_TO_CHILDREN":
3683 return ResizePolicyType.FitToChildren;
3684 case "DIMENSION_DEPENDENCY":
3685 return ResizePolicyType.DimensionDependency;
3686 case "USE_ASSIGNED_SIZE":
3687 return ResizePolicyType.UseAssignedSize;
3689 return ResizePolicyType.Fixed;
3694 SetProperty(View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3699 /// Gets or sets the policy to use when setting size with size negotiation.<br>
3700 /// Defaults to SizeScalePolicyType.UseSizeSet.<br>
3702 public SizeScalePolicyType SizeScalePolicy
3707 if (GetProperty(View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
3709 NUILog.Error("SizeScalePolicy get error!");
3713 case "USE_SIZE_SET":
3714 return SizeScalePolicyType.UseSizeSet;
3715 case "FIT_WITH_ASPECT_RATIO":
3716 return SizeScalePolicyType.FitWithAspectRatio;
3717 case "FILL_WITH_ASPECT_RATIO":
3718 return SizeScalePolicyType.FillWithAspectRatio;
3720 return SizeScalePolicyType.UseSizeSet;
3725 string valueToString = "";
3728 case SizeScalePolicyType.UseSizeSet:
3730 valueToString = "USE_SIZE_SET";
3733 case SizeScalePolicyType.FitWithAspectRatio:
3735 valueToString = "FIT_WITH_ASPECT_RATIO";
3738 case SizeScalePolicyType.FillWithAspectRatio:
3740 valueToString = "FILL_WITH_ASPECT_RATIO";
3745 valueToString = "USE_SIZE_SET";
3749 SetProperty(View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
3754 /// Gets or sets the status of whether the width size is dependent on the height size.
3756 public bool WidthForHeight
3761 GetProperty(View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
3766 SetProperty(View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue(value));
3771 /// Gets or sets the status of whether the height size is dependent on the width size.
3773 public bool HeightForWidth
3778 GetProperty(View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
3783 SetProperty(View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue(value));
3788 /// Gets or sets the padding for use in layout.
3790 public Vector4 Padding
3794 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3795 GetProperty(View.Property.PADDING).Get(temp);
3800 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
3805 /// Gets or sets the minimum size the view can be assigned in size negotiation.
3807 public Size2D MinimumSize
3811 Size2D temp = new Size2D(0, 0);
3812 GetProperty(View.Property.MINIMUM_SIZE).Get(temp);
3817 SetProperty(View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3822 /// Gets or sets the maximum size the view can be assigned in size negotiation.
3824 public Size2D MaximumSize
3828 Size2D temp = new Size2D(0, 0);
3829 GetProperty(View.Property.MAXIMUM_SIZE).Get(temp);
3834 SetProperty(View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3839 /// Gets or sets whether a child view inherits it's parent's position.<br>
3840 /// Default is to inherit.<br>
3841 /// 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>
3843 public bool InheritPosition
3848 GetProperty(View.Property.INHERIT_POSITION).Get(out temp);
3853 SetProperty(View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue(value));
3858 /// Gets or sets the clipping behavior (mode) of it's children.
3860 public ClippingModeType ClippingMode
3865 if (GetProperty(View.Property.CLIPPING_MODE).Get(out temp) == false)
3867 NUILog.Error("ClippingMode get error!");
3872 return ClippingModeType.Disabled;
3873 case "CLIP_CHILDREN":
3874 return ClippingModeType.ClipChildren;
3876 return ClippingModeType.Disabled;
3881 SetProperty(View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)value));
3886 /// Gets the number of renderers held by the view.
3888 public uint RendererCount
3892 return GetRendererCount();
3899 [Obsolete("Please do not use! this will be deprecated")]
3900 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> Touched
3904 if (_touchDataEventHandler == null)
3906 _touchDataCallback = OnTouch;
3907 this.TouchSignal().Connect(_touchDataCallback);
3910 _touchDataEventHandler += value;
3915 _touchDataEventHandler -= value;
3917 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
3919 this.TouchSignal().Disconnect(_touchDataCallback);
3925 [Obsolete("Please do not use! this will be deprecated")]
3926 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> Hovered
3930 if (_hoverEventHandler == null)
3932 _hoverEventCallback = OnHoverEvent;
3933 this.HoveredSignal().Connect(_hoverEventCallback);
3936 _hoverEventHandler += value;
3941 _hoverEventHandler -= value;
3943 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
3945 this.HoveredSignal().Disconnect(_hoverEventCallback);
3951 [Obsolete("Please do not use! this will be deprecated")]
3952 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelMoved
3956 if (_wheelEventHandler == null)
3958 _wheelEventCallback = OnWheelEvent;
3959 this.WheelEventSignal().Connect(_wheelEventCallback);
3962 _wheelEventHandler += value;
3967 _wheelEventHandler -= value;
3969 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
3971 this.WheelEventSignal().Disconnect(_wheelEventCallback);
3977 [Obsolete("Please do not use! this will be deprecated")]
3978 public Position AnchorPoint
3982 Position temp = new Position(0.0f, 0.0f, 0.0f);
3983 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
3988 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3992 [Obsolete("Please do not use! this will be deprecated, please use Size2D instead")]
3997 Size temp = new Size(0.0f, 0.0f, 0.0f);
3998 GetProperty(View.Property.SIZE).Get(temp);
4003 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(value));
4007 [Obsolete("Please do not use! this will be deprecated")]
4008 public event EventHandler OnWindowEvent
4012 if (_onWindowEventHandler == null)
4014 _onWindowEventCallback = OnWindow;
4015 this.OnWindowSignal().Connect(_onWindowEventCallback);
4018 _onWindowEventHandler += value;
4023 _onWindowEventHandler -= value;
4025 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
4027 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
4032 [Obsolete("Please do not use! this will be deprecated")]
4033 public event EventHandler OffWindowEvent
4037 if (_offWindowEventHandler == null)
4039 _offWindowEventCallback = OffWindow;
4040 this.OffWindowSignal().Connect(_offWindowEventCallback);
4043 _offWindowEventHandler += value;
4048 _offWindowEventHandler -= value;
4050 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
4052 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
4057 [Obsolete("Please do not use! this will be deprecated")]
4058 public event EventHandler OnRelayoutEvent
4062 if (_onRelayoutEventHandler == null)
4064 _onRelayoutEventCallback = OnRelayout;
4065 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
4068 _onRelayoutEventHandler += value;
4073 _onRelayoutEventHandler -= value;
4075 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
4077 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
4083 //"Please DO NOT use! This will be deprecated! Please use 'Container GetParent() for derived class' instead!"
4084 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
4085 public new View Parent
4090 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
4092 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(cPtr);
4094 if (basehandle is Layer)
4096 ret = new View(cPtr, false);
4100 ret = basehandle as View;
4103 if (NDalicPINVOKE.SWIGPendingException.Pending)
4104 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4109 public bool InheritLayoutDirection
4114 GetProperty(View.Property.INHERIT_LAYOUT_DIRECTION).Get(out temp);
4119 SetProperty(View.Property.INHERIT_LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue(value));
4123 public ViewLayoutDirectionType LayoutDirection
4128 if (GetProperty(View.Property.LAYOUT_DIRECTION).Get(out temp) == false)
4130 NUILog.Error("LAYOUT_DIRECTION get error!");
4132 return (ViewLayoutDirectionType)temp;
4136 SetProperty(View.Property.LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((int)value));
4141 public enum ViewLayoutDirectionType