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 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 /// Get 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();
123 // you can override it to clean-up your own resources.
124 protected override void Dispose(DisposeTypes type)
131 if(type == DisposeTypes.Explicit)
134 //Release your own managed resources here.
135 //You should release all of your own disposable objects here.
138 //Release your own unmanaged resources here.
139 //You should not access any managed member here except static instance.
140 //because the execution order of Finalizes is non-deterministic.
142 DisConnectFromSignals();
144 if (swigCPtr.Handle != global::System.IntPtr.Zero)
149 NDalicPINVOKE.delete_View(swigCPtr);
151 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
157 private void DisConnectFromSignals()
159 // Save current CPtr.
160 global::System.Runtime.InteropServices.HandleRef currentCPtr = swigCPtr;
162 // Use BaseHandle CPtr as current might have been deleted already in derived classes.
163 swigCPtr = GetBaseHandleCPtrHandleRef;
165 if (_onRelayoutEventCallback != null)
167 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
170 if (_offWindowEventCallback != null)
172 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
175 if (_onWindowEventCallback != null)
177 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
180 if (_wheelEventCallback != null)
182 this.WheelEventSignal().Disconnect(_wheelEventCallback);
185 if (_hoverEventCallback != null)
187 this.HoveredSignal().Disconnect(_hoverEventCallback);
190 if (_touchDataCallback != null)
192 this.TouchSignal().Disconnect(_touchDataCallback);
195 if (_ResourcesLoadedCallback != null)
197 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
200 if (_offWindowEventCallback != null)
202 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
205 if (_onWindowEventCallback != null)
207 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
210 if (_wheelEventCallback != null)
212 this.WheelEventSignal().Disconnect(_wheelEventCallback);
215 if (_hoverEventCallback != null)
217 this.HoveredSignal().Disconnect(_hoverEventCallback);
220 if (_touchDataCallback != null)
222 this.TouchSignal().Disconnect(_touchDataCallback);
225 if (_onRelayoutEventCallback != null)
227 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
230 if (_keyCallback != null)
232 this.KeyEventSignal().Disconnect(_keyCallback);
235 if (_keyInputFocusLostCallback != null)
237 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
240 if (_keyInputFocusGainedCallback != null)
242 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
245 // BaseHandle CPtr is used in Registry and there is danger of deletion if we keep using it here.
246 // Restore current CPtr.
247 swigCPtr = currentCPtr;
250 private EventHandler _keyInputFocusGainedEventHandler;
251 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
252 private delegate void KeyInputFocusGainedCallbackType(IntPtr control);
253 private KeyInputFocusGainedCallbackType _keyInputFocusGainedCallback;
256 /// Event for KeyInputFocusGained signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
257 /// KeyInputFocusGained signal is emitted when the control gets Key Input Focus.<br>
259 public event EventHandler FocusGained
263 if (_keyInputFocusGainedEventHandler == null)
265 _keyInputFocusGainedCallback = OnKeyInputFocusGained;
266 this.KeyInputFocusGainedSignal().Connect(_keyInputFocusGainedCallback);
269 _keyInputFocusGainedEventHandler += value;
274 _keyInputFocusGainedEventHandler -= value;
276 if (_keyInputFocusGainedEventHandler == null && KeyInputFocusGainedSignal().Empty() == false)
278 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
283 private void OnKeyInputFocusGained(IntPtr view)
285 if (_keyInputFocusGainedEventHandler != null)
287 _keyInputFocusGainedEventHandler(this, null);
292 private EventHandler _keyInputFocusLostEventHandler;
293 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
294 private delegate void KeyInputFocusLostCallbackType(IntPtr control);
295 private KeyInputFocusLostCallbackType _keyInputFocusLostCallback;
298 /// Event for KeyInputFocusLost signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
299 /// KeyInputFocusLost signal is emitted when the control loses Key Input Focus.<br>
301 public event EventHandler FocusLost
305 if (_keyInputFocusLostEventHandler == null)
307 _keyInputFocusLostCallback = OnKeyInputFocusLost;
308 this.KeyInputFocusLostSignal().Connect(_keyInputFocusLostCallback);
311 _keyInputFocusLostEventHandler += value;
316 _keyInputFocusLostEventHandler -= value;
318 if (_keyInputFocusLostEventHandler == null && KeyInputFocusLostSignal().Empty() == false)
320 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
325 private void OnKeyInputFocusLost(IntPtr view)
327 if (_keyInputFocusLostEventHandler != null)
329 _keyInputFocusLostEventHandler(this, null);
334 /// Event arguments that passed via KeyEvent signal.
336 public class KeyEventArgs : EventArgs
341 /// Key - is the key sent to the View.
356 private EventHandlerWithReturnType<object, KeyEventArgs, bool> _keyEventHandler;
357 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
358 private delegate bool KeyCallbackType(IntPtr control, IntPtr keyEvent);
359 private KeyCallbackType _keyCallback;
362 /// Event for KeyPressed signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
363 /// KeyPressed signal is emitted when key event is received.<br>
365 public event EventHandlerWithReturnType<object, KeyEventArgs, bool> KeyEvent
369 if (_keyEventHandler == null)
371 _keyCallback = OnKeyEvent;
372 this.KeyEventSignal().Connect(_keyCallback);
375 _keyEventHandler += value;
380 _keyEventHandler -= value;
382 if (_keyEventHandler == null && KeyEventSignal().Empty() == false)
384 this.KeyEventSignal().Disconnect(_keyCallback);
389 private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
391 KeyEventArgs e = new KeyEventArgs();
395 e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
397 if (_keyEventHandler != null)
399 Delegate[] delegateList = _keyEventHandler.GetInvocationList();
401 // Oring the result of each callback.
402 foreach ( EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList )
404 result |= del( this, e );
411 private EventHandler _onRelayoutEventHandler;
412 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
413 private delegate void OnRelayoutEventCallbackType(IntPtr control);
414 private OnRelayoutEventCallbackType _onRelayoutEventCallback;
417 /// Event for OnRelayout signal which can be used to subscribe/unsubscribe the event handler.<br>
418 /// OnRelayout signal is emitted after the size has been set on the view during relayout.<br>
420 public event EventHandler Relayout
424 if (_onRelayoutEventHandler == null)
426 _onRelayoutEventCallback = OnRelayout;
427 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
430 _onRelayoutEventHandler += value;
435 _onRelayoutEventHandler -= value;
437 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
439 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
445 // Callback for View OnRelayout signal
446 private void OnRelayout(IntPtr data)
448 if (_onRelayoutEventHandler != null)
450 _onRelayoutEventHandler(this, null);
455 /// Event arguments that passed via Touch signal.
457 public class TouchEventArgs : EventArgs
459 private Touch _touch;
462 /// Touch - contains the information of touch points
477 private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
478 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
479 private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
480 private TouchDataCallbackType _touchDataCallback;
483 /// Event for Touched signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
484 /// Touched signal is emitted when touch input is received.<br>
486 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
490 if (_touchDataEventHandler == null)
492 _touchDataCallback = OnTouch;
493 this.TouchSignal().Connect(_touchDataCallback);
496 _touchDataEventHandler += value;
501 _touchDataEventHandler -= value;
503 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
505 this.TouchSignal().Disconnect(_touchDataCallback);
511 // Callback for View TouchSignal
512 private bool OnTouch(IntPtr view, IntPtr touchData)
514 TouchEventArgs e = new TouchEventArgs();
516 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
518 if (_touchDataEventHandler != null)
520 return _touchDataEventHandler(this, e);
527 /// Event arguments that passed via Hover signal.
529 public class HoverEventArgs : EventArgs
531 private Hover _hover;
534 /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
549 private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
550 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
551 private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
552 private HoverEventCallbackType _hoverEventCallback;
555 /// Event for Hovered signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
556 /// Hovered signal is emitted when hover input is received.<br>
558 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
562 if (_hoverEventHandler == null)
564 _hoverEventCallback = OnHoverEvent;
565 this.HoveredSignal().Connect(_hoverEventCallback);
568 _hoverEventHandler += value;
573 _hoverEventHandler -= value;
575 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
577 this.HoveredSignal().Disconnect(_hoverEventCallback);
583 // Callback for View Hover signal
584 private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
586 HoverEventArgs e = new HoverEventArgs();
588 e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
590 if (_hoverEventHandler != null)
592 return _hoverEventHandler(this, e);
599 /// Event arguments that passed via Wheel signal.
601 public class WheelEventArgs : EventArgs
603 private Wheel _wheel;
606 /// WheelEvent - store a wheel rolling type : MOUSE_WHEEL or CUSTOM_WHEEL
621 private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
622 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
623 private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
624 private WheelEventCallbackType _wheelEventCallback;
627 /// Event for WheelMoved signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
628 /// WheelMoved signal is emitted when wheel event is received.<br>
630 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
634 if (_wheelEventHandler == null)
636 _wheelEventCallback = OnWheelEvent;
637 this.WheelEventSignal().Connect(_wheelEventCallback);
640 _wheelEventHandler += value;
645 _wheelEventHandler -= value;
647 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
649 this.WheelEventSignal().Disconnect(_wheelEventCallback);
655 // Callback for View Wheel signal
656 private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
658 WheelEventArgs e = new WheelEventArgs();
660 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
662 if (_wheelEventHandler != null)
664 return _wheelEventHandler(this, e);
670 private EventHandler _onWindowEventHandler;
671 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
672 private delegate void OnWindowEventCallbackType(IntPtr control);
673 private OnWindowEventCallbackType _onWindowEventCallback;
676 /// Event for OnWindow signal which can be used to subscribe/unsubscribe the event handler.<br>
677 /// OnWindow signal is emitted after the view has been connected to the Window.<br>
679 public event EventHandler AddedToWindow
683 if (_onWindowEventHandler == null)
685 _onWindowEventCallback = OnWindow;
686 this.OnWindowSignal().Connect(_onWindowEventCallback);
689 _onWindowEventHandler += value;
694 _onWindowEventHandler -= value;
696 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
698 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
703 // Callback for View OnWindow signal
704 private void OnWindow(IntPtr data)
706 if (_onWindowEventHandler != null)
708 _onWindowEventHandler(this, null);
713 private EventHandler _offWindowEventHandler;
714 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
715 private delegate void OffWindowEventCallbackType(IntPtr control);
716 private OffWindowEventCallbackType _offWindowEventCallback;
719 /// Event for OffWindow signal which can be used to subscribe/unsubscribe the event handler.<br>
720 /// OffWindow signal is emitted after the view has been disconnected from the Window.<br>
722 public event EventHandler RemovedFromWindow
726 if (_offWindowEventHandler == null)
728 _offWindowEventCallback = OffWindow;
729 this.OffWindowSignal().Connect(_offWindowEventCallback);
732 _offWindowEventHandler += value;
737 _offWindowEventHandler -= value;
739 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
741 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
746 // Callback for View OffWindow signal
747 private void OffWindow(IntPtr data)
749 if (_offWindowEventHandler != null)
751 _offWindowEventHandler(this, null);
756 /// Event arguments of visibility changed.
758 public class VisibilityChangedEventArgs : EventArgs
761 private bool _visibility;
762 private VisibilityChangeType _type;
765 /// The view, or child of view, whose visibility has changed.
780 /// Whether the view is now visible or not.
782 public bool Visibility
795 /// Whether the view's visible property has changed or a parent's.
797 public VisibilityChangeType Type
810 private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
811 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
812 private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
813 private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
816 /// Event for visibility change which can be used to subscribe/unsubscribe the event handler.<br>
817 /// This signal is emitted when the visible property of this or a parent view is changed.<br>
819 public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
823 if (_visibilityChangedEventHandler == null)
825 _visibilityChangedEventCallback = OnVisibilityChanged;
826 VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
829 _visibilityChangedEventHandler += value;
834 _visibilityChangedEventHandler -= value;
836 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
838 VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
843 // Callback for View visibility change signal
844 private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
846 VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
849 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
851 e.Visibility = visibility;
854 if (_visibilityChangedEventHandler != null)
856 _visibilityChangedEventHandler(this, e);
862 /// Event arguments of layout direction changed.
864 public class LayoutDirectionChangedEventArgs : EventArgs
867 private ViewLayoutDirectionType _type;
870 /// The view, or child of view, whose layout direction has changed.
885 /// Whether the view's layout direction property has changed or a parent's.
887 public ViewLayoutDirectionType Type
900 private EventHandler<LayoutDirectionChangedEventArgs> _layoutDirectionChangedEventHandler;
901 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
902 private delegate void LayoutDirectionChangedEventCallbackType(IntPtr data, ViewLayoutDirectionType type);
903 private LayoutDirectionChangedEventCallbackType _layoutDirectionChangedEventCallback;
906 /// Event for layout direction change which can be used to subscribe/unsubscribe the event handler.<br>
907 /// This signal is emitted when the layout direction property of this or a parent view is changed.<br>
909 public event EventHandler<LayoutDirectionChangedEventArgs> LayoutDirectionChanged
913 if (_layoutDirectionChangedEventHandler == null)
915 _layoutDirectionChangedEventCallback = OnLayoutDirectionChanged;
916 LayoutDirectionChangedSignal(this).Connect(_layoutDirectionChangedEventCallback);
919 _layoutDirectionChangedEventHandler += value;
924 _layoutDirectionChangedEventHandler -= value;
926 if (_layoutDirectionChangedEventHandler == null && LayoutDirectionChangedSignal(this).Empty() == false)
928 LayoutDirectionChangedSignal(this).Disconnect(_layoutDirectionChangedEventCallback);
933 // Callback for View layout direction change signal
934 private void OnLayoutDirectionChanged(IntPtr data, ViewLayoutDirectionType type)
936 LayoutDirectionChangedEventArgs e = new LayoutDirectionChangedEventArgs();
939 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
943 if (_layoutDirectionChangedEventHandler != null)
945 _layoutDirectionChangedEventHandler(this, e);
955 // Resource Ready Signal
957 private EventHandler _resourcesLoadedEventHandler;
958 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
959 private delegate void ResourcesLoadedCallbackType(IntPtr control);
960 private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
963 /// Event for ResourcesLoadedSignal signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
964 /// This signal is emitted after all resources required by a View are loaded and ready.<br>
966 public event EventHandler ResourcesLoaded
970 if (_resourcesLoadedEventHandler == null)
972 _ResourcesLoadedCallback = OnResourcesLoaded;
973 this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
976 _resourcesLoadedEventHandler += value;
981 _resourcesLoadedEventHandler -= value;
983 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
985 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
990 private void OnResourcesLoaded(IntPtr view)
992 if (_resourcesLoadedEventHandler != null)
994 _resourcesLoadedEventHandler(this, null);
998 internal IntPtr GetPtrfromView()
1000 return (IntPtr)swigCPtr;
1003 internal class Property
1005 internal static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get();
1006 internal static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get();
1007 internal static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get();
1008 internal static readonly int LEFT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
1009 internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
1010 internal static readonly int UP_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
1011 internal static readonly int DOWN_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
1012 internal static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get();
1013 internal static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get();
1014 internal static readonly int SIBLING_ORDER = NDalicManualPINVOKE.Actor_Property_SIBLING_ORDER_get();
1015 internal static readonly int OPACITY = NDalicManualPINVOKE.Actor_Property_OPACITY_get();
1016 internal static readonly int SCREEN_POSITION = NDalicManualPINVOKE.Actor_Property_SCREEN_POSITION_get();
1017 internal static readonly int POSITION_USES_ANCHOR_POINT = NDalicManualPINVOKE.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
1018 internal static readonly int PARENT_ORIGIN = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_get();
1019 internal static readonly int PARENT_ORIGIN_X = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_X_get();
1020 internal static readonly int PARENT_ORIGIN_Y = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Y_get();
1021 internal static readonly int PARENT_ORIGIN_Z = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Z_get();
1022 internal static readonly int ANCHOR_POINT = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_get();
1023 internal static readonly int ANCHOR_POINT_X = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_X_get();
1024 internal static readonly int ANCHOR_POINT_Y = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Y_get();
1025 internal static readonly int ANCHOR_POINT_Z = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Z_get();
1026 internal static readonly int SIZE = NDalicPINVOKE.Actor_Property_SIZE_get();
1027 internal static readonly int SIZE_WIDTH = NDalicPINVOKE.Actor_Property_SIZE_WIDTH_get();
1028 internal static readonly int SIZE_HEIGHT = NDalicPINVOKE.Actor_Property_SIZE_HEIGHT_get();
1029 internal static readonly int SIZE_DEPTH = NDalicPINVOKE.Actor_Property_SIZE_DEPTH_get();
1030 internal static readonly int POSITION = NDalicPINVOKE.Actor_Property_POSITION_get();
1031 internal static readonly int POSITION_X = NDalicPINVOKE.Actor_Property_POSITION_X_get();
1032 internal static readonly int POSITION_Y = NDalicPINVOKE.Actor_Property_POSITION_Y_get();
1033 internal static readonly int POSITION_Z = NDalicPINVOKE.Actor_Property_POSITION_Z_get();
1034 internal static readonly int WORLD_POSITION = NDalicPINVOKE.Actor_Property_WORLD_POSITION_get();
1035 internal static readonly int WORLD_POSITION_X = NDalicPINVOKE.Actor_Property_WORLD_POSITION_X_get();
1036 internal static readonly int WORLD_POSITION_Y = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Y_get();
1037 internal static readonly int WORLD_POSITION_Z = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Z_get();
1038 internal static readonly int ORIENTATION = NDalicPINVOKE.Actor_Property_ORIENTATION_get();
1039 internal static readonly int WORLD_ORIENTATION = NDalicPINVOKE.Actor_Property_WORLD_ORIENTATION_get();
1040 internal static readonly int SCALE = NDalicPINVOKE.Actor_Property_SCALE_get();
1041 internal static readonly int SCALE_X = NDalicPINVOKE.Actor_Property_SCALE_X_get();
1042 internal static readonly int SCALE_Y = NDalicPINVOKE.Actor_Property_SCALE_Y_get();
1043 internal static readonly int SCALE_Z = NDalicPINVOKE.Actor_Property_SCALE_Z_get();
1044 internal static readonly int WORLD_SCALE = NDalicPINVOKE.Actor_Property_WORLD_SCALE_get();
1045 internal static readonly int VISIBLE = NDalicPINVOKE.Actor_Property_VISIBLE_get();
1046 internal static readonly int WORLD_COLOR = NDalicPINVOKE.Actor_Property_WORLD_COLOR_get();
1047 internal static readonly int WORLD_MATRIX = NDalicPINVOKE.Actor_Property_WORLD_MATRIX_get();
1048 internal static readonly int NAME = NDalicPINVOKE.Actor_Property_NAME_get();
1049 internal static readonly int SENSITIVE = NDalicPINVOKE.Actor_Property_SENSITIVE_get();
1050 internal static readonly int LEAVE_REQUIRED = NDalicPINVOKE.Actor_Property_LEAVE_REQUIRED_get();
1051 internal static readonly int INHERIT_ORIENTATION = NDalicPINVOKE.Actor_Property_INHERIT_ORIENTATION_get();
1052 internal static readonly int INHERIT_SCALE = NDalicPINVOKE.Actor_Property_INHERIT_SCALE_get();
1053 internal static readonly int DRAW_MODE = NDalicPINVOKE.Actor_Property_DRAW_MODE_get();
1054 internal static readonly int SIZE_MODE_FACTOR = NDalicPINVOKE.Actor_Property_SIZE_MODE_FACTOR_get();
1055 internal static readonly int WIDTH_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_WIDTH_RESIZE_POLICY_get();
1056 internal static readonly int HEIGHT_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_HEIGHT_RESIZE_POLICY_get();
1057 internal static readonly int SIZE_SCALE_POLICY = NDalicPINVOKE.Actor_Property_SIZE_SCALE_POLICY_get();
1058 internal static readonly int WIDTH_FOR_HEIGHT = NDalicPINVOKE.Actor_Property_WIDTH_FOR_HEIGHT_get();
1059 internal static readonly int HEIGHT_FOR_WIDTH = NDalicPINVOKE.Actor_Property_HEIGHT_FOR_WIDTH_get();
1060 internal static readonly int PADDING = NDalicPINVOKE.Actor_Property_PADDING_get();
1061 internal static readonly int MINIMUM_SIZE = NDalicPINVOKE.Actor_Property_MINIMUM_SIZE_get();
1062 internal static readonly int MAXIMUM_SIZE = NDalicPINVOKE.Actor_Property_MAXIMUM_SIZE_get();
1063 internal static readonly int INHERIT_POSITION = NDalicPINVOKE.Actor_Property_INHERIT_POSITION_get();
1064 internal static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
1065 internal static readonly int INHERIT_LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_INHERIT_LAYOUT_DIRECTION_get();
1066 internal static readonly int LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_LAYOUT_DIRECTION_get();
1070 /// Describes the direction to move the focus towards.
1072 public enum FocusDirection
1083 /// Creates a new instance of a View.
1085 public View() : this(NDalicPINVOKE.View_New(), true)
1087 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1090 internal View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true)
1092 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1096 /// Downcasts a handle to View handle.<br>
1097 /// If handle points to a View, the downcast produces valid handle.<br>
1098 /// If not, the returned handle is left uninitialized.<br>
1100 /// <param name="handle">Handle to an object</param>
1101 /// <returns>A handle to a View or an uninitialized handle</returns>
1102 [Obsolete("Please do not use! this will be deprecated, instead please use as keyword.")]
1103 public static View DownCast(BaseHandle handle)
1105 View ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as View;
1106 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1110 [Obsolete("Please do not use! this will be deprecated, instead please use as keyword.")]
1111 public static T DownCast<T>(View view) where T : View
1113 T ret = Registry.GetManagedBaseHandleFromNativePtr(view) as T;
1121 private View ConvertIdToView(uint id)
1127 View parentView = Parent as View;
1128 view = parentView.FindChildById(id);
1133 view = Window.Instance.GetRootLayer().FindChildById(id);
1139 internal void SetKeyInputFocus()
1141 NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
1142 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1146 /// Quries whether the view has focus.
1148 /// <returns>true if this view has focus</returns>
1149 public bool HasFocus()
1151 bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
1152 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1156 internal void ClearKeyInputFocus()
1158 NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
1159 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1162 internal PinchGestureDetector GetPinchGestureDetector()
1164 PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
1165 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1169 internal PanGestureDetector GetPanGestureDetector()
1171 PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
1172 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1176 internal TapGestureDetector GetTapGestureDetector()
1178 TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
1179 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1183 internal LongPressGestureDetector GetLongPressGestureDetector()
1185 LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
1186 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1191 /// Sets the name of the style to be applied to the view.
1193 /// <param name="styleName">A string matching a style described in a stylesheet</param>
1194 public void SetStyleName(string styleName)
1196 NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
1197 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1201 /// Retrieves the name of the style to be applied to the view (if any).
1203 /// <returns>A string matching a style, or an empty string</returns>
1204 public string GetStyleName()
1206 string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
1207 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1211 internal void SetBackgroundColor(Vector4 color)
1213 NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
1214 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1217 internal Vector4 GetBackgroundColor()
1219 Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
1220 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1224 internal void SetBackgroundImage(Image image)
1226 NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
1227 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1231 /// Clears the background.
1233 public void ClearBackground()
1235 NDalicPINVOKE.View_ClearBackground(swigCPtr);
1236 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1239 internal ControlKeySignal KeyEventSignal()
1241 ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
1242 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1246 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
1248 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
1249 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1253 internal KeyInputFocusSignal KeyInputFocusLostSignal()
1255 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
1256 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1260 internal View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
1262 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1265 internal enum PropertyRange
1267 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
1268 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
1269 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
1273 /// styleName, type string.
1275 public string StyleName
1280 GetProperty(View.Property.STYLE_NAME).Get(out temp);
1285 SetProperty(View.Property.STYLE_NAME, new Tizen.NUI.PropertyValue(value));
1290 /// mutually exclusive with BACKGROUND_IMAGE & BACKGROUND, type Vector4.
1292 public Color BackgroundColor
1296 Color backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1298 Tizen.NUI.PropertyMap background = Background;
1300 background.Find(Visual.Property.Type)?.Get(out visualType);
1301 if (visualType == (int)Visual.Type.Color)
1303 background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor);
1306 return backgroundColor;
1310 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1315 /// Create an Animation to animate the background color visual. If there is no
1316 /// background visual, creates one with transparent black as it's mixColor.
1318 public Animation AnimateBackgroundColor( object destinationValue,
1321 AlphaFunction.BuiltinFunctions? alphaFunction = null,
1322 object initialValue = null)
1324 Tizen.NUI.PropertyMap background = Background;
1326 if( background.Empty() )
1328 // If there is no background yet, ensure there is a transparent
1330 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1331 background = Background;
1333 return AnimateColor( "background", destinationValue, startTime, endTime, alphaFunction, initialValue );
1337 /// Create an Animation to animate the mixColor of the named visual.
1339 public Animation AnimateColor( string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null )
1341 Animation animation = null;
1343 PropertyMap _animator = new PropertyMap();
1344 if( alphaFunction != null )
1346 _animator.Add("alphaFunction", new PropertyValue( AlphaFunction.BuiltinToPropertyKey(alphaFunction) ) );
1349 PropertyMap _timePeriod = new PropertyMap();
1350 _timePeriod.Add( "duration", new PropertyValue((endTime-startTime)/1000.0f) );
1351 _timePeriod.Add( "delay", new PropertyValue( startTime/1000.0f ) );
1352 _animator.Add( "timePeriod", new PropertyValue( _timePeriod ) );
1354 PropertyMap _transition = new PropertyMap();
1355 _transition.Add( "animator", new PropertyValue( _animator ) );
1356 _transition.Add( "target", new PropertyValue( targetVisual ) );
1357 _transition.Add( "property", new PropertyValue( "mixColor" ) );
1359 if( initialColor != null )
1361 PropertyValue initValue = PropertyValue.CreateFromObject( initialColor );
1362 _transition.Add( "initialValue", initValue );
1365 PropertyValue destValue = PropertyValue.CreateFromObject( destinationColor );
1366 _transition.Add( "targetValue", destValue );
1367 TransitionData _transitionData = new TransitionData( _transition );
1369 animation = new Animation( NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true );
1370 if (NDalicPINVOKE.SWIGPendingException.Pending)
1371 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1377 /// mutually exclusive with BACKGROUND_COLOR & BACKGROUND, type Map.
1379 public string BackgroundImage
1383 string backgroundImage = "";
1385 Tizen.NUI.PropertyMap background = Background;
1387 background.Find(Visual.Property.Type)?.Get(out visualType);
1388 if (visualType == (int)Visual.Type.Image)
1390 background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
1393 return backgroundImage;
1397 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1401 public Tizen.NUI.PropertyMap Background
1405 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1406 GetProperty( View.Property.BACKGROUND ).Get(temp);
1411 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1417 /// The current state of the view.
1424 if (GetProperty(View.Property.STATE).Get(out temp) == false)
1426 NUILog.Error("State get error!");
1432 return States.Normal;
1436 return States.Focused;
1440 return States.Disabled;
1444 return States.Normal;
1450 SetProperty(View.Property.STATE, new Tizen.NUI.PropertyValue((int)value));
1455 /// The current sub state of the view.
1457 public States SubState
1462 if (GetProperty(View.Property.SUB_STATE).Get(out temp) == false)
1464 NUILog.Error("subState get error!");
1469 return States.Normal;
1471 return States.Focused;
1473 return States.Disabled;
1475 return States.Normal;
1480 string valueToString = "";
1485 valueToString = "NORMAL";
1488 case States.Focused:
1490 valueToString = "FOCUSED";
1493 case States.Disabled:
1495 valueToString = "DISABLED";
1500 valueToString = "NORMAL";
1504 SetProperty(View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
1509 /// Displays a tooltip
1511 public Tizen.NUI.PropertyMap Tooltip
1515 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1516 GetProperty(View.Property.TOOLTIP).Get(temp);
1521 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1526 /// Displays a tooltip as Text
1528 public string TooltipText
1532 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1536 private int LeftFocusableViewId
1541 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
1546 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1550 private int RightFocusableViewId
1555 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
1560 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1564 private int UpFocusableViewId
1569 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
1574 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1578 private int DownFocusableViewId
1583 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
1588 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1593 /// Child Property of FlexContainer.<br>
1594 /// The proportion of the free space in the container the flex item will receive.<br>
1595 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br>
1602 GetProperty(FlexContainer.ChildProperty.FLEX).Get(out temp);
1607 SetProperty(FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue(value));
1612 /// Child Property of FlexContainer.<br>
1613 /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br>
1615 public int AlignSelf
1620 GetProperty(FlexContainer.ChildProperty.ALIGN_SELF).Get(out temp);
1625 SetProperty(FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue(value));
1630 /// Child Property of FlexContainer.<br>
1631 /// The space around the flex item.<br>
1633 public Vector4 FlexMargin
1637 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1638 GetProperty(FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
1643 SetProperty(FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue(value));
1648 /// The top-left cell this child occupies, if not set, the first available cell is used
1650 public Vector2 CellIndex
1654 Vector2 temp = new Vector2(0.0f, 0.0f);
1655 GetProperty(TableView.ChildProperty.CELL_INDEX).Get(temp);
1660 SetProperty(TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue(value));
1665 /// The number of rows this child occupies, if not set, default value is 1
1667 public float RowSpan
1672 GetProperty(TableView.ChildProperty.ROW_SPAN).Get(out temp);
1677 SetProperty(TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue(value));
1682 /// The number of columns this child occupies, if not set, default value is 1
1684 public float ColumnSpan
1689 GetProperty(TableView.ChildProperty.COLUMN_SPAN).Get(out temp);
1694 SetProperty(TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue(value));
1699 /// The horizontal alignment of this child inside the cells, if not set, default value is 'left'
1701 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
1706 if (GetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
1708 NUILog.Error("CellHorizontalAlignment get error!");
1714 return Tizen.NUI.HorizontalAlignmentType.Left;
1716 return Tizen.NUI.HorizontalAlignmentType.Center;
1718 return Tizen.NUI.HorizontalAlignmentType.Right;
1720 return Tizen.NUI.HorizontalAlignmentType.Left;
1725 string valueToString = "";
1728 case Tizen.NUI.HorizontalAlignmentType.Left:
1730 valueToString = "left";
1733 case Tizen.NUI.HorizontalAlignmentType.Center:
1735 valueToString = "center";
1738 case Tizen.NUI.HorizontalAlignmentType.Right:
1740 valueToString = "right";
1745 valueToString = "left";
1749 SetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1754 /// The vertical alignment of this child inside the cells, if not set, default value is 'top'
1756 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
1761 GetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
1763 NUILog.Error("CellVerticalAlignment get error!");
1769 return Tizen.NUI.VerticalAlignmentType.Top;
1771 return Tizen.NUI.VerticalAlignmentType.Center;
1773 return Tizen.NUI.VerticalAlignmentType.Bottom;
1775 return Tizen.NUI.VerticalAlignmentType.Top;
1780 string valueToString = "";
1783 case Tizen.NUI.VerticalAlignmentType.Top:
1785 valueToString = "top";
1788 case Tizen.NUI.VerticalAlignmentType.Center:
1790 valueToString = "center";
1793 case Tizen.NUI.VerticalAlignmentType.Bottom:
1795 valueToString = "bottom";
1800 valueToString = "top";
1804 SetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1809 /// The left focusable view.<br>
1810 /// This will return NULL if not set.<br>
1811 /// This will also return NULL if the specified left focusable view is not on Window.<br>
1813 public View LeftFocusableView
1815 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1818 if (LeftFocusableViewId >= 0)
1820 return ConvertIdToView((uint)LeftFocusableViewId);
1826 LeftFocusableViewId = (int)value.GetId();
1831 /// The right focusable view.<br>
1832 /// This will return NULL if not set.<br>
1833 /// This will also return NULL if the specified right focusable view is not on Window.<br>
1835 public View RightFocusableView
1837 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1840 if (RightFocusableViewId >= 0)
1842 return ConvertIdToView((uint)RightFocusableViewId);
1848 RightFocusableViewId = (int)value.GetId();
1853 /// The up focusable view.<br>
1854 /// This will return NULL if not set.<br>
1855 /// This will also return NULL if the specified up focusable view is not on Window.<br>
1857 public View UpFocusableView
1859 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1862 if (UpFocusableViewId >= 0)
1864 return ConvertIdToView((uint)UpFocusableViewId);
1870 UpFocusableViewId = (int)value.GetId();
1875 /// The down focusable view.<br>
1876 /// This will return NULL if not set.<br>
1877 /// This will also return NULL if the specified down focusable view is not on Window.<br>
1879 public View DownFocusableView
1881 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1884 if (DownFocusableViewId >= 0)
1886 return ConvertIdToView((uint)DownFocusableViewId);
1892 DownFocusableViewId = (int)value.GetId();
1897 /// whether the view should be focusable by keyboard navigation.
1899 public bool Focusable
1903 SetKeyboardFocusable(value);
1907 return IsKeyboardFocusable();
1912 /// Enumeration for describing the states of view.
1931 /// Retrieves the position of the View.<br>
1932 /// The coordinates are relative to the View's parent.<br>
1934 public Position CurrentPosition
1938 return GetCurrentPosition();
1943 /// Sets the size of an view for width and height.<br>
1944 /// Geometry can be scaled to fit within this area.<br>
1945 /// This does not interfere with the views scale factor.<br>
1946 /// The views default depth is the minimum of width & height.<br>
1948 public Size2D Size2D
1952 Size temp = new Size(0.0f, 0.0f, 0.0f);
1953 GetProperty(View.Property.SIZE).Get(temp);
1954 Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
1959 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(new Size(value)));
1964 /// Retrieves the size of the View.<br>
1965 /// The coordinates are relative to the View's parent.<br>
1967 public Size2D CurrentSize
1971 return GetCurrentSize();
1975 [Obsolete("Please do not use! this will be deprecated. Please use Visibility instead.")]
1985 /// Retrieves and sets the view's opacity.<br>
1987 public float Opacity
1992 GetProperty(View.Property.OPACITY).Get(out temp);
1997 SetProperty(View.Property.OPACITY, new Tizen.NUI.PropertyValue(value));
2002 /// Sets the position of the View for X and Y.<br>
2003 /// By default, sets the position vector between the parent origin and pivot point(default).<br>
2004 /// If Position inheritance if disabled, sets the world position.<br>
2006 public Position2D Position2D
2010 Position temp = new Position(0.0f, 0.0f, 0.0f);
2011 GetProperty(View.Property.POSITION).Get(temp);
2012 return new Position2D(temp);
2016 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(new Position(value)));
2021 /// Retrieves screen postion of view's.<br>
2023 public Vector2 ScreenPosition
2027 Vector2 temp = new Vector2(0.0f, 0.0f);
2028 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
2034 /// Determines whether the pivot point should be used to determine the position of the view.
2035 /// This is true by default.
2037 /// <remarks>If false, then the top-left of the view is used for the position.
2038 /// Setting this to false will allow scaling or rotation around the anchor-point without affecting the view's position.
2040 public bool PositionUsesPivotPoint
2045 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
2050 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
2054 [Obsolete("Please do not use! this will be deprecated")]
2055 public bool PositionUsesAnchorPoint
2060 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
2065 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
2069 internal bool FocusState
2073 return IsKeyboardFocusable();
2077 SetKeyboardFocusable(value);
2082 /// Queries whether the view is connected to the Stage.<br>
2083 /// When an view is connected, it will be directly or indirectly parented to the root View.<br>
2085 public bool IsOnWindow
2094 /// Gets depth in the hierarchy for the view.
2096 public int HierarchyDepth
2100 return GetHierarchyDepth();
2105 /// Sets the sibling order of the view so depth position can be defined within the same parent.
2108 /// Note The initial value is 0.
2109 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove and LowerBelow will override the sibling order.
2110 /// The values set by this Property will likely change.
2112 public int SiblingOrder
2117 GetProperty(View.Property.SIBLING_ORDER).Get(out temp);
2122 SetProperty(View.Property.SIBLING_ORDER, new Tizen.NUI.PropertyValue(value));
2127 /// Returns the natural size of the view.
2130 /// Deriving classes stipulate the natural size and by default a view has a ZERO natural size.
2132 [Obsolete("Please do not use! this will be deprecated, please use NaturalSize2D instead")]
2133 public Vector3 NaturalSize
2137 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2138 if (NDalicPINVOKE.SWIGPendingException.Pending)
2139 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2145 /// Returns the natural size (Size2D) of the view.
2148 /// Deriving classes stipulate the natural size and by default a view has a ZERO natural size.
2150 public Size2D NaturalSize2D
2154 Vector3 temp = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2155 if (NDalicPINVOKE.SWIGPendingException.Pending)
2156 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2158 return new Size2D((int)temp.Width, (int)temp.Height);
2166 /// This is an asynchronous method.
2177 /// This is an asynchronous method.
2178 /// If an view is hidden, then the view and its children will not be rendered.
2179 /// This is regardless of the individual visibility of the children i.e.an view will only be rendered if all of its parents are shown.
2186 internal void Raise()
2188 NDalicPINVOKE.Raise(swigCPtr);
2189 if (NDalicPINVOKE.SWIGPendingException.Pending)
2190 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2193 internal void Lower()
2195 NDalicPINVOKE.Lower(swigCPtr);
2196 if (NDalicPINVOKE.SWIGPendingException.Pending)
2197 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2201 /// Raise view above all other views.
2204 /// Sibling order of views within the parent will be updated automatically.
2205 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2207 public void RaiseToTop()
2209 NDalicPINVOKE.RaiseToTop(swigCPtr);
2210 if (NDalicPINVOKE.SWIGPendingException.Pending)
2211 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2215 /// Lower view to the bottom of all views.
2218 /// Sibling order of views within the parent will be updated automatically.
2219 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2221 public void LowerToBottom()
2223 NDalicPINVOKE.LowerToBottom(swigCPtr);
2224 if (NDalicPINVOKE.SWIGPendingException.Pending)
2225 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2229 /// Query if all resources required by a View are loaded and ready.
2231 /// <remarks>Most resources are only loaded when the control is placed on stage
2233 public bool IsResourceReady()
2235 bool ret = NDalicPINVOKE.IsResourceReady(swigCPtr);
2236 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2241 /// Raise the view to above the target view.
2243 /// <remarks>Sibling order of views within the parent will be updated automatically.
2244 /// Views on the level above the target view will still be shown above this view.
2245 /// Raising this view above views with the same sibling order as each other will raise this view above them.
2246 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2248 /// <param name="target">Will be raised above this view</param>
2249 internal void RaiseAbove(View target)
2251 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
2252 if (NDalicPINVOKE.SWIGPendingException.Pending)
2253 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2257 /// Lower the view to below the target view.
2259 /// <remarks>Sibling order of views within the parent will be updated automatically.
2260 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
2261 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2263 /// <param name="target">Will be lowered below this view</param>
2264 internal void LowerBelow(View target)
2266 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
2267 if (NDalicPINVOKE.SWIGPendingException.Pending)
2268 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2271 internal string GetName()
2273 string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);
2274 if (NDalicPINVOKE.SWIGPendingException.Pending)
2275 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2279 internal void SetName(string name)
2281 NDalicPINVOKE.Actor_SetName(swigCPtr, name);
2282 if (NDalicPINVOKE.SWIGPendingException.Pending)
2283 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2286 internal uint GetId()
2288 uint ret = NDalicPINVOKE.Actor_GetId(swigCPtr);
2289 if (NDalicPINVOKE.SWIGPendingException.Pending)
2290 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2294 internal bool IsRoot()
2296 bool ret = NDalicPINVOKE.Actor_IsRoot(swigCPtr);
2297 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2301 internal bool OnWindow()
2303 bool ret = NDalicPINVOKE.Actor_OnStage(swigCPtr);
2304 if (NDalicPINVOKE.SWIGPendingException.Pending)
2305 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2309 internal Layer GetLayer()
2311 IntPtr cPtr = NDalicPINVOKE.Actor_GetLayer(swigCPtr);
2312 Layer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Layer;
2314 if (NDalicPINVOKE.SWIGPendingException.Pending)
2315 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2320 /// Removes a View from its Parent View / Layer. If the View has no parent, this method does nothing.
2322 /// <pre>The (child) View has been initialized. </pre>
2323 public void Unparent()
2325 NDalicPINVOKE.Actor_Unparent(swigCPtr);
2326 if (NDalicPINVOKE.SWIGPendingException.Pending)
2327 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2331 /// Search through this view's hierarchy for an view with the given name.
2332 /// The view itself is also considered in the search.
2334 /// <pre>The View has been initialized.</pre>
2335 /// <param name="viewName">The name of the view to find</param>
2336 /// <returns>A handle to the view if found, or an empty handle if not</returns>
2337 public View FindChildByName(string viewName)
2339 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
2341 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2343 if (NDalicPINVOKE.SWIGPendingException.Pending)
2344 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2348 internal View FindChildById(uint id)
2350 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
2352 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2354 if (NDalicPINVOKE.SWIGPendingException.Pending)
2355 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2359 internal void SetParentOrigin(Vector3 origin)
2361 NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
2362 if (NDalicPINVOKE.SWIGPendingException.Pending)
2363 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2366 internal Vector3 GetCurrentParentOrigin()
2368 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentParentOrigin(swigCPtr), true);
2369 if (NDalicPINVOKE.SWIGPendingException.Pending)
2370 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2374 internal void SetAnchorPoint(Vector3 anchorPoint)
2376 NDalicPINVOKE.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
2377 if (NDalicPINVOKE.SWIGPendingException.Pending)
2378 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2381 internal Vector3 GetCurrentAnchorPoint()
2383 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentAnchorPoint(swigCPtr), true);
2384 if (NDalicPINVOKE.SWIGPendingException.Pending)
2385 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2389 internal void SetSize(float width, float height)
2391 NDalicPINVOKE.Actor_SetSize__SWIG_0(swigCPtr, width, height);
2392 if (NDalicPINVOKE.SWIGPendingException.Pending)
2393 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2396 internal void SetSize(float width, float height, float depth)
2398 NDalicPINVOKE.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
2399 if (NDalicPINVOKE.SWIGPendingException.Pending)
2400 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2403 internal void SetSize(Vector2 size)
2405 NDalicPINVOKE.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
2406 if (NDalicPINVOKE.SWIGPendingException.Pending)
2407 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2410 internal void SetSize(Vector3 size)
2412 NDalicPINVOKE.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
2413 if (NDalicPINVOKE.SWIGPendingException.Pending)
2414 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2417 internal Vector3 GetTargetSize()
2419 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetTargetSize(swigCPtr), true);
2420 if (NDalicPINVOKE.SWIGPendingException.Pending)
2421 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2425 internal Size2D GetCurrentSize()
2427 Size ret = new Size(NDalicPINVOKE.Actor_GetCurrentSize(swigCPtr), true);
2428 if (NDalicPINVOKE.SWIGPendingException.Pending)
2429 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2430 Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
2434 internal Vector3 GetNaturalSize()
2436 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2437 if (NDalicPINVOKE.SWIGPendingException.Pending)
2438 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2442 internal void SetPosition(float x, float y)
2444 NDalicPINVOKE.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
2445 if (NDalicPINVOKE.SWIGPendingException.Pending)
2446 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2449 internal void SetPosition(float x, float y, float z)
2451 NDalicPINVOKE.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
2452 if (NDalicPINVOKE.SWIGPendingException.Pending)
2453 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2456 internal void SetPosition(Vector3 position)
2458 NDalicPINVOKE.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
2459 if (NDalicPINVOKE.SWIGPendingException.Pending)
2460 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2463 internal void SetX(float x)
2465 NDalicPINVOKE.Actor_SetX(swigCPtr, x);
2466 if (NDalicPINVOKE.SWIGPendingException.Pending)
2467 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2470 internal void SetY(float y)
2472 NDalicPINVOKE.Actor_SetY(swigCPtr, y);
2473 if (NDalicPINVOKE.SWIGPendingException.Pending)
2474 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2477 internal void SetZ(float z)
2479 NDalicPINVOKE.Actor_SetZ(swigCPtr, z);
2480 if (NDalicPINVOKE.SWIGPendingException.Pending)
2481 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2484 internal void TranslateBy(Vector3 distance)
2486 NDalicPINVOKE.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
2487 if (NDalicPINVOKE.SWIGPendingException.Pending)
2488 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2491 internal Position GetCurrentPosition()
2493 Position ret = new Position(NDalicPINVOKE.Actor_GetCurrentPosition(swigCPtr), true);
2494 if (NDalicPINVOKE.SWIGPendingException.Pending)
2495 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2499 internal Vector3 GetCurrentWorldPosition()
2501 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldPosition(swigCPtr), true);
2502 if (NDalicPINVOKE.SWIGPendingException.Pending)
2503 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2507 internal void SetInheritPosition(bool inherit)
2509 NDalicPINVOKE.Actor_SetInheritPosition(swigCPtr, inherit);
2510 if (NDalicPINVOKE.SWIGPendingException.Pending)
2511 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2514 internal bool IsPositionInherited()
2516 bool ret = NDalicPINVOKE.Actor_IsPositionInherited(swigCPtr);
2517 if (NDalicPINVOKE.SWIGPendingException.Pending)
2518 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2522 internal void SetOrientation(Degree angle, Vector3 axis)
2524 NDalicPINVOKE.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2525 if (NDalicPINVOKE.SWIGPendingException.Pending)
2526 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2529 internal void SetOrientation(Radian angle, Vector3 axis)
2531 NDalicPINVOKE.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2532 if (NDalicPINVOKE.SWIGPendingException.Pending)
2533 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2536 internal void SetOrientation(Rotation orientation)
2538 NDalicPINVOKE.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
2539 if (NDalicPINVOKE.SWIGPendingException.Pending)
2540 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2543 internal void RotateBy(Degree angle, Vector3 axis)
2545 NDalicPINVOKE.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2546 if (NDalicPINVOKE.SWIGPendingException.Pending)
2547 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2550 internal void RotateBy(Radian angle, Vector3 axis)
2552 NDalicPINVOKE.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2553 if (NDalicPINVOKE.SWIGPendingException.Pending)
2554 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2557 internal void RotateBy(Rotation relativeRotation)
2559 NDalicPINVOKE.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
2560 if (NDalicPINVOKE.SWIGPendingException.Pending)
2561 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2564 internal Rotation GetCurrentOrientation()
2566 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentOrientation(swigCPtr), true);
2567 if (NDalicPINVOKE.SWIGPendingException.Pending)
2568 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2572 internal void SetInheritOrientation(bool inherit)
2574 NDalicPINVOKE.Actor_SetInheritOrientation(swigCPtr, inherit);
2575 if (NDalicPINVOKE.SWIGPendingException.Pending)
2576 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2579 internal bool IsOrientationInherited()
2581 bool ret = NDalicPINVOKE.Actor_IsOrientationInherited(swigCPtr);
2582 if (NDalicPINVOKE.SWIGPendingException.Pending)
2583 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2587 internal Rotation GetCurrentWorldOrientation()
2589 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentWorldOrientation(swigCPtr), true);
2590 if (NDalicPINVOKE.SWIGPendingException.Pending)
2591 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2595 internal void SetScale(float scale)
2597 NDalicPINVOKE.Actor_SetScale__SWIG_0(swigCPtr, scale);
2598 if (NDalicPINVOKE.SWIGPendingException.Pending)
2599 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2602 internal void SetScale(float scaleX, float scaleY, float scaleZ)
2604 NDalicPINVOKE.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
2605 if (NDalicPINVOKE.SWIGPendingException.Pending)
2606 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2609 internal void SetScale(Vector3 scale)
2611 NDalicPINVOKE.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
2612 if (NDalicPINVOKE.SWIGPendingException.Pending)
2613 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2616 internal void ScaleBy(Vector3 relativeScale)
2618 NDalicPINVOKE.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
2619 if (NDalicPINVOKE.SWIGPendingException.Pending)
2620 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2623 internal Vector3 GetCurrentScale()
2625 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentScale(swigCPtr), true);
2626 if (NDalicPINVOKE.SWIGPendingException.Pending)
2627 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2631 internal Vector3 GetCurrentWorldScale()
2633 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldScale(swigCPtr), true);
2634 if (NDalicPINVOKE.SWIGPendingException.Pending)
2635 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2639 internal void SetInheritScale(bool inherit)
2641 NDalicPINVOKE.Actor_SetInheritScale(swigCPtr, inherit);
2642 if (NDalicPINVOKE.SWIGPendingException.Pending)
2643 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2646 internal bool IsScaleInherited()
2648 bool ret = NDalicPINVOKE.Actor_IsScaleInherited(swigCPtr);
2649 if (NDalicPINVOKE.SWIGPendingException.Pending)
2650 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2654 internal Matrix GetCurrentWorldMatrix()
2656 Matrix ret = new Matrix(NDalicPINVOKE.Actor_GetCurrentWorldMatrix(swigCPtr), true);
2657 if (NDalicPINVOKE.SWIGPendingException.Pending)
2658 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2662 internal void SetVisible(bool visible)
2664 NDalicPINVOKE.Actor_SetVisible(swigCPtr, visible);
2665 if (NDalicPINVOKE.SWIGPendingException.Pending)
2666 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2669 internal bool IsVisible()
2671 bool ret = NDalicPINVOKE.Actor_IsVisible(swigCPtr);
2672 if (NDalicPINVOKE.SWIGPendingException.Pending)
2673 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2677 internal void SetOpacity(float opacity)
2679 NDalicPINVOKE.Actor_SetOpacity(swigCPtr, opacity);
2680 if (NDalicPINVOKE.SWIGPendingException.Pending)
2681 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2684 internal float GetCurrentOpacity()
2686 float ret = NDalicPINVOKE.Actor_GetCurrentOpacity(swigCPtr);
2687 if (NDalicPINVOKE.SWIGPendingException.Pending)
2688 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2692 internal void SetColor(Vector4 color)
2694 NDalicPINVOKE.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
2695 if (NDalicPINVOKE.SWIGPendingException.Pending)
2696 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2699 internal Vector4 GetCurrentColor()
2701 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentColor(swigCPtr), true);
2702 if (NDalicPINVOKE.SWIGPendingException.Pending)
2703 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2707 internal void SetColorMode(ColorMode colorMode)
2709 NDalicPINVOKE.Actor_SetColorMode(swigCPtr, (int)colorMode);
2710 if (NDalicPINVOKE.SWIGPendingException.Pending)
2711 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2714 internal ColorMode GetColorMode()
2716 ColorMode ret = (ColorMode)NDalicPINVOKE.Actor_GetColorMode(swigCPtr);
2717 if (NDalicPINVOKE.SWIGPendingException.Pending)
2718 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2722 internal Vector4 GetCurrentWorldColor()
2724 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentWorldColor(swigCPtr), true);
2725 if (NDalicPINVOKE.SWIGPendingException.Pending)
2726 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2730 internal void SetDrawMode(DrawModeType drawMode)
2732 NDalicPINVOKE.Actor_SetDrawMode(swigCPtr, (int)drawMode);
2733 if (NDalicPINVOKE.SWIGPendingException.Pending)
2734 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2737 internal DrawModeType GetDrawMode()
2739 DrawModeType ret = (DrawModeType)NDalicPINVOKE.Actor_GetDrawMode(swigCPtr);
2740 if (NDalicPINVOKE.SWIGPendingException.Pending)
2741 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2746 /// Converts screen coordinates into the view's coordinate system using the default camera.
2748 /// <pre>The View has been initialized.</pre>
2749 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5)</remarks>
2750 /// <param name="localX">On return, the X-coordinate relative to the view</param>
2751 /// <param name="localY">On return, the Y-coordinate relative to the view</param>
2752 /// <param name="screenX">The screen X-coordinate</param>
2753 /// <param name="screenY">The screen Y-coordinate</param>
2754 /// <returns>True if the conversion succeeded</returns>
2755 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
2757 bool ret = NDalicPINVOKE.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
2758 if (NDalicPINVOKE.SWIGPendingException.Pending)
2759 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2763 internal void SetKeyboardFocusable(bool focusable)
2765 NDalicPINVOKE.Actor_SetKeyboardFocusable(swigCPtr, focusable);
2766 if (NDalicPINVOKE.SWIGPendingException.Pending)
2767 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2770 internal bool IsKeyboardFocusable()
2772 bool ret = NDalicPINVOKE.Actor_IsKeyboardFocusable(swigCPtr);
2773 if (NDalicPINVOKE.SWIGPendingException.Pending)
2774 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2778 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
2780 NDalicPINVOKE.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
2781 if (NDalicPINVOKE.SWIGPendingException.Pending)
2782 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2785 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
2787 ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.Actor_GetResizePolicy(swigCPtr, (int)dimension);
2788 if (NDalicPINVOKE.SWIGPendingException.Pending)
2789 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2794 /// Sets the relative to parent size factor of the view.<br>
2795 /// This factor is only used when ResizePolicy is set to either:
2796 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br>
2797 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br>
2799 /// <pre>The View has been initialized.</pre>
2800 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis</param>
2801 public void SetSizeModeFactor(Vector3 factor)
2803 NDalicPINVOKE.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
2804 if (NDalicPINVOKE.SWIGPendingException.Pending)
2805 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2808 internal Vector3 GetSizeModeFactor()
2810 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetSizeModeFactor(swigCPtr), true);
2811 if (NDalicPINVOKE.SWIGPendingException.Pending)
2812 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2817 /// Calculates the height of the view given a width.<br>
2818 /// The natural size is used for default calculation. <br>
2819 /// size 0 is treated as aspect ratio 1:1.<br>
2821 /// <param name="width">Width to use</param>
2822 /// <returns>The height based on the width</returns>
2823 public float GetHeightForWidth(float width)
2825 float ret = NDalicPINVOKE.Actor_GetHeightForWidth(swigCPtr, width);
2826 if (NDalicPINVOKE.SWIGPendingException.Pending)
2827 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2832 /// Calculates the width of the view given a height.<br>
2833 /// The natural size is used for default calculation.<br>
2834 /// size 0 is treated as aspect ratio 1:1.<br>
2836 /// <param name="height">Height to use</param>
2837 /// <returns>The width based on the height</returns>
2838 public float GetWidthForHeight(float height)
2840 float ret = NDalicPINVOKE.Actor_GetWidthForHeight(swigCPtr, height);
2841 if (NDalicPINVOKE.SWIGPendingException.Pending)
2842 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2846 public float GetRelayoutSize(DimensionType dimension)
2848 float ret = NDalicPINVOKE.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
2849 if (NDalicPINVOKE.SWIGPendingException.Pending)
2850 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2854 public void SetPadding(PaddingType padding)
2856 NDalicPINVOKE.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
2857 if (NDalicPINVOKE.SWIGPendingException.Pending)
2858 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2861 public void GetPadding(PaddingType paddingOut)
2863 NDalicPINVOKE.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
2864 if (NDalicPINVOKE.SWIGPendingException.Pending)
2865 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2868 internal void SetMinimumSize(Vector2 size)
2870 NDalicPINVOKE.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
2871 if (NDalicPINVOKE.SWIGPendingException.Pending)
2872 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2875 internal Vector2 GetMinimumSize()
2877 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMinimumSize(swigCPtr), true);
2878 if (NDalicPINVOKE.SWIGPendingException.Pending)
2879 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2883 internal void SetMaximumSize(Vector2 size)
2885 NDalicPINVOKE.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
2886 if (NDalicPINVOKE.SWIGPendingException.Pending)
2887 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2890 internal Vector2 GetMaximumSize()
2892 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMaximumSize(swigCPtr), true);
2893 if (NDalicPINVOKE.SWIGPendingException.Pending)
2894 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2898 internal int GetHierarchyDepth()
2900 int ret = NDalicPINVOKE.Actor_GetHierarchyDepth(swigCPtr);
2901 if (NDalicPINVOKE.SWIGPendingException.Pending)
2902 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2906 public uint AddRenderer(Renderer renderer)
2908 uint ret = NDalicPINVOKE.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
2909 if (NDalicPINVOKE.SWIGPendingException.Pending)
2910 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2914 internal uint GetRendererCount()
2916 uint ret = NDalicPINVOKE.Actor_GetRendererCount(swigCPtr);
2917 if (NDalicPINVOKE.SWIGPendingException.Pending)
2918 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2922 public Renderer GetRendererAt(uint index)
2924 IntPtr cPtr = NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index);
2925 Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Renderer;
2927 if (NDalicPINVOKE.SWIGPendingException.Pending)
2928 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2932 public void RemoveRenderer(Renderer renderer)
2934 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
2935 if (NDalicPINVOKE.SWIGPendingException.Pending)
2936 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2939 public void RemoveRenderer(uint index)
2941 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
2942 if (NDalicPINVOKE.SWIGPendingException.Pending)
2943 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2946 internal TouchDataSignal TouchSignal()
2948 TouchDataSignal ret = new TouchDataSignal(NDalicPINVOKE.Actor_TouchSignal(swigCPtr), false);
2949 if (NDalicPINVOKE.SWIGPendingException.Pending)
2950 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2954 internal HoverSignal HoveredSignal()
2956 HoverSignal ret = new HoverSignal(NDalicPINVOKE.Actor_HoveredSignal(swigCPtr), false);
2957 if (NDalicPINVOKE.SWIGPendingException.Pending)
2958 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2962 internal WheelSignal WheelEventSignal()
2964 WheelSignal ret = new WheelSignal(NDalicPINVOKE.Actor_WheelEventSignal(swigCPtr), false);
2965 if (NDalicPINVOKE.SWIGPendingException.Pending)
2966 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2970 internal ViewSignal OnWindowSignal()
2972 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnStageSignal(swigCPtr), false);
2973 if (NDalicPINVOKE.SWIGPendingException.Pending)
2974 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2978 internal ViewSignal OffWindowSignal()
2980 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OffStageSignal(swigCPtr), false);
2981 if (NDalicPINVOKE.SWIGPendingException.Pending)
2982 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2986 internal ViewSignal OnRelayoutSignal()
2988 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnRelayoutSignal(swigCPtr), false);
2989 if (NDalicPINVOKE.SWIGPendingException.Pending)
2990 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2994 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view) {
2995 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
2996 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3001 internal ViewLayoutDirectionChangedSignal LayoutDirectionChangedSignal(View view) {
3002 ViewLayoutDirectionChangedSignal ret = new ViewLayoutDirectionChangedSignal(NDalicManualPINVOKE.LayoutDirectionChangedSignal(View.getCPtr(view)), false);
3003 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3008 internal ViewSignal ResourcesLoadedSignal()
3010 ViewSignal ret = new ViewSignal(NDalicPINVOKE.ResourceReadySignal(swigCPtr), false);
3011 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3016 /// Gets/Sets the origin of an view, within its parent's area.<br>
3017 /// 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>
3018 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br>
3019 /// An view's position is the distance between this origin, and the view's anchor-point.<br>
3021 /// <pre>The View has been initialized.</pre>
3022 public Position ParentOrigin
3026 Position temp = new Position(0.0f, 0.0f, 0.0f);
3027 GetProperty(View.Property.PARENT_ORIGIN).Get(temp);
3032 SetProperty(View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue(value));
3036 internal float ParentOriginX
3041 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
3046 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
3050 internal float ParentOriginY
3055 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
3060 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
3064 internal float ParentOriginZ
3069 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
3074 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
3079 /// Gets/Sets the anchor-point of an view.<br>
3080 /// 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>
3081 /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br>
3082 /// An view position is the distance between its parent-origin and this anchor-point.<br>
3083 /// An view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br>
3084 /// <pre>The View has been initialized.</pre>
3086 public Position PivotPoint
3090 Position temp = new Position(0.0f, 0.0f, 0.0f);
3091 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
3096 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3100 internal float PivotPointX
3105 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
3110 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
3114 internal float PivotPointY
3119 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
3124 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
3128 internal float PivotPointZ
3133 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
3138 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
3143 /// Gets/Sets the size width of an view.
3145 public float SizeWidth
3150 GetProperty(View.Property.SIZE_WIDTH).Get(out temp);
3155 SetProperty(View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue(value));
3160 /// Gets/Sets the size height of an view.
3162 public float SizeHeight
3167 GetProperty(View.Property.SIZE_HEIGHT).Get(out temp);
3172 SetProperty(View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue(value));
3177 /// Gets/Sets the position of the View.<br>
3178 /// By default, sets the position vector between the parent origin and pivot point(default).<br>
3179 /// If Position inheritance if disabled, sets the world position.<br>
3181 public Position Position
3185 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3186 GetProperty(View.Property.POSITION).Get(temp);
3191 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(value));
3196 /// Gets/Sets the position x of the View.
3198 public float PositionX
3203 GetProperty(View.Property.POSITION_X).Get(out temp);
3208 SetProperty(View.Property.POSITION_X, new Tizen.NUI.PropertyValue(value));
3213 /// Gets/Sets the position y of the View.
3215 public float PositionY
3220 GetProperty(View.Property.POSITION_Y).Get(out temp);
3225 SetProperty(View.Property.POSITION_Y, new Tizen.NUI.PropertyValue(value));
3230 /// Gets/Sets the position z of the View.
3232 public float PositionZ
3237 GetProperty(View.Property.POSITION_Z).Get(out temp);
3242 SetProperty(View.Property.POSITION_Z, new Tizen.NUI.PropertyValue(value));
3247 /// Gets/Sets the world position of the View.
3249 public Vector3 WorldPosition
3253 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3254 GetProperty(View.Property.WORLD_POSITION).Get(temp);
3259 internal float WorldPositionX
3264 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
3269 internal float WorldPositionY
3274 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
3279 internal float WorldPositionZ
3284 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
3290 /// Gets/Sets the orientation of the View.<br>
3291 /// An view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br>
3293 /// <remarks>This is an asynchronous method.</remarks>
3294 public Rotation Orientation
3298 Rotation temp = new Rotation();
3299 GetProperty(View.Property.ORIENTATION).Get(temp);
3304 SetProperty(View.Property.ORIENTATION, new Tizen.NUI.PropertyValue(value));
3309 /// Gets/Sets the world orientation of the View.<br>
3311 public Rotation WorldOrientation
3315 Rotation temp = new Rotation();
3316 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
3322 /// Gets/Sets the scale factor applied to an view.<br>
3324 public Vector3 Scale
3328 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3329 GetProperty(View.Property.SCALE).Get(temp);
3334 SetProperty(View.Property.SCALE, new Tizen.NUI.PropertyValue(value));
3339 /// Gets/Sets the scale x factor applied to an view.
3346 GetProperty(View.Property.SCALE_X).Get(out temp);
3351 SetProperty(View.Property.SCALE_X, new Tizen.NUI.PropertyValue(value));
3356 /// Gets/Sets the scale y factor applied to an view.
3363 GetProperty(View.Property.SCALE_Y).Get(out temp);
3368 SetProperty(View.Property.SCALE_Y, new Tizen.NUI.PropertyValue(value));
3373 /// Gets/Sets the scale z factor applied to an view.
3380 GetProperty(View.Property.SCALE_Z).Get(out temp);
3385 SetProperty(View.Property.SCALE_Z, new Tizen.NUI.PropertyValue(value));
3390 /// Gets the world scale of View.
3392 public Vector3 WorldScale
3396 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3397 GetProperty(View.Property.WORLD_SCALE).Get(temp);
3403 /// Retrieves the visibility flag of an view.
3406 /// If an view is not visible, then the view and its children will not be rendered.
3407 /// This is regardless of the individual visibility values of the children i.e.an view will only be rendered if all of its parents have visibility set to true.
3409 public bool Visibility
3414 GetProperty(View.Property.VISIBLE).Get(out temp);
3420 /// Gets the view's world color.
3422 public Vector4 WorldColor
3426 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3427 GetProperty(View.Property.WORLD_COLOR).Get(temp);
3432 internal Matrix WorldMatrix
3436 Matrix temp = new Matrix();
3437 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
3443 /// Gets/Sets the View's name.
3450 GetProperty(View.Property.NAME).Get(out temp);
3455 SetProperty(View.Property.NAME, new Tizen.NUI.PropertyValue(value));
3460 /// Get the number of children held by the view.
3462 public uint ChildCount
3466 return GetChildCount();
3471 /// Gets the View's ID.
3483 /// Gets/Sets the status of whether an view should emit touch or hover signals.
3485 public bool Sensitive
3490 GetProperty(View.Property.SENSITIVE).Get(out temp);
3495 SetProperty(View.Property.SENSITIVE, new Tizen.NUI.PropertyValue(value));
3500 /// Gets/Sets the status of whether the view should receive a notification when touch or hover motion events leave the boundary of the view.
3502 public bool LeaveRequired
3507 GetProperty(View.Property.LEAVE_REQUIRED).Get(out temp);
3512 SetProperty(View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue(value));
3517 /// Gets/Sets the status of whether a child view inherits it's parent's orientation.
3519 public bool InheritOrientation
3524 GetProperty(View.Property.INHERIT_ORIENTATION).Get(out temp);
3529 SetProperty(View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue(value));
3534 /// Gets/Sets the status of whether a child view inherits it's parent's scale.
3536 public bool InheritScale
3541 GetProperty(View.Property.INHERIT_SCALE).Get(out temp);
3546 SetProperty(View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue(value));
3551 /// Gets/Sets the status of how the view and its children should be drawn.<br>
3552 /// Not all views are renderable, but DrawMode can be inherited from any view.<br>
3553 /// 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>
3554 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br>
3555 /// Overlay views are drawn in a separate pass, after all non-overlay views within the Layer.<br>
3556 /// For overlay views, the drawing order is with respect to tree levels of Views, and depth-testing will not be used.<br>
3558 public DrawModeType DrawMode
3563 if (GetProperty(View.Property.DRAW_MODE).Get(out temp) == false)
3565 NUILog.Error("DrawMode get error!");
3570 return DrawModeType.Normal;
3572 return DrawModeType.Overlay2D;
3574 return DrawModeType.Stencil;
3576 return DrawModeType.Normal;
3581 SetProperty(View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)value));
3586 /// Gets/Sets the relative to parent size factor of the view.<br>
3587 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br>
3588 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br>
3590 public Vector3 SizeModeFactor
3594 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3595 GetProperty(View.Property.SIZE_MODE_FACTOR).Get(temp);
3600 SetProperty(View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue(value));
3605 /// Gets/Sets the width resize policy to be used.
3607 public ResizePolicyType WidthResizePolicy
3612 if (GetProperty(View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
3614 NUILog.Error("WidthResizePolicy get error!");
3619 return ResizePolicyType.Fixed;
3620 case "USE_NATURAL_SIZE":
3621 return ResizePolicyType.UseNaturalSize;
3622 case "FILL_TO_PARENT":
3623 return ResizePolicyType.FillToParent;
3624 case "SIZE_RELATIVE_TO_PARENT":
3625 return ResizePolicyType.SizeRelativeToParent;
3626 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3627 return ResizePolicyType.SizeFixedOffsetFromParent;
3628 case "FIT_TO_CHILDREN":
3629 return ResizePolicyType.FitToChildren;
3630 case "DIMENSION_DEPENDENCY":
3631 return ResizePolicyType.DimensionDependency;
3632 case "USE_ASSIGNED_SIZE":
3633 return ResizePolicyType.UseAssignedSize;
3635 return ResizePolicyType.Fixed;
3640 SetProperty(View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3645 /// Gets/Sets the height resize policy to be used.
3647 public ResizePolicyType HeightResizePolicy
3652 if (GetProperty(View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
3654 NUILog.Error("HeightResizePolicy get error!");
3659 return ResizePolicyType.Fixed;
3660 case "USE_NATURAL_SIZE":
3661 return ResizePolicyType.UseNaturalSize;
3662 case "FILL_TO_PARENT":
3663 return ResizePolicyType.FillToParent;
3664 case "SIZE_RELATIVE_TO_PARENT":
3665 return ResizePolicyType.SizeRelativeToParent;
3666 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3667 return ResizePolicyType.SizeFixedOffsetFromParent;
3668 case "FIT_TO_CHILDREN":
3669 return ResizePolicyType.FitToChildren;
3670 case "DIMENSION_DEPENDENCY":
3671 return ResizePolicyType.DimensionDependency;
3672 case "USE_ASSIGNED_SIZE":
3673 return ResizePolicyType.UseAssignedSize;
3675 return ResizePolicyType.Fixed;
3680 SetProperty(View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3685 /// Gets/Sets the policy to use when setting size with size negotiation.<br>
3686 /// Defaults to SizeScalePolicyType.UseSizeSet.<br>
3688 public SizeScalePolicyType SizeScalePolicy
3693 if (GetProperty(View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
3695 NUILog.Error("SizeScalePolicy get error!");
3699 case "USE_SIZE_SET":
3700 return SizeScalePolicyType.UseSizeSet;
3701 case "FIT_WITH_ASPECT_RATIO":
3702 return SizeScalePolicyType.FitWithAspectRatio;
3703 case "FILL_WITH_ASPECT_RATIO":
3704 return SizeScalePolicyType.FillWithAspectRatio;
3706 return SizeScalePolicyType.UseSizeSet;
3711 string valueToString = "";
3714 case SizeScalePolicyType.UseSizeSet:
3716 valueToString = "USE_SIZE_SET";
3719 case SizeScalePolicyType.FitWithAspectRatio:
3721 valueToString = "FIT_WITH_ASPECT_RATIO";
3724 case SizeScalePolicyType.FillWithAspectRatio:
3726 valueToString = "FILL_WITH_ASPECT_RATIO";
3731 valueToString = "USE_SIZE_SET";
3735 SetProperty(View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
3740 /// Gets/Sets the status of whether the width size is dependent on height size.
3742 public bool WidthForHeight
3747 GetProperty(View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
3752 SetProperty(View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue(value));
3757 /// Gets/Sets the status of whether the height size is dependent on width size.
3759 public bool HeightForWidth
3764 GetProperty(View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
3769 SetProperty(View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue(value));
3774 /// Gets/Sets the padding for use in layout.
3776 public Vector4 Padding
3780 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3781 GetProperty(View.Property.PADDING).Get(temp);
3786 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
3791 /// Gets/Sets the minimum size an view can be assigned in size negotiation.
3793 public Size2D MinimumSize
3797 Size2D temp = new Size2D(0, 0);
3798 GetProperty(View.Property.MINIMUM_SIZE).Get(temp);
3803 SetProperty(View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3808 /// Gets/Sets the maximum size an view can be assigned in size negotiation.
3810 public Size2D MaximumSize
3814 Size2D temp = new Size2D(0, 0);
3815 GetProperty(View.Property.MAXIMUM_SIZE).Get(temp);
3820 SetProperty(View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3825 /// Gets/Sets whether a child view inherits it's parent's position.<br>
3826 /// Default is to inherit.<br>
3827 /// 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>
3829 public bool InheritPosition
3834 GetProperty(View.Property.INHERIT_POSITION).Get(out temp);
3839 SetProperty(View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue(value));
3844 /// Gets/Sets clipping behavior(mode) of it's children.
3846 public ClippingModeType ClippingMode
3851 if (GetProperty(View.Property.CLIPPING_MODE).Get(out temp) == false)
3853 NUILog.Error("ClippingMode get error!");
3858 return ClippingModeType.Disabled;
3859 case "CLIP_CHILDREN":
3860 return ClippingModeType.ClipChildren;
3862 return ClippingModeType.Disabled;
3867 SetProperty(View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)value));
3872 /// Get the number of renderers held by the view.
3874 public uint RendererCount
3878 return GetRendererCount();
3885 [Obsolete("Please do not use! this will be deprecated")]
3886 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> Touched
3890 if (_touchDataEventHandler == null)
3892 _touchDataCallback = OnTouch;
3893 this.TouchSignal().Connect(_touchDataCallback);
3896 _touchDataEventHandler += value;
3901 _touchDataEventHandler -= value;
3903 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
3905 this.TouchSignal().Disconnect(_touchDataCallback);
3911 [Obsolete("Please do not use! this will be deprecated")]
3912 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> Hovered
3916 if (_hoverEventHandler == null)
3918 _hoverEventCallback = OnHoverEvent;
3919 this.HoveredSignal().Connect(_hoverEventCallback);
3922 _hoverEventHandler += value;
3927 _hoverEventHandler -= value;
3929 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
3931 this.HoveredSignal().Disconnect(_hoverEventCallback);
3937 [Obsolete("Please do not use! this will be deprecated")]
3938 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelMoved
3942 if (_wheelEventHandler == null)
3944 _wheelEventCallback = OnWheelEvent;
3945 this.WheelEventSignal().Connect(_wheelEventCallback);
3948 _wheelEventHandler += value;
3953 _wheelEventHandler -= value;
3955 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
3957 this.WheelEventSignal().Disconnect(_wheelEventCallback);
3963 [Obsolete("Please do not use! this will be deprecated")]
3964 public Position AnchorPoint
3968 Position temp = new Position(0.0f, 0.0f, 0.0f);
3969 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
3974 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3978 [Obsolete("Please do not use! this will be deprecated, please use Size2D instead")]
3983 Size temp = new Size(0.0f, 0.0f, 0.0f);
3984 GetProperty(View.Property.SIZE).Get(temp);
3989 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(value));
3993 [Obsolete("Please do not use! this will be deprecated")]
3994 public event EventHandler OnWindowEvent
3998 if (_onWindowEventHandler == null)
4000 _onWindowEventCallback = OnWindow;
4001 this.OnWindowSignal().Connect(_onWindowEventCallback);
4004 _onWindowEventHandler += value;
4009 _onWindowEventHandler -= value;
4011 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
4013 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
4018 [Obsolete("Please do not use! this will be deprecated")]
4019 public event EventHandler OffWindowEvent
4023 if (_offWindowEventHandler == null)
4025 _offWindowEventCallback = OffWindow;
4026 this.OffWindowSignal().Connect(_offWindowEventCallback);
4029 _offWindowEventHandler += value;
4034 _offWindowEventHandler -= value;
4036 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
4038 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
4043 [Obsolete("Please do not use! this will be deprecated")]
4044 public event EventHandler OnRelayoutEvent
4048 if (_onRelayoutEventHandler == null)
4050 _onRelayoutEventCallback = OnRelayout;
4051 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
4054 _onRelayoutEventHandler += value;
4059 _onRelayoutEventHandler -= value;
4061 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
4063 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
4069 [Obsolete("Please DO NOT use! This will be deprecated! Please use 'Container GetParent()' instead!")]
4075 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
4077 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(cPtr);
4079 if (basehandle is Layer)
4081 ret = new View(cPtr, false);
4085 ret = basehandle as View;
4088 if (NDalicPINVOKE.SWIGPendingException.Pending)
4089 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4094 public bool InheritLayoutDirection
4099 GetProperty(View.Property.INHERIT_LAYOUT_DIRECTION).Get(out temp);
4104 SetProperty(View.Property.INHERIT_LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue(value));
4108 public ViewLayoutDirectionType LayoutDirection
4113 if (GetProperty(View.Property.LAYOUT_DIRECTION).Get(out temp) == false)
4115 NUILog.Error("LAYOUT_DIRECTION get error!");
4117 return (ViewLayoutDirectionType)temp;
4121 SetProperty(View.Property.LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((int)value));
4126 public enum ViewLayoutDirectionType