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 [Obsolete("This is temporal API. Currently Parent returns View but Container class has been introduced so 'View Parent' will be changed 'Container Parent' later soon, then this will be removed")]
122 public Container GetContainerParent()
124 return this.GetParent();
127 internal bool IsTopLevelView()
129 if(GetContainerParent() is Layer)
136 // you can override it to clean-up your own resources.
137 protected override void Dispose(DisposeTypes type)
144 if(type == DisposeTypes.Explicit)
147 //Release your own managed resources here.
148 //You should release all of your own disposable objects here.
151 //Release your own unmanaged resources here.
152 //You should not access any managed member here except static instance.
153 //because the execution order of Finalizes is non-deterministic.
155 DisConnectFromSignals();
157 if (swigCPtr.Handle != global::System.IntPtr.Zero)
162 NDalicPINVOKE.delete_View(swigCPtr);
164 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
170 private void DisConnectFromSignals()
172 // Save current CPtr.
173 global::System.Runtime.InteropServices.HandleRef currentCPtr = swigCPtr;
175 // Use BaseHandle CPtr as current might have been deleted already in derived classes.
176 swigCPtr = GetBaseHandleCPtrHandleRef;
178 if (_onRelayoutEventCallback != null)
180 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
183 if (_offWindowEventCallback != null)
185 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
188 if (_onWindowEventCallback != null)
190 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
193 if (_wheelEventCallback != null)
195 this.WheelEventSignal().Disconnect(_wheelEventCallback);
198 if (_hoverEventCallback != null)
200 this.HoveredSignal().Disconnect(_hoverEventCallback);
203 if (_touchDataCallback != null)
205 this.TouchSignal().Disconnect(_touchDataCallback);
208 if (_ResourcesLoadedCallback != null)
210 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
213 if (_offWindowEventCallback != null)
215 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
218 if (_onWindowEventCallback != null)
220 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
223 if (_wheelEventCallback != null)
225 this.WheelEventSignal().Disconnect(_wheelEventCallback);
228 if (_hoverEventCallback != null)
230 this.HoveredSignal().Disconnect(_hoverEventCallback);
233 if (_touchDataCallback != null)
235 this.TouchSignal().Disconnect(_touchDataCallback);
238 if (_onRelayoutEventCallback != null)
240 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
243 if (_keyCallback != null)
245 this.KeyEventSignal().Disconnect(_keyCallback);
248 if (_keyInputFocusLostCallback != null)
250 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
253 if (_keyInputFocusGainedCallback != null)
255 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
258 // BaseHandle CPtr is used in Registry and there is danger of deletion if we keep using it here.
259 // Restore current CPtr.
260 swigCPtr = currentCPtr;
263 private EventHandler _keyInputFocusGainedEventHandler;
264 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
265 private delegate void KeyInputFocusGainedCallbackType(IntPtr control);
266 private KeyInputFocusGainedCallbackType _keyInputFocusGainedCallback;
269 /// An event for the KeyInputFocusGained signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br>
270 /// The KeyInputFocusGained signal is emitted when the control gets the key input focus.<br>
272 public event EventHandler FocusGained
276 if (_keyInputFocusGainedEventHandler == null)
278 _keyInputFocusGainedCallback = OnKeyInputFocusGained;
279 this.KeyInputFocusGainedSignal().Connect(_keyInputFocusGainedCallback);
282 _keyInputFocusGainedEventHandler += value;
287 _keyInputFocusGainedEventHandler -= value;
289 if (_keyInputFocusGainedEventHandler == null && KeyInputFocusGainedSignal().Empty() == false)
291 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
296 private void OnKeyInputFocusGained(IntPtr view)
298 if (_keyInputFocusGainedEventHandler != null)
300 _keyInputFocusGainedEventHandler(this, null);
305 private EventHandler _keyInputFocusLostEventHandler;
306 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
307 private delegate void KeyInputFocusLostCallbackType(IntPtr control);
308 private KeyInputFocusLostCallbackType _keyInputFocusLostCallback;
311 /// An event for the KeyInputFocusLost signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br>
312 /// The KeyInputFocusLost signal is emitted when the control loses the key input focus.<br>
314 public event EventHandler FocusLost
318 if (_keyInputFocusLostEventHandler == null)
320 _keyInputFocusLostCallback = OnKeyInputFocusLost;
321 this.KeyInputFocusLostSignal().Connect(_keyInputFocusLostCallback);
324 _keyInputFocusLostEventHandler += value;
329 _keyInputFocusLostEventHandler -= value;
331 if (_keyInputFocusLostEventHandler == null && KeyInputFocusLostSignal().Empty() == false)
333 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
338 private void OnKeyInputFocusLost(IntPtr view)
340 if (_keyInputFocusLostEventHandler != null)
342 _keyInputFocusLostEventHandler(this, null);
347 /// Event arguments that passed via the KeyEvent signal.
349 public class KeyEventArgs : EventArgs
354 /// Key - is the key sent to the view.
369 private EventHandlerWithReturnType<object, KeyEventArgs, bool> _keyEventHandler;
370 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
371 private delegate bool KeyCallbackType(IntPtr control, IntPtr keyEvent);
372 private KeyCallbackType _keyCallback;
375 /// An event for the KeyPressed signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br>
376 /// The KeyPressed signal is emitted when the key event is received.<br>
378 public event EventHandlerWithReturnType<object, KeyEventArgs, bool> KeyEvent
382 if (_keyEventHandler == null)
384 _keyCallback = OnKeyEvent;
385 this.KeyEventSignal().Connect(_keyCallback);
388 _keyEventHandler += value;
393 _keyEventHandler -= value;
395 if (_keyEventHandler == null && KeyEventSignal().Empty() == false)
397 this.KeyEventSignal().Disconnect(_keyCallback);
402 private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
404 KeyEventArgs e = new KeyEventArgs();
408 e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
410 if (_keyEventHandler != null)
412 Delegate[] delegateList = _keyEventHandler.GetInvocationList();
414 // Oring the result of each callback.
415 foreach ( EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList )
417 result |= del( this, e );
424 private EventHandler _onRelayoutEventHandler;
425 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
426 private delegate void OnRelayoutEventCallbackType(IntPtr control);
427 private OnRelayoutEventCallbackType _onRelayoutEventCallback;
430 /// An event for the OnRelayout signal which can be used to subscribe or unsubscribe the event handler.<br>
431 /// The OnRelayout signal is emitted after the size has been set on the view during relayout.<br>
433 public event EventHandler Relayout
437 if (_onRelayoutEventHandler == null)
439 _onRelayoutEventCallback = OnRelayout;
440 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
443 _onRelayoutEventHandler += value;
448 _onRelayoutEventHandler -= value;
450 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
452 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
458 // Callback for View OnRelayout signal
459 private void OnRelayout(IntPtr data)
461 if (_onRelayoutEventHandler != null)
463 _onRelayoutEventHandler(this, null);
468 /// Event arguments that passed via the touch signal.
470 public class TouchEventArgs : EventArgs
472 private Touch _touch;
475 /// Touch - contains the information of touch points.
490 private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
491 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
492 private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
493 private TouchDataCallbackType _touchDataCallback;
496 /// An event for the touched signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br>
497 /// The touched signal is emitted when the touch input is received.<br>
499 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
503 if (_touchDataEventHandler == null)
505 _touchDataCallback = OnTouch;
506 this.TouchSignal().Connect(_touchDataCallback);
509 _touchDataEventHandler += value;
514 _touchDataEventHandler -= value;
516 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
518 this.TouchSignal().Disconnect(_touchDataCallback);
524 // Callback for View TouchSignal
525 private bool OnTouch(IntPtr view, IntPtr touchData)
527 TouchEventArgs e = new TouchEventArgs();
529 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
531 if (_touchDataEventHandler != null)
533 return _touchDataEventHandler(this, e);
540 /// Event arguments that passed via the hover signal.
542 public class HoverEventArgs : EventArgs
544 private Hover _hover;
547 /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
562 private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
563 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
564 private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
565 private HoverEventCallbackType _hoverEventCallback;
568 /// An event for the hovered signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br>
569 /// The hovered signal is emitted when the hover input is received.<br>
571 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
575 if (_hoverEventHandler == null)
577 _hoverEventCallback = OnHoverEvent;
578 this.HoveredSignal().Connect(_hoverEventCallback);
581 _hoverEventHandler += value;
586 _hoverEventHandler -= value;
588 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
590 this.HoveredSignal().Disconnect(_hoverEventCallback);
596 // Callback for View Hover signal
597 private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
599 HoverEventArgs e = new HoverEventArgs();
601 e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
603 if (_hoverEventHandler != null)
605 return _hoverEventHandler(this, e);
612 /// Event arguments that passed via the wheel signal.
614 public class WheelEventArgs : EventArgs
616 private Wheel _wheel;
619 /// WheelEvent - store a wheel rolling type: MOUSE_WHEEL or CUSTOM_WHEEL.
634 private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
635 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
636 private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
637 private WheelEventCallbackType _wheelEventCallback;
640 /// An event for the WheelMoved signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br>
641 /// The WheelMoved signal is emitted when the wheel event is received.<br>
643 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
647 if (_wheelEventHandler == null)
649 _wheelEventCallback = OnWheelEvent;
650 this.WheelEventSignal().Connect(_wheelEventCallback);
653 _wheelEventHandler += value;
658 _wheelEventHandler -= value;
660 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
662 this.WheelEventSignal().Disconnect(_wheelEventCallback);
668 // Callback for View Wheel signal
669 private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
671 WheelEventArgs e = new WheelEventArgs();
673 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
675 if (_wheelEventHandler != null)
677 return _wheelEventHandler(this, e);
683 private EventHandler _onWindowEventHandler;
684 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
685 private delegate void OnWindowEventCallbackType(IntPtr control);
686 private OnWindowEventCallbackType _onWindowEventCallback;
689 /// An event for the OnWindow signal which can be used to subscribe or unsubscribe the event handler.<br>
690 /// The OnWindow signal is emitted after the view has been connected to the window.<br>
692 public event EventHandler AddedToWindow
696 if (_onWindowEventHandler == null)
698 _onWindowEventCallback = OnWindow;
699 this.OnWindowSignal().Connect(_onWindowEventCallback);
702 _onWindowEventHandler += value;
707 _onWindowEventHandler -= value;
709 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
711 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
716 // Callback for View OnWindow signal
717 private void OnWindow(IntPtr data)
719 if (_onWindowEventHandler != null)
721 _onWindowEventHandler(this, null);
726 private EventHandler _offWindowEventHandler;
727 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
728 private delegate void OffWindowEventCallbackType(IntPtr control);
729 private OffWindowEventCallbackType _offWindowEventCallback;
732 /// An event for the OffWindow signal, which can be used to subscribe or unsubscribe the event handler.<br>
733 /// OffWindow signal is emitted after the view has been disconnected from the window.<br>
735 public event EventHandler RemovedFromWindow
739 if (_offWindowEventHandler == null)
741 _offWindowEventCallback = OffWindow;
742 this.OffWindowSignal().Connect(_offWindowEventCallback);
745 _offWindowEventHandler += value;
750 _offWindowEventHandler -= value;
752 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
754 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
759 // Callback for View OffWindow signal
760 private void OffWindow(IntPtr data)
762 if (_offWindowEventHandler != null)
764 _offWindowEventHandler(this, null);
769 /// Event arguments of visibility changed.
771 public class VisibilityChangedEventArgs : EventArgs
774 private bool _visibility;
775 private VisibilityChangeType _type;
778 /// The view, or child of view, whose visibility has changed.
793 /// Whether the view is now visible or not.
795 public bool Visibility
808 /// Whether the view's visible property has changed or a parent's.
810 public VisibilityChangeType Type
823 private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
824 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
825 private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
826 private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
829 /// An event for visibility change which can be used to subscribe or unsubscribe the event handler.<br>
830 /// This signal is emitted when the visible property of this or a parent view is changed.<br>
832 public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
836 if (_visibilityChangedEventHandler == null)
838 _visibilityChangedEventCallback = OnVisibilityChanged;
839 VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
842 _visibilityChangedEventHandler += value;
847 _visibilityChangedEventHandler -= value;
849 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
851 VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
856 // Callback for View visibility change signal
857 private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
859 VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
862 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
864 e.Visibility = visibility;
867 if (_visibilityChangedEventHandler != null)
869 _visibilityChangedEventHandler(this, e);
875 /// Event arguments of layout direction changed.
877 public class LayoutDirectionChangedEventArgs : EventArgs
880 private ViewLayoutDirectionType _type;
883 /// The view, or child of view, whose layout direction has changed.
898 /// Whether the view's layout direction property has changed or a parent's.
900 public ViewLayoutDirectionType Type
913 private EventHandler<LayoutDirectionChangedEventArgs> _layoutDirectionChangedEventHandler;
914 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
915 private delegate void LayoutDirectionChangedEventCallbackType(IntPtr data, ViewLayoutDirectionType type);
916 private LayoutDirectionChangedEventCallbackType _layoutDirectionChangedEventCallback;
919 /// Event for layout direction change which can be used to subscribe/unsubscribe the event handler.<br>
920 /// This signal is emitted when the layout direction property of this or a parent view is changed.<br>
922 public event EventHandler<LayoutDirectionChangedEventArgs> LayoutDirectionChanged
926 if (_layoutDirectionChangedEventHandler == null)
928 _layoutDirectionChangedEventCallback = OnLayoutDirectionChanged;
929 LayoutDirectionChangedSignal(this).Connect(_layoutDirectionChangedEventCallback);
932 _layoutDirectionChangedEventHandler += value;
937 _layoutDirectionChangedEventHandler -= value;
939 if (_layoutDirectionChangedEventHandler == null && LayoutDirectionChangedSignal(this).Empty() == false)
941 LayoutDirectionChangedSignal(this).Disconnect(_layoutDirectionChangedEventCallback);
946 // Callback for View layout direction change signal
947 private void OnLayoutDirectionChanged(IntPtr data, ViewLayoutDirectionType type)
949 LayoutDirectionChangedEventArgs e = new LayoutDirectionChangedEventArgs();
952 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
956 if (_layoutDirectionChangedEventHandler != null)
958 _layoutDirectionChangedEventHandler(this, e);
968 // Resource Ready Signal
970 private EventHandler _resourcesLoadedEventHandler;
971 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
972 private delegate void ResourcesLoadedCallbackType(IntPtr control);
973 private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
976 /// An event for the ResourcesLoadedSignal signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br>
977 /// This signal is emitted after all resources required by a view are loaded and ready.<br>
979 public event EventHandler ResourcesLoaded
983 if (_resourcesLoadedEventHandler == null)
985 _ResourcesLoadedCallback = OnResourcesLoaded;
986 this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
989 _resourcesLoadedEventHandler += value;
994 _resourcesLoadedEventHandler -= value;
996 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
998 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
1003 private void OnResourcesLoaded(IntPtr view)
1005 if (_resourcesLoadedEventHandler != null)
1007 _resourcesLoadedEventHandler(this, null);
1011 internal IntPtr GetPtrfromView()
1013 return (IntPtr)swigCPtr;
1016 internal class Property
1018 internal static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get();
1019 internal static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get();
1020 internal static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get();
1021 internal static readonly int LEFT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
1022 internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
1023 internal static readonly int UP_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
1024 internal static readonly int DOWN_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
1025 internal static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get();
1026 internal static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get();
1027 internal static readonly int SIBLING_ORDER = NDalicManualPINVOKE.Actor_Property_SIBLING_ORDER_get();
1028 internal static readonly int OPACITY = NDalicManualPINVOKE.Actor_Property_OPACITY_get();
1029 internal static readonly int SCREEN_POSITION = NDalicManualPINVOKE.Actor_Property_SCREEN_POSITION_get();
1030 internal static readonly int POSITION_USES_ANCHOR_POINT = NDalicManualPINVOKE.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
1031 internal static readonly int PARENT_ORIGIN = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_get();
1032 internal static readonly int PARENT_ORIGIN_X = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_X_get();
1033 internal static readonly int PARENT_ORIGIN_Y = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Y_get();
1034 internal static readonly int PARENT_ORIGIN_Z = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Z_get();
1035 internal static readonly int ANCHOR_POINT = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_get();
1036 internal static readonly int ANCHOR_POINT_X = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_X_get();
1037 internal static readonly int ANCHOR_POINT_Y = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Y_get();
1038 internal static readonly int ANCHOR_POINT_Z = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Z_get();
1039 internal static readonly int SIZE = NDalicPINVOKE.Actor_Property_SIZE_get();
1040 internal static readonly int SIZE_WIDTH = NDalicPINVOKE.Actor_Property_SIZE_WIDTH_get();
1041 internal static readonly int SIZE_HEIGHT = NDalicPINVOKE.Actor_Property_SIZE_HEIGHT_get();
1042 internal static readonly int SIZE_DEPTH = NDalicPINVOKE.Actor_Property_SIZE_DEPTH_get();
1043 internal static readonly int POSITION = NDalicPINVOKE.Actor_Property_POSITION_get();
1044 internal static readonly int POSITION_X = NDalicPINVOKE.Actor_Property_POSITION_X_get();
1045 internal static readonly int POSITION_Y = NDalicPINVOKE.Actor_Property_POSITION_Y_get();
1046 internal static readonly int POSITION_Z = NDalicPINVOKE.Actor_Property_POSITION_Z_get();
1047 internal static readonly int WORLD_POSITION = NDalicPINVOKE.Actor_Property_WORLD_POSITION_get();
1048 internal static readonly int WORLD_POSITION_X = NDalicPINVOKE.Actor_Property_WORLD_POSITION_X_get();
1049 internal static readonly int WORLD_POSITION_Y = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Y_get();
1050 internal static readonly int WORLD_POSITION_Z = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Z_get();
1051 internal static readonly int ORIENTATION = NDalicPINVOKE.Actor_Property_ORIENTATION_get();
1052 internal static readonly int WORLD_ORIENTATION = NDalicPINVOKE.Actor_Property_WORLD_ORIENTATION_get();
1053 internal static readonly int SCALE = NDalicPINVOKE.Actor_Property_SCALE_get();
1054 internal static readonly int SCALE_X = NDalicPINVOKE.Actor_Property_SCALE_X_get();
1055 internal static readonly int SCALE_Y = NDalicPINVOKE.Actor_Property_SCALE_Y_get();
1056 internal static readonly int SCALE_Z = NDalicPINVOKE.Actor_Property_SCALE_Z_get();
1057 internal static readonly int WORLD_SCALE = NDalicPINVOKE.Actor_Property_WORLD_SCALE_get();
1058 internal static readonly int VISIBLE = NDalicPINVOKE.Actor_Property_VISIBLE_get();
1059 internal static readonly int WORLD_COLOR = NDalicPINVOKE.Actor_Property_WORLD_COLOR_get();
1060 internal static readonly int WORLD_MATRIX = NDalicPINVOKE.Actor_Property_WORLD_MATRIX_get();
1061 internal static readonly int NAME = NDalicPINVOKE.Actor_Property_NAME_get();
1062 internal static readonly int SENSITIVE = NDalicPINVOKE.Actor_Property_SENSITIVE_get();
1063 internal static readonly int LEAVE_REQUIRED = NDalicPINVOKE.Actor_Property_LEAVE_REQUIRED_get();
1064 internal static readonly int INHERIT_ORIENTATION = NDalicPINVOKE.Actor_Property_INHERIT_ORIENTATION_get();
1065 internal static readonly int INHERIT_SCALE = NDalicPINVOKE.Actor_Property_INHERIT_SCALE_get();
1066 internal static readonly int DRAW_MODE = NDalicPINVOKE.Actor_Property_DRAW_MODE_get();
1067 internal static readonly int SIZE_MODE_FACTOR = NDalicPINVOKE.Actor_Property_SIZE_MODE_FACTOR_get();
1068 internal static readonly int WIDTH_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_WIDTH_RESIZE_POLICY_get();
1069 internal static readonly int HEIGHT_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_HEIGHT_RESIZE_POLICY_get();
1070 internal static readonly int SIZE_SCALE_POLICY = NDalicPINVOKE.Actor_Property_SIZE_SCALE_POLICY_get();
1071 internal static readonly int WIDTH_FOR_HEIGHT = NDalicPINVOKE.Actor_Property_WIDTH_FOR_HEIGHT_get();
1072 internal static readonly int HEIGHT_FOR_WIDTH = NDalicPINVOKE.Actor_Property_HEIGHT_FOR_WIDTH_get();
1073 internal static readonly int PADDING = NDalicPINVOKE.Actor_Property_PADDING_get();
1074 internal static readonly int MINIMUM_SIZE = NDalicPINVOKE.Actor_Property_MINIMUM_SIZE_get();
1075 internal static readonly int MAXIMUM_SIZE = NDalicPINVOKE.Actor_Property_MAXIMUM_SIZE_get();
1076 internal static readonly int INHERIT_POSITION = NDalicPINVOKE.Actor_Property_INHERIT_POSITION_get();
1077 internal static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
1078 internal static readonly int INHERIT_LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_INHERIT_LAYOUT_DIRECTION_get();
1079 internal static readonly int LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_LAYOUT_DIRECTION_get();
1083 /// Describes the direction to move the focus towards.
1085 public enum FocusDirection
1096 /// Creates a new instance of a view.
1098 public View() : this(NDalicPINVOKE.View_New(), true)
1100 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1103 internal View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true)
1105 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1109 /// Downcasts a handle to view handle.<br>
1110 /// If handle points to a view, the downcast produces a valid handle.<br>
1111 /// If not, the returned handle is left uninitialized.<br>
1113 /// <param name="handle">A handle to an object.</param>
1114 /// <returns>A handle to a view or an uninitialized handle.</returns>
1115 [Obsolete("Please do not use! this will be deprecated, instead please use as keyword.")]
1116 public static View DownCast(BaseHandle handle)
1118 View ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as View;
1119 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1123 [Obsolete("Please do not use! this will be deprecated, instead please use as keyword.")]
1124 public static T DownCast<T>(View view) where T : View
1126 T ret = Registry.GetManagedBaseHandleFromNativePtr(view) as T;
1134 private View ConvertIdToView(uint id)
1140 View parentView = Parent as View;
1141 view = parentView.FindChildById(id);
1146 view = Window.Instance.GetRootLayer().FindChildById(id);
1152 internal void SetKeyInputFocus()
1154 NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
1155 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1159 /// Queries whether the view has a focus.
1161 /// <returns>True if this view has a focus.</returns>
1162 public bool HasFocus()
1164 bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
1165 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1169 internal void ClearKeyInputFocus()
1171 NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
1172 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1175 internal PinchGestureDetector GetPinchGestureDetector()
1177 PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
1178 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1182 internal PanGestureDetector GetPanGestureDetector()
1184 PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
1185 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1189 internal TapGestureDetector GetTapGestureDetector()
1191 TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
1192 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1196 internal LongPressGestureDetector GetLongPressGestureDetector()
1198 LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
1199 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1204 /// Sets the name of the style to be applied to the view.
1206 /// <param name="styleName">A string matching a style described in a stylesheet.</param>
1207 public void SetStyleName(string styleName)
1209 NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
1210 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1214 /// Retrieves the name of the style to be applied to the view (if any).
1216 /// <returns>A string matching a style, or an empty string.</returns>
1217 public string GetStyleName()
1219 string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
1220 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1224 internal void SetBackgroundColor(Vector4 color)
1226 NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
1227 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1230 internal Vector4 GetBackgroundColor()
1232 Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
1233 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1237 internal void SetBackgroundImage(Image image)
1239 NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
1240 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1244 /// Clears the background.
1246 public void ClearBackground()
1248 NDalicPINVOKE.View_ClearBackground(swigCPtr);
1249 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1252 internal ControlKeySignal KeyEventSignal()
1254 ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
1255 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1259 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
1261 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
1262 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1266 internal KeyInputFocusSignal KeyInputFocusLostSignal()
1268 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
1269 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1273 internal View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
1275 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1278 internal enum PropertyRange
1280 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
1281 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
1282 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
1286 /// The StyleName, type string.
1288 public string StyleName
1293 GetProperty(View.Property.STYLE_NAME).Get(out temp);
1298 SetProperty(View.Property.STYLE_NAME, new Tizen.NUI.PropertyValue(value));
1303 /// The mutually exclusive with BACKGROUND_IMAGE & BACKGROUND type Vector4.
1305 public Color BackgroundColor
1309 Color backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1311 Tizen.NUI.PropertyMap background = Background;
1313 background.Find(Visual.Property.Type)?.Get(out visualType);
1314 if (visualType == (int)Visual.Type.Color)
1316 background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor);
1319 return backgroundColor;
1323 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1328 /// Creates an animation to animate the background color visual. If there is no
1329 /// background visual, creates one with transparent black as it's mixColor.
1331 public Animation AnimateBackgroundColor( object destinationValue,
1334 AlphaFunction.BuiltinFunctions? alphaFunction = null,
1335 object initialValue = null)
1337 Tizen.NUI.PropertyMap background = Background;
1339 if( background.Empty() )
1341 // If there is no background yet, ensure there is a transparent
1343 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1344 background = Background;
1346 return AnimateColor( "background", destinationValue, startTime, endTime, alphaFunction, initialValue );
1350 /// Creates an animation to animate the mixColor of the named visual.
1352 public Animation AnimateColor( string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null )
1354 Animation animation = null;
1356 PropertyMap _animator = new PropertyMap();
1357 if( alphaFunction != null )
1359 _animator.Add("alphaFunction", new PropertyValue( AlphaFunction.BuiltinToPropertyKey(alphaFunction) ) );
1362 PropertyMap _timePeriod = new PropertyMap();
1363 _timePeriod.Add( "duration", new PropertyValue((endTime-startTime)/1000.0f) );
1364 _timePeriod.Add( "delay", new PropertyValue( startTime/1000.0f ) );
1365 _animator.Add( "timePeriod", new PropertyValue( _timePeriod ) );
1367 PropertyMap _transition = new PropertyMap();
1368 _transition.Add( "animator", new PropertyValue( _animator ) );
1369 _transition.Add( "target", new PropertyValue( targetVisual ) );
1370 _transition.Add( "property", new PropertyValue( "mixColor" ) );
1372 if( initialColor != null )
1374 PropertyValue initValue = PropertyValue.CreateFromObject( initialColor );
1375 _transition.Add( "initialValue", initValue );
1378 PropertyValue destValue = PropertyValue.CreateFromObject( destinationColor );
1379 _transition.Add( "targetValue", destValue );
1380 TransitionData _transitionData = new TransitionData( _transition );
1382 animation = new Animation( NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true );
1383 if (NDalicPINVOKE.SWIGPendingException.Pending)
1384 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1390 /// The mutually exclusive with BACKGROUND_COLOR & BACKGROUND type Map.
1392 public string BackgroundImage
1396 string backgroundImage = "";
1398 Tizen.NUI.PropertyMap background = Background;
1400 background.Find(Visual.Property.Type)?.Get(out visualType);
1401 if (visualType == (int)Visual.Type.Image)
1403 background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
1406 return backgroundImage;
1410 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1414 public Tizen.NUI.PropertyMap Background
1418 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1419 GetProperty( View.Property.BACKGROUND ).Get(temp);
1424 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1430 /// The current state of the view.
1437 if (GetProperty(View.Property.STATE).Get(out temp) == false)
1439 NUILog.Error("State get error!");
1445 return States.Normal;
1449 return States.Focused;
1453 return States.Disabled;
1457 return States.Normal;
1463 SetProperty(View.Property.STATE, new Tizen.NUI.PropertyValue((int)value));
1468 /// The current sub state of the view.
1470 public States SubState
1475 if (GetProperty(View.Property.SUB_STATE).Get(out temp) == false)
1477 NUILog.Error("subState get error!");
1482 return States.Normal;
1484 return States.Focused;
1486 return States.Disabled;
1488 return States.Normal;
1493 string valueToString = "";
1498 valueToString = "NORMAL";
1501 case States.Focused:
1503 valueToString = "FOCUSED";
1506 case States.Disabled:
1508 valueToString = "DISABLED";
1513 valueToString = "NORMAL";
1517 SetProperty(View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
1522 /// Displays a tooltip
1524 public Tizen.NUI.PropertyMap Tooltip
1528 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1529 GetProperty(View.Property.TOOLTIP).Get(temp);
1534 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1539 /// Displays a tooltip as a text.
1541 public string TooltipText
1545 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1549 private int LeftFocusableViewId
1554 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
1559 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1563 private int RightFocusableViewId
1568 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
1573 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1577 private int UpFocusableViewId
1582 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
1587 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1591 private int DownFocusableViewId
1596 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
1601 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1606 /// The Child property of FlexContainer.<br>
1607 /// The proportion of the free space in the container, the flex item will receive.<br>
1608 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br>
1615 GetProperty(FlexContainer.ChildProperty.FLEX).Get(out temp);
1620 SetProperty(FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue(value));
1625 /// The Child property of FlexContainer.<br>
1626 /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br>
1628 public int AlignSelf
1633 GetProperty(FlexContainer.ChildProperty.ALIGN_SELF).Get(out temp);
1638 SetProperty(FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue(value));
1643 /// The Child property of FlexContainer.<br>
1644 /// The space around the flex item.<br>
1646 public Vector4 FlexMargin
1650 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1651 GetProperty(FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
1656 SetProperty(FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue(value));
1661 /// The top-left cell this child occupies, if not set, the first available cell is used.
1663 public Vector2 CellIndex
1667 Vector2 temp = new Vector2(0.0f, 0.0f);
1668 GetProperty(TableView.ChildProperty.CELL_INDEX).Get(temp);
1673 SetProperty(TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue(value));
1678 /// The number of rows this child occupies, if not set, the default value is 1.
1680 public float RowSpan
1685 GetProperty(TableView.ChildProperty.ROW_SPAN).Get(out temp);
1690 SetProperty(TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue(value));
1695 /// The number of columns this child occupies, if not set, the default value is 1.
1697 public float ColumnSpan
1702 GetProperty(TableView.ChildProperty.COLUMN_SPAN).Get(out temp);
1707 SetProperty(TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue(value));
1712 /// The horizontal alignment of this child inside the cells, if not set, the default value is 'left'.
1714 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
1719 if (GetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
1721 NUILog.Error("CellHorizontalAlignment get error!");
1727 return Tizen.NUI.HorizontalAlignmentType.Left;
1729 return Tizen.NUI.HorizontalAlignmentType.Center;
1731 return Tizen.NUI.HorizontalAlignmentType.Right;
1733 return Tizen.NUI.HorizontalAlignmentType.Left;
1738 string valueToString = "";
1741 case Tizen.NUI.HorizontalAlignmentType.Left:
1743 valueToString = "left";
1746 case Tizen.NUI.HorizontalAlignmentType.Center:
1748 valueToString = "center";
1751 case Tizen.NUI.HorizontalAlignmentType.Right:
1753 valueToString = "right";
1758 valueToString = "left";
1762 SetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1767 /// The vertical alignment of this child inside the cells, if not set, the default value is 'top'.
1769 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
1774 GetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
1776 NUILog.Error("CellVerticalAlignment get error!");
1782 return Tizen.NUI.VerticalAlignmentType.Top;
1784 return Tizen.NUI.VerticalAlignmentType.Center;
1786 return Tizen.NUI.VerticalAlignmentType.Bottom;
1788 return Tizen.NUI.VerticalAlignmentType.Top;
1793 string valueToString = "";
1796 case Tizen.NUI.VerticalAlignmentType.Top:
1798 valueToString = "top";
1801 case Tizen.NUI.VerticalAlignmentType.Center:
1803 valueToString = "center";
1806 case Tizen.NUI.VerticalAlignmentType.Bottom:
1808 valueToString = "bottom";
1813 valueToString = "top";
1817 SetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1822 /// The left focusable view.<br>
1823 /// This will return null if not set.<br>
1824 /// This will also return null if the specified left focusable view is not on a window.<br>
1826 public View LeftFocusableView
1828 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1831 if (LeftFocusableViewId >= 0)
1833 return ConvertIdToView((uint)LeftFocusableViewId);
1839 LeftFocusableViewId = (int)value.GetId();
1844 /// The right focusable view.<br>
1845 /// This will return null if not set.<br>
1846 /// This will also return null if the specified right focusable view is not on a window.<br>
1848 public View RightFocusableView
1850 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1853 if (RightFocusableViewId >= 0)
1855 return ConvertIdToView((uint)RightFocusableViewId);
1861 RightFocusableViewId = (int)value.GetId();
1866 /// The up focusable view.<br>
1867 /// This will return null if not set.<br>
1868 /// This will also return null if the specified up focusable view is not on a window.<br>
1870 public View UpFocusableView
1872 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1875 if (UpFocusableViewId >= 0)
1877 return ConvertIdToView((uint)UpFocusableViewId);
1883 UpFocusableViewId = (int)value.GetId();
1888 /// The down focusable view.<br>
1889 /// This will return null if not set.<br>
1890 /// This will also return null if the specified down focusable view is not on a window.<br>
1892 public View DownFocusableView
1894 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1897 if (DownFocusableViewId >= 0)
1899 return ConvertIdToView((uint)DownFocusableViewId);
1905 DownFocusableViewId = (int)value.GetId();
1910 /// Whether the view should be focusable by keyboard navigation.
1912 public bool Focusable
1916 SetKeyboardFocusable(value);
1920 return IsKeyboardFocusable();
1925 /// Enumeration for describing the states of the view.
1930 /// The normal state.
1934 /// The focused state.
1938 /// The disabled state.
1944 /// Retrieves the position of the view.<br>
1945 /// The coordinates are relative to the view's parent.<br>
1947 public Position CurrentPosition
1951 return GetCurrentPosition();
1956 /// Sets the size of a view for the width and the height.<br>
1957 /// Geometry can be scaled to fit within this area.<br>
1958 /// This does not interfere with the view's scale factor.<br>
1959 /// The views default depth is the minimum of width and height.<br>
1961 public Size2D Size2D
1965 Size temp = new Size(0.0f, 0.0f, 0.0f);
1966 GetProperty(View.Property.SIZE).Get(temp);
1967 Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
1972 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(new Size(value)));
1977 /// Retrieves the size of the view.<br>
1978 /// The coordinates are relative to the view's parent.<br>
1980 public Size2D CurrentSize
1984 return GetCurrentSize();
1988 [Obsolete("Please do not use! this will be deprecated. Please use Visibility instead.")]
1998 /// Retrieves and sets the view's opacity.<br>
2000 public float Opacity
2005 GetProperty(View.Property.OPACITY).Get(out temp);
2010 SetProperty(View.Property.OPACITY, new Tizen.NUI.PropertyValue(value));
2015 /// Sets the position of the view for X and Y.<br>
2016 /// By default, sets the position vector between the parent origin and the pivot point (default).<br>
2017 /// If the position inheritance is disabled, sets the world position.<br>
2019 public Position2D Position2D
2023 Position temp = new Position(0.0f, 0.0f, 0.0f);
2024 GetProperty(View.Property.POSITION).Get(temp);
2025 return new Position2D(temp);
2029 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(new Position(value)));
2034 /// Retrieves the screen postion of the view.<br>
2036 public Vector2 ScreenPosition
2040 Vector2 temp = new Vector2(0.0f, 0.0f);
2041 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
2047 /// Determines whether the pivot point should be used to determine the position of the view.
2048 /// This is true by default.
2050 /// <remarks>If false, then the top-left of the view is used for the position.
2051 /// Setting this to false will allow scaling or rotation around the anchor-point without affecting the view's position.
2053 public bool PositionUsesPivotPoint
2058 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
2063 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
2067 [Obsolete("Please do not use! this will be deprecated")]
2068 public bool PositionUsesAnchorPoint
2073 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
2078 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
2082 internal bool FocusState
2086 return IsKeyboardFocusable();
2090 SetKeyboardFocusable(value);
2095 /// Queries whether the view is connected to the stage.<br>
2096 /// When a view is connected, it will be directly or indirectly parented to the root view.<br>
2098 public bool IsOnWindow
2107 /// Gets the depth in the hierarchy for the view.
2109 public int HierarchyDepth
2113 return GetHierarchyDepth();
2118 /// Sets the sibling order of the view so the depth position can be defined within the same parent.
2121 /// Note the initial value is 0.
2122 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove, and LowerBelow will override the sibling order.
2123 /// The values set by this property will likely change.
2125 public int SiblingOrder
2130 GetProperty(View.Property.SIBLING_ORDER).Get(out temp);
2135 SetProperty(View.Property.SIBLING_ORDER, new Tizen.NUI.PropertyValue(value));
2140 /// Returns the natural size of the view.
2143 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
2145 [Obsolete("Please do not use! this will be deprecated, please use NaturalSize2D instead")]
2146 public Vector3 NaturalSize
2150 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2151 if (NDalicPINVOKE.SWIGPendingException.Pending)
2152 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2158 /// Returns the natural size (Size2D) of the view.
2161 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
2163 public Size2D NaturalSize2D
2167 Vector3 temp = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2168 if (NDalicPINVOKE.SWIGPendingException.Pending)
2169 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2171 return new Size2D((int)temp.Width, (int)temp.Height);
2179 /// This is an asynchronous method.
2190 /// This is an asynchronous method.
2191 /// If the view is hidden, then the view and its children will not be rendered.
2192 /// 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.
2199 internal void Raise()
2201 NDalicPINVOKE.Raise(swigCPtr);
2202 if (NDalicPINVOKE.SWIGPendingException.Pending)
2203 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2206 internal void Lower()
2208 NDalicPINVOKE.Lower(swigCPtr);
2209 if (NDalicPINVOKE.SWIGPendingException.Pending)
2210 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2214 /// Raises the view above all other views.
2217 /// Sibling order of views within the parent will be updated automatically.
2218 /// Once a raise or lower API is used, that view will then have an exclusive sibling order independent of insertion.
2220 public void RaiseToTop()
2222 NDalicPINVOKE.RaiseToTop(swigCPtr);
2223 if (NDalicPINVOKE.SWIGPendingException.Pending)
2224 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2228 /// Lowers the view to the bottom of all views.
2231 /// The sibling order of views within the parent will be updated automatically.
2232 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2234 public void LowerToBottom()
2236 NDalicPINVOKE.LowerToBottom(swigCPtr);
2237 if (NDalicPINVOKE.SWIGPendingException.Pending)
2238 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2242 /// Queries if all resources required by a view are loaded and ready.
2244 /// <remarks>Most resources are only loaded when the control is placed on the stage.
2246 public bool IsResourceReady()
2248 bool ret = NDalicPINVOKE.IsResourceReady(swigCPtr);
2249 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2254 /// Raises the view to above the target view.
2256 /// <remarks>The sibling order of views within the parent will be updated automatically.
2257 /// Views on the level above the target view will still be shown above this view.
2258 /// Raising this view above views with the same sibling order as each other will raise this view above them.
2259 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2261 /// <param name="target">Will be raised above this view.</param>
2262 internal void RaiseAbove(View target)
2264 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
2265 if (NDalicPINVOKE.SWIGPendingException.Pending)
2266 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2270 /// Lowers the view to below the target view.
2272 /// <remarks>The sibling order of views within the parent will be updated automatically.
2273 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
2274 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2276 /// <param name="target">Will be lowered below this view.</param>
2277 internal void LowerBelow(View target)
2279 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
2280 if (NDalicPINVOKE.SWIGPendingException.Pending)
2281 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2284 internal string GetName()
2286 string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);
2287 if (NDalicPINVOKE.SWIGPendingException.Pending)
2288 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2292 internal void SetName(string name)
2294 NDalicPINVOKE.Actor_SetName(swigCPtr, name);
2295 if (NDalicPINVOKE.SWIGPendingException.Pending)
2296 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2299 internal uint GetId()
2301 uint ret = NDalicPINVOKE.Actor_GetId(swigCPtr);
2302 if (NDalicPINVOKE.SWIGPendingException.Pending)
2303 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2307 internal bool IsRoot()
2309 bool ret = NDalicPINVOKE.Actor_IsRoot(swigCPtr);
2310 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2314 internal bool OnWindow()
2316 bool ret = NDalicPINVOKE.Actor_OnStage(swigCPtr);
2317 if (NDalicPINVOKE.SWIGPendingException.Pending)
2318 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2322 internal Layer GetLayer()
2324 IntPtr cPtr = NDalicPINVOKE.Actor_GetLayer(swigCPtr);
2325 Layer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Layer;
2327 if (NDalicPINVOKE.SWIGPendingException.Pending)
2328 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2333 /// Removes a view from its parent view or layer. If a view has no parent, this method does nothing.
2335 /// <pre>The (child) view has been initialized. </pre>
2336 public void Unparent()
2338 NDalicPINVOKE.Actor_Unparent(swigCPtr);
2339 if (NDalicPINVOKE.SWIGPendingException.Pending)
2340 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2344 /// Search through this view's hierarchy for a view with the given name.
2345 /// The view itself is also considered in the search.
2347 /// <pre>The view has been initialized.</pre>
2348 /// <param name="viewName">The name of the view to find.</param>
2349 /// <returns>A handle to the view if found, or an empty handle if not.</returns>
2350 public View FindChildByName(string viewName)
2352 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
2354 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2356 if (NDalicPINVOKE.SWIGPendingException.Pending)
2357 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2361 internal View FindChildById(uint id)
2363 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
2365 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2367 if (NDalicPINVOKE.SWIGPendingException.Pending)
2368 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2372 internal void SetParentOrigin(Vector3 origin)
2374 NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
2375 if (NDalicPINVOKE.SWIGPendingException.Pending)
2376 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2379 internal Vector3 GetCurrentParentOrigin()
2381 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentParentOrigin(swigCPtr), true);
2382 if (NDalicPINVOKE.SWIGPendingException.Pending)
2383 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2387 internal void SetAnchorPoint(Vector3 anchorPoint)
2389 NDalicPINVOKE.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
2390 if (NDalicPINVOKE.SWIGPendingException.Pending)
2391 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2394 internal Vector3 GetCurrentAnchorPoint()
2396 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentAnchorPoint(swigCPtr), true);
2397 if (NDalicPINVOKE.SWIGPendingException.Pending)
2398 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2402 internal void SetSize(float width, float height)
2404 NDalicPINVOKE.Actor_SetSize__SWIG_0(swigCPtr, width, height);
2405 if (NDalicPINVOKE.SWIGPendingException.Pending)
2406 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2409 internal void SetSize(float width, float height, float depth)
2411 NDalicPINVOKE.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
2412 if (NDalicPINVOKE.SWIGPendingException.Pending)
2413 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2416 internal void SetSize(Vector2 size)
2418 NDalicPINVOKE.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
2419 if (NDalicPINVOKE.SWIGPendingException.Pending)
2420 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2423 internal void SetSize(Vector3 size)
2425 NDalicPINVOKE.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
2426 if (NDalicPINVOKE.SWIGPendingException.Pending)
2427 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2430 internal Vector3 GetTargetSize()
2432 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetTargetSize(swigCPtr), true);
2433 if (NDalicPINVOKE.SWIGPendingException.Pending)
2434 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2438 internal Size2D GetCurrentSize()
2440 Size ret = new Size(NDalicPINVOKE.Actor_GetCurrentSize(swigCPtr), true);
2441 if (NDalicPINVOKE.SWIGPendingException.Pending)
2442 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2443 Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
2447 internal Vector3 GetNaturalSize()
2449 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2450 if (NDalicPINVOKE.SWIGPendingException.Pending)
2451 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2455 internal void SetPosition(float x, float y)
2457 NDalicPINVOKE.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
2458 if (NDalicPINVOKE.SWIGPendingException.Pending)
2459 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2462 internal void SetPosition(float x, float y, float z)
2464 NDalicPINVOKE.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
2465 if (NDalicPINVOKE.SWIGPendingException.Pending)
2466 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2469 internal void SetPosition(Vector3 position)
2471 NDalicPINVOKE.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
2472 if (NDalicPINVOKE.SWIGPendingException.Pending)
2473 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2476 internal void SetX(float x)
2478 NDalicPINVOKE.Actor_SetX(swigCPtr, x);
2479 if (NDalicPINVOKE.SWIGPendingException.Pending)
2480 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2483 internal void SetY(float y)
2485 NDalicPINVOKE.Actor_SetY(swigCPtr, y);
2486 if (NDalicPINVOKE.SWIGPendingException.Pending)
2487 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2490 internal void SetZ(float z)
2492 NDalicPINVOKE.Actor_SetZ(swigCPtr, z);
2493 if (NDalicPINVOKE.SWIGPendingException.Pending)
2494 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2497 internal void TranslateBy(Vector3 distance)
2499 NDalicPINVOKE.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
2500 if (NDalicPINVOKE.SWIGPendingException.Pending)
2501 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2504 internal Position GetCurrentPosition()
2506 Position ret = new Position(NDalicPINVOKE.Actor_GetCurrentPosition(swigCPtr), true);
2507 if (NDalicPINVOKE.SWIGPendingException.Pending)
2508 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2512 internal Vector3 GetCurrentWorldPosition()
2514 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldPosition(swigCPtr), true);
2515 if (NDalicPINVOKE.SWIGPendingException.Pending)
2516 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2520 internal void SetInheritPosition(bool inherit)
2522 NDalicPINVOKE.Actor_SetInheritPosition(swigCPtr, inherit);
2523 if (NDalicPINVOKE.SWIGPendingException.Pending)
2524 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2527 internal bool IsPositionInherited()
2529 bool ret = NDalicPINVOKE.Actor_IsPositionInherited(swigCPtr);
2530 if (NDalicPINVOKE.SWIGPendingException.Pending)
2531 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2535 internal void SetOrientation(Degree angle, Vector3 axis)
2537 NDalicPINVOKE.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2538 if (NDalicPINVOKE.SWIGPendingException.Pending)
2539 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2542 internal void SetOrientation(Radian angle, Vector3 axis)
2544 NDalicPINVOKE.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2545 if (NDalicPINVOKE.SWIGPendingException.Pending)
2546 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2549 internal void SetOrientation(Rotation orientation)
2551 NDalicPINVOKE.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
2552 if (NDalicPINVOKE.SWIGPendingException.Pending)
2553 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2556 internal void RotateBy(Degree angle, Vector3 axis)
2558 NDalicPINVOKE.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2559 if (NDalicPINVOKE.SWIGPendingException.Pending)
2560 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2563 internal void RotateBy(Radian angle, Vector3 axis)
2565 NDalicPINVOKE.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2566 if (NDalicPINVOKE.SWIGPendingException.Pending)
2567 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2570 internal void RotateBy(Rotation relativeRotation)
2572 NDalicPINVOKE.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
2573 if (NDalicPINVOKE.SWIGPendingException.Pending)
2574 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2577 internal Rotation GetCurrentOrientation()
2579 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentOrientation(swigCPtr), true);
2580 if (NDalicPINVOKE.SWIGPendingException.Pending)
2581 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2585 internal void SetInheritOrientation(bool inherit)
2587 NDalicPINVOKE.Actor_SetInheritOrientation(swigCPtr, inherit);
2588 if (NDalicPINVOKE.SWIGPendingException.Pending)
2589 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2592 internal bool IsOrientationInherited()
2594 bool ret = NDalicPINVOKE.Actor_IsOrientationInherited(swigCPtr);
2595 if (NDalicPINVOKE.SWIGPendingException.Pending)
2596 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2600 internal Rotation GetCurrentWorldOrientation()
2602 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentWorldOrientation(swigCPtr), true);
2603 if (NDalicPINVOKE.SWIGPendingException.Pending)
2604 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2608 internal void SetScale(float scale)
2610 NDalicPINVOKE.Actor_SetScale__SWIG_0(swigCPtr, scale);
2611 if (NDalicPINVOKE.SWIGPendingException.Pending)
2612 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2615 internal void SetScale(float scaleX, float scaleY, float scaleZ)
2617 NDalicPINVOKE.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
2618 if (NDalicPINVOKE.SWIGPendingException.Pending)
2619 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2622 internal void SetScale(Vector3 scale)
2624 NDalicPINVOKE.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
2625 if (NDalicPINVOKE.SWIGPendingException.Pending)
2626 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2629 internal void ScaleBy(Vector3 relativeScale)
2631 NDalicPINVOKE.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
2632 if (NDalicPINVOKE.SWIGPendingException.Pending)
2633 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2636 internal Vector3 GetCurrentScale()
2638 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentScale(swigCPtr), true);
2639 if (NDalicPINVOKE.SWIGPendingException.Pending)
2640 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2644 internal Vector3 GetCurrentWorldScale()
2646 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldScale(swigCPtr), true);
2647 if (NDalicPINVOKE.SWIGPendingException.Pending)
2648 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2652 internal void SetInheritScale(bool inherit)
2654 NDalicPINVOKE.Actor_SetInheritScale(swigCPtr, inherit);
2655 if (NDalicPINVOKE.SWIGPendingException.Pending)
2656 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2659 internal bool IsScaleInherited()
2661 bool ret = NDalicPINVOKE.Actor_IsScaleInherited(swigCPtr);
2662 if (NDalicPINVOKE.SWIGPendingException.Pending)
2663 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2667 internal Matrix GetCurrentWorldMatrix()
2669 Matrix ret = new Matrix(NDalicPINVOKE.Actor_GetCurrentWorldMatrix(swigCPtr), true);
2670 if (NDalicPINVOKE.SWIGPendingException.Pending)
2671 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2675 internal void SetVisible(bool visible)
2677 NDalicPINVOKE.Actor_SetVisible(swigCPtr, visible);
2678 if (NDalicPINVOKE.SWIGPendingException.Pending)
2679 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2682 internal bool IsVisible()
2684 bool ret = NDalicPINVOKE.Actor_IsVisible(swigCPtr);
2685 if (NDalicPINVOKE.SWIGPendingException.Pending)
2686 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2690 internal void SetOpacity(float opacity)
2692 NDalicPINVOKE.Actor_SetOpacity(swigCPtr, opacity);
2693 if (NDalicPINVOKE.SWIGPendingException.Pending)
2694 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2697 internal float GetCurrentOpacity()
2699 float ret = NDalicPINVOKE.Actor_GetCurrentOpacity(swigCPtr);
2700 if (NDalicPINVOKE.SWIGPendingException.Pending)
2701 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2705 internal void SetColor(Vector4 color)
2707 NDalicPINVOKE.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
2708 if (NDalicPINVOKE.SWIGPendingException.Pending)
2709 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2712 internal Vector4 GetCurrentColor()
2714 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentColor(swigCPtr), true);
2715 if (NDalicPINVOKE.SWIGPendingException.Pending)
2716 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2720 internal void SetColorMode(ColorMode colorMode)
2722 NDalicPINVOKE.Actor_SetColorMode(swigCPtr, (int)colorMode);
2723 if (NDalicPINVOKE.SWIGPendingException.Pending)
2724 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2727 internal ColorMode GetColorMode()
2729 ColorMode ret = (ColorMode)NDalicPINVOKE.Actor_GetColorMode(swigCPtr);
2730 if (NDalicPINVOKE.SWIGPendingException.Pending)
2731 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2735 internal Vector4 GetCurrentWorldColor()
2737 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentWorldColor(swigCPtr), true);
2738 if (NDalicPINVOKE.SWIGPendingException.Pending)
2739 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2743 internal void SetDrawMode(DrawModeType drawMode)
2745 NDalicPINVOKE.Actor_SetDrawMode(swigCPtr, (int)drawMode);
2746 if (NDalicPINVOKE.SWIGPendingException.Pending)
2747 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2750 internal DrawModeType GetDrawMode()
2752 DrawModeType ret = (DrawModeType)NDalicPINVOKE.Actor_GetDrawMode(swigCPtr);
2753 if (NDalicPINVOKE.SWIGPendingException.Pending)
2754 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2759 /// Converts screen coordinates into the view's coordinate system using the default camera.
2761 /// <pre>The view has been initialized.</pre>
2762 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5).</remarks>
2763 /// <param name="localX">On return, the X-coordinate relative to the view.</param>
2764 /// <param name="localY">On return, the Y-coordinate relative to the view.</param>
2765 /// <param name="screenX">The screen X-coordinate.</param>
2766 /// <param name="screenY">The screen Y-coordinate.</param>
2767 /// <returns>True if the conversion succeeded.</returns>
2768 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
2770 bool ret = NDalicPINVOKE.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
2771 if (NDalicPINVOKE.SWIGPendingException.Pending)
2772 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2776 internal void SetKeyboardFocusable(bool focusable)
2778 NDalicPINVOKE.Actor_SetKeyboardFocusable(swigCPtr, focusable);
2779 if (NDalicPINVOKE.SWIGPendingException.Pending)
2780 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2783 internal bool IsKeyboardFocusable()
2785 bool ret = NDalicPINVOKE.Actor_IsKeyboardFocusable(swigCPtr);
2786 if (NDalicPINVOKE.SWIGPendingException.Pending)
2787 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2791 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
2793 NDalicPINVOKE.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
2794 if (NDalicPINVOKE.SWIGPendingException.Pending)
2795 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2798 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
2800 ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.Actor_GetResizePolicy(swigCPtr, (int)dimension);
2801 if (NDalicPINVOKE.SWIGPendingException.Pending)
2802 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2807 /// Sets the relative to parent size factor of the view.<br>
2808 /// This factor is only used when ResizePolicy is set to either:
2809 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br>
2810 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br>
2812 /// <pre>The view has been initialized.</pre>
2813 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis.</param>
2814 public void SetSizeModeFactor(Vector3 factor)
2816 NDalicPINVOKE.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
2817 if (NDalicPINVOKE.SWIGPendingException.Pending)
2818 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2821 internal Vector3 GetSizeModeFactor()
2823 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetSizeModeFactor(swigCPtr), true);
2824 if (NDalicPINVOKE.SWIGPendingException.Pending)
2825 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2830 /// Calculates the height of the view given a width.<br>
2831 /// The natural size is used for default calculation.<br>
2832 /// Size 0 is treated as aspect ratio 1:1.<br>
2834 /// <param name="width">The width to use.</param>
2835 /// <returns>The height based on the width.</returns>
2836 public float GetHeightForWidth(float width)
2838 float ret = NDalicPINVOKE.Actor_GetHeightForWidth(swigCPtr, width);
2839 if (NDalicPINVOKE.SWIGPendingException.Pending)
2840 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2845 /// Calculates the width of the view given a height.<br>
2846 /// The natural size is used for default calculation.<br>
2847 /// Size 0 is treated as aspect ratio 1:1.<br>
2849 /// <param name="height">The height to use.</param>
2850 /// <returns>The width based on the height.</returns>
2851 public float GetWidthForHeight(float height)
2853 float ret = NDalicPINVOKE.Actor_GetWidthForHeight(swigCPtr, height);
2854 if (NDalicPINVOKE.SWIGPendingException.Pending)
2855 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2859 public float GetRelayoutSize(DimensionType dimension)
2861 float ret = NDalicPINVOKE.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
2862 if (NDalicPINVOKE.SWIGPendingException.Pending)
2863 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2867 public void SetPadding(PaddingType padding)
2869 NDalicPINVOKE.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
2870 if (NDalicPINVOKE.SWIGPendingException.Pending)
2871 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2874 public void GetPadding(PaddingType paddingOut)
2876 NDalicPINVOKE.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
2877 if (NDalicPINVOKE.SWIGPendingException.Pending)
2878 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2881 internal void SetMinimumSize(Vector2 size)
2883 NDalicPINVOKE.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
2884 if (NDalicPINVOKE.SWIGPendingException.Pending)
2885 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2888 internal Vector2 GetMinimumSize()
2890 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMinimumSize(swigCPtr), true);
2891 if (NDalicPINVOKE.SWIGPendingException.Pending)
2892 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2896 internal void SetMaximumSize(Vector2 size)
2898 NDalicPINVOKE.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
2899 if (NDalicPINVOKE.SWIGPendingException.Pending)
2900 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2903 internal Vector2 GetMaximumSize()
2905 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMaximumSize(swigCPtr), true);
2906 if (NDalicPINVOKE.SWIGPendingException.Pending)
2907 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2911 internal int GetHierarchyDepth()
2913 int ret = NDalicPINVOKE.Actor_GetHierarchyDepth(swigCPtr);
2914 if (NDalicPINVOKE.SWIGPendingException.Pending)
2915 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2919 public uint AddRenderer(Renderer renderer)
2921 uint ret = NDalicPINVOKE.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
2922 if (NDalicPINVOKE.SWIGPendingException.Pending)
2923 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2927 internal uint GetRendererCount()
2929 uint ret = NDalicPINVOKE.Actor_GetRendererCount(swigCPtr);
2930 if (NDalicPINVOKE.SWIGPendingException.Pending)
2931 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2935 public Renderer GetRendererAt(uint index)
2937 IntPtr cPtr = NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index);
2938 Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Renderer;
2940 if (NDalicPINVOKE.SWIGPendingException.Pending)
2941 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2945 public void RemoveRenderer(Renderer renderer)
2947 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
2948 if (NDalicPINVOKE.SWIGPendingException.Pending)
2949 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2952 public void RemoveRenderer(uint index)
2954 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
2955 if (NDalicPINVOKE.SWIGPendingException.Pending)
2956 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2959 internal TouchDataSignal TouchSignal()
2961 TouchDataSignal ret = new TouchDataSignal(NDalicPINVOKE.Actor_TouchSignal(swigCPtr), false);
2962 if (NDalicPINVOKE.SWIGPendingException.Pending)
2963 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2967 internal HoverSignal HoveredSignal()
2969 HoverSignal ret = new HoverSignal(NDalicPINVOKE.Actor_HoveredSignal(swigCPtr), false);
2970 if (NDalicPINVOKE.SWIGPendingException.Pending)
2971 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2975 internal WheelSignal WheelEventSignal()
2977 WheelSignal ret = new WheelSignal(NDalicPINVOKE.Actor_WheelEventSignal(swigCPtr), false);
2978 if (NDalicPINVOKE.SWIGPendingException.Pending)
2979 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2983 internal ViewSignal OnWindowSignal()
2985 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnStageSignal(swigCPtr), false);
2986 if (NDalicPINVOKE.SWIGPendingException.Pending)
2987 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2991 internal ViewSignal OffWindowSignal()
2993 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OffStageSignal(swigCPtr), false);
2994 if (NDalicPINVOKE.SWIGPendingException.Pending)
2995 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2999 internal ViewSignal OnRelayoutSignal()
3001 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnRelayoutSignal(swigCPtr), false);
3002 if (NDalicPINVOKE.SWIGPendingException.Pending)
3003 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3007 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view) {
3008 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
3009 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3014 internal ViewLayoutDirectionChangedSignal LayoutDirectionChangedSignal(View view) {
3015 ViewLayoutDirectionChangedSignal ret = new ViewLayoutDirectionChangedSignal(NDalicManualPINVOKE.LayoutDirectionChangedSignal(View.getCPtr(view)), false);
3016 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3021 internal ViewSignal ResourcesLoadedSignal()
3023 ViewSignal ret = new ViewSignal(NDalicPINVOKE.ResourceReadySignal(swigCPtr), false);
3024 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3029 /// Gets or sets the origin of a view within its parent's area.<br>
3030 /// 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>
3031 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br>
3032 /// A view's position is the distance between this origin and the view's anchor-point.<br>
3034 /// <pre>The view has been initialized.</pre>
3035 public Position ParentOrigin
3039 Position temp = new Position(0.0f, 0.0f, 0.0f);
3040 GetProperty(View.Property.PARENT_ORIGIN).Get(temp);
3045 SetProperty(View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue(value));
3049 internal float ParentOriginX
3054 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
3059 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
3063 internal float ParentOriginY
3068 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
3073 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
3077 internal float ParentOriginZ
3082 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
3087 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
3092 /// Gets or sets the anchor-point of a view.<br>
3093 /// 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>
3094 /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br>
3095 /// A view position is the distance between its parent-origin and this anchor-point.<br>
3096 /// A view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br>
3097 /// <pre>The view has been initialized.</pre>
3099 public Position PivotPoint
3103 Position temp = new Position(0.0f, 0.0f, 0.0f);
3104 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
3109 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3113 internal float PivotPointX
3118 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
3123 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
3127 internal float PivotPointY
3132 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
3137 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
3141 internal float PivotPointZ
3146 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
3151 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
3156 /// Gets or sets the size width of the view.
3158 public float SizeWidth
3163 GetProperty(View.Property.SIZE_WIDTH).Get(out temp);
3168 SetProperty(View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue(value));
3173 /// Gets or sets the size height of the view.
3175 public float SizeHeight
3180 GetProperty(View.Property.SIZE_HEIGHT).Get(out temp);
3185 SetProperty(View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue(value));
3190 /// Gets or sets the position of the view.<br>
3191 /// By default, sets the position vector between the parent origin and pivot point (default).<br>
3192 /// If the position inheritance is disabled, sets the world position.<br>
3194 public Position Position
3198 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3199 GetProperty(View.Property.POSITION).Get(temp);
3204 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(value));
3209 /// Gets or sets the position X of the view.
3211 public float PositionX
3216 GetProperty(View.Property.POSITION_X).Get(out temp);
3221 SetProperty(View.Property.POSITION_X, new Tizen.NUI.PropertyValue(value));
3226 /// Gets or sets the position Y of the view.
3228 public float PositionY
3233 GetProperty(View.Property.POSITION_Y).Get(out temp);
3238 SetProperty(View.Property.POSITION_Y, new Tizen.NUI.PropertyValue(value));
3243 /// Gets or sets the position Z of the view.
3245 public float PositionZ
3250 GetProperty(View.Property.POSITION_Z).Get(out temp);
3255 SetProperty(View.Property.POSITION_Z, new Tizen.NUI.PropertyValue(value));
3260 /// Gets or sets the world position of the view.
3262 public Vector3 WorldPosition
3266 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3267 GetProperty(View.Property.WORLD_POSITION).Get(temp);
3272 internal float WorldPositionX
3277 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
3282 internal float WorldPositionY
3287 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
3292 internal float WorldPositionZ
3297 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
3303 /// Gets or sets the orientation of the view.<br>
3304 /// The view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br>
3306 /// <remarks>This is an asynchronous method.</remarks>
3307 public Rotation Orientation
3311 Rotation temp = new Rotation();
3312 GetProperty(View.Property.ORIENTATION).Get(temp);
3317 SetProperty(View.Property.ORIENTATION, new Tizen.NUI.PropertyValue(value));
3322 /// Gets or sets the world orientation of the view.<br>
3324 public Rotation WorldOrientation
3328 Rotation temp = new Rotation();
3329 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
3335 /// Gets or sets the scale factor applied to the view.<br>
3337 public Vector3 Scale
3341 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3342 GetProperty(View.Property.SCALE).Get(temp);
3347 SetProperty(View.Property.SCALE, new Tizen.NUI.PropertyValue(value));
3352 /// Gets or sets the scale X factor applied to the view.
3359 GetProperty(View.Property.SCALE_X).Get(out temp);
3364 SetProperty(View.Property.SCALE_X, new Tizen.NUI.PropertyValue(value));
3369 /// Gets or sets the scale Y factor applied to the view.
3376 GetProperty(View.Property.SCALE_Y).Get(out temp);
3381 SetProperty(View.Property.SCALE_Y, new Tizen.NUI.PropertyValue(value));
3386 /// Gets or sets the scale Z factor applied to the view.
3393 GetProperty(View.Property.SCALE_Z).Get(out temp);
3398 SetProperty(View.Property.SCALE_Z, new Tizen.NUI.PropertyValue(value));
3403 /// Gets the world scale of the view.
3405 public Vector3 WorldScale
3409 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3410 GetProperty(View.Property.WORLD_SCALE).Get(temp);
3416 /// Retrieves the visibility flag of the view.
3419 /// If the view is not visible, then the view and its children will not be rendered.
3420 /// 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.
3422 public bool Visibility
3427 GetProperty(View.Property.VISIBLE).Get(out temp);
3433 /// Gets the view's world color.
3435 public Vector4 WorldColor
3439 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3440 GetProperty(View.Property.WORLD_COLOR).Get(temp);
3445 internal Matrix WorldMatrix
3449 Matrix temp = new Matrix();
3450 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
3456 /// Gets or sets the view's name.
3463 GetProperty(View.Property.NAME).Get(out temp);
3468 SetProperty(View.Property.NAME, new Tizen.NUI.PropertyValue(value));
3473 /// Get the number of children held by the view.
3475 public uint ChildCount
3479 return GetChildCount();
3484 /// Gets the view's ID.
3496 /// Gets or sets the status of whether the view should emit touch or hover signals.
3498 public bool Sensitive
3503 GetProperty(View.Property.SENSITIVE).Get(out temp);
3508 SetProperty(View.Property.SENSITIVE, new Tizen.NUI.PropertyValue(value));
3513 /// 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.
3515 public bool LeaveRequired
3520 GetProperty(View.Property.LEAVE_REQUIRED).Get(out temp);
3525 SetProperty(View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue(value));
3530 /// Gets or sets the status of whether a child view inherits it's parent's orientation.
3532 public bool InheritOrientation
3537 GetProperty(View.Property.INHERIT_ORIENTATION).Get(out temp);
3542 SetProperty(View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue(value));
3547 /// Gets or sets the status of whether a child view inherits it's parent's scale.
3549 public bool InheritScale
3554 GetProperty(View.Property.INHERIT_SCALE).Get(out temp);
3559 SetProperty(View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue(value));
3564 /// Gets or sets the status of how the view and its children should be drawn.<br>
3565 /// Not all views are renderable, but DrawMode can be inherited from any view.<br>
3566 /// 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>
3567 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br>
3568 /// Overlay views are drawn in a separate pass, after all non-overlay views within the layer.<br>
3569 /// For overlay views, the drawing order is with respect to tree levels of views, and depth-testing will not be used.<br>
3571 public DrawModeType DrawMode
3576 if (GetProperty(View.Property.DRAW_MODE).Get(out temp) == false)
3578 NUILog.Error("DrawMode get error!");
3583 return DrawModeType.Normal;
3585 return DrawModeType.Overlay2D;
3587 return DrawModeType.Stencil;
3589 return DrawModeType.Normal;
3594 SetProperty(View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)value));
3599 /// Gets or sets the relative to parent size factor of the view.<br>
3600 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br>
3601 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br>
3603 public Vector3 SizeModeFactor
3607 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3608 GetProperty(View.Property.SIZE_MODE_FACTOR).Get(temp);
3613 SetProperty(View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue(value));
3618 /// Gets or sets the width resize policy to be used.
3620 public ResizePolicyType WidthResizePolicy
3625 if (GetProperty(View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
3627 NUILog.Error("WidthResizePolicy get error!");
3632 return ResizePolicyType.Fixed;
3633 case "USE_NATURAL_SIZE":
3634 return ResizePolicyType.UseNaturalSize;
3635 case "FILL_TO_PARENT":
3636 return ResizePolicyType.FillToParent;
3637 case "SIZE_RELATIVE_TO_PARENT":
3638 return ResizePolicyType.SizeRelativeToParent;
3639 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3640 return ResizePolicyType.SizeFixedOffsetFromParent;
3641 case "FIT_TO_CHILDREN":
3642 return ResizePolicyType.FitToChildren;
3643 case "DIMENSION_DEPENDENCY":
3644 return ResizePolicyType.DimensionDependency;
3645 case "USE_ASSIGNED_SIZE":
3646 return ResizePolicyType.UseAssignedSize;
3648 return ResizePolicyType.Fixed;
3653 SetProperty(View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3658 /// Gets or sets the height resize policy to be used.
3660 public ResizePolicyType HeightResizePolicy
3665 if (GetProperty(View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
3667 NUILog.Error("HeightResizePolicy get error!");
3672 return ResizePolicyType.Fixed;
3673 case "USE_NATURAL_SIZE":
3674 return ResizePolicyType.UseNaturalSize;
3675 case "FILL_TO_PARENT":
3676 return ResizePolicyType.FillToParent;
3677 case "SIZE_RELATIVE_TO_PARENT":
3678 return ResizePolicyType.SizeRelativeToParent;
3679 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3680 return ResizePolicyType.SizeFixedOffsetFromParent;
3681 case "FIT_TO_CHILDREN":
3682 return ResizePolicyType.FitToChildren;
3683 case "DIMENSION_DEPENDENCY":
3684 return ResizePolicyType.DimensionDependency;
3685 case "USE_ASSIGNED_SIZE":
3686 return ResizePolicyType.UseAssignedSize;
3688 return ResizePolicyType.Fixed;
3693 SetProperty(View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3698 /// Gets or sets the policy to use when setting size with size negotiation.<br>
3699 /// Defaults to SizeScalePolicyType.UseSizeSet.<br>
3701 public SizeScalePolicyType SizeScalePolicy
3706 if (GetProperty(View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
3708 NUILog.Error("SizeScalePolicy get error!");
3712 case "USE_SIZE_SET":
3713 return SizeScalePolicyType.UseSizeSet;
3714 case "FIT_WITH_ASPECT_RATIO":
3715 return SizeScalePolicyType.FitWithAspectRatio;
3716 case "FILL_WITH_ASPECT_RATIO":
3717 return SizeScalePolicyType.FillWithAspectRatio;
3719 return SizeScalePolicyType.UseSizeSet;
3724 string valueToString = "";
3727 case SizeScalePolicyType.UseSizeSet:
3729 valueToString = "USE_SIZE_SET";
3732 case SizeScalePolicyType.FitWithAspectRatio:
3734 valueToString = "FIT_WITH_ASPECT_RATIO";
3737 case SizeScalePolicyType.FillWithAspectRatio:
3739 valueToString = "FILL_WITH_ASPECT_RATIO";
3744 valueToString = "USE_SIZE_SET";
3748 SetProperty(View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
3753 /// Gets or sets the status of whether the width size is dependent on the height size.
3755 public bool WidthForHeight
3760 GetProperty(View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
3765 SetProperty(View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue(value));
3770 /// Gets or sets the status of whether the height size is dependent on the width size.
3772 public bool HeightForWidth
3777 GetProperty(View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
3782 SetProperty(View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue(value));
3787 /// Gets or sets the padding for use in layout.
3789 public Vector4 Padding
3793 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3794 GetProperty(View.Property.PADDING).Get(temp);
3799 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
3804 /// Gets or sets the minimum size the view can be assigned in size negotiation.
3806 public Size2D MinimumSize
3810 Size2D temp = new Size2D(0, 0);
3811 GetProperty(View.Property.MINIMUM_SIZE).Get(temp);
3816 SetProperty(View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3821 /// Gets or sets the maximum size the view can be assigned in size negotiation.
3823 public Size2D MaximumSize
3827 Size2D temp = new Size2D(0, 0);
3828 GetProperty(View.Property.MAXIMUM_SIZE).Get(temp);
3833 SetProperty(View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3838 /// Gets or sets whether a child view inherits it's parent's position.<br>
3839 /// Default is to inherit.<br>
3840 /// 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>
3842 public bool InheritPosition
3847 GetProperty(View.Property.INHERIT_POSITION).Get(out temp);
3852 SetProperty(View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue(value));
3857 /// Gets or sets the clipping behavior (mode) of it's children.
3859 public ClippingModeType ClippingMode
3864 if (GetProperty(View.Property.CLIPPING_MODE).Get(out temp) == false)
3866 NUILog.Error("ClippingMode get error!");
3871 return ClippingModeType.Disabled;
3872 case "CLIP_CHILDREN":
3873 return ClippingModeType.ClipChildren;
3875 return ClippingModeType.Disabled;
3880 SetProperty(View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)value));
3885 /// Gets the number of renderers held by the view.
3887 public uint RendererCount
3891 return GetRendererCount();
3898 [Obsolete("Please do not use! this will be deprecated")]
3899 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> Touched
3903 if (_touchDataEventHandler == null)
3905 _touchDataCallback = OnTouch;
3906 this.TouchSignal().Connect(_touchDataCallback);
3909 _touchDataEventHandler += value;
3914 _touchDataEventHandler -= value;
3916 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
3918 this.TouchSignal().Disconnect(_touchDataCallback);
3924 [Obsolete("Please do not use! this will be deprecated")]
3925 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> Hovered
3929 if (_hoverEventHandler == null)
3931 _hoverEventCallback = OnHoverEvent;
3932 this.HoveredSignal().Connect(_hoverEventCallback);
3935 _hoverEventHandler += value;
3940 _hoverEventHandler -= value;
3942 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
3944 this.HoveredSignal().Disconnect(_hoverEventCallback);
3950 [Obsolete("Please do not use! this will be deprecated")]
3951 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelMoved
3955 if (_wheelEventHandler == null)
3957 _wheelEventCallback = OnWheelEvent;
3958 this.WheelEventSignal().Connect(_wheelEventCallback);
3961 _wheelEventHandler += value;
3966 _wheelEventHandler -= value;
3968 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
3970 this.WheelEventSignal().Disconnect(_wheelEventCallback);
3976 [Obsolete("Please do not use! this will be deprecated")]
3977 public Position AnchorPoint
3981 Position temp = new Position(0.0f, 0.0f, 0.0f);
3982 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
3987 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3991 [Obsolete("Please do not use! this will be deprecated, please use Size2D instead")]
3996 Size temp = new Size(0.0f, 0.0f, 0.0f);
3997 GetProperty(View.Property.SIZE).Get(temp);
4002 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(value));
4006 [Obsolete("Please do not use! this will be deprecated")]
4007 public event EventHandler OnWindowEvent
4011 if (_onWindowEventHandler == null)
4013 _onWindowEventCallback = OnWindow;
4014 this.OnWindowSignal().Connect(_onWindowEventCallback);
4017 _onWindowEventHandler += value;
4022 _onWindowEventHandler -= value;
4024 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
4026 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
4031 [Obsolete("Please do not use! this will be deprecated")]
4032 public event EventHandler OffWindowEvent
4036 if (_offWindowEventHandler == null)
4038 _offWindowEventCallback = OffWindow;
4039 this.OffWindowSignal().Connect(_offWindowEventCallback);
4042 _offWindowEventHandler += value;
4047 _offWindowEventHandler -= value;
4049 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
4051 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
4056 [Obsolete("Please do not use! this will be deprecated")]
4057 public event EventHandler OnRelayoutEvent
4061 if (_onRelayoutEventHandler == null)
4063 _onRelayoutEventCallback = OnRelayout;
4064 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
4067 _onRelayoutEventHandler += value;
4072 _onRelayoutEventHandler -= value;
4074 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
4076 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
4082 [Obsolete("Please DO NOT use! This will be deprecated! Please use 'Container GetParent() for derived class' instead!")]
4088 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
4090 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(cPtr);
4092 if (basehandle is Layer)
4094 ret = new View(cPtr, false);
4098 ret = basehandle as View;
4101 if (NDalicPINVOKE.SWIGPendingException.Pending)
4102 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4107 public bool InheritLayoutDirection
4112 GetProperty(View.Property.INHERIT_LAYOUT_DIRECTION).Get(out temp);
4117 SetProperty(View.Property.INHERIT_LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue(value));
4121 public ViewLayoutDirectionType LayoutDirection
4126 if (GetProperty(View.Property.LAYOUT_DIRECTION).Get(out temp) == false)
4128 NUILog.Error("LAYOUT_DIRECTION get error!");
4130 return (ViewLayoutDirectionType)temp;
4134 SetProperty(View.Property.LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((int)value));
4139 public enum ViewLayoutDirectionType