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;
26 /// View is the base class for all views.
28 public class View : Animatable //CustomActor => Animatable
30 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
32 internal View(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.View_SWIGUpcast(cPtr), cMemoryOwn)
34 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
35 PositionUsesPivotPoint = false;
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 if (swigCPtr.Handle != global::System.IntPtr.Zero)
68 //Unreference this instance from Registry.
69 Registry.Unregister(this);
71 NDalicPINVOKE.delete_View(swigCPtr);
73 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
79 private EventHandler _keyInputFocusGainedEventHandler;
80 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
81 private delegate void KeyInputFocusGainedCallbackType(IntPtr control);
82 private KeyInputFocusGainedCallbackType _keyInputFocusGainedCallback;
85 /// Event for KeyInputFocusGained signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
86 /// KeyInputFocusGained signal is emitted when the control gets Key Input Focus.<br>
88 public event EventHandler FocusGained
92 if (_keyInputFocusGainedEventHandler == null)
94 _keyInputFocusGainedCallback = OnKeyInputFocusGained;
95 this.KeyInputFocusGainedSignal().Connect(_keyInputFocusGainedCallback);
98 _keyInputFocusGainedEventHandler += value;
103 _keyInputFocusGainedEventHandler -= value;
105 if (_keyInputFocusGainedEventHandler == null && KeyInputFocusGainedSignal().Empty() == false)
107 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
112 private void OnKeyInputFocusGained(IntPtr view)
114 if (_keyInputFocusGainedEventHandler != null)
116 _keyInputFocusGainedEventHandler(this, null);
121 private EventHandler _keyInputFocusLostEventHandler;
122 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
123 private delegate void KeyInputFocusLostCallbackType(IntPtr control);
124 private KeyInputFocusLostCallbackType _keyInputFocusLostCallback;
127 /// Event for KeyInputFocusLost signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
128 /// KeyInputFocusLost signal is emitted when the control loses Key Input Focus.<br>
130 public event EventHandler FocusLost
134 if (_keyInputFocusLostEventHandler == null)
136 _keyInputFocusLostCallback = OnKeyInputFocusLost;
137 this.KeyInputFocusLostSignal().Connect(_keyInputFocusLostCallback);
140 _keyInputFocusLostEventHandler += value;
145 _keyInputFocusLostEventHandler -= value;
147 if (_keyInputFocusLostEventHandler == null && KeyInputFocusLostSignal().Empty() == false)
149 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
154 private void OnKeyInputFocusLost(IntPtr view)
156 if (_keyInputFocusLostEventHandler != null)
158 _keyInputFocusLostEventHandler(this, null);
163 /// Event arguments that passed via KeyEvent signal.
165 public class KeyEventArgs : EventArgs
170 /// Key - is the key sent to the View.
185 private EventHandlerWithReturnType<object, KeyEventArgs, bool> _keyEventHandler;
186 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
187 private delegate bool KeyCallbackType(IntPtr control, IntPtr keyEvent);
188 private KeyCallbackType _keyCallback;
191 /// Event for KeyPressed signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
192 /// KeyPressed signal is emitted when key event is received.<br>
194 public event EventHandlerWithReturnType<object, KeyEventArgs, bool> KeyEvent
198 if (_keyEventHandler == null)
200 _keyCallback = OnKeyEvent;
201 this.KeyEventSignal().Connect(_keyCallback);
204 _keyEventHandler += value;
209 _keyEventHandler -= value;
211 if (_keyEventHandler == null && KeyEventSignal().Empty() == false)
213 this.KeyEventSignal().Disconnect(_keyCallback);
218 private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
220 KeyEventArgs e = new KeyEventArgs();
224 e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
226 if (_keyEventHandler != null)
228 Delegate[] delegateList = _keyEventHandler.GetInvocationList();
230 // Oring the result of each callback.
231 foreach ( EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList )
233 result |= del( this, e );
240 private EventHandler _onRelayoutEventHandler;
241 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
242 private delegate void OnRelayoutEventCallbackType(IntPtr control);
243 private OnRelayoutEventCallbackType _onRelayoutEventCallback;
246 /// Event for OnRelayout signal which can be used to subscribe/unsubscribe the event handler.<br>
247 /// OnRelayout signal is emitted after the size has been set on the view during relayout.<br>
249 public event EventHandler Relayout
253 if (_onRelayoutEventHandler == null)
255 _onRelayoutEventCallback = OnRelayout;
256 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
259 _onRelayoutEventHandler += value;
264 _onRelayoutEventHandler -= value;
266 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
268 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
274 // Callback for View OnRelayout signal
275 private void OnRelayout(IntPtr data)
277 if (_onRelayoutEventHandler != null)
279 _onRelayoutEventHandler(this, null);
284 /// Event arguments that passed via Touch signal.
286 public class TouchEventArgs : EventArgs
288 private Touch _touch;
291 /// Touch - contains the information of touch points
306 private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
307 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
308 private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
309 private TouchDataCallbackType _touchDataCallback;
312 /// Event for Touched signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
313 /// Touched signal is emitted when touch input is received.<br>
315 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
319 if (_touchDataEventHandler == null)
321 _touchDataCallback = OnTouch;
322 this.TouchSignal().Connect(_touchDataCallback);
325 _touchDataEventHandler += value;
330 _touchDataEventHandler -= value;
332 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
334 this.TouchSignal().Disconnect(_touchDataCallback);
340 // Callback for View TouchSignal
341 private bool OnTouch(IntPtr view, IntPtr touchData)
343 TouchEventArgs e = new TouchEventArgs();
345 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
347 if (_touchDataEventHandler != null)
349 return _touchDataEventHandler(this, e);
356 /// Event arguments that passed via Hover signal.
358 public class HoverEventArgs : EventArgs
360 private Hover _hover;
363 /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
378 private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
379 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
380 private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
381 private HoverEventCallbackType _hoverEventCallback;
384 /// Event for Hovered signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
385 /// Hovered signal is emitted when hover input is received.<br>
387 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
391 if (_hoverEventHandler == null)
393 _hoverEventCallback = OnHoverEvent;
394 this.HoveredSignal().Connect(_hoverEventCallback);
397 _hoverEventHandler += value;
402 _hoverEventHandler -= value;
404 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
406 this.HoveredSignal().Disconnect(_hoverEventCallback);
412 // Callback for View Hover signal
413 private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
415 HoverEventArgs e = new HoverEventArgs();
417 e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
419 if (_hoverEventHandler != null)
421 return _hoverEventHandler(this, e);
428 /// Event arguments that passed via Wheel signal.
430 public class WheelEventArgs : EventArgs
432 private Wheel _wheel;
435 /// WheelEvent - store a wheel rolling type : MOUSE_WHEEL or CUSTOM_WHEEL
450 private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
451 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
452 private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
453 private WheelEventCallbackType _wheelEventCallback;
456 /// Event for WheelMoved signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
457 /// WheelMoved signal is emitted when wheel event is received.<br>
459 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
463 if (_wheelEventHandler == null)
465 _wheelEventCallback = OnWheelEvent;
466 this.WheelEventSignal().Connect(_wheelEventCallback);
469 _wheelEventHandler += value;
474 _wheelEventHandler -= value;
476 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
478 this.WheelEventSignal().Disconnect(_wheelEventCallback);
484 // Callback for View Wheel signal
485 private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
487 WheelEventArgs e = new WheelEventArgs();
489 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
491 if (_wheelEventHandler != null)
493 return _wheelEventHandler(this, e);
499 private EventHandler _onWindowEventHandler;
500 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
501 private delegate void OnWindowEventCallbackType(IntPtr control);
502 private OnWindowEventCallbackType _onWindowEventCallback;
505 /// Event for OnWindow signal which can be used to subscribe/unsubscribe the event handler.<br>
506 /// OnWindow signal is emitted after the view has been connected to the Window.<br>
508 public event EventHandler AddedToWindow
512 if (_onWindowEventHandler == null)
514 _onWindowEventCallback = OnWindow;
515 this.OnWindowSignal().Connect(_onWindowEventCallback);
518 _onWindowEventHandler += value;
523 _onWindowEventHandler -= value;
525 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
527 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
532 // Callback for View OnWindow signal
533 private void OnWindow(IntPtr data)
535 if (_onWindowEventHandler != null)
537 _onWindowEventHandler(this, null);
542 private EventHandler _offWindowEventHandler;
543 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
544 private delegate void OffWindowEventCallbackType(IntPtr control);
545 private OffWindowEventCallbackType _offWindowEventCallback;
548 /// Event for OffWindow signal which can be used to subscribe/unsubscribe the event handler.<br>
549 /// OffWindow signal is emitted after the view has been disconnected from the Window.<br>
551 public event EventHandler RemovedFromWindow
555 if (_offWindowEventHandler == null)
557 _offWindowEventCallback = OffWindow;
558 this.OffWindowSignal().Connect(_offWindowEventCallback);
561 _offWindowEventHandler += value;
566 _offWindowEventHandler -= value;
568 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
570 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
575 // Callback for View OffWindow signal
576 private void OffWindow(IntPtr data)
578 if (_offWindowEventHandler != null)
580 _offWindowEventHandler(this, null);
585 /// Event arguments of visibility changed.
587 public class VisibilityChangedEventArgs : EventArgs
590 private bool _visibility;
591 private VisibilityChangeType _type;
594 /// The view, or child of view, whose visibility has changed.
609 /// Whether the view is now visible or not.
611 public bool Visibility
624 /// Whether the view's visible property has changed or a parent's.
626 public VisibilityChangeType Type
639 private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
640 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
641 private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
642 private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
645 /// Event for visibility change which can be used to subscribe/unsubscribe the event handler.<br>
646 /// This signal is emitted when the visible property of this or a parent view is changed.<br>
648 public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
652 if (_visibilityChangedEventHandler == null)
654 _visibilityChangedEventCallback = OnVisibilityChanged;
655 VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
658 _visibilityChangedEventHandler += value;
663 _visibilityChangedEventHandler -= value;
665 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
667 VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
672 // Callback for View visibility change signal
673 private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
675 VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
678 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
680 e.Visibility = visibility;
683 if (_visibilityChangedEventHandler != null)
685 _visibilityChangedEventHandler(this, e);
689 // Resource Ready Signal
691 private EventHandler _resourcesLoadedEventHandler;
692 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
693 private delegate void ResourcesLoadedCallbackType(IntPtr control);
694 private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
697 /// Event for ResourcesLoadedSignal signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
698 /// This signal is emitted after all resources required by a View are loaded and ready.<br>
700 public event EventHandler ResourcesLoaded
704 if (_resourcesLoadedEventHandler == null)
706 _ResourcesLoadedCallback = OnResourcesLoaded;
707 this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
710 _resourcesLoadedEventHandler += value;
715 _resourcesLoadedEventHandler -= value;
717 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
719 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
724 private void OnResourcesLoaded(IntPtr view)
726 if (_resourcesLoadedEventHandler != null)
728 _resourcesLoadedEventHandler(this, null);
732 internal IntPtr GetPtrfromView()
734 return (IntPtr)swigCPtr;
737 internal class Property
739 internal static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get();
740 internal static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get();
741 internal static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get();
742 internal static readonly int LEFT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
743 internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
744 internal static readonly int UP_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
745 internal static readonly int DOWN_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
746 internal static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get();
747 internal static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get();
748 internal static readonly int SIBLING_ORDER = NDalicManualPINVOKE.Actor_Property_SIBLING_ORDER_get();
749 internal static readonly int OPACITY = NDalicManualPINVOKE.Actor_Property_OPACITY_get();
750 internal static readonly int SCREEN_POSITION = NDalicManualPINVOKE.Actor_Property_SCREEN_POSITION_get();
751 internal static readonly int POSITION_USES_ANCHOR_POINT = NDalicManualPINVOKE.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
752 internal static readonly int PARENT_ORIGIN = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_get();
753 internal static readonly int PARENT_ORIGIN_X = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_X_get();
754 internal static readonly int PARENT_ORIGIN_Y = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Y_get();
755 internal static readonly int PARENT_ORIGIN_Z = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Z_get();
756 internal static readonly int ANCHOR_POINT = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_get();
757 internal static readonly int ANCHOR_POINT_X = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_X_get();
758 internal static readonly int ANCHOR_POINT_Y = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Y_get();
759 internal static readonly int ANCHOR_POINT_Z = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Z_get();
760 internal static readonly int SIZE = NDalicPINVOKE.Actor_Property_SIZE_get();
761 internal static readonly int SIZE_WIDTH = NDalicPINVOKE.Actor_Property_SIZE_WIDTH_get();
762 internal static readonly int SIZE_HEIGHT = NDalicPINVOKE.Actor_Property_SIZE_HEIGHT_get();
763 internal static readonly int SIZE_DEPTH = NDalicPINVOKE.Actor_Property_SIZE_DEPTH_get();
764 internal static readonly int POSITION = NDalicPINVOKE.Actor_Property_POSITION_get();
765 internal static readonly int POSITION_X = NDalicPINVOKE.Actor_Property_POSITION_X_get();
766 internal static readonly int POSITION_Y = NDalicPINVOKE.Actor_Property_POSITION_Y_get();
767 internal static readonly int POSITION_Z = NDalicPINVOKE.Actor_Property_POSITION_Z_get();
768 internal static readonly int WORLD_POSITION = NDalicPINVOKE.Actor_Property_WORLD_POSITION_get();
769 internal static readonly int WORLD_POSITION_X = NDalicPINVOKE.Actor_Property_WORLD_POSITION_X_get();
770 internal static readonly int WORLD_POSITION_Y = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Y_get();
771 internal static readonly int WORLD_POSITION_Z = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Z_get();
772 internal static readonly int ORIENTATION = NDalicPINVOKE.Actor_Property_ORIENTATION_get();
773 internal static readonly int WORLD_ORIENTATION = NDalicPINVOKE.Actor_Property_WORLD_ORIENTATION_get();
774 internal static readonly int SCALE = NDalicPINVOKE.Actor_Property_SCALE_get();
775 internal static readonly int SCALE_X = NDalicPINVOKE.Actor_Property_SCALE_X_get();
776 internal static readonly int SCALE_Y = NDalicPINVOKE.Actor_Property_SCALE_Y_get();
777 internal static readonly int SCALE_Z = NDalicPINVOKE.Actor_Property_SCALE_Z_get();
778 internal static readonly int WORLD_SCALE = NDalicPINVOKE.Actor_Property_WORLD_SCALE_get();
779 internal static readonly int VISIBLE = NDalicPINVOKE.Actor_Property_VISIBLE_get();
780 internal static readonly int WORLD_COLOR = NDalicPINVOKE.Actor_Property_WORLD_COLOR_get();
781 internal static readonly int WORLD_MATRIX = NDalicPINVOKE.Actor_Property_WORLD_MATRIX_get();
782 internal static readonly int NAME = NDalicPINVOKE.Actor_Property_NAME_get();
783 internal static readonly int SENSITIVE = NDalicPINVOKE.Actor_Property_SENSITIVE_get();
784 internal static readonly int LEAVE_REQUIRED = NDalicPINVOKE.Actor_Property_LEAVE_REQUIRED_get();
785 internal static readonly int INHERIT_ORIENTATION = NDalicPINVOKE.Actor_Property_INHERIT_ORIENTATION_get();
786 internal static readonly int INHERIT_SCALE = NDalicPINVOKE.Actor_Property_INHERIT_SCALE_get();
787 internal static readonly int DRAW_MODE = NDalicPINVOKE.Actor_Property_DRAW_MODE_get();
788 internal static readonly int SIZE_MODE_FACTOR = NDalicPINVOKE.Actor_Property_SIZE_MODE_FACTOR_get();
789 internal static readonly int WIDTH_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_WIDTH_RESIZE_POLICY_get();
790 internal static readonly int HEIGHT_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_HEIGHT_RESIZE_POLICY_get();
791 internal static readonly int SIZE_SCALE_POLICY = NDalicPINVOKE.Actor_Property_SIZE_SCALE_POLICY_get();
792 internal static readonly int WIDTH_FOR_HEIGHT = NDalicPINVOKE.Actor_Property_WIDTH_FOR_HEIGHT_get();
793 internal static readonly int HEIGHT_FOR_WIDTH = NDalicPINVOKE.Actor_Property_HEIGHT_FOR_WIDTH_get();
794 internal static readonly int PADDING = NDalicPINVOKE.Actor_Property_PADDING_get();
795 internal static readonly int MINIMUM_SIZE = NDalicPINVOKE.Actor_Property_MINIMUM_SIZE_get();
796 internal static readonly int MAXIMUM_SIZE = NDalicPINVOKE.Actor_Property_MAXIMUM_SIZE_get();
797 internal static readonly int INHERIT_POSITION = NDalicPINVOKE.Actor_Property_INHERIT_POSITION_get();
798 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 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
822 internal View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true)
824 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
828 /// Downcasts a handle to View handle.<br>
829 /// If handle points to a View, the downcast produces valid handle.<br>
830 /// If not, the returned handle is left uninitialized.<br>
832 /// <param name="handle">Handle to an object</param>
833 /// <returns>A handle to a View or an uninitialized handle</returns>
834 public new static View DownCast(BaseHandle handle)
836 View ret = new View(NDalicPINVOKE.View_DownCast(BaseHandle.getCPtr(handle)), true);
837 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
841 [Obsolete("Please do not use! this will be deprecated")]
842 public static T DownCast<T>(View view) where T : View
844 //View ret = ViewRegistry.GetViewFromBaseHandle(view);
845 View ret = View.DownCast(view);
853 private View ConvertIdToView(uint id)
859 view = Parent.FindChildById(id);
864 view = Window.Instance.GetRootLayer().FindChildById(id);
870 internal void SetKeyInputFocus()
872 NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
873 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
877 /// Quries whether the view has focus.
879 /// <returns>true if this view has focus</returns>
880 public bool HasFocus()
882 bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
883 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
887 internal void ClearKeyInputFocus()
889 NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
890 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
893 internal PinchGestureDetector GetPinchGestureDetector()
895 PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
896 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
900 internal PanGestureDetector GetPanGestureDetector()
902 PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
903 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
907 internal TapGestureDetector GetTapGestureDetector()
909 TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
910 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
914 internal LongPressGestureDetector GetLongPressGestureDetector()
916 LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
917 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
922 /// Sets the name of the style to be applied to the view.
924 /// <param name="styleName">A string matching a style described in a stylesheet</param>
925 public void SetStyleName(string styleName)
927 NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
928 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
932 /// Retrieves the name of the style to be applied to the view (if any).
934 /// <returns>A string matching a style, or an empty string</returns>
935 public string GetStyleName()
937 string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
938 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
942 internal void SetBackgroundColor(Vector4 color)
944 NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
945 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
948 internal Vector4 GetBackgroundColor()
950 Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
951 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
955 internal void SetBackgroundImage(Image image)
957 NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
958 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
962 /// Clears the background.
964 public void ClearBackground()
966 NDalicPINVOKE.View_ClearBackground(swigCPtr);
967 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
970 internal ControlKeySignal KeyEventSignal()
972 ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
973 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
977 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
979 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
980 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
984 internal KeyInputFocusSignal KeyInputFocusLostSignal()
986 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
987 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
991 internal View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
993 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
996 internal enum PropertyRange
998 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
999 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
1000 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
1004 /// styleName, type string.
1006 public string StyleName
1011 GetProperty(View.Property.STYLE_NAME).Get(out temp);
1016 SetProperty(View.Property.STYLE_NAME, new Tizen.NUI.PropertyValue(value));
1021 /// mutually exclusive with BACKGROUND_IMAGE & BACKGROUND, type Vector4.
1023 public Color BackgroundColor
1027 Color backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1029 Tizen.NUI.PropertyMap background = Background;
1031 background.Find(Visual.Property.Type)?.Get(out visualType);
1032 if (visualType == (int)Visual.Type.Color)
1034 background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor);
1037 return backgroundColor;
1041 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1046 /// Create an Animation to animate the background color visual. If there is no
1047 /// background visual, creates one with transparent black as it's mixColor.
1049 public Animation AnimateBackgroundColor( object destinationValue,
1052 AlphaFunction.BuiltinFunctions? alphaFunction = null,
1053 object initialValue = null)
1055 Tizen.NUI.PropertyMap background = Background;
1057 if( background.Empty() )
1059 // If there is no background yet, ensure there is a transparent
1061 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1062 background = Background;
1064 return AnimateColor( "background", destinationValue, startTime, endTime, alphaFunction, initialValue );
1068 /// Create an Animation to animate the mixColor of the named visual.
1070 public Animation AnimateColor( string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null )
1072 Animation animation = null;
1074 PropertyMap _animator = new PropertyMap();
1075 if( alphaFunction != null )
1077 _animator.Add("alphaFunction", new PropertyValue( AlphaFunction.BuiltinToPropertyKey(alphaFunction) ) );
1080 PropertyMap _timePeriod = new PropertyMap();
1081 _timePeriod.Add( "duration", new PropertyValue((endTime-startTime)/1000.0f) );
1082 _timePeriod.Add( "delay", new PropertyValue( startTime/1000.0f ) );
1083 _animator.Add( "timePeriod", new PropertyValue( _timePeriod ) );
1085 PropertyMap _transition = new PropertyMap();
1086 _transition.Add( "animator", new PropertyValue( _animator ) );
1087 _transition.Add( "target", new PropertyValue( targetVisual ) );
1088 _transition.Add( "property", new PropertyValue( "mixColor" ) );
1090 if( initialColor != null )
1092 PropertyValue initValue = PropertyValue.CreateFromObject( initialColor );
1093 _transition.Add( "initialValue", initValue );
1096 PropertyValue destValue = PropertyValue.CreateFromObject( destinationColor );
1097 _transition.Add( "targetValue", destValue );
1098 TransitionData _transitionData = new TransitionData( _transition );
1100 animation = new Animation( NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true );
1101 if (NDalicPINVOKE.SWIGPendingException.Pending)
1102 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1108 /// mutually exclusive with BACKGROUND_COLOR & BACKGROUND, type Map.
1110 public string BackgroundImage
1114 string backgroundImage = "";
1116 Tizen.NUI.PropertyMap background = Background;
1118 background.Find(Visual.Property.Type)?.Get(out visualType);
1119 if (visualType == (int)Visual.Type.Image)
1121 background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
1124 return backgroundImage;
1128 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1132 public Tizen.NUI.PropertyMap Background
1136 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1137 GetProperty( View.Property.BACKGROUND ).Get(temp);
1142 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1148 /// The current state of the view.
1155 if (GetProperty(View.Property.STATE).Get(out temp) == false)
1157 NUILog.Error("State get error!");
1163 return States.Normal;
1167 return States.Focused;
1171 return States.Disabled;
1175 return States.Normal;
1181 SetProperty(View.Property.STATE, new Tizen.NUI.PropertyValue((int)value));
1186 /// The current sub state of the view.
1188 public States SubState
1193 if (GetProperty(View.Property.SUB_STATE).Get(out temp) == false)
1195 NUILog.Error("subState get error!");
1200 return States.Normal;
1202 return States.Focused;
1204 return States.Disabled;
1206 return States.Normal;
1211 string valueToString = "";
1216 valueToString = "NORMAL";
1219 case States.Focused:
1221 valueToString = "FOCUSED";
1224 case States.Disabled:
1226 valueToString = "DISABLED";
1231 valueToString = "NORMAL";
1235 SetProperty(View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
1240 /// Displays a tooltip
1242 public Tizen.NUI.PropertyMap Tooltip
1246 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1247 GetProperty(View.Property.TOOLTIP).Get(temp);
1252 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1257 /// Displays a tooltip as Text
1259 public string TooltipText
1263 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1267 private int LeftFocusableViewId
1272 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
1277 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1281 private int RightFocusableViewId
1286 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
1291 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1295 private int UpFocusableViewId
1300 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
1305 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1309 private int DownFocusableViewId
1314 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
1319 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1324 /// Child Property of FlexContainer.<br>
1325 /// The proportion of the free space in the container the flex item will receive.<br>
1326 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br>
1333 GetProperty(FlexContainer.ChildProperty.FLEX).Get(out temp);
1338 SetProperty(FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue(value));
1343 /// Child Property of FlexContainer.<br>
1344 /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br>
1346 public int AlignSelf
1351 GetProperty(FlexContainer.ChildProperty.ALIGN_SELF).Get(out temp);
1356 SetProperty(FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue(value));
1361 /// Child Property of FlexContainer.<br>
1362 /// The space around the flex item.<br>
1364 public Vector4 FlexMargin
1368 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1369 GetProperty(FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
1374 SetProperty(FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue(value));
1379 /// The top-left cell this child occupies, if not set, the first available cell is used
1381 public Vector2 CellIndex
1385 Vector2 temp = new Vector2(0.0f, 0.0f);
1386 GetProperty(TableView.ChildProperty.CELL_INDEX).Get(temp);
1391 SetProperty(TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue(value));
1396 /// The number of rows this child occupies, if not set, default value is 1
1398 public float RowSpan
1403 GetProperty(TableView.ChildProperty.ROW_SPAN).Get(out temp);
1408 SetProperty(TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue(value));
1413 /// The number of columns this child occupies, if not set, default value is 1
1415 public float ColumnSpan
1420 GetProperty(TableView.ChildProperty.COLUMN_SPAN).Get(out temp);
1425 SetProperty(TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue(value));
1430 /// The horizontal alignment of this child inside the cells, if not set, default value is 'left'
1432 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
1437 if (GetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
1439 NUILog.Error("CellHorizontalAlignment get error!");
1445 return Tizen.NUI.HorizontalAlignmentType.Left;
1447 return Tizen.NUI.HorizontalAlignmentType.Center;
1449 return Tizen.NUI.HorizontalAlignmentType.Right;
1451 return Tizen.NUI.HorizontalAlignmentType.Left;
1456 string valueToString = "";
1459 case Tizen.NUI.HorizontalAlignmentType.Left:
1461 valueToString = "left";
1464 case Tizen.NUI.HorizontalAlignmentType.Center:
1466 valueToString = "center";
1469 case Tizen.NUI.HorizontalAlignmentType.Right:
1471 valueToString = "right";
1476 valueToString = "left";
1480 SetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1485 /// The vertical alignment of this child inside the cells, if not set, default value is 'top'
1487 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
1492 GetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
1494 NUILog.Error("CellVerticalAlignment get error!");
1500 return Tizen.NUI.VerticalAlignmentType.Top;
1502 return Tizen.NUI.VerticalAlignmentType.Center;
1504 return Tizen.NUI.VerticalAlignmentType.Bottom;
1506 return Tizen.NUI.VerticalAlignmentType.Top;
1511 string valueToString = "";
1514 case Tizen.NUI.VerticalAlignmentType.Top:
1516 valueToString = "top";
1519 case Tizen.NUI.VerticalAlignmentType.Center:
1521 valueToString = "center";
1524 case Tizen.NUI.VerticalAlignmentType.Bottom:
1526 valueToString = "bottom";
1531 valueToString = "top";
1535 SetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1540 /// The left focusable view.<br>
1541 /// This will return NULL if not set.<br>
1542 /// This will also return NULL if the specified left focusable view is not on Window.<br>
1544 public View LeftFocusableView
1546 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1549 if (LeftFocusableViewId >= 0)
1551 return ConvertIdToView((uint)LeftFocusableViewId);
1557 LeftFocusableViewId = (int)value.GetId();
1562 /// The right focusable view.<br>
1563 /// This will return NULL if not set.<br>
1564 /// This will also return NULL if the specified right focusable view is not on Window.<br>
1566 public View RightFocusableView
1568 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1571 if (RightFocusableViewId >= 0)
1573 return ConvertIdToView((uint)RightFocusableViewId);
1579 RightFocusableViewId = (int)value.GetId();
1584 /// The up focusable view.<br>
1585 /// This will return NULL if not set.<br>
1586 /// This will also return NULL if the specified up focusable view is not on Window.<br>
1588 public View UpFocusableView
1590 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1593 if (UpFocusableViewId >= 0)
1595 return ConvertIdToView((uint)UpFocusableViewId);
1601 UpFocusableViewId = (int)value.GetId();
1606 /// The down focusable view.<br>
1607 /// This will return NULL if not set.<br>
1608 /// This will also return NULL if the specified down focusable view is not on Window.<br>
1610 public View DownFocusableView
1612 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1615 if (DownFocusableViewId >= 0)
1617 return ConvertIdToView((uint)DownFocusableViewId);
1623 DownFocusableViewId = (int)value.GetId();
1628 /// whether the view should be focusable by keyboard navigation.
1630 public bool Focusable
1634 SetKeyboardFocusable(value);
1638 return IsKeyboardFocusable();
1643 /// Enumeration for describing the states of view.
1662 /// Retrieves the position of the View.<br>
1663 /// The coordinates are relative to the View's parent.<br>
1665 public Position CurrentPosition
1669 return GetCurrentPosition();
1674 /// Sets the size of an view for width and height.<br>
1675 /// Geometry can be scaled to fit within this area.<br>
1676 /// This does not interfere with the views scale factor.<br>
1677 /// The views default depth is the minimum of width & height.<br>
1679 public Size2D Size2D
1683 Size temp = new Size(0.0f, 0.0f, 0.0f);
1684 GetProperty(View.Property.SIZE).Get(temp);
1685 Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
1690 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(new Size(value)));
1695 /// Retrieves the size of the View.<br>
1696 /// The coordinates are relative to the View's parent.<br>
1698 public Size2D CurrentSize
1702 return GetCurrentSize();
1707 /// Retrieves the view's parent.<br>
1717 public bool Visibility
1726 /// Retrieves and sets the view's opacity.<br>
1728 public float Opacity
1733 GetProperty(View.Property.OPACITY).Get(out temp);
1738 SetProperty(View.Property.OPACITY, new Tizen.NUI.PropertyValue(value));
1743 /// Sets the position of the View for X and Y.<br>
1744 /// By default, sets the position vector between the parent origin and pivot point(default).<br>
1745 /// If Position inheritance if disabled, sets the world position.<br>
1747 public Position2D Position2D
1751 Position temp = new Position(0.0f, 0.0f, 0.0f);
1752 GetProperty(View.Property.POSITION).Get(temp);
1753 return new Position2D(temp);
1757 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(new Position(value)));
1762 /// Retrieves screen postion of view's.<br>
1764 public Vector2 ScreenPosition
1768 Vector2 temp = new Vector2(0.0f, 0.0f);
1769 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
1775 /// Determines whether the pivot point should be used to determine the position of the view.
1776 /// This is true by default.
1778 /// <remarks>If false, then the top-left of the view is used for the position.
1779 /// Setting this to false will allow scaling or rotation around the anchor-point without affecting the view's position.
1781 public bool PositionUsesPivotPoint
1786 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
1791 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
1795 [Obsolete("Please do not use! this will be deprecated")]
1796 public bool PositionUsesAnchorPoint
1801 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
1806 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
1810 internal bool FocusState
1814 return IsKeyboardFocusable();
1818 SetKeyboardFocusable(value);
1823 /// Queries whether the view is connected to the Stage.<br>
1824 /// When an view is connected, it will be directly or indirectly parented to the root View.<br>
1826 public bool IsOnWindow
1835 /// Gets depth in the hierarchy for the view.
1837 public int HierarchyDepth
1841 return GetHierarchyDepth();
1846 /// Sets the sibling order of the view so depth position can be defined within the same parent.
1849 /// Note The initial value is 0.
1850 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove and LowerBelow will override the sibling order.
1851 /// The values set by this Property will likely change.
1853 public int SiblingOrder
1858 GetProperty(View.Property.SIBLING_ORDER).Get(out temp);
1863 SetProperty(View.Property.SIBLING_ORDER, new Tizen.NUI.PropertyValue(value));
1867 [Obsolete("Please do not use! this will be internal property")]
1868 public Vector3 NaturalSize
1872 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
1873 if (NDalicPINVOKE.SWIGPendingException.Pending)
1874 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1883 /// This is an asynchronous method.
1894 /// This is an asynchronous method.
1895 /// If an view is hidden, then the view and its children will not be rendered.
1896 /// 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.
1903 internal void Raise()
1905 NDalicPINVOKE.Raise(swigCPtr);
1906 if (NDalicPINVOKE.SWIGPendingException.Pending)
1907 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1910 internal void Lower()
1912 NDalicPINVOKE.Lower(swigCPtr);
1913 if (NDalicPINVOKE.SWIGPendingException.Pending)
1914 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1918 /// Raise view above all other views.
1921 /// Sibling order of views within the parent will be updated automatically.
1922 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
1924 public void RaiseToTop()
1926 NDalicPINVOKE.RaiseToTop(swigCPtr);
1927 if (NDalicPINVOKE.SWIGPendingException.Pending)
1928 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1932 /// Lower view to the bottom of all views.
1935 /// Sibling order of views within the parent will be updated automatically.
1936 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
1938 public void LowerToBottom()
1940 NDalicPINVOKE.LowerToBottom(swigCPtr);
1941 if (NDalicPINVOKE.SWIGPendingException.Pending)
1942 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1946 /// Query if all resources required by a View are loaded and ready.
1948 /// <remarks>Most resources are only loaded when the control is placed on stage
1950 public bool IsResourceReady()
1952 bool ret = NDalicPINVOKE.IsResourceReady(swigCPtr);
1953 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1958 /// Raise the view to above the target view.
1960 /// <remarks>Sibling order of views within the parent will be updated automatically.
1961 /// Views on the level above the target view will still be shown above this view.
1962 /// Raising this view above views with the same sibling order as each other will raise this view above them.
1963 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
1965 /// <param name="target">Will be raised above this view</param>
1966 internal void RaiseAbove(View target)
1968 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
1969 if (NDalicPINVOKE.SWIGPendingException.Pending)
1970 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1974 /// Lower the view to below the target view.
1976 /// <remarks>Sibling order of views within the parent will be updated automatically.
1977 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
1978 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
1980 /// <param name="target">Will be lowered below this view</param>
1981 internal void LowerBelow(View target)
1983 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
1984 if (NDalicPINVOKE.SWIGPendingException.Pending)
1985 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1988 internal string GetName()
1990 string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);
1991 if (NDalicPINVOKE.SWIGPendingException.Pending)
1992 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1996 internal void SetName(string name)
1998 NDalicPINVOKE.Actor_SetName(swigCPtr, name);
1999 if (NDalicPINVOKE.SWIGPendingException.Pending)
2000 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2003 internal uint GetId()
2005 uint ret = NDalicPINVOKE.Actor_GetId(swigCPtr);
2006 if (NDalicPINVOKE.SWIGPendingException.Pending)
2007 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2011 internal bool IsRoot()
2013 bool ret = NDalicPINVOKE.Actor_IsRoot(swigCPtr);
2014 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2018 internal bool OnWindow()
2020 bool ret = NDalicPINVOKE.Actor_OnStage(swigCPtr);
2021 if (NDalicPINVOKE.SWIGPendingException.Pending)
2022 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2026 internal Layer GetLayer()
2028 Layer ret = new Layer(NDalicPINVOKE.Actor_GetLayer(swigCPtr), true);
2029 if (NDalicPINVOKE.SWIGPendingException.Pending)
2030 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2035 /// Adds a child view to this View.
2037 /// <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>
2038 /// <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>
2039 /// <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>
2040 /// <param name="child">The child</param>
2041 public void Add(View child)
2043 NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
2044 if (NDalicPINVOKE.SWIGPendingException.Pending)
2045 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2049 /// Removes a child View from this View. If the view was not a child of this view, this is a no-op.
2051 /// <pre>This View(the parent) has been initialized. The child view is not the same as the parent view.</pre>
2052 /// <param name="child">The child</param>
2053 public void Remove(View child)
2055 NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
2056 if (NDalicPINVOKE.SWIGPendingException.Pending)
2057 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2060 internal void Unparent()
2062 NDalicPINVOKE.Actor_Unparent(swigCPtr);
2063 if (NDalicPINVOKE.SWIGPendingException.Pending)
2064 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2068 /// Retrieves the number of children held by the view.
2070 /// <pre>The View has been initialized.</pre>
2071 /// <returns>The number of children</returns>
2072 internal uint GetChildCount()
2074 uint ret = NDalicPINVOKE.Actor_GetChildCount(swigCPtr);
2075 if (NDalicPINVOKE.SWIGPendingException.Pending)
2076 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2081 /// Retrieves child view by index.
2083 /// <pre>The View has been initialized.</pre>
2084 /// <param name="index">The index of the child to retrieve</param>
2085 /// <returns>The view for the given index or empty handle if children not initialized</returns>
2086 public View GetChildAt(uint index)
2088 IntPtr cPtr = NDalicPINVOKE.Actor_GetChildAt(swigCPtr, index);
2090 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2092 if (NDalicPINVOKE.SWIGPendingException.Pending)
2093 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2098 /// Search through this view's hierarchy for an view with the given name.
2099 /// The view itself is also considered in the search.
2101 /// <pre>The View has been initialized.</pre>
2102 /// <param name="viewName">The name of the view to find</param>
2103 /// <returns>A handle to the view if found, or an empty handle if not</returns>
2104 public View FindChildByName(string viewName)
2106 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
2108 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2110 if (NDalicPINVOKE.SWIGPendingException.Pending)
2111 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2115 internal View FindChildById(uint id)
2117 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
2119 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2121 if (NDalicPINVOKE.SWIGPendingException.Pending)
2122 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2126 internal View GetParent()
2128 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
2130 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2132 if (NDalicPINVOKE.SWIGPendingException.Pending)
2133 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2137 internal void SetParentOrigin(Vector3 origin)
2139 NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
2140 if (NDalicPINVOKE.SWIGPendingException.Pending)
2141 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2144 internal Vector3 GetCurrentParentOrigin()
2146 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentParentOrigin(swigCPtr), true);
2147 if (NDalicPINVOKE.SWIGPendingException.Pending)
2148 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2152 internal void SetAnchorPoint(Vector3 anchorPoint)
2154 NDalicPINVOKE.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
2155 if (NDalicPINVOKE.SWIGPendingException.Pending)
2156 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2159 internal Vector3 GetCurrentAnchorPoint()
2161 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentAnchorPoint(swigCPtr), true);
2162 if (NDalicPINVOKE.SWIGPendingException.Pending)
2163 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2167 internal void SetSize(float width, float height)
2169 NDalicPINVOKE.Actor_SetSize__SWIG_0(swigCPtr, width, height);
2170 if (NDalicPINVOKE.SWIGPendingException.Pending)
2171 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2174 internal void SetSize(float width, float height, float depth)
2176 NDalicPINVOKE.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
2177 if (NDalicPINVOKE.SWIGPendingException.Pending)
2178 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2181 internal void SetSize(Vector2 size)
2183 NDalicPINVOKE.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
2184 if (NDalicPINVOKE.SWIGPendingException.Pending)
2185 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2188 internal void SetSize(Vector3 size)
2190 NDalicPINVOKE.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
2191 if (NDalicPINVOKE.SWIGPendingException.Pending)
2192 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2195 internal Vector3 GetTargetSize()
2197 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetTargetSize(swigCPtr), true);
2198 if (NDalicPINVOKE.SWIGPendingException.Pending)
2199 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2203 internal Size2D GetCurrentSize()
2205 Size ret = new Size(NDalicPINVOKE.Actor_GetCurrentSize(swigCPtr), true);
2206 if (NDalicPINVOKE.SWIGPendingException.Pending)
2207 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2208 Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
2212 internal Vector3 GetNaturalSize()
2214 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2215 if (NDalicPINVOKE.SWIGPendingException.Pending)
2216 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2220 internal void SetPosition(float x, float y)
2222 NDalicPINVOKE.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
2223 if (NDalicPINVOKE.SWIGPendingException.Pending)
2224 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2227 internal void SetPosition(float x, float y, float z)
2229 NDalicPINVOKE.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
2230 if (NDalicPINVOKE.SWIGPendingException.Pending)
2231 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2234 internal void SetPosition(Vector3 position)
2236 NDalicPINVOKE.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
2237 if (NDalicPINVOKE.SWIGPendingException.Pending)
2238 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2241 internal void SetX(float x)
2243 NDalicPINVOKE.Actor_SetX(swigCPtr, x);
2244 if (NDalicPINVOKE.SWIGPendingException.Pending)
2245 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2248 internal void SetY(float y)
2250 NDalicPINVOKE.Actor_SetY(swigCPtr, y);
2251 if (NDalicPINVOKE.SWIGPendingException.Pending)
2252 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2255 internal void SetZ(float z)
2257 NDalicPINVOKE.Actor_SetZ(swigCPtr, z);
2258 if (NDalicPINVOKE.SWIGPendingException.Pending)
2259 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2262 internal void TranslateBy(Vector3 distance)
2264 NDalicPINVOKE.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
2265 if (NDalicPINVOKE.SWIGPendingException.Pending)
2266 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2269 internal Position GetCurrentPosition()
2271 Position ret = new Position(NDalicPINVOKE.Actor_GetCurrentPosition(swigCPtr), true);
2272 if (NDalicPINVOKE.SWIGPendingException.Pending)
2273 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2277 internal Vector3 GetCurrentWorldPosition()
2279 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldPosition(swigCPtr), true);
2280 if (NDalicPINVOKE.SWIGPendingException.Pending)
2281 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2285 internal void SetInheritPosition(bool inherit)
2287 NDalicPINVOKE.Actor_SetInheritPosition(swigCPtr, inherit);
2288 if (NDalicPINVOKE.SWIGPendingException.Pending)
2289 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2292 internal bool IsPositionInherited()
2294 bool ret = NDalicPINVOKE.Actor_IsPositionInherited(swigCPtr);
2295 if (NDalicPINVOKE.SWIGPendingException.Pending)
2296 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2300 internal void SetOrientation(Degree angle, Vector3 axis)
2302 NDalicPINVOKE.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2303 if (NDalicPINVOKE.SWIGPendingException.Pending)
2304 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2307 internal void SetOrientation(Radian angle, Vector3 axis)
2309 NDalicPINVOKE.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2310 if (NDalicPINVOKE.SWIGPendingException.Pending)
2311 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2314 internal void SetOrientation(Rotation orientation)
2316 NDalicPINVOKE.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
2317 if (NDalicPINVOKE.SWIGPendingException.Pending)
2318 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2321 internal void RotateBy(Degree angle, Vector3 axis)
2323 NDalicPINVOKE.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2324 if (NDalicPINVOKE.SWIGPendingException.Pending)
2325 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2328 internal void RotateBy(Radian angle, Vector3 axis)
2330 NDalicPINVOKE.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2331 if (NDalicPINVOKE.SWIGPendingException.Pending)
2332 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2335 internal void RotateBy(Rotation relativeRotation)
2337 NDalicPINVOKE.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
2338 if (NDalicPINVOKE.SWIGPendingException.Pending)
2339 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2342 internal Rotation GetCurrentOrientation()
2344 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentOrientation(swigCPtr), true);
2345 if (NDalicPINVOKE.SWIGPendingException.Pending)
2346 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2350 internal void SetInheritOrientation(bool inherit)
2352 NDalicPINVOKE.Actor_SetInheritOrientation(swigCPtr, inherit);
2353 if (NDalicPINVOKE.SWIGPendingException.Pending)
2354 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2357 internal bool IsOrientationInherited()
2359 bool ret = NDalicPINVOKE.Actor_IsOrientationInherited(swigCPtr);
2360 if (NDalicPINVOKE.SWIGPendingException.Pending)
2361 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2365 internal Rotation GetCurrentWorldOrientation()
2367 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentWorldOrientation(swigCPtr), true);
2368 if (NDalicPINVOKE.SWIGPendingException.Pending)
2369 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2373 internal void SetScale(float scale)
2375 NDalicPINVOKE.Actor_SetScale__SWIG_0(swigCPtr, scale);
2376 if (NDalicPINVOKE.SWIGPendingException.Pending)
2377 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2380 internal void SetScale(float scaleX, float scaleY, float scaleZ)
2382 NDalicPINVOKE.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
2383 if (NDalicPINVOKE.SWIGPendingException.Pending)
2384 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2387 internal void SetScale(Vector3 scale)
2389 NDalicPINVOKE.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
2390 if (NDalicPINVOKE.SWIGPendingException.Pending)
2391 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2394 internal void ScaleBy(Vector3 relativeScale)
2396 NDalicPINVOKE.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
2397 if (NDalicPINVOKE.SWIGPendingException.Pending)
2398 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2401 internal Vector3 GetCurrentScale()
2403 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentScale(swigCPtr), true);
2404 if (NDalicPINVOKE.SWIGPendingException.Pending)
2405 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2409 internal Vector3 GetCurrentWorldScale()
2411 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldScale(swigCPtr), true);
2412 if (NDalicPINVOKE.SWIGPendingException.Pending)
2413 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2417 internal void SetInheritScale(bool inherit)
2419 NDalicPINVOKE.Actor_SetInheritScale(swigCPtr, inherit);
2420 if (NDalicPINVOKE.SWIGPendingException.Pending)
2421 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2424 internal bool IsScaleInherited()
2426 bool ret = NDalicPINVOKE.Actor_IsScaleInherited(swigCPtr);
2427 if (NDalicPINVOKE.SWIGPendingException.Pending)
2428 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2432 internal Matrix GetCurrentWorldMatrix()
2434 Matrix ret = new Matrix(NDalicPINVOKE.Actor_GetCurrentWorldMatrix(swigCPtr), true);
2435 if (NDalicPINVOKE.SWIGPendingException.Pending)
2436 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2440 internal void SetVisible(bool visible)
2442 NDalicPINVOKE.Actor_SetVisible(swigCPtr, visible);
2443 if (NDalicPINVOKE.SWIGPendingException.Pending)
2444 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2447 internal bool IsVisible()
2449 bool ret = NDalicPINVOKE.Actor_IsVisible(swigCPtr);
2450 if (NDalicPINVOKE.SWIGPendingException.Pending)
2451 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2455 internal void SetOpacity(float opacity)
2457 NDalicPINVOKE.Actor_SetOpacity(swigCPtr, opacity);
2458 if (NDalicPINVOKE.SWIGPendingException.Pending)
2459 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2462 internal float GetCurrentOpacity()
2464 float ret = NDalicPINVOKE.Actor_GetCurrentOpacity(swigCPtr);
2465 if (NDalicPINVOKE.SWIGPendingException.Pending)
2466 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2470 internal void SetColor(Vector4 color)
2472 NDalicPINVOKE.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
2473 if (NDalicPINVOKE.SWIGPendingException.Pending)
2474 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2477 internal Vector4 GetCurrentColor()
2479 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentColor(swigCPtr), true);
2480 if (NDalicPINVOKE.SWIGPendingException.Pending)
2481 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2485 internal void SetColorMode(ColorMode colorMode)
2487 NDalicPINVOKE.Actor_SetColorMode(swigCPtr, (int)colorMode);
2488 if (NDalicPINVOKE.SWIGPendingException.Pending)
2489 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2492 internal ColorMode GetColorMode()
2494 ColorMode ret = (ColorMode)NDalicPINVOKE.Actor_GetColorMode(swigCPtr);
2495 if (NDalicPINVOKE.SWIGPendingException.Pending)
2496 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2500 internal Vector4 GetCurrentWorldColor()
2502 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentWorldColor(swigCPtr), true);
2503 if (NDalicPINVOKE.SWIGPendingException.Pending)
2504 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2508 internal void SetDrawMode(DrawModeType drawMode)
2510 NDalicPINVOKE.Actor_SetDrawMode(swigCPtr, (int)drawMode);
2511 if (NDalicPINVOKE.SWIGPendingException.Pending)
2512 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2515 internal DrawModeType GetDrawMode()
2517 DrawModeType ret = (DrawModeType)NDalicPINVOKE.Actor_GetDrawMode(swigCPtr);
2518 if (NDalicPINVOKE.SWIGPendingException.Pending)
2519 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2524 /// Converts screen coordinates into the view's coordinate system using the default camera.
2526 /// <pre>The View has been initialized.</pre>
2527 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5)</remarks>
2528 /// <param name="localX">On return, the X-coordinate relative to the view</param>
2529 /// <param name="localY">On return, the Y-coordinate relative to the view</param>
2530 /// <param name="screenX">The screen X-coordinate</param>
2531 /// <param name="screenY">The screen Y-coordinate</param>
2532 /// <returns>True if the conversion succeeded</returns>
2533 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
2535 bool ret = NDalicPINVOKE.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
2536 if (NDalicPINVOKE.SWIGPendingException.Pending)
2537 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2541 internal void SetKeyboardFocusable(bool focusable)
2543 NDalicPINVOKE.Actor_SetKeyboardFocusable(swigCPtr, focusable);
2544 if (NDalicPINVOKE.SWIGPendingException.Pending)
2545 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2548 internal bool IsKeyboardFocusable()
2550 bool ret = NDalicPINVOKE.Actor_IsKeyboardFocusable(swigCPtr);
2551 if (NDalicPINVOKE.SWIGPendingException.Pending)
2552 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2556 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
2558 NDalicPINVOKE.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
2559 if (NDalicPINVOKE.SWIGPendingException.Pending)
2560 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2563 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
2565 ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.Actor_GetResizePolicy(swigCPtr, (int)dimension);
2566 if (NDalicPINVOKE.SWIGPendingException.Pending)
2567 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2572 /// Sets the relative to parent size factor of the view.<br>
2573 /// This factor is only used when ResizePolicy is set to either:
2574 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br>
2575 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br>
2577 /// <pre>The View has been initialized.</pre>
2578 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis</param>
2579 public void SetSizeModeFactor(Vector3 factor)
2581 NDalicPINVOKE.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
2582 if (NDalicPINVOKE.SWIGPendingException.Pending)
2583 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2586 internal Vector3 GetSizeModeFactor()
2588 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetSizeModeFactor(swigCPtr), true);
2589 if (NDalicPINVOKE.SWIGPendingException.Pending)
2590 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2595 /// Calculates the height of the view given a width.<br>
2596 /// The natural size is used for default calculation. <br>
2597 /// size 0 is treated as aspect ratio 1:1.<br>
2599 /// <param name="width">Width to use</param>
2600 /// <returns>The height based on the width</returns>
2601 public float GetHeightForWidth(float width)
2603 float ret = NDalicPINVOKE.Actor_GetHeightForWidth(swigCPtr, width);
2604 if (NDalicPINVOKE.SWIGPendingException.Pending)
2605 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2610 /// Calculates the width of the view given a height.<br>
2611 /// The natural size is used for default calculation.<br>
2612 /// size 0 is treated as aspect ratio 1:1.<br>
2614 /// <param name="height">Height to use</param>
2615 /// <returns>The width based on the height</returns>
2616 public float GetWidthForHeight(float height)
2618 float ret = NDalicPINVOKE.Actor_GetWidthForHeight(swigCPtr, height);
2619 if (NDalicPINVOKE.SWIGPendingException.Pending)
2620 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2624 public float GetRelayoutSize(DimensionType dimension)
2626 float ret = NDalicPINVOKE.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
2627 if (NDalicPINVOKE.SWIGPendingException.Pending)
2628 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2632 public void SetPadding(PaddingType padding)
2634 NDalicPINVOKE.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
2635 if (NDalicPINVOKE.SWIGPendingException.Pending)
2636 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2639 public void GetPadding(PaddingType paddingOut)
2641 NDalicPINVOKE.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
2642 if (NDalicPINVOKE.SWIGPendingException.Pending)
2643 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2646 internal void SetMinimumSize(Vector2 size)
2648 NDalicPINVOKE.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
2649 if (NDalicPINVOKE.SWIGPendingException.Pending)
2650 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2653 internal Vector2 GetMinimumSize()
2655 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMinimumSize(swigCPtr), true);
2656 if (NDalicPINVOKE.SWIGPendingException.Pending)
2657 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2661 internal void SetMaximumSize(Vector2 size)
2663 NDalicPINVOKE.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
2664 if (NDalicPINVOKE.SWIGPendingException.Pending)
2665 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2668 internal Vector2 GetMaximumSize()
2670 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMaximumSize(swigCPtr), true);
2671 if (NDalicPINVOKE.SWIGPendingException.Pending)
2672 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2676 internal int GetHierarchyDepth()
2678 int ret = NDalicPINVOKE.Actor_GetHierarchyDepth(swigCPtr);
2679 if (NDalicPINVOKE.SWIGPendingException.Pending)
2680 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2684 public uint AddRenderer(Renderer renderer)
2686 uint ret = NDalicPINVOKE.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
2687 if (NDalicPINVOKE.SWIGPendingException.Pending)
2688 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2692 internal uint GetRendererCount()
2694 uint ret = NDalicPINVOKE.Actor_GetRendererCount(swigCPtr);
2695 if (NDalicPINVOKE.SWIGPendingException.Pending)
2696 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2700 public Renderer GetRendererAt(uint index)
2702 Renderer ret = new Renderer(NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index), true);
2703 if (NDalicPINVOKE.SWIGPendingException.Pending)
2704 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2708 public void RemoveRenderer(Renderer renderer)
2710 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
2711 if (NDalicPINVOKE.SWIGPendingException.Pending)
2712 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2715 public void RemoveRenderer(uint index)
2717 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
2718 if (NDalicPINVOKE.SWIGPendingException.Pending)
2719 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2722 internal TouchDataSignal TouchSignal()
2724 TouchDataSignal ret = new TouchDataSignal(NDalicPINVOKE.Actor_TouchSignal(swigCPtr), false);
2725 if (NDalicPINVOKE.SWIGPendingException.Pending)
2726 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2730 internal HoverSignal HoveredSignal()
2732 HoverSignal ret = new HoverSignal(NDalicPINVOKE.Actor_HoveredSignal(swigCPtr), false);
2733 if (NDalicPINVOKE.SWIGPendingException.Pending)
2734 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2738 internal WheelSignal WheelEventSignal()
2740 WheelSignal ret = new WheelSignal(NDalicPINVOKE.Actor_WheelEventSignal(swigCPtr), false);
2741 if (NDalicPINVOKE.SWIGPendingException.Pending)
2742 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2746 internal ViewSignal OnWindowSignal()
2748 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnStageSignal(swigCPtr), false);
2749 if (NDalicPINVOKE.SWIGPendingException.Pending)
2750 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2754 internal ViewSignal OffWindowSignal()
2756 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OffStageSignal(swigCPtr), false);
2757 if (NDalicPINVOKE.SWIGPendingException.Pending)
2758 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2762 internal ViewSignal OnRelayoutSignal()
2764 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnRelayoutSignal(swigCPtr), false);
2765 if (NDalicPINVOKE.SWIGPendingException.Pending)
2766 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2770 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view) {
2771 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
2772 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2776 internal ViewSignal ResourcesLoadedSignal()
2778 ViewSignal ret = new ViewSignal(NDalicPINVOKE.ResourceReadySignal(swigCPtr), false);
2779 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2784 /// Gets/Sets the origin of an view, within its parent's area.<br>
2785 /// 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>
2786 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br>
2787 /// An view's position is the distance between this origin, and the view's anchor-point.<br>
2789 /// <pre>The View has been initialized.</pre>
2790 public Position ParentOrigin
2794 Position temp = new Position(0.0f, 0.0f, 0.0f);
2795 GetProperty(View.Property.PARENT_ORIGIN).Get(temp);
2800 SetProperty(View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue(value));
2804 internal float ParentOriginX
2809 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
2814 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
2818 internal float ParentOriginY
2823 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
2828 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
2832 internal float ParentOriginZ
2837 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
2842 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
2847 /// Gets/Sets the anchor-point of an view.<br>
2848 /// 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>
2849 /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br>
2850 /// An view position is the distance between its parent-origin and this anchor-point.<br>
2851 /// An view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br>
2852 /// <pre>The View has been initialized.</pre>
2854 public Position PivotPoint
2858 Position temp = new Position(0.0f, 0.0f, 0.0f);
2859 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
2864 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
2868 internal float PivotPointX
2873 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
2878 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
2882 internal float PivotPointY
2887 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
2892 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
2896 internal float PivotPointZ
2901 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
2906 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
2911 /// Gets/Sets the size width of an view.
2913 public float SizeWidth
2918 GetProperty(View.Property.SIZE_WIDTH).Get(out temp);
2923 SetProperty(View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue(value));
2928 /// Gets/Sets the size height of an view.
2930 public float SizeHeight
2935 GetProperty(View.Property.SIZE_HEIGHT).Get(out temp);
2940 SetProperty(View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue(value));
2945 /// Gets/Sets the position of the View.<br>
2946 /// By default, sets the position vector between the parent origin and pivot point(default).<br>
2947 /// If Position inheritance if disabled, sets the world position.<br>
2949 public Position Position
2953 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
2954 GetProperty(View.Property.POSITION).Get(temp);
2959 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(value));
2964 /// Gets/Sets the position x of the View.
2966 public float PositionX
2971 GetProperty(View.Property.POSITION_X).Get(out temp);
2976 SetProperty(View.Property.POSITION_X, new Tizen.NUI.PropertyValue(value));
2981 /// Gets/Sets the position y of the View.
2983 public float PositionY
2988 GetProperty(View.Property.POSITION_Y).Get(out temp);
2993 SetProperty(View.Property.POSITION_Y, new Tizen.NUI.PropertyValue(value));
2998 /// Gets/Sets the position z of the View.
3000 public float PositionZ
3005 GetProperty(View.Property.POSITION_Z).Get(out temp);
3010 SetProperty(View.Property.POSITION_Z, new Tizen.NUI.PropertyValue(value));
3015 /// Gets/Sets the world position of the View.
3017 public Vector3 WorldPosition
3021 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3022 GetProperty(View.Property.WORLD_POSITION).Get(temp);
3027 internal float WorldPositionX
3032 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
3037 internal float WorldPositionY
3042 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
3047 internal float WorldPositionZ
3052 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
3058 /// Gets/Sets the orientation of the View.<br>
3059 /// An view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br>
3061 /// <remarks>This is an asynchronous method.</remarks>
3062 public Rotation Orientation
3066 Rotation temp = new Rotation();
3067 GetProperty(View.Property.ORIENTATION).Get(temp);
3072 SetProperty(View.Property.ORIENTATION, new Tizen.NUI.PropertyValue(value));
3077 /// Gets/Sets the world orientation of the View.<br>
3079 public Rotation WorldOrientation
3083 Rotation temp = new Rotation();
3084 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
3090 /// Gets/Sets the scale factor applied to an view.<br>
3092 public Vector3 Scale
3096 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3097 GetProperty(View.Property.SCALE).Get(temp);
3102 SetProperty(View.Property.SCALE, new Tizen.NUI.PropertyValue(value));
3107 /// Gets/Sets the scale x factor applied to an view.
3114 GetProperty(View.Property.SCALE_X).Get(out temp);
3119 SetProperty(View.Property.SCALE_X, new Tizen.NUI.PropertyValue(value));
3124 /// Gets/Sets the scale y factor applied to an view.
3131 GetProperty(View.Property.SCALE_Y).Get(out temp);
3136 SetProperty(View.Property.SCALE_Y, new Tizen.NUI.PropertyValue(value));
3141 /// Gets/Sets the scale z factor applied to an view.
3148 GetProperty(View.Property.SCALE_Z).Get(out temp);
3153 SetProperty(View.Property.SCALE_Z, new Tizen.NUI.PropertyValue(value));
3158 /// Gets the world scale of View.
3160 public Vector3 WorldScale
3164 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3165 GetProperty(View.Property.WORLD_SCALE).Get(temp);
3171 /// Retrieves the visibility flag of an view.
3174 /// If an view is not visible, then the view and its children will not be rendered.
3175 /// 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.
3182 GetProperty(View.Property.VISIBLE).Get(out temp);
3184 }/* only get is required : removed
3187 SetProperty(View.Property.VISIBLE, new Tizen.NUI.PropertyValue(value));
3192 /// Gets the view's world color.
3194 public Vector4 WorldColor
3198 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3199 GetProperty(View.Property.WORLD_COLOR).Get(temp);
3204 internal Matrix WorldMatrix
3208 Matrix temp = new Matrix();
3209 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
3215 /// Gets/Sets the View's name.
3222 GetProperty(View.Property.NAME).Get(out temp);
3227 SetProperty(View.Property.NAME, new Tizen.NUI.PropertyValue(value));
3232 /// Get the number of children held by the view.
3234 public uint ChildCount
3238 return GetChildCount();
3243 /// Gets the View's ID.
3255 /// Gets/Sets the status of whether an view should emit touch or hover signals.
3257 public bool Sensitive
3262 GetProperty(View.Property.SENSITIVE).Get(out temp);
3267 SetProperty(View.Property.SENSITIVE, new Tizen.NUI.PropertyValue(value));
3272 /// Gets/Sets the status of whether the view should receive a notification when touch or hover motion events leave the boundary of the view.
3274 public bool LeaveRequired
3279 GetProperty(View.Property.LEAVE_REQUIRED).Get(out temp);
3284 SetProperty(View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue(value));
3289 /// Gets/Sets the status of whether a child view inherits it's parent's orientation.
3291 public bool InheritOrientation
3296 GetProperty(View.Property.INHERIT_ORIENTATION).Get(out temp);
3301 SetProperty(View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue(value));
3306 /// Gets/Sets the status of whether a child view inherits it's parent's scale.
3308 public bool InheritScale
3313 GetProperty(View.Property.INHERIT_SCALE).Get(out temp);
3318 SetProperty(View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue(value));
3323 /// Gets/Sets the status of how the view and its children should be drawn.<br>
3324 /// Not all views are renderable, but DrawMode can be inherited from any view.<br>
3325 /// 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>
3326 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br>
3327 /// Overlay views are drawn in a separate pass, after all non-overlay views within the Layer.<br>
3328 /// For overlay views, the drawing order is with respect to tree levels of Views, and depth-testing will not be used.<br>
3330 public DrawModeType DrawMode
3335 if (GetProperty(View.Property.DRAW_MODE).Get(out temp) == false)
3337 NUILog.Error("DrawMode get error!");
3342 return DrawModeType.Normal;
3344 return DrawModeType.Overlay2D;
3346 return DrawModeType.Stencil;
3348 return DrawModeType.Normal;
3353 SetProperty(View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)value));
3358 /// Gets/Sets the relative to parent size factor of the view.<br>
3359 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br>
3360 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br>
3362 public Vector3 SizeModeFactor
3366 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3367 GetProperty(View.Property.SIZE_MODE_FACTOR).Get(temp);
3372 SetProperty(View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue(value));
3377 /// Gets/Sets the width resize policy to be used.
3379 public ResizePolicyType WidthResizePolicy
3384 if (GetProperty(View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
3386 NUILog.Error("WidthResizePolicy get error!");
3391 return ResizePolicyType.Fixed;
3392 case "USE_NATURAL_SIZE":
3393 return ResizePolicyType.UseNaturalSize;
3394 case "FILL_TO_PARENT":
3395 return ResizePolicyType.FillToParent;
3396 case "SIZE_RELATIVE_TO_PARENT":
3397 return ResizePolicyType.SizeRelativeToParent;
3398 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3399 return ResizePolicyType.SizeFixedOffsetFromParent;
3400 case "FIT_TO_CHILDREN":
3401 return ResizePolicyType.FitToChildren;
3402 case "DIMENSION_DEPENDENCY":
3403 return ResizePolicyType.DimensionDependency;
3404 case "USE_ASSIGNED_SIZE":
3405 return ResizePolicyType.UseAssignedSize;
3407 return ResizePolicyType.Fixed;
3412 SetProperty(View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3417 /// Gets/Sets the height resize policy to be used.
3419 public ResizePolicyType HeightResizePolicy
3424 if (GetProperty(View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
3426 NUILog.Error("HeightResizePolicy get error!");
3431 return ResizePolicyType.Fixed;
3432 case "USE_NATURAL_SIZE":
3433 return ResizePolicyType.UseNaturalSize;
3434 case "FILL_TO_PARENT":
3435 return ResizePolicyType.FillToParent;
3436 case "SIZE_RELATIVE_TO_PARENT":
3437 return ResizePolicyType.SizeRelativeToParent;
3438 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3439 return ResizePolicyType.SizeFixedOffsetFromParent;
3440 case "FIT_TO_CHILDREN":
3441 return ResizePolicyType.FitToChildren;
3442 case "DIMENSION_DEPENDENCY":
3443 return ResizePolicyType.DimensionDependency;
3444 case "USE_ASSIGNED_SIZE":
3445 return ResizePolicyType.UseAssignedSize;
3447 return ResizePolicyType.Fixed;
3452 SetProperty(View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3457 /// Gets/Sets the policy to use when setting size with size negotiation.<br>
3458 /// Defaults to SizeScalePolicyType.UseSizeSet.<br>
3460 public SizeScalePolicyType SizeScalePolicy
3465 if (GetProperty(View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
3467 NUILog.Error("SizeScalePolicy get error!");
3471 case "USE_SIZE_SET":
3472 return SizeScalePolicyType.UseSizeSet;
3473 case "FIT_WITH_ASPECT_RATIO":
3474 return SizeScalePolicyType.FitWithAspectRatio;
3475 case "FILL_WITH_ASPECT_RATIO":
3476 return SizeScalePolicyType.FillWithAspectRatio;
3478 return SizeScalePolicyType.UseSizeSet;
3483 string valueToString = "";
3486 case SizeScalePolicyType.UseSizeSet:
3488 valueToString = "USE_SIZE_SET";
3491 case SizeScalePolicyType.FitWithAspectRatio:
3493 valueToString = "FIT_WITH_ASPECT_RATIO";
3496 case SizeScalePolicyType.FillWithAspectRatio:
3498 valueToString = "FILL_WITH_ASPECT_RATIO";
3503 valueToString = "USE_SIZE_SET";
3507 SetProperty(View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
3512 /// Gets/Sets the status of whether the width size is dependent on height size.
3514 public bool WidthForHeight
3519 GetProperty(View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
3524 SetProperty(View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue(value));
3529 /// Gets/Sets the status of whether the height size is dependent on width size.
3531 public bool HeightForWidth
3536 GetProperty(View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
3541 SetProperty(View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue(value));
3546 /// Gets/Sets the padding for use in layout.
3548 public Vector4 Padding
3552 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3553 GetProperty(View.Property.PADDING).Get(temp);
3558 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
3563 /// Gets/Sets the minimum size an view can be assigned in size negotiation.
3565 public Size2D MinimumSize
3569 Size2D temp = new Size2D(0, 0);
3570 GetProperty(View.Property.MINIMUM_SIZE).Get(temp);
3575 SetProperty(View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3580 /// Gets/Sets the maximum size an view can be assigned in size negotiation.
3582 public Size2D MaximumSize
3586 Size2D temp = new Size2D(0, 0);
3587 GetProperty(View.Property.MAXIMUM_SIZE).Get(temp);
3592 SetProperty(View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3597 /// Gets/Sets whether a child view inherits it's parent's position.<br>
3598 /// Default is to inherit.<br>
3599 /// Switching this off means that using Position sets the view's world position, i.e. translates from the world origin(0,0,0) to the pivot point of the view.<br>
3601 public bool InheritPosition
3606 GetProperty(View.Property.INHERIT_POSITION).Get(out temp);
3611 SetProperty(View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue(value));
3616 /// Gets/Sets clipping behavior(mode) of it's children.
3618 public ClippingModeType ClippingMode
3623 if (GetProperty(View.Property.CLIPPING_MODE).Get(out temp) == false)
3625 NUILog.Error("ClippingMode get error!");
3630 return ClippingModeType.Disabled;
3631 case "CLIP_CHILDREN":
3632 return ClippingModeType.ClipChildren;
3634 return ClippingModeType.Disabled;
3639 SetProperty(View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)value));
3644 /// Get the number of renderers held by the view.
3646 public uint RendererCount
3650 return GetRendererCount();
3657 [Obsolete("Please do not use! this will be deprecated")]
3658 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> Touched
3662 if (_touchDataEventHandler == null)
3664 _touchDataCallback = OnTouch;
3665 this.TouchSignal().Connect(_touchDataCallback);
3668 _touchDataEventHandler += value;
3673 _touchDataEventHandler -= value;
3675 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
3677 this.TouchSignal().Disconnect(_touchDataCallback);
3683 [Obsolete("Please do not use! this will be deprecated")]
3684 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> Hovered
3688 if (_hoverEventHandler == null)
3690 _hoverEventCallback = OnHoverEvent;
3691 this.HoveredSignal().Connect(_hoverEventCallback);
3694 _hoverEventHandler += value;
3699 _hoverEventHandler -= value;
3701 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
3703 this.HoveredSignal().Disconnect(_hoverEventCallback);
3709 [Obsolete("Please do not use! this will be deprecated")]
3710 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelMoved
3714 if (_wheelEventHandler == null)
3716 _wheelEventCallback = OnWheelEvent;
3717 this.WheelEventSignal().Connect(_wheelEventCallback);
3720 _wheelEventHandler += value;
3725 _wheelEventHandler -= value;
3727 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
3729 this.WheelEventSignal().Disconnect(_wheelEventCallback);
3735 [Obsolete("Please do not use! this will be deprecated")]
3736 public Position AnchorPoint
3740 Position temp = new Position(0.0f, 0.0f, 0.0f);
3741 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
3746 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3750 [Obsolete("Please do not use! this will be deprecated")]
3755 Size temp = new Size(0.0f, 0.0f, 0.0f);
3756 GetProperty(View.Property.SIZE).Get(temp);
3761 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(value));
3765 [Obsolete("Please do not use! this will be deprecated")]
3766 public event EventHandler OnWindowEvent
3770 if (_onWindowEventHandler == null)
3772 _onWindowEventCallback = OnWindow;
3773 this.OnWindowSignal().Connect(_onWindowEventCallback);
3776 _onWindowEventHandler += value;
3781 _onWindowEventHandler -= value;
3783 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
3785 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
3790 [Obsolete("Please do not use! this will be deprecated")]
3791 public event EventHandler OffWindowEvent
3795 if (_offWindowEventHandler == null)
3797 _offWindowEventCallback = OffWindow;
3798 this.OffWindowSignal().Connect(_offWindowEventCallback);
3801 _offWindowEventHandler += value;
3806 _offWindowEventHandler -= value;
3808 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
3810 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
3815 [Obsolete("Please do not use! this will be deprecated")]
3816 public event EventHandler OnRelayoutEvent
3820 if (_onRelayoutEventHandler == null)
3822 _onRelayoutEventCallback = OnRelayout;
3823 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
3826 _onRelayoutEventHandler += value;
3831 _onRelayoutEventHandler -= value;
3833 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
3835 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);