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> Key
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();
221 e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
223 if (_keyEventHandler != null)
225 return _keyEventHandler(this, e);
231 private EventHandler _onRelayoutEventHandler;
232 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
233 private delegate void OnRelayoutEventCallbackType(IntPtr control);
234 private OnRelayoutEventCallbackType _onRelayoutEventCallback;
237 /// Event for OnRelayout signal which can be used to subscribe/unsubscribe the event handler.<br>
238 /// OnRelayout signal is emitted after the size has been set on the view during relayout.<br>
240 public event EventHandler Relayout
244 if (_onRelayoutEventHandler == null)
246 _onRelayoutEventCallback = OnRelayout;
247 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
250 _onRelayoutEventHandler += value;
255 _onRelayoutEventHandler -= value;
257 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
259 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
265 // Callback for View OnRelayout signal
266 private void OnRelayout(IntPtr data)
268 if (_onRelayoutEventHandler != null)
270 _onRelayoutEventHandler(this, null);
275 /// Event arguments that passed via Touch signal.
277 public class TouchEventArgs : EventArgs
279 private Touch _touch;
282 /// Touch - contains the information of touch points
297 private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
298 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
299 private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
300 private TouchDataCallbackType _touchDataCallback;
303 /// Event for Touched signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
304 /// Touched signal is emitted when touch input is received.<br>
306 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> Touch
310 if (_touchDataEventHandler == null)
312 _touchDataCallback = OnTouch;
313 this.TouchSignal().Connect(_touchDataCallback);
316 _touchDataEventHandler += value;
321 _touchDataEventHandler -= value;
323 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
325 this.TouchSignal().Disconnect(_touchDataCallback);
331 // Callback for View TouchSignal
332 private bool OnTouch(IntPtr view, IntPtr touchData)
334 TouchEventArgs e = new TouchEventArgs();
336 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
338 if (_touchDataEventHandler != null)
340 return _touchDataEventHandler(this, e);
347 /// Event arguments that passed via Hover signal.
349 public class HoverEventArgs : EventArgs
351 private Hover _hover;
354 /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
369 private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
370 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
371 private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
372 private HoverEventCallbackType _hoverEventCallback;
375 /// Event for Hovered signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
376 /// Hovered signal is emitted when hover input is received.<br>
378 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> Hover
382 if (_hoverEventHandler == null)
384 _hoverEventCallback = OnHoverEvent;
385 this.HoveredSignal().Connect(_hoverEventCallback);
388 _hoverEventHandler += value;
393 _hoverEventHandler -= value;
395 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
397 this.HoveredSignal().Disconnect(_hoverEventCallback);
403 // Callback for View Hover signal
404 private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
406 HoverEventArgs e = new HoverEventArgs();
408 e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
410 if (_hoverEventHandler != null)
412 return _hoverEventHandler(this, e);
419 /// Event arguments that passed via Wheel signal.
421 public class WheelEventArgs : EventArgs
423 private Wheel _wheel;
426 /// WheelEvent - store a wheel rolling type : MOUSE_WHEEL or CUSTOM_WHEEL
441 private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
442 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
443 private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
444 private WheelEventCallbackType _wheelEventCallback;
447 /// Event for WheelMoved signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
448 /// WheelMoved signal is emitted when wheel event is received.<br>
450 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelRoll
454 if (_wheelEventHandler == null)
456 _wheelEventCallback = OnWheelEvent;
457 this.WheelEventSignal().Connect(_wheelEventCallback);
460 _wheelEventHandler += value;
465 _wheelEventHandler -= value;
467 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
469 this.WheelEventSignal().Disconnect(_wheelEventCallback);
475 // Callback for View Wheel signal
476 private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
478 WheelEventArgs e = new WheelEventArgs();
480 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
482 if (_wheelEventHandler != null)
484 return _wheelEventHandler(this, e);
490 private EventHandler _onWindowEventHandler;
491 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
492 private delegate void OnWindowEventCallbackType(IntPtr control);
493 private OnWindowEventCallbackType _onWindowEventCallback;
496 /// Event for OnWindow signal which can be used to subscribe/unsubscribe the event handler.<br>
497 /// OnWindow signal is emitted after the view has been connected to the Window.<br>
499 public event EventHandler AddedToWindow
503 if (_onWindowEventHandler == null)
505 _onWindowEventCallback = OnWindow;
506 this.OnWindowSignal().Connect(_onWindowEventCallback);
509 _onWindowEventHandler += value;
514 _onWindowEventHandler -= value;
516 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
518 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
523 // Callback for View OnWindow signal
524 private void OnWindow(IntPtr data)
526 if (_onWindowEventHandler != null)
528 _onWindowEventHandler(this, null);
533 private EventHandler _offWindowEventHandler;
534 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
535 private delegate void OffWindowEventCallbackType(IntPtr control);
536 private OffWindowEventCallbackType _offWindowEventCallback;
539 /// Event for OffWindow signal which can be used to subscribe/unsubscribe the event handler.<br>
540 /// OffWindow signal is emitted after the view has been disconnected from the Window.<br>
542 public event EventHandler RemovedFromWindow
546 if (_offWindowEventHandler == null)
548 _offWindowEventCallback = OffWindow;
549 this.OffWindowSignal().Connect(_offWindowEventCallback);
552 _offWindowEventHandler += value;
557 _offWindowEventHandler -= value;
559 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
561 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
566 // Callback for View OffWindow signal
567 private void OffWindow(IntPtr data)
569 if (_offWindowEventHandler != null)
571 _offWindowEventHandler(this, null);
576 /// Event arguments of visibility changed.
578 public class VisibilityChangedEventArgs : EventArgs
581 private bool _visibility;
582 private VisibilityChangeType _type;
585 /// The view, or child of view, whose visibility has changed.
600 /// Whether the view is now visible or not.
602 public bool Visibility
615 /// Whether the view's visible property has changed or a parent's.
617 public VisibilityChangeType Type
630 private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
631 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
632 private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
633 private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
636 /// Event for visibility change which can be used to subscribe/unsubscribe the event handler.<br>
637 /// This signal is emitted when the visible property of this or a parent view is changed.<br>
639 public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
643 if (_visibilityChangedEventHandler == null)
645 _visibilityChangedEventCallback = OnVisibilityChanged;
646 VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
649 _visibilityChangedEventHandler += value;
654 _visibilityChangedEventHandler -= value;
656 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
658 VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
663 // Callback for View visibility change signal
664 private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
666 VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
669 e.View = View.GetViewFromPtr(data);
671 e.Visibility = visibility;
674 if (_visibilityChangedEventHandler != null)
676 _visibilityChangedEventHandler(this, e);
680 // Resource Ready Signal
682 private EventHandler _resourcesLoadedEventHandler;
683 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
684 private delegate void ResourcesLoadedCallbackType(IntPtr control);
685 private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
688 /// Event for ResourcesLoadedSignal signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
689 /// This signal is emitted after all resources required by a View are loaded and ready.<br>
691 public event EventHandler ResourcesLoaded
695 if (_resourcesLoadedEventHandler == null)
697 _ResourcesLoadedCallback = OnResourcesLoaded;
698 this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
701 _resourcesLoadedEventHandler += value;
706 _resourcesLoadedEventHandler -= value;
708 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
710 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
715 private void OnResourcesLoaded(IntPtr view)
717 if (_resourcesLoadedEventHandler != null)
719 _resourcesLoadedEventHandler(this, null);
724 internal static View GetViewFromPtr(global::System.IntPtr cPtr)
726 View ret = new View(cPtr, false);
727 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
731 internal IntPtr GetPtrfromView()
733 return (IntPtr)swigCPtr;
736 internal class Property
738 internal static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get();
739 internal static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get();
740 internal static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get();
741 internal static readonly int LEFT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
742 internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
743 internal static readonly int UP_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
744 internal static readonly int DOWN_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
745 internal static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get();
746 internal static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get();
747 internal static readonly int SIBLING_ORDER = NDalicManualPINVOKE.Actor_Property_SIBLING_ORDER_get();
748 internal static readonly int OPACITY = NDalicManualPINVOKE.Actor_Property_OPACITY_get();
749 internal static readonly int SCREEN_POSITION = NDalicManualPINVOKE.Actor_Property_SCREEN_POSITION_get();
750 internal static readonly int POSITION_USES_ANCHOR_POINT = NDalicManualPINVOKE.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
751 internal static readonly int PARENT_ORIGIN = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_get();
752 internal static readonly int PARENT_ORIGIN_X = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_X_get();
753 internal static readonly int PARENT_ORIGIN_Y = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Y_get();
754 internal static readonly int PARENT_ORIGIN_Z = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Z_get();
755 internal static readonly int ANCHOR_POINT = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_get();
756 internal static readonly int ANCHOR_POINT_X = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_X_get();
757 internal static readonly int ANCHOR_POINT_Y = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Y_get();
758 internal static readonly int ANCHOR_POINT_Z = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Z_get();
759 internal static readonly int SIZE = NDalicPINVOKE.Actor_Property_SIZE_get();
760 internal static readonly int SIZE_WIDTH = NDalicPINVOKE.Actor_Property_SIZE_WIDTH_get();
761 internal static readonly int SIZE_HEIGHT = NDalicPINVOKE.Actor_Property_SIZE_HEIGHT_get();
762 internal static readonly int SIZE_DEPTH = NDalicPINVOKE.Actor_Property_SIZE_DEPTH_get();
763 internal static readonly int POSITION = NDalicPINVOKE.Actor_Property_POSITION_get();
764 internal static readonly int POSITION_X = NDalicPINVOKE.Actor_Property_POSITION_X_get();
765 internal static readonly int POSITION_Y = NDalicPINVOKE.Actor_Property_POSITION_Y_get();
766 internal static readonly int POSITION_Z = NDalicPINVOKE.Actor_Property_POSITION_Z_get();
767 internal static readonly int WORLD_POSITION = NDalicPINVOKE.Actor_Property_WORLD_POSITION_get();
768 internal static readonly int WORLD_POSITION_X = NDalicPINVOKE.Actor_Property_WORLD_POSITION_X_get();
769 internal static readonly int WORLD_POSITION_Y = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Y_get();
770 internal static readonly int WORLD_POSITION_Z = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Z_get();
771 internal static readonly int ORIENTATION = NDalicPINVOKE.Actor_Property_ORIENTATION_get();
772 internal static readonly int WORLD_ORIENTATION = NDalicPINVOKE.Actor_Property_WORLD_ORIENTATION_get();
773 internal static readonly int SCALE = NDalicPINVOKE.Actor_Property_SCALE_get();
774 internal static readonly int SCALE_X = NDalicPINVOKE.Actor_Property_SCALE_X_get();
775 internal static readonly int SCALE_Y = NDalicPINVOKE.Actor_Property_SCALE_Y_get();
776 internal static readonly int SCALE_Z = NDalicPINVOKE.Actor_Property_SCALE_Z_get();
777 internal static readonly int WORLD_SCALE = NDalicPINVOKE.Actor_Property_WORLD_SCALE_get();
778 internal static readonly int VISIBLE = NDalicPINVOKE.Actor_Property_VISIBLE_get();
779 internal static readonly int WORLD_COLOR = NDalicPINVOKE.Actor_Property_WORLD_COLOR_get();
780 internal static readonly int WORLD_MATRIX = NDalicPINVOKE.Actor_Property_WORLD_MATRIX_get();
781 internal static readonly int NAME = NDalicPINVOKE.Actor_Property_NAME_get();
782 internal static readonly int SENSITIVE = NDalicPINVOKE.Actor_Property_SENSITIVE_get();
783 internal static readonly int LEAVE_REQUIRED = NDalicPINVOKE.Actor_Property_LEAVE_REQUIRED_get();
784 internal static readonly int INHERIT_ORIENTATION = NDalicPINVOKE.Actor_Property_INHERIT_ORIENTATION_get();
785 internal static readonly int INHERIT_SCALE = NDalicPINVOKE.Actor_Property_INHERIT_SCALE_get();
786 internal static readonly int DRAW_MODE = NDalicPINVOKE.Actor_Property_DRAW_MODE_get();
787 internal static readonly int SIZE_MODE_FACTOR = NDalicPINVOKE.Actor_Property_SIZE_MODE_FACTOR_get();
788 internal static readonly int WIDTH_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_WIDTH_RESIZE_POLICY_get();
789 internal static readonly int HEIGHT_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_HEIGHT_RESIZE_POLICY_get();
790 internal static readonly int SIZE_SCALE_POLICY = NDalicPINVOKE.Actor_Property_SIZE_SCALE_POLICY_get();
791 internal static readonly int WIDTH_FOR_HEIGHT = NDalicPINVOKE.Actor_Property_WIDTH_FOR_HEIGHT_get();
792 internal static readonly int HEIGHT_FOR_WIDTH = NDalicPINVOKE.Actor_Property_HEIGHT_FOR_WIDTH_get();
793 internal static readonly int PADDING = NDalicPINVOKE.Actor_Property_PADDING_get();
794 internal static readonly int MINIMUM_SIZE = NDalicPINVOKE.Actor_Property_MINIMUM_SIZE_get();
795 internal static readonly int MAXIMUM_SIZE = NDalicPINVOKE.Actor_Property_MAXIMUM_SIZE_get();
796 internal static readonly int INHERIT_POSITION = NDalicPINVOKE.Actor_Property_INHERIT_POSITION_get();
797 internal static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
802 /// Describes the direction to move the focus towards.
804 public enum FocusDirection
815 /// Creates a new instance of a View.
817 public View() : this(NDalicPINVOKE.View_New(), true)
819 PositionUsesAnchorPoint = false;
820 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
823 internal View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true)
825 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
829 /// Downcasts a handle to View handle.<br>
830 /// If handle points to a View, the downcast produces valid handle.<br>
831 /// If not, the returned handle is left uninitialized.<br>
833 /// <param name="handle">Handle to an object</param>
834 /// <returns>A handle to a View or an uninitialized handle</returns>
835 public new static View DownCast(BaseHandle handle)
837 View ret = new View(NDalicPINVOKE.View_DownCast(BaseHandle.getCPtr(handle)), true);
838 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
843 /// Downcasts a handle to class which inherit View handle.
845 /// <typeparam name="T">Class which inherit View</typeparam>
846 /// <param name="view">View to an object</param>
847 /// <returns>A object which inherit View</returns>
848 public static T DownCast<T>(View view) where T : View
850 View ret = ViewRegistry.GetViewFromBaseHandle(view);
858 private View ConvertIdToView(uint id)
864 view = Parent.FindChildById(id);
869 view = Window.Instance.GetRootLayer().FindChildById(id);
875 internal void SetKeyInputFocus()
877 NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
878 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
882 /// Quries whether the view has focus.
884 /// <returns>true if this view has focus</returns>
885 public bool HasFocus()
887 bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
888 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
892 internal void ClearKeyInputFocus()
894 NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
895 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
898 internal PinchGestureDetector GetPinchGestureDetector()
900 PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
901 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
905 internal PanGestureDetector GetPanGestureDetector()
907 PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
908 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
912 internal TapGestureDetector GetTapGestureDetector()
914 TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
915 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
919 internal LongPressGestureDetector GetLongPressGestureDetector()
921 LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
922 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
927 /// Sets the name of the style to be applied to the view.
929 /// <param name="styleName">A string matching a style described in a stylesheet</param>
930 public void SetStyleName(string styleName)
932 NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
933 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
937 /// Retrieves the name of the style to be applied to the view (if any).
939 /// <returns>A string matching a style, or an empty string</returns>
940 public string GetStyleName()
942 string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
943 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
947 internal void SetBackgroundColor(Vector4 color)
949 NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
950 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
953 internal Vector4 GetBackgroundColor()
955 Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
956 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
960 internal void SetBackgroundImage(Image image)
962 NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
963 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
967 /// Clears the background.
969 public void ClearBackground()
971 NDalicPINVOKE.View_ClearBackground(swigCPtr);
972 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
975 internal ControlKeySignal KeyEventSignal()
977 ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
978 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
982 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
984 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
985 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
989 internal KeyInputFocusSignal KeyInputFocusLostSignal()
991 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
992 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
996 internal View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
998 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1001 internal enum PropertyRange
1003 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
1004 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
1005 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
1009 /// styleName, type string.
1011 public string StyleName
1016 GetProperty(View.Property.STYLE_NAME).Get(out temp);
1021 SetProperty(View.Property.STYLE_NAME, new Tizen.NUI.PropertyValue(value));
1026 /// mutually exclusive with BACKGROUND_IMAGE & BACKGROUND, type Vector4.
1028 public Color BackgroundColor
1032 Color backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1034 Tizen.NUI.PropertyMap background = Background;
1036 background.Find(Visual.Property.Type)?.Get(out visualType);
1037 if (visualType == (int)Visual.Type.Color)
1039 background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor);
1042 return backgroundColor;
1046 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1051 /// mutually exclusive with BACKGROUND_COLOR & BACKGROUND, type Map.
1053 public string BackgroundImage
1057 string backgroundImage = "";
1059 Tizen.NUI.PropertyMap background = Background;
1061 background.Find(Visual.Property.Type)?.Get(out visualType);
1062 if (visualType == (int)Visual.Type.Image)
1064 background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
1067 return backgroundImage;
1071 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1076 /// mutually exclusive with BACKGROUND_COLOR & BACKGROUND_IMAGE, type Map or string for URL.
1078 public Tizen.NUI.PropertyMap Background
1082 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1083 GetProperty(View.Property.BACKGROUND).Get(temp);
1088 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1093 /// The current state of the view.
1100 if (GetProperty(View.Property.STATE).Get(out temp) == false)
1103 Tizen.Log.Error("NUI", "State get error!");
1110 return States.Normal;
1114 return States.Focused;
1118 return States.Disabled;
1122 return States.Normal;
1128 SetProperty(View.Property.STATE, new Tizen.NUI.PropertyValue((int)value));
1133 /// The current sub state of the view.
1135 public States SubState
1140 if (GetProperty(View.Property.SUB_STATE).Get(out temp) == false)
1143 Tizen.Log.Error("NUI", "subState get error!");
1149 return States.Normal;
1151 return States.Focused;
1153 return States.Disabled;
1155 return States.Normal;
1160 string valueToString = "";
1165 valueToString = "NORMAL";
1168 case States.Focused:
1170 valueToString = "FOCUSED";
1173 case States.Disabled:
1175 valueToString = "DISABLED";
1180 valueToString = "NORMAL";
1184 SetProperty(View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
1189 /// Displays a tooltip
1191 public Tizen.NUI.PropertyMap Tooltip
1195 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1196 GetProperty(View.Property.TOOLTIP).Get(temp);
1201 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1206 /// Displays a tooltip as Text
1208 public string TooltipText
1212 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1216 private int LeftFocusableViewId
1221 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
1226 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1230 private int RightFocusableViewId
1235 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
1240 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1244 private int UpFocusableViewId
1249 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
1254 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1258 private int DownFocusableViewId
1263 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
1268 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1273 /// Child Property of FlexContainer.<br>
1274 /// The proportion of the free space in the container the flex item will receive.<br>
1275 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br>
1282 GetProperty(FlexContainer.ChildProperty.FLEX).Get(out temp);
1287 SetProperty(FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue(value));
1292 /// Child Property of FlexContainer.<br>
1293 /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br>
1295 public int AlignSelf
1300 GetProperty(FlexContainer.ChildProperty.ALIGN_SELF).Get(out temp);
1305 SetProperty(FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue(value));
1310 /// Child Property of FlexContainer.<br>
1311 /// The space around the flex item.<br>
1313 public Vector4 FlexMargin
1317 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1318 GetProperty(FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
1323 SetProperty(FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue(value));
1328 /// The top-left cell this child occupies, if not set, the first available cell is used
1330 public Vector2 CellIndex
1334 Vector2 temp = new Vector2(0.0f, 0.0f);
1335 GetProperty(TableView.ChildProperty.CELL_INDEX).Get(temp);
1340 SetProperty(TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue(value));
1345 /// The number of rows this child occupies, if not set, default value is 1
1347 public float RowSpan
1352 GetProperty(TableView.ChildProperty.ROW_SPAN).Get(out temp);
1357 SetProperty(TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue(value));
1362 /// The number of columns this child occupies, if not set, default value is 1
1364 public float ColumnSpan
1369 GetProperty(TableView.ChildProperty.COLUMN_SPAN).Get(out temp);
1374 SetProperty(TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue(value));
1379 /// The horizontal alignment of this child inside the cells, if not set, default value is 'left'
1381 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
1386 if (GetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
1389 Tizen.Log.Error("NUI", "CellHorizontalAlignment get error!");
1396 return Tizen.NUI.HorizontalAlignmentType.Left;
1398 return Tizen.NUI.HorizontalAlignmentType.Center;
1400 return Tizen.NUI.HorizontalAlignmentType.Right;
1402 return Tizen.NUI.HorizontalAlignmentType.Left;
1407 string valueToString = "";
1410 case Tizen.NUI.HorizontalAlignmentType.Left:
1412 valueToString = "left";
1415 case Tizen.NUI.HorizontalAlignmentType.Center:
1417 valueToString = "center";
1420 case Tizen.NUI.HorizontalAlignmentType.Right:
1422 valueToString = "right";
1427 valueToString = "left";
1431 SetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1436 /// The vertical alignment of this child inside the cells, if not set, default value is 'top'
1438 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
1443 GetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
1446 Tizen.Log.Error("NUI", "CellVerticalAlignment get error!");
1453 return Tizen.NUI.VerticalAlignmentType.Top;
1455 return Tizen.NUI.VerticalAlignmentType.Center;
1457 return Tizen.NUI.VerticalAlignmentType.Bottom;
1459 return Tizen.NUI.VerticalAlignmentType.Top;
1464 string valueToString = "";
1467 case Tizen.NUI.VerticalAlignmentType.Top:
1469 valueToString = "top";
1472 case Tizen.NUI.VerticalAlignmentType.Center:
1474 valueToString = "center";
1477 case Tizen.NUI.VerticalAlignmentType.Bottom:
1479 valueToString = "bottom";
1484 valueToString = "top";
1488 SetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1493 /// The left focusable view.<br>
1494 /// This will return NULL if not set.<br>
1495 /// This will also return NULL if the specified left focusable view is not on Window.<br>
1497 public View LeftFocusableView
1499 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1502 if (LeftFocusableViewId >= 0)
1504 return ConvertIdToView((uint)LeftFocusableViewId);
1510 LeftFocusableViewId = (int)value.GetId();
1515 /// The right focusable view.<br>
1516 /// This will return NULL if not set.<br>
1517 /// This will also return NULL if the specified right focusable view is not on Window.<br>
1519 public View RightFocusableView
1521 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1524 if (RightFocusableViewId >= 0)
1526 return ConvertIdToView((uint)RightFocusableViewId);
1532 RightFocusableViewId = (int)value.GetId();
1537 /// The up focusable view.<br>
1538 /// This will return NULL if not set.<br>
1539 /// This will also return NULL if the specified up focusable view is not on Window.<br>
1541 public View UpFocusableView
1543 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1546 if (UpFocusableViewId >= 0)
1548 return ConvertIdToView((uint)UpFocusableViewId);
1554 UpFocusableViewId = (int)value.GetId();
1559 /// The down focusable view.<br>
1560 /// This will return NULL if not set.<br>
1561 /// This will also return NULL if the specified down focusable view is not on Window.<br>
1563 public View DownFocusableView
1565 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1568 if (DownFocusableViewId >= 0)
1570 return ConvertIdToView((uint)DownFocusableViewId);
1576 DownFocusableViewId = (int)value.GetId();
1581 /// whether the view should be focusable by keyboard navigation.
1583 public bool Focusable
1587 SetKeyboardFocusable(value);
1591 return IsKeyboardFocusable();
1596 /// Enumeration for describing the states of view.
1615 /// Retrieves the position of the View.<br>
1616 /// The coordinates are relative to the View's parent.<br>
1618 public Position CurrentPosition
1622 return GetCurrentPosition();
1627 /// Sets the size of an view for width and height.<br>
1628 /// Geometry can be scaled to fit within this area.<br>
1629 /// This does not interfere with the views scale factor.<br>
1630 /// The views default depth is the minimum of width & height.<br>
1632 public Size2D Size2D
1636 Size temp = new Size(0.0f, 0.0f, 0.0f);
1637 GetProperty(View.Property.SIZE).Get(temp);
1638 Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
1643 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(new Size(value)));
1648 /// Retrieves the size of the View.<br>
1649 /// The coordinates are relative to the View's parent.<br>
1651 public Size2D CurrentSize
1655 return GetCurrentSize();
1660 /// Retrieves the view's parent.<br>
1670 public bool Visibility
1679 /// Retrieves and sets the view's opacity.<br>
1681 public float Opacity
1686 GetProperty(View.Property.OPACITY).Get(out temp);
1691 SetProperty(View.Property.OPACITY, new Tizen.NUI.PropertyValue(value));
1696 /// Sets the position of the View for X and Y.<br>
1697 /// By default, sets the position vector between the parent origin and anchor point(default).<br>
1698 /// If Position inheritance if disabled, sets the world position.<br>
1700 public Position2D Position2D
1704 Position temp = new Position(0.0f, 0.0f, 0.0f);
1705 GetProperty(View.Property.POSITION).Get(temp);
1706 return new Position2D(temp);
1710 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(new Position(value)));
1715 /// Retrieves screen postion of view's.<br>
1717 public Vector2 ScreenPosition
1721 Vector2 temp = new Vector2(0.0f, 0.0f);
1722 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
1728 /// Determines whether the anchor point should be used to determine the position of the view.
1729 /// This is true by default.
1731 /// <remarks>If false, then the top-left of the view is used for the position.
1732 /// Setting this to false will allow scaling or rotation around the anchor-point without affecting the view's position.
1734 public bool PositionUsesAnchorPoint
1739 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
1744 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
1748 internal bool FocusState
1752 return IsKeyboardFocusable();
1756 SetKeyboardFocusable(value);
1761 /// Queries whether the view is connected to the Stage.<br>
1762 /// When an view is connected, it will be directly or indirectly parented to the root View.<br>
1764 public bool IsOnWindow
1773 /// Gets depth in the hierarchy for the view.
1775 public int HierarchyDepth
1779 return GetHierarchyDepth();
1784 /// Sets the sibling order of the view so depth position can be defined within the same parent.
1787 /// Note The initial value is 0.
1788 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove and LowerBelow will override the sibling order.
1789 /// The values set by this Property will likely change.
1791 public int SiblingOrder
1796 GetProperty(View.Property.SIBLING_ORDER).Get(out temp);
1801 SetProperty(View.Property.SIBLING_ORDER, new Tizen.NUI.PropertyValue(value));
1806 /// Gets the natural size of the view.<br>
1811 internal Vector3 NaturalSize
1815 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
1816 if (NDalicPINVOKE.SWIGPendingException.Pending)
1817 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1826 /// This is an asynchronous method.
1837 /// This is an asynchronous method.
1838 /// If an view is hidden, then the view and its children will not be rendered.
1839 /// 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.
1846 internal void Raise()
1848 NDalicPINVOKE.Raise(swigCPtr);
1849 if (NDalicPINVOKE.SWIGPendingException.Pending)
1850 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1853 internal void Lower()
1855 NDalicPINVOKE.Lower(swigCPtr);
1856 if (NDalicPINVOKE.SWIGPendingException.Pending)
1857 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1861 /// Raise view above all other views.
1864 /// Sibling order of views within the parent will be updated automatically.
1865 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
1867 public void RaiseToTop()
1869 NDalicPINVOKE.RaiseToTop(swigCPtr);
1870 if (NDalicPINVOKE.SWIGPendingException.Pending)
1871 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1875 /// Lower view to the bottom of all views.
1878 /// Sibling order of views within the parent will be updated automatically.
1879 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
1881 public void LowerToBottom()
1883 NDalicPINVOKE.LowerToBottom(swigCPtr);
1884 if (NDalicPINVOKE.SWIGPendingException.Pending)
1885 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1889 /// Query if all resources required by a View are loaded and ready.
1891 /// <remarks>Most resources are only loaded when the control is placed on stage
1893 public bool IsResourceReady()
1895 bool ret = NDalicPINVOKE.IsResourceReady(swigCPtr);
1896 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1901 /// Raise the view to above the target view.
1903 /// <remarks>Sibling order of views within the parent will be updated automatically.
1904 /// Views on the level above the target view will still be shown above this view.
1905 /// Raising this view above views with the same sibling order as each other will raise this view above them.
1906 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
1908 /// <param name="target">Will be raised above this view</param>
1909 internal void RaiseAbove(View target)
1911 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
1912 if (NDalicPINVOKE.SWIGPendingException.Pending)
1913 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1917 /// Lower the view to below the target view.
1919 /// <remarks>Sibling order of views within the parent will be updated automatically.
1920 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
1921 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
1923 /// <param name="target">Will be lowered below this view</param>
1924 internal void LowerBelow(View target)
1926 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
1927 if (NDalicPINVOKE.SWIGPendingException.Pending)
1928 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1931 internal string GetName()
1933 string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);
1934 if (NDalicPINVOKE.SWIGPendingException.Pending)
1935 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1939 internal void SetName(string name)
1941 NDalicPINVOKE.Actor_SetName(swigCPtr, name);
1942 if (NDalicPINVOKE.SWIGPendingException.Pending)
1943 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1946 internal uint GetId()
1948 uint ret = NDalicPINVOKE.Actor_GetId(swigCPtr);
1949 if (NDalicPINVOKE.SWIGPendingException.Pending)
1950 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1954 internal bool IsRoot()
1956 bool ret = NDalicPINVOKE.Actor_IsRoot(swigCPtr);
1957 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1961 internal bool OnWindow()
1963 bool ret = NDalicPINVOKE.Actor_OnStage(swigCPtr);
1964 if (NDalicPINVOKE.SWIGPendingException.Pending)
1965 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1969 internal Layer GetLayer()
1971 Layer ret = new Layer(NDalicPINVOKE.Actor_GetLayer(swigCPtr), true);
1972 if (NDalicPINVOKE.SWIGPendingException.Pending)
1973 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1978 /// Adds a child view to this View.
1980 /// <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>
1981 /// <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>
1982 /// <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>
1983 /// <param name="child">The child</param>
1984 public void Add(View child)
1986 NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
1987 if (NDalicPINVOKE.SWIGPendingException.Pending)
1988 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1992 /// Removes a child View from this View. If the view was not a child of this view, this is a no-op.
1994 /// <pre>This View(the parent) has been initialized. The child view is not the same as the parent view.</pre>
1995 /// <param name="child">The child</param>
1996 public void Remove(View child)
1998 NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
1999 if (NDalicPINVOKE.SWIGPendingException.Pending)
2000 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2003 internal void Unparent()
2005 NDalicPINVOKE.Actor_Unparent(swigCPtr);
2006 if (NDalicPINVOKE.SWIGPendingException.Pending)
2007 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2011 /// Retrieves the number of children held by the view.
2013 /// <pre>The View has been initialized.</pre>
2014 /// <returns>The number of children</returns>
2015 internal uint GetChildCount()
2017 uint ret = NDalicPINVOKE.Actor_GetChildCount(swigCPtr);
2018 if (NDalicPINVOKE.SWIGPendingException.Pending)
2019 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2024 /// Retrieves child view by index.
2026 /// <pre>The View has been initialized.</pre>
2027 /// <param name="index">The index of the child to retrieve</param>
2028 /// <returns>The view for the given index or empty handle if children not initialized</returns>
2029 public View GetChildAt(uint index)
2031 IntPtr cPtr = NDalicPINVOKE.Actor_GetChildAt(swigCPtr, index);
2032 cPtr = NDalicPINVOKE.View_SWIGUpcast(cPtr);
2033 cPtr = NDalicPINVOKE.Handle_SWIGUpcast(cPtr);
2035 BaseHandle ret = new BaseHandle(cPtr, false);
2037 View temp = ViewRegistry.GetViewFromBaseHandle(ret);
2039 if (NDalicPINVOKE.SWIGPendingException.Pending)
2040 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2042 return temp ?? null;
2046 /// Search through this view's hierarchy for an view with the given name.
2047 /// The view itself is also considered in the search.
2049 /// <pre>The View has been initialized.</pre>
2050 /// <param name="viewName">The name of the view to find</param>
2051 /// <returns>A handle to the view if found, or an empty handle if not</returns>
2052 public View FindChildByName(string viewName)
2054 View ret = new View(NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName), true);
2055 if (NDalicPINVOKE.SWIGPendingException.Pending)
2056 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2060 internal View FindChildById(uint id)
2062 View ret = new View(NDalicPINVOKE.Actor_FindChildById(swigCPtr, id), true);
2063 if (NDalicPINVOKE.SWIGPendingException.Pending)
2064 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2068 internal View GetParent()
2070 View ret = new View(NDalicPINVOKE.Actor_GetParent(swigCPtr), true);
2071 if (NDalicPINVOKE.SWIGPendingException.Pending)
2072 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2076 internal void SetParentOrigin(Vector3 origin)
2078 NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
2079 if (NDalicPINVOKE.SWIGPendingException.Pending)
2080 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2083 internal Vector3 GetCurrentParentOrigin()
2085 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentParentOrigin(swigCPtr), true);
2086 if (NDalicPINVOKE.SWIGPendingException.Pending)
2087 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2091 internal void SetAnchorPoint(Vector3 anchorPoint)
2093 NDalicPINVOKE.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
2094 if (NDalicPINVOKE.SWIGPendingException.Pending)
2095 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2098 internal Vector3 GetCurrentAnchorPoint()
2100 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentAnchorPoint(swigCPtr), true);
2101 if (NDalicPINVOKE.SWIGPendingException.Pending)
2102 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2106 internal void SetSize(float width, float height)
2108 NDalicPINVOKE.Actor_SetSize__SWIG_0(swigCPtr, width, height);
2109 if (NDalicPINVOKE.SWIGPendingException.Pending)
2110 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2113 internal void SetSize(float width, float height, float depth)
2115 NDalicPINVOKE.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
2116 if (NDalicPINVOKE.SWIGPendingException.Pending)
2117 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2120 internal void SetSize(Vector2 size)
2122 NDalicPINVOKE.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
2123 if (NDalicPINVOKE.SWIGPendingException.Pending)
2124 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2127 internal void SetSize(Vector3 size)
2129 NDalicPINVOKE.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
2130 if (NDalicPINVOKE.SWIGPendingException.Pending)
2131 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2134 internal Vector3 GetTargetSize()
2136 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetTargetSize(swigCPtr), true);
2137 if (NDalicPINVOKE.SWIGPendingException.Pending)
2138 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2142 internal Size2D GetCurrentSize()
2144 Size ret = new Size(NDalicPINVOKE.Actor_GetCurrentSize(swigCPtr), true);
2145 if (NDalicPINVOKE.SWIGPendingException.Pending)
2146 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2147 Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
2151 internal Vector3 GetNaturalSize()
2153 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2154 if (NDalicPINVOKE.SWIGPendingException.Pending)
2155 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2159 internal void SetPosition(float x, float y)
2161 NDalicPINVOKE.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
2162 if (NDalicPINVOKE.SWIGPendingException.Pending)
2163 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2166 internal void SetPosition(float x, float y, float z)
2168 NDalicPINVOKE.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
2169 if (NDalicPINVOKE.SWIGPendingException.Pending)
2170 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2173 internal void SetPosition(Vector3 position)
2175 NDalicPINVOKE.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
2176 if (NDalicPINVOKE.SWIGPendingException.Pending)
2177 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2180 internal void SetX(float x)
2182 NDalicPINVOKE.Actor_SetX(swigCPtr, x);
2183 if (NDalicPINVOKE.SWIGPendingException.Pending)
2184 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2187 internal void SetY(float y)
2189 NDalicPINVOKE.Actor_SetY(swigCPtr, y);
2190 if (NDalicPINVOKE.SWIGPendingException.Pending)
2191 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2194 internal void SetZ(float z)
2196 NDalicPINVOKE.Actor_SetZ(swigCPtr, z);
2197 if (NDalicPINVOKE.SWIGPendingException.Pending)
2198 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2201 internal void TranslateBy(Vector3 distance)
2203 NDalicPINVOKE.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
2204 if (NDalicPINVOKE.SWIGPendingException.Pending)
2205 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2208 internal Position GetCurrentPosition()
2210 Position ret = new Position(NDalicPINVOKE.Actor_GetCurrentPosition(swigCPtr), true);
2211 if (NDalicPINVOKE.SWIGPendingException.Pending)
2212 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2216 internal Vector3 GetCurrentWorldPosition()
2218 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldPosition(swigCPtr), true);
2219 if (NDalicPINVOKE.SWIGPendingException.Pending)
2220 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2224 internal void SetInheritPosition(bool inherit)
2226 NDalicPINVOKE.Actor_SetInheritPosition(swigCPtr, inherit);
2227 if (NDalicPINVOKE.SWIGPendingException.Pending)
2228 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2231 internal bool IsPositionInherited()
2233 bool ret = NDalicPINVOKE.Actor_IsPositionInherited(swigCPtr);
2234 if (NDalicPINVOKE.SWIGPendingException.Pending)
2235 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2239 internal void SetOrientation(Degree angle, Vector3 axis)
2241 NDalicPINVOKE.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2242 if (NDalicPINVOKE.SWIGPendingException.Pending)
2243 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2246 internal void SetOrientation(Radian angle, Vector3 axis)
2248 NDalicPINVOKE.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2249 if (NDalicPINVOKE.SWIGPendingException.Pending)
2250 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2253 internal void SetOrientation(Rotation orientation)
2255 NDalicPINVOKE.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
2256 if (NDalicPINVOKE.SWIGPendingException.Pending)
2257 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2260 internal void RotateBy(Degree angle, Vector3 axis)
2262 NDalicPINVOKE.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2263 if (NDalicPINVOKE.SWIGPendingException.Pending)
2264 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2267 internal void RotateBy(Radian angle, Vector3 axis)
2269 NDalicPINVOKE.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2270 if (NDalicPINVOKE.SWIGPendingException.Pending)
2271 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2274 internal void RotateBy(Rotation relativeRotation)
2276 NDalicPINVOKE.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
2277 if (NDalicPINVOKE.SWIGPendingException.Pending)
2278 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2281 internal Rotation GetCurrentOrientation()
2283 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentOrientation(swigCPtr), true);
2284 if (NDalicPINVOKE.SWIGPendingException.Pending)
2285 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2289 internal void SetInheritOrientation(bool inherit)
2291 NDalicPINVOKE.Actor_SetInheritOrientation(swigCPtr, inherit);
2292 if (NDalicPINVOKE.SWIGPendingException.Pending)
2293 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2296 internal bool IsOrientationInherited()
2298 bool ret = NDalicPINVOKE.Actor_IsOrientationInherited(swigCPtr);
2299 if (NDalicPINVOKE.SWIGPendingException.Pending)
2300 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2304 internal Rotation GetCurrentWorldOrientation()
2306 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentWorldOrientation(swigCPtr), true);
2307 if (NDalicPINVOKE.SWIGPendingException.Pending)
2308 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2312 internal void SetScale(float scale)
2314 NDalicPINVOKE.Actor_SetScale__SWIG_0(swigCPtr, scale);
2315 if (NDalicPINVOKE.SWIGPendingException.Pending)
2316 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2319 internal void SetScale(float scaleX, float scaleY, float scaleZ)
2321 NDalicPINVOKE.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
2322 if (NDalicPINVOKE.SWIGPendingException.Pending)
2323 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2326 internal void SetScale(Vector3 scale)
2328 NDalicPINVOKE.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
2329 if (NDalicPINVOKE.SWIGPendingException.Pending)
2330 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2333 internal void ScaleBy(Vector3 relativeScale)
2335 NDalicPINVOKE.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
2336 if (NDalicPINVOKE.SWIGPendingException.Pending)
2337 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2340 internal Vector3 GetCurrentScale()
2342 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentScale(swigCPtr), true);
2343 if (NDalicPINVOKE.SWIGPendingException.Pending)
2344 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2348 internal Vector3 GetCurrentWorldScale()
2350 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldScale(swigCPtr), true);
2351 if (NDalicPINVOKE.SWIGPendingException.Pending)
2352 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2356 internal void SetInheritScale(bool inherit)
2358 NDalicPINVOKE.Actor_SetInheritScale(swigCPtr, inherit);
2359 if (NDalicPINVOKE.SWIGPendingException.Pending)
2360 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2363 internal bool IsScaleInherited()
2365 bool ret = NDalicPINVOKE.Actor_IsScaleInherited(swigCPtr);
2366 if (NDalicPINVOKE.SWIGPendingException.Pending)
2367 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2371 internal Matrix GetCurrentWorldMatrix()
2373 Matrix ret = new Matrix(NDalicPINVOKE.Actor_GetCurrentWorldMatrix(swigCPtr), true);
2374 if (NDalicPINVOKE.SWIGPendingException.Pending)
2375 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2379 internal void SetVisible(bool visible)
2381 NDalicPINVOKE.Actor_SetVisible(swigCPtr, visible);
2382 if (NDalicPINVOKE.SWIGPendingException.Pending)
2383 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2386 internal bool IsVisible()
2388 bool ret = NDalicPINVOKE.Actor_IsVisible(swigCPtr);
2389 if (NDalicPINVOKE.SWIGPendingException.Pending)
2390 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2394 internal void SetOpacity(float opacity)
2396 NDalicPINVOKE.Actor_SetOpacity(swigCPtr, opacity);
2397 if (NDalicPINVOKE.SWIGPendingException.Pending)
2398 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2401 internal float GetCurrentOpacity()
2403 float ret = NDalicPINVOKE.Actor_GetCurrentOpacity(swigCPtr);
2404 if (NDalicPINVOKE.SWIGPendingException.Pending)
2405 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2409 internal void SetColor(Vector4 color)
2411 NDalicPINVOKE.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
2412 if (NDalicPINVOKE.SWIGPendingException.Pending)
2413 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2416 internal Vector4 GetCurrentColor()
2418 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentColor(swigCPtr), true);
2419 if (NDalicPINVOKE.SWIGPendingException.Pending)
2420 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2424 internal void SetColorMode(ColorMode colorMode)
2426 NDalicPINVOKE.Actor_SetColorMode(swigCPtr, (int)colorMode);
2427 if (NDalicPINVOKE.SWIGPendingException.Pending)
2428 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2431 internal ColorMode GetColorMode()
2433 ColorMode ret = (ColorMode)NDalicPINVOKE.Actor_GetColorMode(swigCPtr);
2434 if (NDalicPINVOKE.SWIGPendingException.Pending)
2435 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2439 internal Vector4 GetCurrentWorldColor()
2441 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentWorldColor(swigCPtr), true);
2442 if (NDalicPINVOKE.SWIGPendingException.Pending)
2443 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2447 internal void SetDrawMode(DrawModeType drawMode)
2449 NDalicPINVOKE.Actor_SetDrawMode(swigCPtr, (int)drawMode);
2450 if (NDalicPINVOKE.SWIGPendingException.Pending)
2451 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2454 internal DrawModeType GetDrawMode()
2456 DrawModeType ret = (DrawModeType)NDalicPINVOKE.Actor_GetDrawMode(swigCPtr);
2457 if (NDalicPINVOKE.SWIGPendingException.Pending)
2458 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2463 /// Converts screen coordinates into the view's coordinate system using the default camera.
2465 /// <pre>The View has been initialized.</pre>
2466 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5)</remarks>
2467 /// <param name="localX">On return, the X-coordinate relative to the view</param>
2468 /// <param name="localY">On return, the Y-coordinate relative to the view</param>
2469 /// <param name="screenX">The screen X-coordinate</param>
2470 /// <param name="screenY">The screen Y-coordinate</param>
2471 /// <returns>True if the conversion succeeded</returns>
2472 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
2474 bool ret = NDalicPINVOKE.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
2475 if (NDalicPINVOKE.SWIGPendingException.Pending)
2476 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2480 internal void SetKeyboardFocusable(bool focusable)
2482 NDalicPINVOKE.Actor_SetKeyboardFocusable(swigCPtr, focusable);
2483 if (NDalicPINVOKE.SWIGPendingException.Pending)
2484 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2487 internal bool IsKeyboardFocusable()
2489 bool ret = NDalicPINVOKE.Actor_IsKeyboardFocusable(swigCPtr);
2490 if (NDalicPINVOKE.SWIGPendingException.Pending)
2491 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2495 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
2497 NDalicPINVOKE.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
2498 if (NDalicPINVOKE.SWIGPendingException.Pending)
2499 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2502 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
2504 ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.Actor_GetResizePolicy(swigCPtr, (int)dimension);
2505 if (NDalicPINVOKE.SWIGPendingException.Pending)
2506 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2511 /// Sets the relative to parent size factor of the view.<br>
2512 /// This factor is only used when ResizePolicy is set to either:
2513 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br>
2514 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br>
2516 /// <pre>The View has been initialized.</pre>
2517 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis</param>
2518 public void SetSizeModeFactor(Vector3 factor)
2520 NDalicPINVOKE.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
2521 if (NDalicPINVOKE.SWIGPendingException.Pending)
2522 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2525 internal Vector3 GetSizeModeFactor()
2527 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetSizeModeFactor(swigCPtr), true);
2528 if (NDalicPINVOKE.SWIGPendingException.Pending)
2529 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2534 /// Calculates the height of the view given a width.<br>
2535 /// The natural size is used for default calculation. <br>
2536 /// size 0 is treated as aspect ratio 1:1.<br>
2538 /// <param name="width">Width to use</param>
2539 /// <returns>The height based on the width</returns>
2540 public float GetHeightForWidth(float width)
2542 float ret = NDalicPINVOKE.Actor_GetHeightForWidth(swigCPtr, width);
2543 if (NDalicPINVOKE.SWIGPendingException.Pending)
2544 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2549 /// Calculates the width of the view given a height.<br>
2550 /// The natural size is used for default calculation.<br>
2551 /// size 0 is treated as aspect ratio 1:1.<br>
2553 /// <param name="height">Height to use</param>
2554 /// <returns>The width based on the height</returns>
2555 public float GetWidthForHeight(float height)
2557 float ret = NDalicPINVOKE.Actor_GetWidthForHeight(swigCPtr, height);
2558 if (NDalicPINVOKE.SWIGPendingException.Pending)
2559 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2563 public float GetRelayoutSize(DimensionType dimension)
2565 float ret = NDalicPINVOKE.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
2566 if (NDalicPINVOKE.SWIGPendingException.Pending)
2567 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2571 public void SetPadding(PaddingType padding)
2573 NDalicPINVOKE.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
2574 if (NDalicPINVOKE.SWIGPendingException.Pending)
2575 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2578 public void GetPadding(PaddingType paddingOut)
2580 NDalicPINVOKE.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
2581 if (NDalicPINVOKE.SWIGPendingException.Pending)
2582 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2585 internal void SetMinimumSize(Vector2 size)
2587 NDalicPINVOKE.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
2588 if (NDalicPINVOKE.SWIGPendingException.Pending)
2589 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2592 internal Vector2 GetMinimumSize()
2594 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMinimumSize(swigCPtr), true);
2595 if (NDalicPINVOKE.SWIGPendingException.Pending)
2596 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2600 internal void SetMaximumSize(Vector2 size)
2602 NDalicPINVOKE.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
2603 if (NDalicPINVOKE.SWIGPendingException.Pending)
2604 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2607 internal Vector2 GetMaximumSize()
2609 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMaximumSize(swigCPtr), true);
2610 if (NDalicPINVOKE.SWIGPendingException.Pending)
2611 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2615 internal int GetHierarchyDepth()
2617 int ret = NDalicPINVOKE.Actor_GetHierarchyDepth(swigCPtr);
2618 if (NDalicPINVOKE.SWIGPendingException.Pending)
2619 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2623 public uint AddRenderer(Renderer renderer)
2625 uint ret = NDalicPINVOKE.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
2626 if (NDalicPINVOKE.SWIGPendingException.Pending)
2627 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2631 internal uint GetRendererCount()
2633 uint ret = NDalicPINVOKE.Actor_GetRendererCount(swigCPtr);
2634 if (NDalicPINVOKE.SWIGPendingException.Pending)
2635 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2639 public Renderer GetRendererAt(uint index)
2641 Renderer ret = new Renderer(NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index), true);
2642 if (NDalicPINVOKE.SWIGPendingException.Pending)
2643 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2647 public void RemoveRenderer(Renderer renderer)
2649 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
2650 if (NDalicPINVOKE.SWIGPendingException.Pending)
2651 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2654 public void RemoveRenderer(uint index)
2656 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
2657 if (NDalicPINVOKE.SWIGPendingException.Pending)
2658 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2661 internal TouchDataSignal TouchSignal()
2663 TouchDataSignal ret = new TouchDataSignal(NDalicPINVOKE.Actor_TouchSignal(swigCPtr), false);
2664 if (NDalicPINVOKE.SWIGPendingException.Pending)
2665 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2669 internal HoverSignal HoveredSignal()
2671 HoverSignal ret = new HoverSignal(NDalicPINVOKE.Actor_HoveredSignal(swigCPtr), false);
2672 if (NDalicPINVOKE.SWIGPendingException.Pending)
2673 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2677 internal WheelSignal WheelEventSignal()
2679 WheelSignal ret = new WheelSignal(NDalicPINVOKE.Actor_WheelEventSignal(swigCPtr), false);
2680 if (NDalicPINVOKE.SWIGPendingException.Pending)
2681 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2685 internal ViewSignal OnWindowSignal()
2687 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnStageSignal(swigCPtr), false);
2688 if (NDalicPINVOKE.SWIGPendingException.Pending)
2689 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2693 internal ViewSignal OffWindowSignal()
2695 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OffStageSignal(swigCPtr), false);
2696 if (NDalicPINVOKE.SWIGPendingException.Pending)
2697 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2701 internal ViewSignal OnRelayoutSignal()
2703 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnRelayoutSignal(swigCPtr), false);
2704 if (NDalicPINVOKE.SWIGPendingException.Pending)
2705 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2709 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view) {
2710 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
2711 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2715 internal ViewSignal ResourcesLoadedSignal()
2717 ViewSignal ret = new ViewSignal(NDalicPINVOKE.ResourceReadySignal(swigCPtr), false);
2718 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2723 /// Gets/Sets the origin of an view, within its parent's area.<br>
2724 /// 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>
2725 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br>
2726 /// An view's position is the distance between this origin, and the view's anchor-point.<br>
2728 /// <pre>The View has been initialized.</pre>
2729 public Position ParentOrigin
2733 Position temp = new Position(0.0f, 0.0f, 0.0f);
2734 GetProperty(View.Property.PARENT_ORIGIN).Get(temp);
2739 SetProperty(View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue(value));
2743 internal float ParentOriginX
2748 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
2753 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
2757 internal float ParentOriginY
2762 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
2767 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
2771 internal float ParentOriginZ
2776 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
2781 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
2786 /// Gets/Sets the anchor-point of an view.<br>
2787 /// 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>
2788 /// The default anchor point is AnchorPoint.Center (0.5, 0.5, 0.5).<br>
2789 /// An view position is the distance between its parent-origin and this anchor-point.<br>
2790 /// An view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br>
2791 /// <pre>The View has been initialized.</pre>
2793 public Position PivotPoint
2797 Position temp = new Position(0.0f, 0.0f, 0.0f);
2798 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
2803 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
2807 internal float PivotPointX
2812 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
2817 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
2821 internal float PivotPointY
2826 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
2831 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
2835 internal float PivotPointZ
2840 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
2845 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
2850 /// Gets/Sets the size width of an view.
2852 public float SizeWidth
2857 GetProperty(View.Property.SIZE_WIDTH).Get(out temp);
2862 SetProperty(View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue(value));
2867 /// Gets/Sets the size height of an view.
2869 public float SizeHeight
2874 GetProperty(View.Property.SIZE_HEIGHT).Get(out temp);
2879 SetProperty(View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue(value));
2884 /// Gets/Sets the position of the View.<br>
2885 /// By default, sets the position vector between the parent origin and anchor point(default).<br>
2886 /// If Position inheritance if disabled, sets the world position.<br>
2888 public Position Position
2892 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
2893 GetProperty(View.Property.POSITION).Get(temp);
2898 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(value));
2903 /// Gets/Sets the position x of the View.
2905 public float PositionX
2910 GetProperty(View.Property.POSITION_X).Get(out temp);
2915 SetProperty(View.Property.POSITION_X, new Tizen.NUI.PropertyValue(value));
2920 /// Gets/Sets the position y of the View.
2922 public float PositionY
2927 GetProperty(View.Property.POSITION_Y).Get(out temp);
2932 SetProperty(View.Property.POSITION_Y, new Tizen.NUI.PropertyValue(value));
2937 /// Gets/Sets the position z of the View.
2939 public float PositionZ
2944 GetProperty(View.Property.POSITION_Z).Get(out temp);
2949 SetProperty(View.Property.POSITION_Z, new Tizen.NUI.PropertyValue(value));
2954 /// Gets/Sets the world position of the View.
2956 public Vector3 WorldPosition
2960 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
2961 GetProperty(View.Property.WORLD_POSITION).Get(temp);
2966 internal float WorldPositionX
2971 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
2976 internal float WorldPositionY
2981 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
2986 internal float WorldPositionZ
2991 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
2997 /// Gets/Sets the orientation of the View.<br>
2998 /// An view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br>
3000 /// <remarks>This is an asynchronous method.</remarks>
3001 public Rotation Orientation
3005 Rotation temp = new Rotation();
3006 GetProperty(View.Property.ORIENTATION).Get(temp);
3011 SetProperty(View.Property.ORIENTATION, new Tizen.NUI.PropertyValue(value));
3016 /// Gets/Sets the world orientation of the View.<br>
3018 public Rotation WorldOrientation
3022 Rotation temp = new Rotation();
3023 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
3029 /// Gets/Sets the scale factor applied to an view.<br>
3031 public Vector3 Scale
3035 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3036 GetProperty(View.Property.SCALE).Get(temp);
3041 SetProperty(View.Property.SCALE, new Tizen.NUI.PropertyValue(value));
3046 /// Gets/Sets the scale x factor applied to an view.
3053 GetProperty(View.Property.SCALE_X).Get(out temp);
3058 SetProperty(View.Property.SCALE_X, new Tizen.NUI.PropertyValue(value));
3063 /// Gets/Sets the scale y factor applied to an view.
3070 GetProperty(View.Property.SCALE_Y).Get(out temp);
3075 SetProperty(View.Property.SCALE_Y, new Tizen.NUI.PropertyValue(value));
3080 /// Gets/Sets the scale z factor applied to an view.
3087 GetProperty(View.Property.SCALE_Z).Get(out temp);
3092 SetProperty(View.Property.SCALE_Z, new Tizen.NUI.PropertyValue(value));
3097 /// Gets the world scale of View.
3099 public Vector3 WorldScale
3103 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3104 GetProperty(View.Property.WORLD_SCALE).Get(temp);
3110 /// Retrieves the visibility flag of an view.
3113 /// If an view is not visible, then the view and its children will not be rendered.
3114 /// 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.
3121 GetProperty(View.Property.VISIBLE).Get(out temp);
3123 }/* only get is required : removed
3126 SetProperty(View.Property.VISIBLE, new Tizen.NUI.PropertyValue(value));
3131 /// Gets the view's world color.
3133 public Vector4 WorldColor
3137 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3138 GetProperty(View.Property.WORLD_COLOR).Get(temp);
3143 internal Matrix WorldMatrix
3147 Matrix temp = new Matrix();
3148 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
3154 /// Gets/Sets the View's name.
3161 GetProperty(View.Property.NAME).Get(out temp);
3166 SetProperty(View.Property.NAME, new Tizen.NUI.PropertyValue(value));
3171 /// Get the number of children held by the view.
3173 public uint ChildCount
3177 return GetChildCount();
3182 /// Gets the View's ID.
3194 /// Gets/Sets the status of whether an view should emit touch or hover signals.
3196 public bool Sensitive
3201 GetProperty(View.Property.SENSITIVE).Get(out temp);
3206 SetProperty(View.Property.SENSITIVE, new Tizen.NUI.PropertyValue(value));
3211 /// Gets/Sets the status of whether the view should receive a notification when touch or hover motion events leave the boundary of the view.
3213 public bool LeaveRequired
3218 GetProperty(View.Property.LEAVE_REQUIRED).Get(out temp);
3223 SetProperty(View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue(value));
3228 /// Gets/Sets the status of whether a child view inherits it's parent's orientation.
3230 public bool InheritOrientation
3235 GetProperty(View.Property.INHERIT_ORIENTATION).Get(out temp);
3240 SetProperty(View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue(value));
3245 /// Gets/Sets the status of whether a child view inherits it's parent's scale.
3247 public bool InheritScale
3252 GetProperty(View.Property.INHERIT_SCALE).Get(out temp);
3257 SetProperty(View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue(value));
3262 /// Gets/Sets the status of how the view and its children should be drawn.<br>
3263 /// Not all views are renderable, but DrawMode can be inherited from any view.<br>
3264 /// 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>
3265 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br>
3266 /// Overlay views are drawn in a separate pass, after all non-overlay views within the Layer.<br>
3267 /// For overlay views, the drawing order is with respect to tree levels of Views, and depth-testing will not be used.<br>
3269 public DrawModeType DrawMode
3274 if (GetProperty(View.Property.DRAW_MODE).Get(out temp) == false)
3277 Tizen.Log.Error("NUI", "DrawMode get error!");
3283 return DrawModeType.Normal;
3285 return DrawModeType.Overlay2D;
3287 return DrawModeType.Stencil;
3289 return DrawModeType.Normal;
3294 SetProperty(View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)value));
3299 /// Gets/Sets the relative to parent size factor of the view.<br>
3300 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br>
3301 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br>
3303 public Vector3 SizeModeFactor
3307 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3308 GetProperty(View.Property.SIZE_MODE_FACTOR).Get(temp);
3313 SetProperty(View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue(value));
3318 /// Gets/Sets the width resize policy to be used.
3320 public ResizePolicyType WidthResizePolicy
3325 if (GetProperty(View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
3328 Tizen.Log.Error("NUI", "WidthResizePolicy get error!");
3334 return ResizePolicyType.Fixed;
3335 case "USE_NATURAL_SIZE":
3336 return ResizePolicyType.UseNaturalSize;
3337 case "FILL_TO_PARENT":
3338 return ResizePolicyType.FillToParent;
3339 case "SIZE_RELATIVE_TO_PARENT":
3340 return ResizePolicyType.SizeRelativeToParent;
3341 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3342 return ResizePolicyType.SizeFixedOffsetFromParent;
3343 case "FIT_TO_CHILDREN":
3344 return ResizePolicyType.FitToChildren;
3345 case "DIMENSION_DEPENDENCY":
3346 return ResizePolicyType.DimensionDependency;
3347 case "USE_ASSIGNED_SIZE":
3348 return ResizePolicyType.UseAssignedSize;
3350 return ResizePolicyType.Fixed;
3355 SetProperty(View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3360 /// Gets/Sets the height resize policy to be used.
3362 public ResizePolicyType HeightResizePolicy
3367 if (GetProperty(View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
3370 Tizen.Log.Error("NUI", "HeightResizePolicy get error!");
3376 return ResizePolicyType.Fixed;
3377 case "USE_NATURAL_SIZE":
3378 return ResizePolicyType.UseNaturalSize;
3379 case "FILL_TO_PARENT":
3380 return ResizePolicyType.FillToParent;
3381 case "SIZE_RELATIVE_TO_PARENT":
3382 return ResizePolicyType.SizeRelativeToParent;
3383 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3384 return ResizePolicyType.SizeFixedOffsetFromParent;
3385 case "FIT_TO_CHILDREN":
3386 return ResizePolicyType.FitToChildren;
3387 case "DIMENSION_DEPENDENCY":
3388 return ResizePolicyType.DimensionDependency;
3389 case "USE_ASSIGNED_SIZE":
3390 return ResizePolicyType.UseAssignedSize;
3392 return ResizePolicyType.Fixed;
3397 SetProperty(View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3402 /// Gets/Sets the policy to use when setting size with size negotiation.<br>
3403 /// Defaults to SizeScalePolicyType.UseSizeSet.<br>
3405 public SizeScalePolicyType SizeScalePolicy
3410 if (GetProperty(View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
3413 Tizen.Log.Error("NUI", "SizeScalePolicy get error!");
3418 case "USE_SIZE_SET":
3419 return SizeScalePolicyType.UseSizeSet;
3420 case "FIT_WITH_ASPECT_RATIO":
3421 return SizeScalePolicyType.FitWithAspectRatio;
3422 case "FILL_WITH_ASPECT_RATIO":
3423 return SizeScalePolicyType.FillWithAspectRatio;
3425 return SizeScalePolicyType.UseSizeSet;
3430 string valueToString = "";
3433 case SizeScalePolicyType.UseSizeSet:
3435 valueToString = "USE_SIZE_SET";
3438 case SizeScalePolicyType.FitWithAspectRatio:
3440 valueToString = "FIT_WITH_ASPECT_RATIO";
3443 case SizeScalePolicyType.FillWithAspectRatio:
3445 valueToString = "FILL_WITH_ASPECT_RATIO";
3450 valueToString = "USE_SIZE_SET";
3454 SetProperty(View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
3459 /// Gets/Sets the status of whether the width size is dependent on height size.
3461 public bool WidthForHeight
3466 GetProperty(View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
3471 SetProperty(View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue(value));
3476 /// Gets/Sets the status of whether the height size is dependent on width size.
3478 public bool HeightForWidth
3483 GetProperty(View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
3488 SetProperty(View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue(value));
3493 /// Gets/Sets the padding for use in layout.
3495 public Vector4 Padding
3499 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3500 GetProperty(View.Property.PADDING).Get(temp);
3505 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
3510 /// Gets/Sets the minimum size an view can be assigned in size negotiation.
3512 public Size2D MinimumSize
3516 Size2D temp = new Size2D(0, 0);
3517 GetProperty(View.Property.MINIMUM_SIZE).Get(temp);
3522 SetProperty(View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3527 /// Gets/Sets the maximum size an view can be assigned in size negotiation.
3529 public Size2D MaximumSize
3533 Size2D temp = new Size2D(0, 0);
3534 GetProperty(View.Property.MAXIMUM_SIZE).Get(temp);
3539 SetProperty(View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3544 /// Gets/Sets whether a child view inherits it's parent's position.<br>
3545 /// Default is to inherit.<br>
3546 /// 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>
3548 public bool InheritPosition
3553 GetProperty(View.Property.INHERIT_POSITION).Get(out temp);
3558 SetProperty(View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue(value));
3563 /// Gets/Sets clipping behavior(mode) of it's children.
3565 public ClippingModeType ClippingMode
3570 if (GetProperty(View.Property.CLIPPING_MODE).Get(out temp) == false)
3573 Tizen.Log.Error("NUI", "ClippingMode get error!");
3579 return ClippingModeType.Disabled;
3580 case "CLIP_CHILDREN":
3581 return ClippingModeType.ClipChildren;
3583 return ClippingModeType.Disabled;
3588 SetProperty(View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)value));
3593 /// Get the number of renderers held by the view.
3595 public uint RendererCount
3599 return GetRendererCount();