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 : Animatable //CustomActor => Animatable
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);
34 // Register this instance of view in the view registry.
35 ViewRegistry.RegisterView(this);
38 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
40 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
43 //you can override it to clean-up your own resources.
44 protected override void Dispose(DisposeTypes type)
51 if(type == DisposeTypes.Explicit)
54 //Release your own managed resources here.
55 //You should release all of your own disposable objects here.
58 //Release your own unmanaged resources here.
59 //You should not access any managed member here except static instance.
60 //because the execution order of Finalizes is non-deterministic.
62 //Unreference this from if a static instance refer to this.
63 ViewRegistry.UnregisterView(this);
65 if (swigCPtr.Handle != global::System.IntPtr.Zero)
70 NDalicPINVOKE.delete_View(swigCPtr);
72 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
78 private EventHandler _keyInputFocusGainedEventHandler;
79 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
80 private delegate void KeyInputFocusGainedCallbackType(IntPtr control);
81 private KeyInputFocusGainedCallbackType _keyInputFocusGainedCallback;
84 /// Event for KeyInputFocusGained signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
85 /// KeyInputFocusGained signal is emitted when the control gets Key Input Focus.<br>
87 public event EventHandler FocusGained
91 if (_keyInputFocusGainedEventHandler == null)
93 _keyInputFocusGainedCallback = OnKeyInputFocusGained;
94 this.KeyInputFocusGainedSignal().Connect(_keyInputFocusGainedCallback);
97 _keyInputFocusGainedEventHandler += value;
102 _keyInputFocusGainedEventHandler -= value;
104 if (_keyInputFocusGainedEventHandler == null && KeyInputFocusGainedSignal().Empty() == false)
106 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
111 private void OnKeyInputFocusGained(IntPtr view)
113 if (_keyInputFocusGainedEventHandler != null)
115 _keyInputFocusGainedEventHandler(this, null);
120 private EventHandler _keyInputFocusLostEventHandler;
121 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
122 private delegate void KeyInputFocusLostCallbackType(IntPtr control);
123 private KeyInputFocusLostCallbackType _keyInputFocusLostCallback;
126 /// Event for KeyInputFocusLost signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
127 /// KeyInputFocusLost signal is emitted when the control loses Key Input Focus.<br>
129 public event EventHandler FocusLost
133 if (_keyInputFocusLostEventHandler == null)
135 _keyInputFocusLostCallback = OnKeyInputFocusLost;
136 this.KeyInputFocusLostSignal().Connect(_keyInputFocusLostCallback);
139 _keyInputFocusLostEventHandler += value;
144 _keyInputFocusLostEventHandler -= value;
146 if (_keyInputFocusLostEventHandler == null && KeyInputFocusLostSignal().Empty() == false)
148 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
153 private void OnKeyInputFocusLost(IntPtr view)
155 if (_keyInputFocusLostEventHandler != null)
157 _keyInputFocusLostEventHandler(this, null);
162 /// Event arguments that passed via KeyEvent signal.
164 public class KeyEventArgs : EventArgs
169 /// Key - is the key sent to the View.
184 private EventHandlerWithReturnType<object, KeyEventArgs, bool> _keyEventHandler;
185 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
186 private delegate bool KeyCallbackType(IntPtr control, IntPtr keyEvent);
187 private KeyCallbackType _keyCallback;
190 /// Event for KeyPressed signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
191 /// KeyPressed signal is emitted when key event is received.<br>
193 public event EventHandlerWithReturnType<object, KeyEventArgs, bool> KeyEvent
197 if (_keyEventHandler == null)
199 _keyCallback = OnKeyEvent;
200 this.KeyEventSignal().Connect(_keyCallback);
203 _keyEventHandler += value;
208 _keyEventHandler -= value;
210 if (_keyEventHandler == null && KeyEventSignal().Empty() == false)
212 this.KeyEventSignal().Disconnect(_keyCallback);
217 private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
219 KeyEventArgs e = new KeyEventArgs();
223 e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
225 if (_keyEventHandler != null)
227 Delegate[] delegateList = _keyEventHandler.GetInvocationList();
229 // Oring the result of each callback.
230 foreach ( EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList )
232 result |= del( this, e );
239 private EventHandler _onRelayoutEventHandler;
240 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
241 private delegate void OnRelayoutEventCallbackType(IntPtr control);
242 private OnRelayoutEventCallbackType _onRelayoutEventCallback;
245 /// Event for OnRelayout signal which can be used to subscribe/unsubscribe the event handler.<br>
246 /// OnRelayout signal is emitted after the size has been set on the view during relayout.<br>
248 public event EventHandler OnRelayoutEvent
252 if (_onRelayoutEventHandler == null)
254 _onRelayoutEventCallback = OnRelayout;
255 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
258 _onRelayoutEventHandler += value;
263 _onRelayoutEventHandler -= value;
265 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
267 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
273 // Callback for View OnRelayout signal
274 private void OnRelayout(IntPtr data)
276 if (_onRelayoutEventHandler != null)
278 _onRelayoutEventHandler(this, null);
283 /// Event arguments that passed via Touch signal.
285 public class TouchEventArgs : EventArgs
287 private Touch _touch;
290 /// Touch - contains the information of touch points
305 private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
306 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
307 private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
308 private TouchDataCallbackType _touchDataCallback;
311 /// Event for Touched signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
312 /// Touched signal is emitted when touch input is received.<br>
314 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> Touched
318 if (_touchDataEventHandler == null)
320 _touchDataCallback = OnTouch;
321 this.TouchSignal().Connect(_touchDataCallback);
324 _touchDataEventHandler += value;
329 _touchDataEventHandler -= value;
331 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
333 this.TouchSignal().Disconnect(_touchDataCallback);
339 // Callback for View TouchSignal
340 private bool OnTouch(IntPtr view, IntPtr touchData)
342 TouchEventArgs e = new TouchEventArgs();
344 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
346 if (_touchDataEventHandler != null)
348 return _touchDataEventHandler(this, e);
355 /// Event arguments that passed via Hover signal.
357 public class HoverEventArgs : EventArgs
359 private Hover _hover;
362 /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
377 private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
378 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
379 private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
380 private HoverEventCallbackType _hoverEventCallback;
383 /// Event for Hovered signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
384 /// Hovered signal is emitted when hover input is received.<br>
386 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> Hovered
390 if (_hoverEventHandler == null)
392 _hoverEventCallback = OnHoverEvent;
393 this.HoveredSignal().Connect(_hoverEventCallback);
396 _hoverEventHandler += value;
401 _hoverEventHandler -= value;
403 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
405 this.HoveredSignal().Disconnect(_hoverEventCallback);
411 // Callback for View Hover signal
412 private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
414 HoverEventArgs e = new HoverEventArgs();
416 e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
418 if (_hoverEventHandler != null)
420 return _hoverEventHandler(this, e);
427 /// Event arguments that passed via Wheel signal.
429 public class WheelEventArgs : EventArgs
431 private Wheel _wheel;
434 /// WheelEvent - store a wheel rolling type : MOUSE_WHEEL or CUSTOM_WHEEL
449 private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
450 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
451 private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
452 private WheelEventCallbackType _wheelEventCallback;
455 /// Event for WheelMoved signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
456 /// WheelMoved signal is emitted when wheel event is received.<br>
458 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelMoved
462 if (_wheelEventHandler == null)
464 _wheelEventCallback = OnWheelEvent;
465 this.WheelEventSignal().Connect(_wheelEventCallback);
468 _wheelEventHandler += value;
473 _wheelEventHandler -= value;
475 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
477 this.WheelEventSignal().Disconnect(_wheelEventCallback);
483 // Callback for View Wheel signal
484 private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
486 WheelEventArgs e = new WheelEventArgs();
488 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
490 if (_wheelEventHandler != null)
492 return _wheelEventHandler(this, e);
498 private EventHandler _onWindowEventHandler;
499 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
500 private delegate void OnWindowEventCallbackType(IntPtr control);
501 private OnWindowEventCallbackType _onWindowEventCallback;
504 /// Event for OnWindow signal which can be used to subscribe/unsubscribe the event handler.<br>
505 /// OnWindow signal is emitted after the view has been connected to the Window.<br>
507 public event EventHandler OnWindowEvent
511 if (_onWindowEventHandler == null)
513 _onWindowEventCallback = OnWindow;
514 this.OnWindowSignal().Connect(_onWindowEventCallback);
517 _onWindowEventHandler += value;
522 _onWindowEventHandler -= value;
524 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
526 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
531 // Callback for View OnWindow signal
532 private void OnWindow(IntPtr data)
534 if (_onWindowEventHandler != null)
536 _onWindowEventHandler(this, null);
541 private EventHandler _offWindowEventHandler;
542 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
543 private delegate void OffWindowEventCallbackType(IntPtr control);
544 private OffWindowEventCallbackType _offWindowEventCallback;
547 /// Event for OffWindow signal which can be used to subscribe/unsubscribe the event handler.<br>
548 /// OffWindow signal is emitted after the view has been disconnected from the Window.<br>
550 public event EventHandler OffWindowEvent
554 if (_offWindowEventHandler == null)
556 _offWindowEventCallback = OffWindow;
557 this.OffWindowSignal().Connect(_offWindowEventCallback);
560 _offWindowEventHandler += value;
565 _offWindowEventHandler -= value;
567 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
569 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
574 // Callback for View OffWindow signal
575 private void OffWindow(IntPtr data)
577 if (_offWindowEventHandler != null)
579 _offWindowEventHandler(this, null);
584 /// Event arguments of visibility changed.
586 public class VisibilityChangedEventArgs : EventArgs
589 private bool _visibility;
590 private VisibilityChangeType _type;
593 /// The view, or child of view, whose visibility has changed.
608 /// Whether the view is now visible or not.
610 public bool Visibility
623 /// Whether the view's visible property has changed or a parent's.
625 public VisibilityChangeType Type
638 private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
639 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
640 private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
641 private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
644 /// Event for visibility change which can be used to subscribe/unsubscribe the event handler.<br>
645 /// This signal is emitted when the visible property of this or a parent view is changed.<br>
647 public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
651 if (_visibilityChangedEventHandler == null)
653 _visibilityChangedEventCallback = OnVisibilityChanged;
654 VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
657 _visibilityChangedEventHandler += value;
662 _visibilityChangedEventHandler -= value;
664 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
666 VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
671 // Callback for View visibility change signal
672 private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
674 VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
677 e.View = View.GetViewFromPtr(data);
679 e.Visibility = visibility;
682 if (_visibilityChangedEventHandler != null)
684 _visibilityChangedEventHandler(this, e);
688 internal static View GetViewFromPtr(global::System.IntPtr cPtr)
690 View ret = new View(cPtr, false);
691 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
695 internal IntPtr GetPtrfromView()
697 return (IntPtr)swigCPtr;
700 internal class Property : global::System.IDisposable
702 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
703 protected bool swigCMemOwn;
705 internal Property(global::System.IntPtr cPtr, bool cMemoryOwn)
707 swigCMemOwn = cMemoryOwn;
708 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
711 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj)
713 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
716 //A Flag to check who called Dispose(). (By User or DisposeQueue)
717 private bool isDisposeQueued = false;
718 //A Flat to check if it is already disposed.
719 protected bool disposed = false;
723 if (!isDisposeQueued)
725 isDisposeQueued = true;
726 DisposeQueue.Instance.Add(this);
730 public void Dispose()
732 //Throw excpetion if Dispose() is called in separate thread.
733 if (!Window.IsInstalled())
735 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
740 Dispose(DisposeTypes.Implicit);
744 Dispose(DisposeTypes.Explicit);
745 System.GC.SuppressFinalize(this);
749 protected virtual void Dispose(DisposeTypes type)
756 if (type == DisposeTypes.Explicit)
759 //Release your own managed resources here.
760 //You should release all of your own disposable objects here.
764 //Release your own unmanaged resources here.
765 //You should not access any managed member here except static instance.
766 //because the execution order of Finalizes is non-deterministic.
768 if (swigCPtr.Handle != global::System.IntPtr.Zero)
773 NDalicPINVOKE.delete_View_Property(swigCPtr);
775 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
781 internal static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get();
782 internal static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get();
783 internal static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get();
784 internal static readonly int LEFT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
785 internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
786 internal static readonly int UP_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
787 internal static readonly int DOWN_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
789 internal Property() : this(NDalicPINVOKE.new_View_Property(), true)
791 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
794 internal static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get();
795 internal static readonly int BACKGROUND_COLOR = NDalicPINVOKE.View_Property_BACKGROUND_COLOR_get();
796 internal static readonly int BACKGROUND_IMAGE = NDalicPINVOKE.View_Property_BACKGROUND_IMAGE_get();
797 internal static readonly int KEY_INPUT_FOCUS = NDalicPINVOKE.View_Property_KEY_INPUT_FOCUS_get();
798 internal static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get();
799 internal static readonly int SIBLING_ORDER = NDalicManualPINVOKE.Actor_Property_SIBLING_ORDER_get();
800 internal static readonly int OPACITY = NDalicManualPINVOKE.Actor_Property_OPACITY_get();
801 internal static readonly int SCREEN_POSITION = NDalicManualPINVOKE.Actor_Property_SCREEN_POSITION_get();
802 internal static readonly int POSITION_USES_ANCHOR_POINT = NDalicManualPINVOKE.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
803 internal static readonly int PARENT_ORIGIN = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_get();
804 internal static readonly int PARENT_ORIGIN_X = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_X_get();
805 internal static readonly int PARENT_ORIGIN_Y = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Y_get();
806 internal static readonly int PARENT_ORIGIN_Z = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Z_get();
807 internal static readonly int ANCHOR_POINT = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_get();
808 internal static readonly int ANCHOR_POINT_X = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_X_get();
809 internal static readonly int ANCHOR_POINT_Y = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Y_get();
810 internal static readonly int ANCHOR_POINT_Z = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Z_get();
811 internal static readonly int SIZE = NDalicPINVOKE.Actor_Property_SIZE_get();
812 internal static readonly int SIZE_WIDTH = NDalicPINVOKE.Actor_Property_SIZE_WIDTH_get();
813 internal static readonly int SIZE_HEIGHT = NDalicPINVOKE.Actor_Property_SIZE_HEIGHT_get();
814 internal static readonly int SIZE_DEPTH = NDalicPINVOKE.Actor_Property_SIZE_DEPTH_get();
815 internal static readonly int POSITION = NDalicPINVOKE.Actor_Property_POSITION_get();
816 internal static readonly int POSITION_X = NDalicPINVOKE.Actor_Property_POSITION_X_get();
817 internal static readonly int POSITION_Y = NDalicPINVOKE.Actor_Property_POSITION_Y_get();
818 internal static readonly int POSITION_Z = NDalicPINVOKE.Actor_Property_POSITION_Z_get();
819 internal static readonly int WORLD_POSITION = NDalicPINVOKE.Actor_Property_WORLD_POSITION_get();
820 internal static readonly int WORLD_POSITION_X = NDalicPINVOKE.Actor_Property_WORLD_POSITION_X_get();
821 internal static readonly int WORLD_POSITION_Y = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Y_get();
822 internal static readonly int WORLD_POSITION_Z = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Z_get();
823 internal static readonly int ORIENTATION = NDalicPINVOKE.Actor_Property_ORIENTATION_get();
824 internal static readonly int WORLD_ORIENTATION = NDalicPINVOKE.Actor_Property_WORLD_ORIENTATION_get();
825 internal static readonly int SCALE = NDalicPINVOKE.Actor_Property_SCALE_get();
826 internal static readonly int SCALE_X = NDalicPINVOKE.Actor_Property_SCALE_X_get();
827 internal static readonly int SCALE_Y = NDalicPINVOKE.Actor_Property_SCALE_Y_get();
828 internal static readonly int SCALE_Z = NDalicPINVOKE.Actor_Property_SCALE_Z_get();
829 internal static readonly int WORLD_SCALE = NDalicPINVOKE.Actor_Property_WORLD_SCALE_get();
830 internal static readonly int VISIBLE = NDalicPINVOKE.Actor_Property_VISIBLE_get();
831 internal static readonly int COLOR = NDalicPINVOKE.Actor_Property_COLOR_get();
832 internal static readonly int COLOR_RED = NDalicPINVOKE.Actor_Property_COLOR_RED_get();
833 internal static readonly int COLOR_GREEN = NDalicPINVOKE.Actor_Property_COLOR_GREEN_get();
834 internal static readonly int COLOR_BLUE = NDalicPINVOKE.Actor_Property_COLOR_BLUE_get();
835 internal static readonly int COLOR_ALPHA = NDalicPINVOKE.Actor_Property_COLOR_ALPHA_get();
836 internal static readonly int WORLD_COLOR = NDalicPINVOKE.Actor_Property_WORLD_COLOR_get();
837 internal static readonly int WORLD_MATRIX = NDalicPINVOKE.Actor_Property_WORLD_MATRIX_get();
838 internal static readonly int NAME = NDalicPINVOKE.Actor_Property_NAME_get();
839 internal static readonly int SENSITIVE = NDalicPINVOKE.Actor_Property_SENSITIVE_get();
840 internal static readonly int LEAVE_REQUIRED = NDalicPINVOKE.Actor_Property_LEAVE_REQUIRED_get();
841 internal static readonly int INHERIT_ORIENTATION = NDalicPINVOKE.Actor_Property_INHERIT_ORIENTATION_get();
842 internal static readonly int INHERIT_SCALE = NDalicPINVOKE.Actor_Property_INHERIT_SCALE_get();
843 internal static readonly int COLOR_MODE = NDalicPINVOKE.Actor_Property_COLOR_MODE_get();
844 internal static readonly int POSITION_INHERITANCE = NDalicPINVOKE.Actor_Property_POSITION_INHERITANCE_get();
845 internal static readonly int DRAW_MODE = NDalicPINVOKE.Actor_Property_DRAW_MODE_get();
846 internal static readonly int SIZE_MODE_FACTOR = NDalicPINVOKE.Actor_Property_SIZE_MODE_FACTOR_get();
847 internal static readonly int WIDTH_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_WIDTH_RESIZE_POLICY_get();
848 internal static readonly int HEIGHT_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_HEIGHT_RESIZE_POLICY_get();
849 internal static readonly int SIZE_SCALE_POLICY = NDalicPINVOKE.Actor_Property_SIZE_SCALE_POLICY_get();
850 internal static readonly int WIDTH_FOR_HEIGHT = NDalicPINVOKE.Actor_Property_WIDTH_FOR_HEIGHT_get();
851 internal static readonly int HEIGHT_FOR_WIDTH = NDalicPINVOKE.Actor_Property_HEIGHT_FOR_WIDTH_get();
852 internal static readonly int PADDING = NDalicPINVOKE.Actor_Property_PADDING_get();
853 internal static readonly int MINIMUM_SIZE = NDalicPINVOKE.Actor_Property_MINIMUM_SIZE_get();
854 internal static readonly int MAXIMUM_SIZE = NDalicPINVOKE.Actor_Property_MAXIMUM_SIZE_get();
855 internal static readonly int INHERIT_POSITION = NDalicPINVOKE.Actor_Property_INHERIT_POSITION_get();
856 internal static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
861 /// Describes the direction to move the focus towards.
863 public enum FocusDirection
874 /// Creates a new instance of a View.
876 public View() : this(NDalicPINVOKE.View_New(), true)
878 PositionUsesAnchorPoint = false;
879 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
882 internal View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true)
884 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
887 internal View Assign(View handle)
889 View ret = new View(NDalicPINVOKE.View_Assign(swigCPtr, View.getCPtr(handle)), false);
890 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
895 /// Downcasts a handle to View handle.<br>
896 /// If handle points to a View, the downcast produces valid handle.<br>
897 /// If not, the returned handle is left uninitialized.<br>
899 /// <param name="handle">Handle to an object</param>
900 /// <returns>A handle to a View or an uninitialized handle</returns>
901 public new static View DownCast(BaseHandle handle)
903 View ret = new View(NDalicPINVOKE.View_DownCast(BaseHandle.getCPtr(handle)), true);
904 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
909 /// Downcasts a handle to class which inherit View handle.
911 /// <typeparam name="T">Class which inherit View</typeparam>
912 /// <param name="view">View to an object</param>
913 /// <returns>A object which inherit View</returns>
914 public static T DownCast<T>(View view) where T : View
916 View ret = ViewRegistry.GetViewFromBaseHandle(view);
924 private View ConvertIdToView(uint id)
930 view = Parent.FindChildById(id);
935 view = Window.Instance.GetRootLayer().FindChildById(id);
941 internal void SetKeyInputFocus()
943 NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
944 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
948 /// Quries whether the view has focus.
950 /// <returns>true if this view has focus</returns>
951 public bool HasFocus()
953 bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
954 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
958 internal void ClearKeyInputFocus()
960 NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
961 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
964 internal PinchGestureDetector GetPinchGestureDetector()
966 PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
967 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
971 internal PanGestureDetector GetPanGestureDetector()
973 PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
974 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
978 internal TapGestureDetector GetTapGestureDetector()
980 TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
981 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
985 internal LongPressGestureDetector GetLongPressGestureDetector()
987 LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
988 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
993 /// Sets the name of the style to be applied to the view.
995 /// <param name="styleName">A string matching a style described in a stylesheet</param>
996 public void SetStyleName(string styleName)
998 NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
999 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1003 /// Retrieves the name of the style to be applied to the view (if any).
1005 /// <returns>A string matching a style, or an empty string</returns>
1006 public string GetStyleName()
1008 string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
1009 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1013 internal void SetBackgroundColor(Vector4 color)
1015 NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
1016 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1019 internal Vector4 GetBackgroundColor()
1021 Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
1022 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1026 internal void SetBackgroundImage(Image image)
1028 NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
1029 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1033 /// Clears the background.
1035 public void ClearBackground()
1037 NDalicPINVOKE.View_ClearBackground(swigCPtr);
1038 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1041 internal ControlKeySignal KeyEventSignal()
1043 ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
1044 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1048 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
1050 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
1051 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1055 internal KeyInputFocusSignal KeyInputFocusLostSignal()
1057 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
1058 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1062 internal View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
1064 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1067 internal enum PropertyRange
1069 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
1070 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
1071 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
1075 /// styleName, type string.
1077 public string StyleName
1082 GetProperty(View.Property.STYLE_NAME).Get(out temp);
1087 SetProperty(View.Property.STYLE_NAME, new Tizen.NUI.PropertyValue(value));
1092 /// mutually exclusive with BACKGROUND_IMAGE & BACKGROUND, type Vector4.
1094 public Color BackgroundColor
1098 Color backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1100 Tizen.NUI.PropertyMap background = Background;
1102 background.Find(Visual.Property.Type)?.Get(ref visualType);
1103 if (visualType == (int)Visual.Type.Color)
1105 background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor);
1108 return backgroundColor;
1112 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1117 /// mutually exclusive with BACKGROUND_COLOR & BACKGROUND, type Map.
1119 public string BackgroundImage
1123 string backgroundImage = "";
1125 Tizen.NUI.PropertyMap background = Background;
1127 background.Find(Visual.Property.Type)?.Get(ref visualType);
1128 if (visualType == (int)Visual.Type.Image)
1130 background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
1133 return backgroundImage;
1137 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1141 internal bool KeyInputFocus
1146 GetProperty(View.Property.KEY_INPUT_FOCUS).Get(ref temp);
1151 SetProperty(View.Property.KEY_INPUT_FOCUS, new Tizen.NUI.PropertyValue(value));
1156 /// mutually exclusive with BACKGROUND_COLOR & BACKGROUND_IMAGE, type Map or string for URL.
1158 public Tizen.NUI.PropertyMap Background
1162 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1163 GetProperty(View.Property.BACKGROUND).Get(temp);
1168 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1173 /// The current state of the view.
1180 if (GetProperty(View.Property.STATE).Get(ref temp) == false)
1183 Tizen.Log.Error("NUI", "State get error!");
1190 return States.Normal;
1194 return States.Focused;
1198 return States.Disabled;
1202 return States.Normal;
1208 SetProperty(View.Property.STATE, new Tizen.NUI.PropertyValue((int)value));
1213 /// The current sub state of the view.
1215 public States SubState
1220 if (GetProperty(View.Property.SUB_STATE).Get(out temp) == false)
1223 Tizen.Log.Error("NUI", "subState get error!");
1229 return States.Normal;
1231 return States.Focused;
1233 return States.Disabled;
1235 return States.Normal;
1240 string valueToString = "";
1245 valueToString = "NORMAL";
1248 case States.Focused:
1250 valueToString = "FOCUSED";
1253 case States.Disabled:
1255 valueToString = "DISABLED";
1260 valueToString = "NORMAL";
1264 SetProperty(View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
1269 /// Displays a tooltip
1271 public Tizen.NUI.PropertyMap Tooltip
1275 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1276 GetProperty(View.Property.TOOLTIP).Get(temp);
1281 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1286 /// Displays a tooltip as Text
1288 public string TooltipText
1292 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1296 private int LeftFocusableViewId
1301 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(ref temp);
1306 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1310 private int RightFocusableViewId
1315 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(ref temp);
1320 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1324 private int UpFocusableViewId
1329 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(ref temp);
1334 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1338 private int DownFocusableViewId
1343 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(ref temp);
1348 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1353 /// Child Property of FlexContainer.<br>
1354 /// The proportion of the free space in the container the flex item will receive.<br>
1355 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br>
1362 GetProperty(FlexContainer.ChildProperty.FLEX).Get(ref temp);
1367 SetProperty(FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue(value));
1372 /// Child Property of FlexContainer.<br>
1373 /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br>
1375 public int AlignSelf
1380 GetProperty(FlexContainer.ChildProperty.ALIGN_SELF).Get(ref temp);
1385 SetProperty(FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue(value));
1390 /// Child Property of FlexContainer.<br>
1391 /// The space around the flex item.<br>
1393 public Vector4 FlexMargin
1397 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1398 GetProperty(FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
1403 SetProperty(FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue(value));
1408 /// The top-left cell this child occupies, if not set, the first available cell is used
1410 public Vector2 CellIndex
1414 Vector2 temp = new Vector2(0.0f, 0.0f);
1415 GetProperty(TableView.ChildProperty.CELL_INDEX).Get(temp);
1420 SetProperty(TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue(value));
1425 /// The number of rows this child occupies, if not set, default value is 1
1427 public float RowSpan
1432 GetProperty(TableView.ChildProperty.ROW_SPAN).Get(ref temp);
1437 SetProperty(TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue(value));
1442 /// The number of columns this child occupies, if not set, default value is 1
1444 public float ColumnSpan
1449 GetProperty(TableView.ChildProperty.COLUMN_SPAN).Get(ref temp);
1454 SetProperty(TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue(value));
1459 /// The horizontal alignment of this child inside the cells, if not set, default value is 'left'
1461 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
1466 if (GetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
1469 Tizen.Log.Error("NUI", "CellHorizontalAlignment get error!");
1476 return Tizen.NUI.HorizontalAlignmentType.Left;
1478 return Tizen.NUI.HorizontalAlignmentType.Center;
1480 return Tizen.NUI.HorizontalAlignmentType.Right;
1482 return Tizen.NUI.HorizontalAlignmentType.Left;
1487 string valueToString = "";
1490 case Tizen.NUI.HorizontalAlignmentType.Left:
1492 valueToString = "left";
1495 case Tizen.NUI.HorizontalAlignmentType.Center:
1497 valueToString = "center";
1500 case Tizen.NUI.HorizontalAlignmentType.Right:
1502 valueToString = "right";
1507 valueToString = "left";
1511 SetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1516 /// The vertical alignment of this child inside the cells, if not set, default value is 'top'
1518 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
1523 GetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
1526 Tizen.Log.Error("NUI", "CellVerticalAlignment get error!");
1533 return Tizen.NUI.VerticalAlignmentType.Top;
1535 return Tizen.NUI.VerticalAlignmentType.Center;
1537 return Tizen.NUI.VerticalAlignmentType.Bottom;
1539 return Tizen.NUI.VerticalAlignmentType.Top;
1544 string valueToString = "";
1547 case Tizen.NUI.VerticalAlignmentType.Top:
1549 valueToString = "top";
1552 case Tizen.NUI.VerticalAlignmentType.Center:
1554 valueToString = "center";
1557 case Tizen.NUI.VerticalAlignmentType.Bottom:
1559 valueToString = "bottom";
1564 valueToString = "top";
1568 SetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1573 /// The left focusable view.<br>
1574 /// This will return NULL if not set.<br>
1575 /// This will also return NULL if the specified left focusable view is not on Window.<br>
1577 public View LeftFocusableView
1579 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1582 if (LeftFocusableViewId >= 0)
1584 return ConvertIdToView((uint)LeftFocusableViewId);
1590 LeftFocusableViewId = (int)value.GetId();
1595 /// The right focusable view.<br>
1596 /// This will return NULL if not set.<br>
1597 /// This will also return NULL if the specified right focusable view is not on Window.<br>
1599 public View RightFocusableView
1601 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1604 if (RightFocusableViewId >= 0)
1606 return ConvertIdToView((uint)RightFocusableViewId);
1612 RightFocusableViewId = (int)value.GetId();
1617 /// The up focusable view.<br>
1618 /// This will return NULL if not set.<br>
1619 /// This will also return NULL if the specified up focusable view is not on Window.<br>
1621 public View UpFocusableView
1623 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1626 if (UpFocusableViewId >= 0)
1628 return ConvertIdToView((uint)UpFocusableViewId);
1634 UpFocusableViewId = (int)value.GetId();
1639 /// The down focusable view.<br>
1640 /// This will return NULL if not set.<br>
1641 /// This will also return NULL if the specified down focusable view is not on Window.<br>
1643 public View DownFocusableView
1645 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1648 if (DownFocusableViewId >= 0)
1650 return ConvertIdToView((uint)DownFocusableViewId);
1656 DownFocusableViewId = (int)value.GetId();
1661 /// whether the view should be focusable by keyboard navigation.
1663 public bool Focusable
1667 SetKeyboardFocusable(value);
1671 return IsKeyboardFocusable();
1676 /// Enumeration for describing the states of view.
1695 /// Retrieves the position of the View.<br>
1696 /// The coordinates are relative to the View's parent.<br>
1698 public Position CurrentPosition
1702 return GetCurrentPosition();
1707 /// Sets the size of an view for width and height.<br>
1708 /// Geometry can be scaled to fit within this area.<br>
1709 /// This does not interfere with the views scale factor.<br>
1710 /// The views default depth is the minimum of width & height.<br>
1712 public Size2D Size2D
1716 Size temp = new Size(0.0f, 0.0f, 0.0f);
1717 GetProperty(View.Property.SIZE).Get(temp);
1718 return new Size2D(temp);
1722 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(new Size(value)));
1727 /// Retrieves the size of the View.<br>
1728 /// The coordinates are relative to the View's parent.<br>
1730 public Size CurrentSize
1734 return GetCurrentSize();
1739 /// Retrieves the view's parent.<br>
1749 public bool Visibility
1758 /// Retrieves and sets the view's opacity.<br>
1760 public float Opacity
1765 GetProperty(View.Property.OPACITY).Get(ref temp);
1770 SetProperty(View.Property.OPACITY, new Tizen.NUI.PropertyValue(value));
1775 /// Sets the position of the View for X and Y.<br>
1776 /// By default, sets the position vector between the parent origin and anchor point(default).<br>
1777 /// If Position inheritance if disabled, sets the world position.<br>
1779 public Position2D Position2D
1783 Position temp = new Position(0.0f, 0.0f, 0.0f);
1784 GetProperty(View.Property.POSITION).Get(temp);
1785 return new Position2D(temp);
1789 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(new Position(value)));
1794 /// Retrieves screen postion of view's.<br>
1796 public Vector2 ScreenPosition
1800 Vector2 temp = new Vector2(0.0f, 0.0f);
1801 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
1807 /// Determines whether the anchor point should be used to determine the position of the view.
1808 /// This is true by default.
1810 /// <remarks>If false, then the top-left of the view is used for the position.
1811 /// Setting this to false will allow scaling or rotation around the anchor-point without affecting the view's position.
1813 public bool PositionUsesAnchorPoint
1818 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(ref temp);
1823 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
1827 public bool StateFocusEnable
1831 return IsKeyboardFocusable();
1835 SetKeyboardFocusable(value);
1840 /// Queries whether the view is connected to the Stage.<br>
1841 /// When an view is connected, it will be directly or indirectly parented to the root View.<br>
1843 public bool IsOnWindow
1852 /// Gets depth in the hierarchy for the view.
1854 public int HierarchyDepth
1858 return GetHierarchyDepth();
1863 /// Sets the sibling order of the view so depth position can be defined within the same parent.
1866 /// Note The initial value is 0.
1867 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove and LowerBelow will override the sibling order.
1868 /// The values set by this Property will likely change.
1870 public int SiblingOrder
1875 GetProperty(View.Property.SIBLING_ORDER).Get(ref temp);
1880 SetProperty(View.Property.SIBLING_ORDER, new Tizen.NUI.PropertyValue(value));
1885 /// Gets the natural size of the view.<br>
1890 public Vector3 NaturalSize
1894 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
1895 if (NDalicPINVOKE.SWIGPendingException.Pending)
1896 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1905 /// This is an asynchronous method.
1916 /// This is an asynchronous method.
1917 /// If an view is hidden, then the view and its children will not be rendered.
1918 /// 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.
1925 internal void Raise()
1927 NDalicPINVOKE.Raise(swigCPtr);
1928 if (NDalicPINVOKE.SWIGPendingException.Pending)
1929 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1932 internal void Lower()
1934 NDalicPINVOKE.Lower(swigCPtr);
1935 if (NDalicPINVOKE.SWIGPendingException.Pending)
1936 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1940 /// Raise view above all other views.
1943 /// Sibling order of views within the parent will be updated automatically.
1944 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
1946 public void RaiseToTop()
1948 NDalicPINVOKE.RaiseToTop(swigCPtr);
1949 if (NDalicPINVOKE.SWIGPendingException.Pending)
1950 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1954 /// Lower view to the bottom of all views.
1957 /// Sibling order of views within the parent will be updated automatically.
1958 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
1960 public void LowerToBottom()
1962 NDalicPINVOKE.LowerToBottom(swigCPtr);
1963 if (NDalicPINVOKE.SWIGPendingException.Pending)
1964 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1968 /// Raise the view to above the target view.
1970 /// <remarks>Sibling order of views within the parent will be updated automatically.
1971 /// Views on the level above the target view will still be shown above this view.
1972 /// Raising this view above views with the same sibling order as each other will raise this view above them.
1973 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
1975 /// <param name="target">Will be raised above this view</param>
1976 internal void RaiseAbove(View target)
1978 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
1979 if (NDalicPINVOKE.SWIGPendingException.Pending)
1980 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1984 /// Lower the view to below the target view.
1986 /// <remarks>Sibling order of views within the parent will be updated automatically.
1987 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
1988 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
1990 /// <param name="target">Will be lowered below this view</param>
1991 internal void LowerBelow(View target)
1993 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
1994 if (NDalicPINVOKE.SWIGPendingException.Pending)
1995 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1998 internal string GetName()
2000 string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);
2001 if (NDalicPINVOKE.SWIGPendingException.Pending)
2002 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2006 internal void SetName(string name)
2008 NDalicPINVOKE.Actor_SetName(swigCPtr, name);
2009 if (NDalicPINVOKE.SWIGPendingException.Pending)
2010 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2013 internal uint GetId()
2015 uint ret = NDalicPINVOKE.Actor_GetId(swigCPtr);
2016 if (NDalicPINVOKE.SWIGPendingException.Pending)
2017 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2021 internal bool IsRoot()
2023 bool ret = NDalicPINVOKE.Actor_IsRoot(swigCPtr);
2024 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2028 internal bool OnWindow()
2030 bool ret = NDalicPINVOKE.Actor_OnStage(swigCPtr);
2031 if (NDalicPINVOKE.SWIGPendingException.Pending)
2032 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2036 internal bool IsLayer()
2038 bool ret = NDalicPINVOKE.Actor_IsLayer(swigCPtr);
2039 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2043 internal Layer GetLayer()
2045 Layer ret = new Layer(NDalicPINVOKE.Actor_GetLayer(swigCPtr), true);
2046 if (NDalicPINVOKE.SWIGPendingException.Pending)
2047 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2052 /// Adds a child view to this View.
2054 /// <pre>This View(the parent) has been initialized. The child view has been initialized. The child view is not the same as the parent view.</pre>
2055 /// <post>The child will be referenced by its parent. This means that the child will be kept alive, even if the handle passed into this method is reset or destroyed.</post>
2056 /// <remarks>If the child already has a parent, it will be removed from old parent and reparented to this view. This may change child's position, color, scale etc as it now inherits them from this view.</remarks>
2057 /// <param name="child">The child</param>
2058 public void Add(View child)
2060 NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
2061 if (NDalicPINVOKE.SWIGPendingException.Pending)
2062 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2066 /// Removes a child View from this View. If the view was not a child of this view, this is a no-op.
2068 /// <pre>This View(the parent) has been initialized. The child view is not the same as the parent view.</pre>
2069 /// <param name="child">The child</param>
2070 public void Remove(View child)
2072 NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
2073 if (NDalicPINVOKE.SWIGPendingException.Pending)
2074 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2077 internal void Unparent()
2079 NDalicPINVOKE.Actor_Unparent(swigCPtr);
2080 if (NDalicPINVOKE.SWIGPendingException.Pending)
2081 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2085 /// Retrieves the number of children held by the view.
2087 /// <pre>The View has been initialized.</pre>
2088 /// <returns>The number of children</returns>
2089 public uint GetChildCount()
2091 uint ret = NDalicPINVOKE.Actor_GetChildCount(swigCPtr);
2092 if (NDalicPINVOKE.SWIGPendingException.Pending)
2093 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2098 /// Retrieves child view by index.
2100 /// <pre>The View has been initialized.</pre>
2101 /// <param name="index">The index of the child to retrieve</param>
2102 /// <returns>The view for the given index or empty handle if children not initialized</returns>
2103 public View GetChildAt(uint index)
2105 IntPtr cPtr = NDalicPINVOKE.Actor_GetChildAt(swigCPtr, index);
2106 cPtr = NDalicPINVOKE.View_SWIGUpcast(cPtr);
2107 cPtr = NDalicPINVOKE.Handle_SWIGUpcast(cPtr);
2109 BaseHandle ret = new BaseHandle(cPtr, false);
2111 View temp = ViewRegistry.GetViewFromBaseHandle(ret);
2113 if (NDalicPINVOKE.SWIGPendingException.Pending)
2114 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2116 return temp ?? null;
2120 /// Search through this view's hierarchy for an view with the given name.
2121 /// The view itself is also considered in the search.
2123 /// <pre>The View has been initialized.</pre>
2124 /// <param name="viewName">The name of the view to find</param>
2125 /// <returns>A handle to the view if found, or an empty handle if not</returns>
2126 public View FindChildByName(string viewName)
2128 View ret = new View(NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName), true);
2129 if (NDalicPINVOKE.SWIGPendingException.Pending)
2130 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2134 internal View FindChildById(uint id)
2136 View ret = new View(NDalicPINVOKE.Actor_FindChildById(swigCPtr, id), true);
2137 if (NDalicPINVOKE.SWIGPendingException.Pending)
2138 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2142 internal View GetParent()
2144 View ret = new View(NDalicPINVOKE.Actor_GetParent(swigCPtr), true);
2145 if (NDalicPINVOKE.SWIGPendingException.Pending)
2146 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2150 internal void SetParentOrigin(Vector3 origin)
2152 NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
2153 if (NDalicPINVOKE.SWIGPendingException.Pending)
2154 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2157 internal Vector3 GetCurrentParentOrigin()
2159 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentParentOrigin(swigCPtr), true);
2160 if (NDalicPINVOKE.SWIGPendingException.Pending)
2161 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2165 internal void SetAnchorPoint(Vector3 anchorPoint)
2167 NDalicPINVOKE.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
2168 if (NDalicPINVOKE.SWIGPendingException.Pending)
2169 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2172 internal Vector3 GetCurrentAnchorPoint()
2174 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentAnchorPoint(swigCPtr), true);
2175 if (NDalicPINVOKE.SWIGPendingException.Pending)
2176 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2180 internal void SetSize(float width, float height)
2182 NDalicPINVOKE.Actor_SetSize__SWIG_0(swigCPtr, width, height);
2183 if (NDalicPINVOKE.SWIGPendingException.Pending)
2184 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2187 internal void SetSize(float width, float height, float depth)
2189 NDalicPINVOKE.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
2190 if (NDalicPINVOKE.SWIGPendingException.Pending)
2191 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2194 internal void SetSize(Vector2 size)
2196 NDalicPINVOKE.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
2197 if (NDalicPINVOKE.SWIGPendingException.Pending)
2198 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2201 internal void SetSize(Vector3 size)
2203 NDalicPINVOKE.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
2204 if (NDalicPINVOKE.SWIGPendingException.Pending)
2205 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2208 internal Vector3 GetTargetSize()
2210 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetTargetSize(swigCPtr), true);
2211 if (NDalicPINVOKE.SWIGPendingException.Pending)
2212 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2216 internal Size GetCurrentSize()
2218 Size ret = new Size(NDalicPINVOKE.Actor_GetCurrentSize(swigCPtr), true);
2219 if (NDalicPINVOKE.SWIGPendingException.Pending)
2220 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2224 internal Vector3 GetNaturalSize()
2226 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2227 if (NDalicPINVOKE.SWIGPendingException.Pending)
2228 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2232 internal void SetPosition(float x, float y)
2234 NDalicPINVOKE.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
2235 if (NDalicPINVOKE.SWIGPendingException.Pending)
2236 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2239 internal void SetPosition(float x, float y, float z)
2241 NDalicPINVOKE.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
2242 if (NDalicPINVOKE.SWIGPendingException.Pending)
2243 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2246 internal void SetPosition(Vector3 position)
2248 NDalicPINVOKE.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
2249 if (NDalicPINVOKE.SWIGPendingException.Pending)
2250 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2253 internal void SetX(float x)
2255 NDalicPINVOKE.Actor_SetX(swigCPtr, x);
2256 if (NDalicPINVOKE.SWIGPendingException.Pending)
2257 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2260 internal void SetY(float y)
2262 NDalicPINVOKE.Actor_SetY(swigCPtr, y);
2263 if (NDalicPINVOKE.SWIGPendingException.Pending)
2264 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2267 internal void SetZ(float z)
2269 NDalicPINVOKE.Actor_SetZ(swigCPtr, z);
2270 if (NDalicPINVOKE.SWIGPendingException.Pending)
2271 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2274 internal void TranslateBy(Vector3 distance)
2276 NDalicPINVOKE.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
2277 if (NDalicPINVOKE.SWIGPendingException.Pending)
2278 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2281 internal Position GetCurrentPosition()
2283 Position ret = new Position(NDalicPINVOKE.Actor_GetCurrentPosition(swigCPtr), true);
2284 if (NDalicPINVOKE.SWIGPendingException.Pending)
2285 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2289 internal Vector3 GetCurrentWorldPosition()
2291 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldPosition(swigCPtr), true);
2292 if (NDalicPINVOKE.SWIGPendingException.Pending)
2293 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2297 internal void SetInheritPosition(bool inherit)
2299 NDalicPINVOKE.Actor_SetInheritPosition(swigCPtr, inherit);
2300 if (NDalicPINVOKE.SWIGPendingException.Pending)
2301 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2304 internal PositionInheritanceMode GetPositionInheritanceMode()
2306 PositionInheritanceMode ret = (PositionInheritanceMode)NDalicPINVOKE.Actor_GetPositionInheritanceMode(swigCPtr);
2307 if (NDalicPINVOKE.SWIGPendingException.Pending)
2308 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2312 internal bool IsPositionInherited()
2314 bool ret = NDalicPINVOKE.Actor_IsPositionInherited(swigCPtr);
2315 if (NDalicPINVOKE.SWIGPendingException.Pending)
2316 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2320 internal void SetOrientation(Degree angle, Vector3 axis)
2322 NDalicPINVOKE.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2323 if (NDalicPINVOKE.SWIGPendingException.Pending)
2324 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2327 internal void SetOrientation(Radian angle, Vector3 axis)
2329 NDalicPINVOKE.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2330 if (NDalicPINVOKE.SWIGPendingException.Pending)
2331 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2334 internal void SetOrientation(Rotation orientation)
2336 NDalicPINVOKE.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
2337 if (NDalicPINVOKE.SWIGPendingException.Pending)
2338 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2341 internal void RotateBy(Degree angle, Vector3 axis)
2343 NDalicPINVOKE.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2344 if (NDalicPINVOKE.SWIGPendingException.Pending)
2345 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2348 internal void RotateBy(Radian angle, Vector3 axis)
2350 NDalicPINVOKE.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2351 if (NDalicPINVOKE.SWIGPendingException.Pending)
2352 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2355 internal void RotateBy(Rotation relativeRotation)
2357 NDalicPINVOKE.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
2358 if (NDalicPINVOKE.SWIGPendingException.Pending)
2359 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2362 internal Rotation GetCurrentOrientation()
2364 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentOrientation(swigCPtr), true);
2365 if (NDalicPINVOKE.SWIGPendingException.Pending)
2366 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2370 internal void SetInheritOrientation(bool inherit)
2372 NDalicPINVOKE.Actor_SetInheritOrientation(swigCPtr, inherit);
2373 if (NDalicPINVOKE.SWIGPendingException.Pending)
2374 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2377 internal bool IsOrientationInherited()
2379 bool ret = NDalicPINVOKE.Actor_IsOrientationInherited(swigCPtr);
2380 if (NDalicPINVOKE.SWIGPendingException.Pending)
2381 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2385 internal Rotation GetCurrentWorldOrientation()
2387 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentWorldOrientation(swigCPtr), true);
2388 if (NDalicPINVOKE.SWIGPendingException.Pending)
2389 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2393 internal void SetScale(float scale)
2395 NDalicPINVOKE.Actor_SetScale__SWIG_0(swigCPtr, scale);
2396 if (NDalicPINVOKE.SWIGPendingException.Pending)
2397 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2400 internal void SetScale(float scaleX, float scaleY, float scaleZ)
2402 NDalicPINVOKE.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
2403 if (NDalicPINVOKE.SWIGPendingException.Pending)
2404 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2407 internal void SetScale(Vector3 scale)
2409 NDalicPINVOKE.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
2410 if (NDalicPINVOKE.SWIGPendingException.Pending)
2411 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2414 internal void ScaleBy(Vector3 relativeScale)
2416 NDalicPINVOKE.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
2417 if (NDalicPINVOKE.SWIGPendingException.Pending)
2418 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2421 internal Vector3 GetCurrentScale()
2423 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentScale(swigCPtr), true);
2424 if (NDalicPINVOKE.SWIGPendingException.Pending)
2425 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2429 internal Vector3 GetCurrentWorldScale()
2431 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldScale(swigCPtr), true);
2432 if (NDalicPINVOKE.SWIGPendingException.Pending)
2433 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2437 internal void SetInheritScale(bool inherit)
2439 NDalicPINVOKE.Actor_SetInheritScale(swigCPtr, inherit);
2440 if (NDalicPINVOKE.SWIGPendingException.Pending)
2441 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2444 internal bool IsScaleInherited()
2446 bool ret = NDalicPINVOKE.Actor_IsScaleInherited(swigCPtr);
2447 if (NDalicPINVOKE.SWIGPendingException.Pending)
2448 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2452 internal Matrix GetCurrentWorldMatrix()
2454 Matrix ret = new Matrix(NDalicPINVOKE.Actor_GetCurrentWorldMatrix(swigCPtr), true);
2455 if (NDalicPINVOKE.SWIGPendingException.Pending)
2456 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2460 internal void SetVisible(bool visible)
2462 NDalicPINVOKE.Actor_SetVisible(swigCPtr, visible);
2463 if (NDalicPINVOKE.SWIGPendingException.Pending)
2464 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2467 internal bool IsVisible()
2469 bool ret = NDalicPINVOKE.Actor_IsVisible(swigCPtr);
2470 if (NDalicPINVOKE.SWIGPendingException.Pending)
2471 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2475 internal void SetOpacity(float opacity)
2477 NDalicPINVOKE.Actor_SetOpacity(swigCPtr, opacity);
2478 if (NDalicPINVOKE.SWIGPendingException.Pending)
2479 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2482 internal float GetCurrentOpacity()
2484 float ret = NDalicPINVOKE.Actor_GetCurrentOpacity(swigCPtr);
2485 if (NDalicPINVOKE.SWIGPendingException.Pending)
2486 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2490 internal void SetColor(Vector4 color)
2492 NDalicPINVOKE.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
2493 if (NDalicPINVOKE.SWIGPendingException.Pending)
2494 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2497 internal Vector4 GetCurrentColor()
2499 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentColor(swigCPtr), true);
2500 if (NDalicPINVOKE.SWIGPendingException.Pending)
2501 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2505 internal void SetColorMode(ColorMode colorMode)
2507 NDalicPINVOKE.Actor_SetColorMode(swigCPtr, (int)colorMode);
2508 if (NDalicPINVOKE.SWIGPendingException.Pending)
2509 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2512 internal ColorMode GetColorMode()
2514 ColorMode ret = (ColorMode)NDalicPINVOKE.Actor_GetColorMode(swigCPtr);
2515 if (NDalicPINVOKE.SWIGPendingException.Pending)
2516 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2520 internal Vector4 GetCurrentWorldColor()
2522 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentWorldColor(swigCPtr), true);
2523 if (NDalicPINVOKE.SWIGPendingException.Pending)
2524 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2528 internal void SetDrawMode(DrawModeType drawMode)
2530 NDalicPINVOKE.Actor_SetDrawMode(swigCPtr, (int)drawMode);
2531 if (NDalicPINVOKE.SWIGPendingException.Pending)
2532 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2535 internal DrawModeType GetDrawMode()
2537 DrawModeType ret = (DrawModeType)NDalicPINVOKE.Actor_GetDrawMode(swigCPtr);
2538 if (NDalicPINVOKE.SWIGPendingException.Pending)
2539 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2543 internal void SetSensitive(bool sensitive)
2545 NDalicPINVOKE.Actor_SetSensitive(swigCPtr, sensitive);
2546 if (NDalicPINVOKE.SWIGPendingException.Pending)
2547 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2550 internal bool IsSensitive()
2552 bool ret = NDalicPINVOKE.Actor_IsSensitive(swigCPtr);
2553 if (NDalicPINVOKE.SWIGPendingException.Pending)
2554 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2559 /// Converts screen coordinates into the view's coordinate system using the default camera.
2561 /// <pre>The View has been initialized.</pre>
2562 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5)</remarks>
2563 /// <param name="localX">On return, the X-coordinate relative to the view</param>
2564 /// <param name="localY">On return, the Y-coordinate relative to the view</param>
2565 /// <param name="screenX">The screen X-coordinate</param>
2566 /// <param name="screenY">The screen Y-coordinate</param>
2567 /// <returns>True if the conversion succeeded</returns>
2568 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
2570 bool ret = NDalicPINVOKE.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
2571 if (NDalicPINVOKE.SWIGPendingException.Pending)
2572 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2576 internal void SetLeaveRequired(bool required)
2578 NDalicPINVOKE.Actor_SetLeaveRequired(swigCPtr, required);
2579 if (NDalicPINVOKE.SWIGPendingException.Pending)
2580 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2583 internal bool GetLeaveRequired()
2585 bool ret = NDalicPINVOKE.Actor_GetLeaveRequired(swigCPtr);
2586 if (NDalicPINVOKE.SWIGPendingException.Pending)
2587 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2591 internal void SetKeyboardFocusable(bool focusable)
2593 NDalicPINVOKE.Actor_SetKeyboardFocusable(swigCPtr, focusable);
2594 if (NDalicPINVOKE.SWIGPendingException.Pending)
2595 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2598 internal bool IsKeyboardFocusable()
2600 bool ret = NDalicPINVOKE.Actor_IsKeyboardFocusable(swigCPtr);
2601 if (NDalicPINVOKE.SWIGPendingException.Pending)
2602 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2606 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
2608 NDalicPINVOKE.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
2609 if (NDalicPINVOKE.SWIGPendingException.Pending)
2610 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2613 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
2615 ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.Actor_GetResizePolicy(swigCPtr, (int)dimension);
2616 if (NDalicPINVOKE.SWIGPendingException.Pending)
2617 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2621 internal void SetSizeScalePolicy(SizeScalePolicyType policy)
2623 NDalicPINVOKE.Actor_SetSizeScalePolicy(swigCPtr, (int)policy);
2624 if (NDalicPINVOKE.SWIGPendingException.Pending)
2625 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2628 internal SizeScalePolicyType GetSizeScalePolicy()
2630 SizeScalePolicyType ret = (SizeScalePolicyType)NDalicPINVOKE.Actor_GetSizeScalePolicy(swigCPtr);
2631 if (NDalicPINVOKE.SWIGPendingException.Pending)
2632 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2637 /// Sets the relative to parent size factor of the view.<br>
2638 /// This factor is only used when ResizePolicy is set to either:
2639 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br>
2640 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br>
2642 /// <pre>The View has been initialized.</pre>
2643 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis</param>
2644 public void SetSizeModeFactor(Vector3 factor)
2646 NDalicPINVOKE.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
2647 if (NDalicPINVOKE.SWIGPendingException.Pending)
2648 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2651 internal Vector3 GetSizeModeFactor()
2653 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetSizeModeFactor(swigCPtr), true);
2654 if (NDalicPINVOKE.SWIGPendingException.Pending)
2655 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2660 /// Calculates the height of the view given a width.<br>
2661 /// The natural size is used for default calculation. <br>
2662 /// size 0 is treated as aspect ratio 1:1.<br>
2664 /// <param name="width">Width to use</param>
2665 /// <returns>The height based on the width</returns>
2666 public float GetHeightForWidth(float width)
2668 float ret = NDalicPINVOKE.Actor_GetHeightForWidth(swigCPtr, width);
2669 if (NDalicPINVOKE.SWIGPendingException.Pending)
2670 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2675 /// Calculates the width of the view given a height.<br>
2676 /// The natural size is used for default calculation.<br>
2677 /// size 0 is treated as aspect ratio 1:1.<br>
2679 /// <param name="height">Height to use</param>
2680 /// <returns>The width based on the height</returns>
2681 public float GetWidthForHeight(float height)
2683 float ret = NDalicPINVOKE.Actor_GetWidthForHeight(swigCPtr, height);
2684 if (NDalicPINVOKE.SWIGPendingException.Pending)
2685 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2689 public float GetRelayoutSize(DimensionType dimension)
2691 float ret = NDalicPINVOKE.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
2692 if (NDalicPINVOKE.SWIGPendingException.Pending)
2693 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2697 public void SetPadding(PaddingType padding)
2699 NDalicPINVOKE.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
2700 if (NDalicPINVOKE.SWIGPendingException.Pending)
2701 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2704 public void GetPadding(PaddingType paddingOut)
2706 NDalicPINVOKE.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
2707 if (NDalicPINVOKE.SWIGPendingException.Pending)
2708 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2711 internal void SetMinimumSize(Vector2 size)
2713 NDalicPINVOKE.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
2714 if (NDalicPINVOKE.SWIGPendingException.Pending)
2715 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2718 internal Vector2 GetMinimumSize()
2720 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMinimumSize(swigCPtr), true);
2721 if (NDalicPINVOKE.SWIGPendingException.Pending)
2722 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2726 internal void SetMaximumSize(Vector2 size)
2728 NDalicPINVOKE.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
2729 if (NDalicPINVOKE.SWIGPendingException.Pending)
2730 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2733 internal Vector2 GetMaximumSize()
2735 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMaximumSize(swigCPtr), true);
2736 if (NDalicPINVOKE.SWIGPendingException.Pending)
2737 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2741 internal int GetHierarchyDepth()
2743 int ret = NDalicPINVOKE.Actor_GetHierarchyDepth(swigCPtr);
2744 if (NDalicPINVOKE.SWIGPendingException.Pending)
2745 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2749 internal uint AddRenderer(Renderer renderer)
2751 uint ret = NDalicPINVOKE.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
2752 if (NDalicPINVOKE.SWIGPendingException.Pending)
2753 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2757 internal uint GetRendererCount()
2759 uint ret = NDalicPINVOKE.Actor_GetRendererCount(swigCPtr);
2760 if (NDalicPINVOKE.SWIGPendingException.Pending)
2761 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2765 internal Renderer GetRendererAt(uint index)
2767 Renderer ret = new Renderer(NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index), true);
2768 if (NDalicPINVOKE.SWIGPendingException.Pending)
2769 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2773 internal void RemoveRenderer(Renderer renderer)
2775 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
2776 if (NDalicPINVOKE.SWIGPendingException.Pending)
2777 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2780 internal void RemoveRenderer(uint index)
2782 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
2783 if (NDalicPINVOKE.SWIGPendingException.Pending)
2784 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2787 internal TouchDataSignal TouchSignal()
2789 TouchDataSignal ret = new TouchDataSignal(NDalicPINVOKE.Actor_TouchSignal(swigCPtr), false);
2790 if (NDalicPINVOKE.SWIGPendingException.Pending)
2791 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2795 internal HoverSignal HoveredSignal()
2797 HoverSignal ret = new HoverSignal(NDalicPINVOKE.Actor_HoveredSignal(swigCPtr), false);
2798 if (NDalicPINVOKE.SWIGPendingException.Pending)
2799 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2803 internal WheelSignal WheelEventSignal()
2805 WheelSignal ret = new WheelSignal(NDalicPINVOKE.Actor_WheelEventSignal(swigCPtr), false);
2806 if (NDalicPINVOKE.SWIGPendingException.Pending)
2807 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2811 internal ViewSignal OnWindowSignal()
2813 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnStageSignal(swigCPtr), false);
2814 if (NDalicPINVOKE.SWIGPendingException.Pending)
2815 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2819 internal ViewSignal OffWindowSignal()
2821 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OffStageSignal(swigCPtr), false);
2822 if (NDalicPINVOKE.SWIGPendingException.Pending)
2823 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2827 internal ViewSignal OnRelayoutSignal()
2829 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnRelayoutSignal(swigCPtr), false);
2830 if (NDalicPINVOKE.SWIGPendingException.Pending)
2831 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2835 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view) {
2836 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
2837 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2842 /// Gets/Sets the origin of an view, within its parent's area.<br>
2843 /// 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>
2844 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br>
2845 /// An view's position is the distance between this origin, and the view's anchor-point.<br>
2847 /// <pre>The View has been initialized.</pre>
2848 public Position ParentOrigin
2852 Position temp = new Position(0.0f, 0.0f, 0.0f);
2853 GetProperty(View.Property.PARENT_ORIGIN).Get(temp);
2858 SetProperty(View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue(value));
2862 internal float ParentOriginX
2867 GetProperty(View.Property.PARENT_ORIGIN_X).Get(ref temp);
2872 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
2876 internal float ParentOriginY
2881 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(ref temp);
2886 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
2890 internal float ParentOriginZ
2895 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(ref temp);
2900 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
2905 /// Gets/Sets the anchor-point of an view.<br>
2906 /// 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>
2907 /// The default anchor point is AnchorPoint.Center (0.5, 0.5, 0.5).<br>
2908 /// An view position is the distance between its parent-origin and this anchor-point.<br>
2909 /// An view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br>
2910 /// <pre>The View has been initialized.</pre>
2912 public Position AnchorPoint
2916 Position temp = new Position(0.0f, 0.0f, 0.0f);
2917 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
2922 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
2926 internal float AnchorPointX
2931 GetProperty(View.Property.ANCHOR_POINT_X).Get(ref temp);
2936 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
2940 internal float AnchorPointY
2945 GetProperty(View.Property.ANCHOR_POINT_Y).Get(ref temp);
2950 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
2954 internal float AnchorPointZ
2959 GetProperty(View.Property.ANCHOR_POINT_Z).Get(ref temp);
2964 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
2969 /// Gets/Sets the size of an view.<br>
2970 /// Geometry can be scaled to fit within this area.<br>
2971 /// This does not interfere with the views scale factor.<br>
2977 Size temp = new Size(0.0f, 0.0f, 0.0f);
2978 GetProperty(View.Property.SIZE).Get(temp);
2983 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(value));
2988 /// Gets/Sets the size width of an view.
2990 public float SizeWidth
2995 GetProperty(View.Property.SIZE_WIDTH).Get(ref temp);
3000 SetProperty(View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue(value));
3005 /// Gets/Sets the size height of an view.
3007 public float SizeHeight
3012 GetProperty(View.Property.SIZE_HEIGHT).Get(ref temp);
3017 SetProperty(View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue(value));
3022 /// Gets/Sets the size depth of an view.
3024 public float SizeDepth
3029 GetProperty(View.Property.SIZE_DEPTH).Get(ref temp);
3034 SetProperty(View.Property.SIZE_DEPTH, new Tizen.NUI.PropertyValue(value));
3039 /// Gets/Sets the position of the View.<br>
3040 /// By default, sets the position vector between the parent origin and anchor point(default).<br>
3041 /// If Position inheritance if disabled, sets the world position.<br>
3043 public Position Position
3047 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3048 GetProperty(View.Property.POSITION).Get(temp);
3053 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(value));
3058 /// Gets/Sets the position x of the View.
3060 public float PositionX
3065 GetProperty(View.Property.POSITION_X).Get(ref temp);
3070 SetProperty(View.Property.POSITION_X, new Tizen.NUI.PropertyValue(value));
3075 /// Gets/Sets the position y of the View.
3077 public float PositionY
3082 GetProperty(View.Property.POSITION_Y).Get(ref temp);
3087 SetProperty(View.Property.POSITION_Y, new Tizen.NUI.PropertyValue(value));
3092 /// Gets/Sets the position z of the View.
3094 public float PositionZ
3099 GetProperty(View.Property.POSITION_Z).Get(ref temp);
3104 SetProperty(View.Property.POSITION_Z, new Tizen.NUI.PropertyValue(value));
3109 /// Gets/Sets the world position of the View.
3111 public Vector3 WorldPosition
3115 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3116 GetProperty(View.Property.WORLD_POSITION).Get(temp);
3121 internal float WorldPositionX
3126 GetProperty(View.Property.WORLD_POSITION_X).Get(ref temp);
3131 internal float WorldPositionY
3136 GetProperty(View.Property.WORLD_POSITION_Y).Get(ref temp);
3141 internal float WorldPositionZ
3146 GetProperty(View.Property.WORLD_POSITION_Z).Get(ref temp);
3152 /// Gets/Sets the orientation of the View.<br>
3153 /// An view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br>
3155 /// <remarks>This is an asynchronous method.</remarks>
3156 public Rotation Orientation
3160 Rotation temp = new Rotation();
3161 GetProperty(View.Property.ORIENTATION).Get(temp);
3166 SetProperty(View.Property.ORIENTATION, new Tizen.NUI.PropertyValue(value));
3171 /// Gets/Sets the world orientation of the View.<br>
3173 public Rotation WorldOrientation
3177 Rotation temp = new Rotation();
3178 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
3184 /// Gets/Sets the scale factor applied to an view.<br>
3186 public Vector3 Scale
3190 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3191 GetProperty(View.Property.SCALE).Get(temp);
3196 SetProperty(View.Property.SCALE, new Tizen.NUI.PropertyValue(value));
3201 /// Gets/Sets the scale x factor applied to an view.
3208 GetProperty(View.Property.SCALE_X).Get(ref temp);
3213 SetProperty(View.Property.SCALE_X, new Tizen.NUI.PropertyValue(value));
3218 /// Gets/Sets the scale y factor applied to an view.
3225 GetProperty(View.Property.SCALE_Y).Get(ref temp);
3230 SetProperty(View.Property.SCALE_Y, new Tizen.NUI.PropertyValue(value));
3235 /// Gets/Sets the scale z factor applied to an view.
3242 GetProperty(View.Property.SCALE_Z).Get(ref temp);
3247 SetProperty(View.Property.SCALE_Z, new Tizen.NUI.PropertyValue(value));
3252 /// Gets the world scale of View.
3254 public Vector3 WorldScale
3258 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3259 GetProperty(View.Property.WORLD_SCALE).Get(temp);
3265 /// Retrieves the visibility flag of an view.
3268 /// If an view is not visible, then the view and its children will not be rendered.
3269 /// 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.
3276 GetProperty(View.Property.VISIBLE).Get(ref temp);
3278 }/* only get is required : removed
3281 SetProperty(View.Property.VISIBLE, new Tizen.NUI.PropertyValue(value));
3286 /// Gets/Sets the view's mix color red.
3288 public float ColorRed
3293 GetProperty(View.Property.COLOR_RED).Get(ref temp);
3298 SetProperty(View.Property.COLOR_RED, new Tizen.NUI.PropertyValue(value));
3303 /// Gets/Sets the view's mix color green.
3305 public float ColorGreen
3310 GetProperty(View.Property.COLOR_GREEN).Get(ref temp);
3315 SetProperty(View.Property.COLOR_GREEN, new Tizen.NUI.PropertyValue(value));
3320 /// Gets/Sets the view's mix color blue
3322 public float ColorBlue
3327 GetProperty(View.Property.COLOR_BLUE).Get(ref temp);
3332 SetProperty(View.Property.COLOR_BLUE, new Tizen.NUI.PropertyValue(value));
3337 /// Gets/Sets the view's mix color alpha.
3339 public float ColorAlpha
3344 GetProperty(View.Property.COLOR_ALPHA).Get(ref temp);
3349 SetProperty(View.Property.COLOR_ALPHA, new Tizen.NUI.PropertyValue(value));
3354 /// Gets the view's world color.
3356 public Vector4 WorldColor
3360 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3361 GetProperty(View.Property.WORLD_COLOR).Get(temp);
3366 internal Matrix WorldMatrix
3370 Matrix temp = new Matrix();
3371 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
3377 /// Gets/Sets the View's name.
3384 GetProperty(View.Property.NAME).Get(out temp);
3389 SetProperty(View.Property.NAME, new Tizen.NUI.PropertyValue(value));
3394 /// Gets the View's ID.
3406 /// Gets/Sets the status of whether an view should emit touch or hover signals.
3408 public bool Sensitive
3413 GetProperty(View.Property.SENSITIVE).Get(ref temp);
3418 SetProperty(View.Property.SENSITIVE, new Tizen.NUI.PropertyValue(value));
3423 /// Gets/Sets the status of whether the view should receive a notification when touch or hover motion events leave the boundary of the view.
3425 public bool LeaveRequired
3430 GetProperty(View.Property.LEAVE_REQUIRED).Get(ref temp);
3435 SetProperty(View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue(value));
3440 /// Gets/Sets the status of whether a child view inherits it's parent's orientation.
3442 public bool InheritOrientation
3447 GetProperty(View.Property.INHERIT_ORIENTATION).Get(ref temp);
3452 SetProperty(View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue(value));
3457 /// Gets/Sets the status of whether a child view inherits it's parent's scale.
3459 public bool InheritScale
3464 GetProperty(View.Property.INHERIT_SCALE).Get(ref temp);
3469 SetProperty(View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue(value));
3474 /// Gets/Sets the view's color mode.<br>
3475 /// This specifies whether the View uses its own color, or inherits its parent color.<br>
3476 /// The default is UseOwnMultiplyParentAlpha.<br>
3478 public ColorMode ColorMode
3483 if (GetProperty(View.Property.COLOR_MODE).Get(out temp) == false)
3486 Tizen.Log.Error("NUI", "ColorMode get error!");
3491 case "USE_OWN_COLOR":
3492 return ColorMode.UseOwnColor;
3493 case "USE_PARENT_COLOR":
3494 return ColorMode.UseParentColor;
3495 case "USE_OWN_MULTIPLY_PARENT_COLOR":
3496 return ColorMode.UseOwnMultiplyParentColor;
3497 case "USE_OWN_MULTIPLY_PARENT_ALPHA":
3498 return ColorMode.UseOwnMultiplyParentAlpha;
3500 return ColorMode.UseOwnMultiplyParentAlpha;
3505 SetProperty(View.Property.COLOR_MODE, new Tizen.NUI.PropertyValue((int)value));
3509 public string PositionInheritance
3514 GetProperty(View.Property.POSITION_INHERITANCE).Get(out temp);
3519 SetProperty(View.Property.POSITION_INHERITANCE, new Tizen.NUI.PropertyValue(value));
3524 /// Gets/Sets the status of how the view and its children should be drawn.<br>
3525 /// Not all views are renderable, but DrawMode can be inherited from any view.<br>
3526 /// 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>
3527 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br>
3528 /// Overlay views are drawn in a separate pass, after all non-overlay views within the Layer.<br>
3529 /// For overlay views, the drawing order is with respect to tree levels of Views, and depth-testing will not be used.<br>
3531 public DrawModeType DrawMode
3536 if (GetProperty(View.Property.DRAW_MODE).Get(out temp) == false)
3539 Tizen.Log.Error("NUI", "DrawMode get error!");
3545 return DrawModeType.Normal;
3547 return DrawModeType.Overlay2D;
3549 return DrawModeType.Stencil;
3551 return DrawModeType.Normal;
3556 SetProperty(View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)value));
3561 /// Gets/Sets the relative to parent size factor of the view.<br>
3562 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br>
3563 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br>
3565 public Vector3 SizeModeFactor
3569 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3570 GetProperty(View.Property.SIZE_MODE_FACTOR).Get(temp);
3575 SetProperty(View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue(value));
3580 /// Gets/Sets the width resize policy to be used.
3582 public ResizePolicyType WidthResizePolicy
3587 if (GetProperty(View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
3590 Tizen.Log.Error("NUI", "WidthResizePolicy get error!");
3596 return ResizePolicyType.Fixed;
3597 case "USE_NATURAL_SIZE":
3598 return ResizePolicyType.UseNaturalSize;
3599 case "FILL_TO_PARENT":
3600 return ResizePolicyType.FillToParent;
3601 case "SIZE_RELATIVE_TO_PARENT":
3602 return ResizePolicyType.SizeRelativeToParent;
3603 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3604 return ResizePolicyType.SizeFixedOffsetFromParent;
3605 case "FIT_TO_CHILDREN":
3606 return ResizePolicyType.FitToChildren;
3607 case "DIMENSION_DEPENDENCY":
3608 return ResizePolicyType.DimensionDependency;
3609 case "USE_ASSIGNED_SIZE":
3610 return ResizePolicyType.UseAssignedSize;
3612 return ResizePolicyType.Fixed;
3617 SetProperty(View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3622 /// Gets/Sets the height resize policy to be used.
3624 public ResizePolicyType HeightResizePolicy
3629 if (GetProperty(View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
3632 Tizen.Log.Error("NUI", "HeightResizePolicy get error!");
3638 return ResizePolicyType.Fixed;
3639 case "USE_NATURAL_SIZE":
3640 return ResizePolicyType.UseNaturalSize;
3641 case "FILL_TO_PARENT":
3642 return ResizePolicyType.FillToParent;
3643 case "SIZE_RELATIVE_TO_PARENT":
3644 return ResizePolicyType.SizeRelativeToParent;
3645 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3646 return ResizePolicyType.SizeFixedOffsetFromParent;
3647 case "FIT_TO_CHILDREN":
3648 return ResizePolicyType.FitToChildren;
3649 case "DIMENSION_DEPENDENCY":
3650 return ResizePolicyType.DimensionDependency;
3651 case "USE_ASSIGNED_SIZE":
3652 return ResizePolicyType.UseAssignedSize;
3654 return ResizePolicyType.Fixed;
3659 SetProperty(View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3664 /// Gets/Sets the policy to use when setting size with size negotiation.<br>
3665 /// Defaults to SizeScalePolicyType.UseSizeSet.<br>
3667 public SizeScalePolicyType SizeScalePolicy
3672 if (GetProperty(View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
3675 Tizen.Log.Error("NUI", "SizeScalePolicy get error!");
3680 case "USE_SIZE_SET":
3681 return SizeScalePolicyType.UseSizeSet;
3682 case "FIT_WITH_ASPECT_RATIO":
3683 return SizeScalePolicyType.FitWithAspectRatio;
3684 case "FILL_WITH_ASPECT_RATIO":
3685 return SizeScalePolicyType.FillWithAspectRatio;
3687 return SizeScalePolicyType.UseSizeSet;
3692 string valueToString = "";
3695 case SizeScalePolicyType.UseSizeSet:
3697 valueToString = "USE_SIZE_SET";
3700 case SizeScalePolicyType.FitWithAspectRatio:
3702 valueToString = "FIT_WITH_ASPECT_RATIO";
3705 case SizeScalePolicyType.FillWithAspectRatio:
3707 valueToString = "FILL_WITH_ASPECT_RATIO";
3712 valueToString = "USE_SIZE_SET";
3716 SetProperty(View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
3721 /// Gets/Sets the status of whether the width size is dependent on height size.
3723 public bool WidthForHeight
3728 GetProperty(View.Property.WIDTH_FOR_HEIGHT).Get(ref temp);
3733 SetProperty(View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue(value));
3738 /// Gets/Sets the status of whether the height size is dependent on width size.
3740 public bool HeightForWidth
3745 GetProperty(View.Property.HEIGHT_FOR_WIDTH).Get(ref temp);
3750 SetProperty(View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue(value));
3755 /// Gets/Sets the padding for use in layout.
3757 public Vector4 Padding
3761 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3762 GetProperty(View.Property.PADDING).Get(temp);
3767 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
3772 /// Gets/Sets the minimum size an view can be assigned in size negotiation.
3774 public Size2D MinimumSize
3778 Size2D temp = new Size2D(0, 0);
3779 GetProperty(View.Property.MINIMUM_SIZE).Get(temp);
3784 SetProperty(View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3789 /// Gets/Sets the maximum size an view can be assigned in size negotiation.
3791 public Size2D MaximumSize
3795 Size2D temp = new Size2D(0, 0);
3796 GetProperty(View.Property.MAXIMUM_SIZE).Get(temp);
3801 SetProperty(View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3806 /// Gets/Sets whether a child view inherits it's parent's position.<br>
3807 /// Default is to inherit.<br>
3808 /// 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 anchor point of the view.<br>
3810 public bool InheritPosition
3815 GetProperty(View.Property.INHERIT_POSITION).Get(ref temp);
3820 SetProperty(View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue(value));
3825 /// Gets/Sets clipping behavior(mode) of it's children.
3827 public ClippingModeType ClippingMode
3832 if (GetProperty(View.Property.CLIPPING_MODE).Get(out temp) == false)
3835 Tizen.Log.Error("NUI", "ClippingMode get error!");
3841 return ClippingModeType.Disabled;
3842 case "CLIP_CHILDREN":
3843 return ClippingModeType.ClipChildren;
3845 return ClippingModeType.Disabled;
3850 SetProperty(View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)value));