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)
67 NDalicPINVOKE.delete_View(swigCPtr);
69 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
75 private EventHandler _keyInputFocusGainedEventHandler;
76 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
77 private delegate void KeyInputFocusGainedCallbackType(IntPtr control);
78 private KeyInputFocusGainedCallbackType _keyInputFocusGainedCallback;
81 /// Event for KeyInputFocusGained signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
82 /// KeyInputFocusGained signal is emitted when the control gets Key Input Focus.<br>
84 public event EventHandler FocusGained
88 if (_keyInputFocusGainedEventHandler == null)
90 _keyInputFocusGainedCallback = OnKeyInputFocusGained;
91 this.KeyInputFocusGainedSignal().Connect(_keyInputFocusGainedCallback);
94 _keyInputFocusGainedEventHandler += value;
99 _keyInputFocusGainedEventHandler -= value;
101 if (_keyInputFocusGainedEventHandler == null && KeyInputFocusGainedSignal().Empty() == false)
103 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
108 private void OnKeyInputFocusGained(IntPtr view)
110 if (_keyInputFocusGainedEventHandler != null)
112 _keyInputFocusGainedEventHandler(this, null);
117 private EventHandler _keyInputFocusLostEventHandler;
118 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
119 private delegate void KeyInputFocusLostCallbackType(IntPtr control);
120 private KeyInputFocusLostCallbackType _keyInputFocusLostCallback;
123 /// Event for KeyInputFocusLost signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
124 /// KeyInputFocusLost signal is emitted when the control loses Key Input Focus.<br>
126 public event EventHandler FocusLost
130 if (_keyInputFocusLostEventHandler == null)
132 _keyInputFocusLostCallback = OnKeyInputFocusLost;
133 this.KeyInputFocusLostSignal().Connect(_keyInputFocusLostCallback);
136 _keyInputFocusLostEventHandler += value;
141 _keyInputFocusLostEventHandler -= value;
143 if (_keyInputFocusLostEventHandler == null && KeyInputFocusLostSignal().Empty() == false)
145 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
150 private void OnKeyInputFocusLost(IntPtr view)
152 if (_keyInputFocusLostEventHandler != null)
154 _keyInputFocusLostEventHandler(this, null);
159 /// Event arguments that passed via KeyEvent signal.
161 public class KeyEventArgs : EventArgs
166 /// Key - is the key sent to the View.
181 private EventHandlerWithReturnType<object, KeyEventArgs, bool> _keyEventHandler;
182 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
183 private delegate bool KeyCallbackType(IntPtr control, IntPtr keyEvent);
184 private KeyCallbackType _keyCallback;
187 /// Event for KeyPressed signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
188 /// KeyPressed signal is emitted when key event is received.<br>
190 public event EventHandlerWithReturnType<object, KeyEventArgs, bool> KeyEvent
194 if (_keyEventHandler == null)
196 _keyCallback = OnKeyEvent;
197 this.KeyEventSignal().Connect(_keyCallback);
200 _keyEventHandler += value;
205 _keyEventHandler -= value;
207 if (_keyEventHandler == null && KeyEventSignal().Empty() == false)
209 this.KeyEventSignal().Disconnect(_keyCallback);
214 private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
216 KeyEventArgs e = new KeyEventArgs();
218 e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
220 if (_keyEventHandler != null)
222 return _keyEventHandler(this, e);
228 private EventHandler _onRelayoutEventHandler;
229 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
230 private delegate void OnRelayoutEventCallbackType(IntPtr control);
231 private OnRelayoutEventCallbackType _onRelayoutEventCallback;
234 /// Event for OnRelayout signal which can be used to subscribe/unsubscribe the event handler.<br>
235 /// OnRelayout signal is emitted after the size has been set on the view during relayout.<br>
237 public event EventHandler Relayout
241 if (_onRelayoutEventHandler == null)
243 _onRelayoutEventCallback = OnRelayout;
244 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
247 _onRelayoutEventHandler += value;
252 _onRelayoutEventHandler -= value;
254 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
256 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
262 // Callback for View OnRelayout signal
263 private void OnRelayout(IntPtr data)
265 if (_onRelayoutEventHandler != null)
267 _onRelayoutEventHandler(this, null);
272 /// Event arguments that passed via Touch signal.
274 public class TouchEventArgs : EventArgs
276 private Touch _touch;
279 /// Touch - contains the information of touch points
294 private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
295 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
296 private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
297 private TouchDataCallbackType _touchDataCallback;
300 /// Event for Touched signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
301 /// Touched signal is emitted when touch input is received.<br>
303 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
307 if (_touchDataEventHandler == null)
309 _touchDataCallback = OnTouch;
310 this.TouchSignal().Connect(_touchDataCallback);
313 _touchDataEventHandler += value;
318 _touchDataEventHandler -= value;
320 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
322 this.TouchSignal().Disconnect(_touchDataCallback);
328 // Callback for View TouchSignal
329 private bool OnTouch(IntPtr view, IntPtr touchData)
331 TouchEventArgs e = new TouchEventArgs();
333 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
335 if (_touchDataEventHandler != null)
337 return _touchDataEventHandler(this, e);
344 /// Event arguments that passed via Hover signal.
346 public class HoverEventArgs : EventArgs
348 private Hover _hover;
351 /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
366 private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
367 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
368 private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
369 private HoverEventCallbackType _hoverEventCallback;
372 /// Event for Hovered signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
373 /// Hovered signal is emitted when hover input is received.<br>
375 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
379 if (_hoverEventHandler == null)
381 _hoverEventCallback = OnHoverEvent;
382 this.HoveredSignal().Connect(_hoverEventCallback);
385 _hoverEventHandler += value;
390 _hoverEventHandler -= value;
392 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
394 this.HoveredSignal().Disconnect(_hoverEventCallback);
400 // Callback for View Hover signal
401 private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
403 HoverEventArgs e = new HoverEventArgs();
405 e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
407 if (_hoverEventHandler != null)
409 return _hoverEventHandler(this, e);
416 /// Event arguments that passed via Wheel signal.
418 public class WheelEventArgs : EventArgs
420 private Wheel _wheel;
423 /// WheelEvent - store a wheel rolling type : MOUSE_WHEEL or CUSTOM_WHEEL
438 private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
439 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
440 private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
441 private WheelEventCallbackType _wheelEventCallback;
444 /// Event for WheelMoved signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
445 /// WheelMoved signal is emitted when wheel event is received.<br>
447 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
451 if (_wheelEventHandler == null)
453 _wheelEventCallback = OnWheelEvent;
454 this.WheelEventSignal().Connect(_wheelEventCallback);
457 _wheelEventHandler += value;
462 _wheelEventHandler -= value;
464 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
466 this.WheelEventSignal().Disconnect(_wheelEventCallback);
472 // Callback for View Wheel signal
473 private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
475 WheelEventArgs e = new WheelEventArgs();
477 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
479 if (_wheelEventHandler != null)
481 return _wheelEventHandler(this, e);
487 private EventHandler _onWindowEventHandler;
488 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
489 private delegate void OnWindowEventCallbackType(IntPtr control);
490 private OnWindowEventCallbackType _onWindowEventCallback;
493 /// Event for OnWindow signal which can be used to subscribe/unsubscribe the event handler.<br>
494 /// OnWindow signal is emitted after the view has been connected to the Window.<br>
496 public event EventHandler AddedToWindow
500 if (_onWindowEventHandler == null)
502 _onWindowEventCallback = OnWindow;
503 this.OnWindowSignal().Connect(_onWindowEventCallback);
506 _onWindowEventHandler += value;
511 _onWindowEventHandler -= value;
513 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
515 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
520 // Callback for View OnWindow signal
521 private void OnWindow(IntPtr data)
523 if (_onWindowEventHandler != null)
525 _onWindowEventHandler(this, null);
530 private EventHandler _offWindowEventHandler;
531 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
532 private delegate void OffWindowEventCallbackType(IntPtr control);
533 private OffWindowEventCallbackType _offWindowEventCallback;
536 /// Event for OffWindow signal which can be used to subscribe/unsubscribe the event handler.<br>
537 /// OffWindow signal is emitted after the view has been disconnected from the Window.<br>
539 public event EventHandler RemovedFromWindow
543 if (_offWindowEventHandler == null)
545 _offWindowEventCallback = OffWindow;
546 this.OffWindowSignal().Connect(_offWindowEventCallback);
549 _offWindowEventHandler += value;
554 _offWindowEventHandler -= value;
556 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
558 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
563 // Callback for View OffWindow signal
564 private void OffWindow(IntPtr data)
566 if (_offWindowEventHandler != null)
568 _offWindowEventHandler(this, null);
573 /// Event arguments of visibility changed.
575 public class VisibilityChangedEventArgs : EventArgs
578 private bool _visibility;
579 private VisibilityChangeType _type;
582 /// The view, or child of view, whose visibility has changed.
597 /// Whether the view is now visible or not.
599 public bool Visibility
612 /// Whether the view's visible property has changed or a parent's.
614 public VisibilityChangeType Type
627 private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
628 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
629 private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
630 private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
633 /// Event for visibility change which can be used to subscribe/unsubscribe the event handler.<br>
634 /// This signal is emitted when the visible property of this or a parent view is changed.<br>
636 public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
640 if (_visibilityChangedEventHandler == null)
642 _visibilityChangedEventCallback = OnVisibilityChanged;
643 VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
646 _visibilityChangedEventHandler += value;
651 _visibilityChangedEventHandler -= value;
653 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
655 VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
660 // Callback for View visibility change signal
661 private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
663 VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
666 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
668 e.Visibility = visibility;
671 if (_visibilityChangedEventHandler != null)
673 _visibilityChangedEventHandler(this, e);
677 // Resource Ready Signal
679 private EventHandler _resourcesLoadedEventHandler;
680 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
681 private delegate void ResourcesLoadedCallbackType(IntPtr control);
682 private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
685 /// Event for ResourcesLoadedSignal signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
686 /// This signal is emitted after all resources required by a View are loaded and ready.<br>
688 public event EventHandler ResourcesLoaded
692 if (_resourcesLoadedEventHandler == null)
694 _ResourcesLoadedCallback = OnResourcesLoaded;
695 this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
698 _resourcesLoadedEventHandler += value;
703 _resourcesLoadedEventHandler -= value;
705 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
707 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
712 private void OnResourcesLoaded(IntPtr view)
714 if (_resourcesLoadedEventHandler != null)
716 _resourcesLoadedEventHandler(this, null);
720 internal IntPtr GetPtrfromView()
722 return (IntPtr)swigCPtr;
725 internal class Property
727 internal static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get();
728 internal static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get();
729 internal static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get();
730 internal static readonly int LEFT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
731 internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
732 internal static readonly int UP_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
733 internal static readonly int DOWN_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
734 internal static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get();
735 internal static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get();
736 internal static readonly int SIBLING_ORDER = NDalicManualPINVOKE.Actor_Property_SIBLING_ORDER_get();
737 internal static readonly int OPACITY = NDalicManualPINVOKE.Actor_Property_OPACITY_get();
738 internal static readonly int SCREEN_POSITION = NDalicManualPINVOKE.Actor_Property_SCREEN_POSITION_get();
739 internal static readonly int POSITION_USES_ANCHOR_POINT = NDalicManualPINVOKE.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
740 internal static readonly int PARENT_ORIGIN = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_get();
741 internal static readonly int PARENT_ORIGIN_X = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_X_get();
742 internal static readonly int PARENT_ORIGIN_Y = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Y_get();
743 internal static readonly int PARENT_ORIGIN_Z = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Z_get();
744 internal static readonly int ANCHOR_POINT = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_get();
745 internal static readonly int ANCHOR_POINT_X = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_X_get();
746 internal static readonly int ANCHOR_POINT_Y = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Y_get();
747 internal static readonly int ANCHOR_POINT_Z = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Z_get();
748 internal static readonly int SIZE = NDalicPINVOKE.Actor_Property_SIZE_get();
749 internal static readonly int SIZE_WIDTH = NDalicPINVOKE.Actor_Property_SIZE_WIDTH_get();
750 internal static readonly int SIZE_HEIGHT = NDalicPINVOKE.Actor_Property_SIZE_HEIGHT_get();
751 internal static readonly int SIZE_DEPTH = NDalicPINVOKE.Actor_Property_SIZE_DEPTH_get();
752 internal static readonly int POSITION = NDalicPINVOKE.Actor_Property_POSITION_get();
753 internal static readonly int POSITION_X = NDalicPINVOKE.Actor_Property_POSITION_X_get();
754 internal static readonly int POSITION_Y = NDalicPINVOKE.Actor_Property_POSITION_Y_get();
755 internal static readonly int POSITION_Z = NDalicPINVOKE.Actor_Property_POSITION_Z_get();
756 internal static readonly int WORLD_POSITION = NDalicPINVOKE.Actor_Property_WORLD_POSITION_get();
757 internal static readonly int WORLD_POSITION_X = NDalicPINVOKE.Actor_Property_WORLD_POSITION_X_get();
758 internal static readonly int WORLD_POSITION_Y = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Y_get();
759 internal static readonly int WORLD_POSITION_Z = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Z_get();
760 internal static readonly int ORIENTATION = NDalicPINVOKE.Actor_Property_ORIENTATION_get();
761 internal static readonly int WORLD_ORIENTATION = NDalicPINVOKE.Actor_Property_WORLD_ORIENTATION_get();
762 internal static readonly int SCALE = NDalicPINVOKE.Actor_Property_SCALE_get();
763 internal static readonly int SCALE_X = NDalicPINVOKE.Actor_Property_SCALE_X_get();
764 internal static readonly int SCALE_Y = NDalicPINVOKE.Actor_Property_SCALE_Y_get();
765 internal static readonly int SCALE_Z = NDalicPINVOKE.Actor_Property_SCALE_Z_get();
766 internal static readonly int WORLD_SCALE = NDalicPINVOKE.Actor_Property_WORLD_SCALE_get();
767 internal static readonly int VISIBLE = NDalicPINVOKE.Actor_Property_VISIBLE_get();
768 internal static readonly int WORLD_COLOR = NDalicPINVOKE.Actor_Property_WORLD_COLOR_get();
769 internal static readonly int WORLD_MATRIX = NDalicPINVOKE.Actor_Property_WORLD_MATRIX_get();
770 internal static readonly int NAME = NDalicPINVOKE.Actor_Property_NAME_get();
771 internal static readonly int SENSITIVE = NDalicPINVOKE.Actor_Property_SENSITIVE_get();
772 internal static readonly int LEAVE_REQUIRED = NDalicPINVOKE.Actor_Property_LEAVE_REQUIRED_get();
773 internal static readonly int INHERIT_ORIENTATION = NDalicPINVOKE.Actor_Property_INHERIT_ORIENTATION_get();
774 internal static readonly int INHERIT_SCALE = NDalicPINVOKE.Actor_Property_INHERIT_SCALE_get();
775 internal static readonly int DRAW_MODE = NDalicPINVOKE.Actor_Property_DRAW_MODE_get();
776 internal static readonly int SIZE_MODE_FACTOR = NDalicPINVOKE.Actor_Property_SIZE_MODE_FACTOR_get();
777 internal static readonly int WIDTH_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_WIDTH_RESIZE_POLICY_get();
778 internal static readonly int HEIGHT_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_HEIGHT_RESIZE_POLICY_get();
779 internal static readonly int SIZE_SCALE_POLICY = NDalicPINVOKE.Actor_Property_SIZE_SCALE_POLICY_get();
780 internal static readonly int WIDTH_FOR_HEIGHT = NDalicPINVOKE.Actor_Property_WIDTH_FOR_HEIGHT_get();
781 internal static readonly int HEIGHT_FOR_WIDTH = NDalicPINVOKE.Actor_Property_HEIGHT_FOR_WIDTH_get();
782 internal static readonly int PADDING = NDalicPINVOKE.Actor_Property_PADDING_get();
783 internal static readonly int MINIMUM_SIZE = NDalicPINVOKE.Actor_Property_MINIMUM_SIZE_get();
784 internal static readonly int MAXIMUM_SIZE = NDalicPINVOKE.Actor_Property_MAXIMUM_SIZE_get();
785 internal static readonly int INHERIT_POSITION = NDalicPINVOKE.Actor_Property_INHERIT_POSITION_get();
786 internal static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
790 /// Describes the direction to move the focus towards.
792 public enum FocusDirection
803 /// Creates a new instance of a View.
805 public View() : this(NDalicPINVOKE.View_New(), true)
807 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
810 internal View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true)
812 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
816 /// Downcasts a handle to View handle.<br>
817 /// If handle points to a View, the downcast produces valid handle.<br>
818 /// If not, the returned handle is left uninitialized.<br>
820 /// <param name="handle">Handle to an object</param>
821 /// <returns>A handle to a View or an uninitialized handle</returns>
822 [Obsolete("Please do not use! this will be deprecated, instead please us as keyword.")]
823 public new static View DownCast(BaseHandle handle)
825 View ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as View;
826 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
830 [Obsolete("Please do not use! this will be deprecated, instead please us as keyword.")]
831 public static T DownCast<T>(View view) where T : View
833 T ret = Registry.GetManagedBaseHandleFromNativePtr(view) as T;
841 private View ConvertIdToView(uint id)
847 view = Parent.FindChildById(id);
852 view = Window.Instance.GetRootLayer().FindChildById(id);
858 internal void SetKeyInputFocus()
860 NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
861 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
865 /// Quries whether the view has focus.
867 /// <returns>true if this view has focus</returns>
868 public bool HasFocus()
870 bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
871 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
875 internal void ClearKeyInputFocus()
877 NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
878 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
881 internal PinchGestureDetector GetPinchGestureDetector()
883 PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
884 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
888 internal PanGestureDetector GetPanGestureDetector()
890 PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
891 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
895 internal TapGestureDetector GetTapGestureDetector()
897 TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
898 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
902 internal LongPressGestureDetector GetLongPressGestureDetector()
904 LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
905 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
910 /// Sets the name of the style to be applied to the view.
912 /// <param name="styleName">A string matching a style described in a stylesheet</param>
913 public void SetStyleName(string styleName)
915 NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
916 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
920 /// Retrieves the name of the style to be applied to the view (if any).
922 /// <returns>A string matching a style, or an empty string</returns>
923 public string GetStyleName()
925 string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
926 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
930 internal void SetBackgroundColor(Vector4 color)
932 NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
933 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
936 internal Vector4 GetBackgroundColor()
938 Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
939 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
943 internal void SetBackgroundImage(Image image)
945 NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
946 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
950 /// Clears the background.
952 public void ClearBackground()
954 NDalicPINVOKE.View_ClearBackground(swigCPtr);
955 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
958 internal ControlKeySignal KeyEventSignal()
960 ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
961 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
965 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
967 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
968 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
972 internal KeyInputFocusSignal KeyInputFocusLostSignal()
974 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
975 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
979 internal View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
981 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
984 internal enum PropertyRange
986 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
987 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
988 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
992 /// styleName, type string.
994 public string StyleName
999 GetProperty(View.Property.STYLE_NAME).Get(out temp);
1004 SetProperty(View.Property.STYLE_NAME, new Tizen.NUI.PropertyValue(value));
1009 /// mutually exclusive with BACKGROUND_IMAGE & BACKGROUND, type Vector4.
1011 public Color BackgroundColor
1015 Color backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1017 Tizen.NUI.PropertyMap background = Background;
1019 background.Find(Visual.Property.Type)?.Get(out visualType);
1020 if (visualType == (int)Visual.Type.Color)
1022 background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor);
1025 return backgroundColor;
1029 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1034 /// Create an Animation to animate the background color visual. If there is no
1035 /// background visual, creates one with transparent black as it's mixColor.
1037 public Animation AnimateBackgroundColor( object destinationValue,
1040 AlphaFunction.BuiltinFunctions? alphaFunction = null,
1041 object initialValue = null)
1043 Tizen.NUI.PropertyMap background = Background;
1045 if( background.Empty() )
1047 // If there is no background yet, ensure there is a transparent
1049 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1050 background = Background;
1052 return AnimateColor( "background", destinationValue, startTime, endTime, alphaFunction, initialValue );
1056 /// Create an Animation to animate the mixColor of the named visual.
1058 public Animation AnimateColor( string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null )
1060 Animation animation = null;
1062 PropertyMap _animator = new PropertyMap();
1063 if( alphaFunction != null )
1065 _animator.Add("alphaFunction", new PropertyValue( AlphaFunction.BuiltinToPropertyKey(alphaFunction) ) );
1068 PropertyMap _timePeriod = new PropertyMap();
1069 _timePeriod.Add( "duration", new PropertyValue((endTime-startTime)/1000.0f) );
1070 _timePeriod.Add( "delay", new PropertyValue( startTime/1000.0f ) );
1071 _animator.Add( "timePeriod", new PropertyValue( _timePeriod ) );
1073 PropertyMap _transition = new PropertyMap();
1074 _transition.Add( "animator", new PropertyValue( _animator ) );
1075 _transition.Add( "target", new PropertyValue( targetVisual ) );
1076 _transition.Add( "property", new PropertyValue( "mixColor" ) );
1078 if( initialColor != null )
1080 PropertyValue initValue = PropertyValue.CreateFromObject( initialColor );
1081 _transition.Add( "initialValue", initValue );
1084 PropertyValue destValue = PropertyValue.CreateFromObject( destinationColor );
1085 _transition.Add( "targetValue", destValue );
1086 TransitionData _transitionData = new TransitionData( _transition );
1088 animation = new Animation( NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true );
1089 if (NDalicPINVOKE.SWIGPendingException.Pending)
1090 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1096 /// mutually exclusive with BACKGROUND_COLOR & BACKGROUND, type Map.
1098 public string BackgroundImage
1102 string backgroundImage = "";
1104 Tizen.NUI.PropertyMap background = Background;
1106 background.Find(Visual.Property.Type)?.Get(out visualType);
1107 if (visualType == (int)Visual.Type.Image)
1109 background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
1112 return backgroundImage;
1116 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1120 public Tizen.NUI.PropertyMap Background
1124 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1125 GetProperty( View.Property.BACKGROUND ).Get(temp);
1130 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1136 /// The current state of the view.
1143 if (GetProperty(View.Property.STATE).Get(out temp) == false)
1145 NUILog.Error("State get error!");
1151 return States.Normal;
1155 return States.Focused;
1159 return States.Disabled;
1163 return States.Normal;
1169 SetProperty(View.Property.STATE, new Tizen.NUI.PropertyValue((int)value));
1174 /// The current sub state of the view.
1176 public States SubState
1181 if (GetProperty(View.Property.SUB_STATE).Get(out temp) == false)
1183 NUILog.Error("subState get error!");
1188 return States.Normal;
1190 return States.Focused;
1192 return States.Disabled;
1194 return States.Normal;
1199 string valueToString = "";
1204 valueToString = "NORMAL";
1207 case States.Focused:
1209 valueToString = "FOCUSED";
1212 case States.Disabled:
1214 valueToString = "DISABLED";
1219 valueToString = "NORMAL";
1223 SetProperty(View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
1228 /// Displays a tooltip
1230 public Tizen.NUI.PropertyMap Tooltip
1234 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1235 GetProperty(View.Property.TOOLTIP).Get(temp);
1240 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1245 /// Displays a tooltip as Text
1247 public string TooltipText
1251 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1255 private int LeftFocusableViewId
1260 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
1265 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1269 private int RightFocusableViewId
1274 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
1279 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1283 private int UpFocusableViewId
1288 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
1293 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1297 private int DownFocusableViewId
1302 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
1307 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1312 /// Child Property of FlexContainer.<br>
1313 /// The proportion of the free space in the container the flex item will receive.<br>
1314 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br>
1321 GetProperty(FlexContainer.ChildProperty.FLEX).Get(out temp);
1326 SetProperty(FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue(value));
1331 /// Child Property of FlexContainer.<br>
1332 /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br>
1334 public int AlignSelf
1339 GetProperty(FlexContainer.ChildProperty.ALIGN_SELF).Get(out temp);
1344 SetProperty(FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue(value));
1349 /// Child Property of FlexContainer.<br>
1350 /// The space around the flex item.<br>
1352 public Vector4 FlexMargin
1356 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1357 GetProperty(FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
1362 SetProperty(FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue(value));
1367 /// The top-left cell this child occupies, if not set, the first available cell is used
1369 public Vector2 CellIndex
1373 Vector2 temp = new Vector2(0.0f, 0.0f);
1374 GetProperty(TableView.ChildProperty.CELL_INDEX).Get(temp);
1379 SetProperty(TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue(value));
1384 /// The number of rows this child occupies, if not set, default value is 1
1386 public float RowSpan
1391 GetProperty(TableView.ChildProperty.ROW_SPAN).Get(out temp);
1396 SetProperty(TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue(value));
1401 /// The number of columns this child occupies, if not set, default value is 1
1403 public float ColumnSpan
1408 GetProperty(TableView.ChildProperty.COLUMN_SPAN).Get(out temp);
1413 SetProperty(TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue(value));
1418 /// The horizontal alignment of this child inside the cells, if not set, default value is 'left'
1420 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
1425 if (GetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
1427 NUILog.Error("CellHorizontalAlignment get error!");
1433 return Tizen.NUI.HorizontalAlignmentType.Left;
1435 return Tizen.NUI.HorizontalAlignmentType.Center;
1437 return Tizen.NUI.HorizontalAlignmentType.Right;
1439 return Tizen.NUI.HorizontalAlignmentType.Left;
1444 string valueToString = "";
1447 case Tizen.NUI.HorizontalAlignmentType.Left:
1449 valueToString = "left";
1452 case Tizen.NUI.HorizontalAlignmentType.Center:
1454 valueToString = "center";
1457 case Tizen.NUI.HorizontalAlignmentType.Right:
1459 valueToString = "right";
1464 valueToString = "left";
1468 SetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1473 /// The vertical alignment of this child inside the cells, if not set, default value is 'top'
1475 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
1480 GetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
1482 NUILog.Error("CellVerticalAlignment get error!");
1488 return Tizen.NUI.VerticalAlignmentType.Top;
1490 return Tizen.NUI.VerticalAlignmentType.Center;
1492 return Tizen.NUI.VerticalAlignmentType.Bottom;
1494 return Tizen.NUI.VerticalAlignmentType.Top;
1499 string valueToString = "";
1502 case Tizen.NUI.VerticalAlignmentType.Top:
1504 valueToString = "top";
1507 case Tizen.NUI.VerticalAlignmentType.Center:
1509 valueToString = "center";
1512 case Tizen.NUI.VerticalAlignmentType.Bottom:
1514 valueToString = "bottom";
1519 valueToString = "top";
1523 SetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1528 /// The left focusable view.<br>
1529 /// This will return NULL if not set.<br>
1530 /// This will also return NULL if the specified left focusable view is not on Window.<br>
1532 public View LeftFocusableView
1534 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1537 if (LeftFocusableViewId >= 0)
1539 return ConvertIdToView((uint)LeftFocusableViewId);
1545 LeftFocusableViewId = (int)value.GetId();
1550 /// The right focusable view.<br>
1551 /// This will return NULL if not set.<br>
1552 /// This will also return NULL if the specified right focusable view is not on Window.<br>
1554 public View RightFocusableView
1556 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1559 if (RightFocusableViewId >= 0)
1561 return ConvertIdToView((uint)RightFocusableViewId);
1567 RightFocusableViewId = (int)value.GetId();
1572 /// The up focusable view.<br>
1573 /// This will return NULL if not set.<br>
1574 /// This will also return NULL if the specified up focusable view is not on Window.<br>
1576 public View UpFocusableView
1578 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1581 if (UpFocusableViewId >= 0)
1583 return ConvertIdToView((uint)UpFocusableViewId);
1589 UpFocusableViewId = (int)value.GetId();
1594 /// The down focusable view.<br>
1595 /// This will return NULL if not set.<br>
1596 /// This will also return NULL if the specified down focusable view is not on Window.<br>
1598 public View DownFocusableView
1600 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1603 if (DownFocusableViewId >= 0)
1605 return ConvertIdToView((uint)DownFocusableViewId);
1611 DownFocusableViewId = (int)value.GetId();
1616 /// whether the view should be focusable by keyboard navigation.
1618 public bool Focusable
1622 SetKeyboardFocusable(value);
1626 return IsKeyboardFocusable();
1631 /// Enumeration for describing the states of view.
1650 /// Retrieves the position of the View.<br>
1651 /// The coordinates are relative to the View's parent.<br>
1653 public Position CurrentPosition
1657 return GetCurrentPosition();
1662 /// Sets the size of an view for width and height.<br>
1663 /// Geometry can be scaled to fit within this area.<br>
1664 /// This does not interfere with the views scale factor.<br>
1665 /// The views default depth is the minimum of width & height.<br>
1667 public Size2D Size2D
1671 Size temp = new Size(0.0f, 0.0f, 0.0f);
1672 GetProperty(View.Property.SIZE).Get(temp);
1673 Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
1678 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(new Size(value)));
1683 /// Retrieves the size of the View.<br>
1684 /// The coordinates are relative to the View's parent.<br>
1686 public Size2D CurrentSize
1690 return GetCurrentSize();
1695 /// Retrieves the view's parent.<br>
1705 public bool Visibility
1714 /// Retrieves and sets the view's opacity.<br>
1716 public float Opacity
1721 GetProperty(View.Property.OPACITY).Get(out temp);
1726 SetProperty(View.Property.OPACITY, new Tizen.NUI.PropertyValue(value));
1731 /// Sets the position of the View for X and Y.<br>
1732 /// By default, sets the position vector between the parent origin and pivot point(default).<br>
1733 /// If Position inheritance if disabled, sets the world position.<br>
1735 public Position2D Position2D
1739 Position temp = new Position(0.0f, 0.0f, 0.0f);
1740 GetProperty(View.Property.POSITION).Get(temp);
1741 return new Position2D(temp);
1745 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(new Position(value)));
1750 /// Retrieves screen postion of view's.<br>
1752 public Vector2 ScreenPosition
1756 Vector2 temp = new Vector2(0.0f, 0.0f);
1757 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
1763 /// Determines whether the pivot point should be used to determine the position of the view.
1764 /// This is true by default.
1766 /// <remarks>If false, then the top-left of the view is used for the position.
1767 /// Setting this to false will allow scaling or rotation around the anchor-point without affecting the view's position.
1769 public bool PositionUsesPivotPoint
1774 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
1779 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
1783 [Obsolete("Please do not use! this will be deprecated")]
1784 public bool PositionUsesAnchorPoint
1789 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
1794 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
1798 internal bool FocusState
1802 return IsKeyboardFocusable();
1806 SetKeyboardFocusable(value);
1811 /// Queries whether the view is connected to the Stage.<br>
1812 /// When an view is connected, it will be directly or indirectly parented to the root View.<br>
1814 public bool IsOnWindow
1823 /// Gets depth in the hierarchy for the view.
1825 public int HierarchyDepth
1829 return GetHierarchyDepth();
1834 /// Sets the sibling order of the view so depth position can be defined within the same parent.
1837 /// Note The initial value is 0.
1838 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove and LowerBelow will override the sibling order.
1839 /// The values set by this Property will likely change.
1841 public int SiblingOrder
1846 GetProperty(View.Property.SIBLING_ORDER).Get(out temp);
1851 SetProperty(View.Property.SIBLING_ORDER, new Tizen.NUI.PropertyValue(value));
1855 [Obsolete("Please do not use! this will be internal property")]
1856 public Vector3 NaturalSize
1860 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
1861 if (NDalicPINVOKE.SWIGPendingException.Pending)
1862 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1871 /// This is an asynchronous method.
1882 /// This is an asynchronous method.
1883 /// If an view is hidden, then the view and its children will not be rendered.
1884 /// 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.
1891 internal void Raise()
1893 NDalicPINVOKE.Raise(swigCPtr);
1894 if (NDalicPINVOKE.SWIGPendingException.Pending)
1895 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1898 internal void Lower()
1900 NDalicPINVOKE.Lower(swigCPtr);
1901 if (NDalicPINVOKE.SWIGPendingException.Pending)
1902 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1906 /// Raise view above all other views.
1909 /// Sibling order of views within the parent will be updated automatically.
1910 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
1912 public void RaiseToTop()
1914 NDalicPINVOKE.RaiseToTop(swigCPtr);
1915 if (NDalicPINVOKE.SWIGPendingException.Pending)
1916 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1920 /// Lower view to the bottom of all views.
1923 /// Sibling order of views within the parent will be updated automatically.
1924 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
1926 public void LowerToBottom()
1928 NDalicPINVOKE.LowerToBottom(swigCPtr);
1929 if (NDalicPINVOKE.SWIGPendingException.Pending)
1930 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1934 /// Query if all resources required by a View are loaded and ready.
1936 /// <remarks>Most resources are only loaded when the control is placed on stage
1938 public bool IsResourceReady()
1940 bool ret = NDalicPINVOKE.IsResourceReady(swigCPtr);
1941 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1946 /// Raise the view to above the target view.
1948 /// <remarks>Sibling order of views within the parent will be updated automatically.
1949 /// Views on the level above the target view will still be shown above this view.
1950 /// Raising this view above views with the same sibling order as each other will raise this view above them.
1951 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
1953 /// <param name="target">Will be raised above this view</param>
1954 internal void RaiseAbove(View target)
1956 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
1957 if (NDalicPINVOKE.SWIGPendingException.Pending)
1958 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1962 /// Lower the view to below the target view.
1964 /// <remarks>Sibling order of views within the parent will be updated automatically.
1965 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
1966 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
1968 /// <param name="target">Will be lowered below this view</param>
1969 internal void LowerBelow(View target)
1971 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
1972 if (NDalicPINVOKE.SWIGPendingException.Pending)
1973 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1976 internal string GetName()
1978 string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);
1979 if (NDalicPINVOKE.SWIGPendingException.Pending)
1980 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1984 internal void SetName(string name)
1986 NDalicPINVOKE.Actor_SetName(swigCPtr, name);
1987 if (NDalicPINVOKE.SWIGPendingException.Pending)
1988 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1991 internal uint GetId()
1993 uint ret = NDalicPINVOKE.Actor_GetId(swigCPtr);
1994 if (NDalicPINVOKE.SWIGPendingException.Pending)
1995 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1999 internal bool IsRoot()
2001 bool ret = NDalicPINVOKE.Actor_IsRoot(swigCPtr);
2002 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2006 internal bool OnWindow()
2008 bool ret = NDalicPINVOKE.Actor_OnStage(swigCPtr);
2009 if (NDalicPINVOKE.SWIGPendingException.Pending)
2010 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2014 internal Layer GetLayer()
2016 IntPtr cPtr = NDalicPINVOKE.Actor_GetLayer(swigCPtr);
2017 Layer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Layer;
2019 if (NDalicPINVOKE.SWIGPendingException.Pending)
2020 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2025 /// Adds a child view to this View.
2027 /// <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>
2028 /// <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>
2029 /// <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>
2030 /// <param name="child">The child</param>
2031 public void Add(View child)
2033 NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
2034 if (NDalicPINVOKE.SWIGPendingException.Pending)
2035 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2039 /// Removes a child View from this View. If the view was not a child of this view, this is a no-op.
2041 /// <pre>This View(the parent) has been initialized. The child view is not the same as the parent view.</pre>
2042 /// <param name="child">The child</param>
2043 public void Remove(View child)
2045 NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
2046 if (NDalicPINVOKE.SWIGPendingException.Pending)
2047 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2051 /// Removes a View from its Parent View / Layer. If the View has no parent, this method does nothing.
2053 /// <pre>The (child) View has been initialized. </pre>
2054 public void Unparent()
2056 NDalicPINVOKE.Actor_Unparent(swigCPtr);
2057 if (NDalicPINVOKE.SWIGPendingException.Pending)
2058 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2062 /// Retrieves the number of children held by the view.
2064 /// <pre>The View has been initialized.</pre>
2065 /// <returns>The number of children</returns>
2066 internal uint GetChildCount()
2068 uint ret = NDalicPINVOKE.Actor_GetChildCount(swigCPtr);
2069 if (NDalicPINVOKE.SWIGPendingException.Pending)
2070 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2075 /// Retrieves child view by index.
2077 /// <pre>The View has been initialized.</pre>
2078 /// <param name="index">The index of the child to retrieve</param>
2079 /// <returns>The view for the given index or empty handle if children not initialized</returns>
2080 public View GetChildAt(uint index)
2082 IntPtr cPtr = NDalicPINVOKE.Actor_GetChildAt(swigCPtr, index);
2084 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2086 if (NDalicPINVOKE.SWIGPendingException.Pending)
2087 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2092 /// Search through this view's hierarchy for an view with the given name.
2093 /// The view itself is also considered in the search.
2095 /// <pre>The View has been initialized.</pre>
2096 /// <param name="viewName">The name of the view to find</param>
2097 /// <returns>A handle to the view if found, or an empty handle if not</returns>
2098 public View FindChildByName(string viewName)
2100 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
2102 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2104 if (NDalicPINVOKE.SWIGPendingException.Pending)
2105 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2109 internal View FindChildById(uint id)
2111 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
2113 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2115 if (NDalicPINVOKE.SWIGPendingException.Pending)
2116 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2120 internal View GetParent()
2123 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
2125 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(cPtr);
2127 if(basehandle is Layer)
2129 ret = new View(cPtr,false);
2133 ret = basehandle as View;
2136 if (NDalicPINVOKE.SWIGPendingException.Pending)
2137 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2141 internal void SetParentOrigin(Vector3 origin)
2143 NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
2144 if (NDalicPINVOKE.SWIGPendingException.Pending)
2145 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2148 internal Vector3 GetCurrentParentOrigin()
2150 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentParentOrigin(swigCPtr), true);
2151 if (NDalicPINVOKE.SWIGPendingException.Pending)
2152 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2156 internal void SetAnchorPoint(Vector3 anchorPoint)
2158 NDalicPINVOKE.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
2159 if (NDalicPINVOKE.SWIGPendingException.Pending)
2160 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2163 internal Vector3 GetCurrentAnchorPoint()
2165 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentAnchorPoint(swigCPtr), true);
2166 if (NDalicPINVOKE.SWIGPendingException.Pending)
2167 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2171 internal void SetSize(float width, float height)
2173 NDalicPINVOKE.Actor_SetSize__SWIG_0(swigCPtr, width, height);
2174 if (NDalicPINVOKE.SWIGPendingException.Pending)
2175 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2178 internal void SetSize(float width, float height, float depth)
2180 NDalicPINVOKE.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
2181 if (NDalicPINVOKE.SWIGPendingException.Pending)
2182 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2185 internal void SetSize(Vector2 size)
2187 NDalicPINVOKE.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
2188 if (NDalicPINVOKE.SWIGPendingException.Pending)
2189 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2192 internal void SetSize(Vector3 size)
2194 NDalicPINVOKE.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
2195 if (NDalicPINVOKE.SWIGPendingException.Pending)
2196 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2199 internal Vector3 GetTargetSize()
2201 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetTargetSize(swigCPtr), true);
2202 if (NDalicPINVOKE.SWIGPendingException.Pending)
2203 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2207 internal Size2D GetCurrentSize()
2209 Size ret = new Size(NDalicPINVOKE.Actor_GetCurrentSize(swigCPtr), true);
2210 if (NDalicPINVOKE.SWIGPendingException.Pending)
2211 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2212 Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
2216 internal Vector3 GetNaturalSize()
2218 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2219 if (NDalicPINVOKE.SWIGPendingException.Pending)
2220 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2224 internal void SetPosition(float x, float y)
2226 NDalicPINVOKE.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
2227 if (NDalicPINVOKE.SWIGPendingException.Pending)
2228 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2231 internal void SetPosition(float x, float y, float z)
2233 NDalicPINVOKE.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
2234 if (NDalicPINVOKE.SWIGPendingException.Pending)
2235 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2238 internal void SetPosition(Vector3 position)
2240 NDalicPINVOKE.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
2241 if (NDalicPINVOKE.SWIGPendingException.Pending)
2242 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2245 internal void SetX(float x)
2247 NDalicPINVOKE.Actor_SetX(swigCPtr, x);
2248 if (NDalicPINVOKE.SWIGPendingException.Pending)
2249 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2252 internal void SetY(float y)
2254 NDalicPINVOKE.Actor_SetY(swigCPtr, y);
2255 if (NDalicPINVOKE.SWIGPendingException.Pending)
2256 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2259 internal void SetZ(float z)
2261 NDalicPINVOKE.Actor_SetZ(swigCPtr, z);
2262 if (NDalicPINVOKE.SWIGPendingException.Pending)
2263 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2266 internal void TranslateBy(Vector3 distance)
2268 NDalicPINVOKE.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
2269 if (NDalicPINVOKE.SWIGPendingException.Pending)
2270 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2273 internal Position GetCurrentPosition()
2275 Position ret = new Position(NDalicPINVOKE.Actor_GetCurrentPosition(swigCPtr), true);
2276 if (NDalicPINVOKE.SWIGPendingException.Pending)
2277 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2281 internal Vector3 GetCurrentWorldPosition()
2283 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldPosition(swigCPtr), true);
2284 if (NDalicPINVOKE.SWIGPendingException.Pending)
2285 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2289 internal void SetInheritPosition(bool inherit)
2291 NDalicPINVOKE.Actor_SetInheritPosition(swigCPtr, inherit);
2292 if (NDalicPINVOKE.SWIGPendingException.Pending)
2293 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2296 internal bool IsPositionInherited()
2298 bool ret = NDalicPINVOKE.Actor_IsPositionInherited(swigCPtr);
2299 if (NDalicPINVOKE.SWIGPendingException.Pending)
2300 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2304 internal void SetOrientation(Degree angle, Vector3 axis)
2306 NDalicPINVOKE.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2307 if (NDalicPINVOKE.SWIGPendingException.Pending)
2308 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2311 internal void SetOrientation(Radian angle, Vector3 axis)
2313 NDalicPINVOKE.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2314 if (NDalicPINVOKE.SWIGPendingException.Pending)
2315 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2318 internal void SetOrientation(Rotation orientation)
2320 NDalicPINVOKE.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
2321 if (NDalicPINVOKE.SWIGPendingException.Pending)
2322 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2325 internal void RotateBy(Degree angle, Vector3 axis)
2327 NDalicPINVOKE.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2328 if (NDalicPINVOKE.SWIGPendingException.Pending)
2329 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2332 internal void RotateBy(Radian angle, Vector3 axis)
2334 NDalicPINVOKE.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2335 if (NDalicPINVOKE.SWIGPendingException.Pending)
2336 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2339 internal void RotateBy(Rotation relativeRotation)
2341 NDalicPINVOKE.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
2342 if (NDalicPINVOKE.SWIGPendingException.Pending)
2343 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2346 internal Rotation GetCurrentOrientation()
2348 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentOrientation(swigCPtr), true);
2349 if (NDalicPINVOKE.SWIGPendingException.Pending)
2350 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2354 internal void SetInheritOrientation(bool inherit)
2356 NDalicPINVOKE.Actor_SetInheritOrientation(swigCPtr, inherit);
2357 if (NDalicPINVOKE.SWIGPendingException.Pending)
2358 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2361 internal bool IsOrientationInherited()
2363 bool ret = NDalicPINVOKE.Actor_IsOrientationInherited(swigCPtr);
2364 if (NDalicPINVOKE.SWIGPendingException.Pending)
2365 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2369 internal Rotation GetCurrentWorldOrientation()
2371 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentWorldOrientation(swigCPtr), true);
2372 if (NDalicPINVOKE.SWIGPendingException.Pending)
2373 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2377 internal void SetScale(float scale)
2379 NDalicPINVOKE.Actor_SetScale__SWIG_0(swigCPtr, scale);
2380 if (NDalicPINVOKE.SWIGPendingException.Pending)
2381 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2384 internal void SetScale(float scaleX, float scaleY, float scaleZ)
2386 NDalicPINVOKE.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
2387 if (NDalicPINVOKE.SWIGPendingException.Pending)
2388 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2391 internal void SetScale(Vector3 scale)
2393 NDalicPINVOKE.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
2394 if (NDalicPINVOKE.SWIGPendingException.Pending)
2395 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2398 internal void ScaleBy(Vector3 relativeScale)
2400 NDalicPINVOKE.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
2401 if (NDalicPINVOKE.SWIGPendingException.Pending)
2402 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2405 internal Vector3 GetCurrentScale()
2407 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentScale(swigCPtr), true);
2408 if (NDalicPINVOKE.SWIGPendingException.Pending)
2409 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2413 internal Vector3 GetCurrentWorldScale()
2415 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldScale(swigCPtr), true);
2416 if (NDalicPINVOKE.SWIGPendingException.Pending)
2417 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2421 internal void SetInheritScale(bool inherit)
2423 NDalicPINVOKE.Actor_SetInheritScale(swigCPtr, inherit);
2424 if (NDalicPINVOKE.SWIGPendingException.Pending)
2425 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2428 internal bool IsScaleInherited()
2430 bool ret = NDalicPINVOKE.Actor_IsScaleInherited(swigCPtr);
2431 if (NDalicPINVOKE.SWIGPendingException.Pending)
2432 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2436 internal Matrix GetCurrentWorldMatrix()
2438 Matrix ret = new Matrix(NDalicPINVOKE.Actor_GetCurrentWorldMatrix(swigCPtr), true);
2439 if (NDalicPINVOKE.SWIGPendingException.Pending)
2440 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2444 internal void SetVisible(bool visible)
2446 NDalicPINVOKE.Actor_SetVisible(swigCPtr, visible);
2447 if (NDalicPINVOKE.SWIGPendingException.Pending)
2448 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2451 internal bool IsVisible()
2453 bool ret = NDalicPINVOKE.Actor_IsVisible(swigCPtr);
2454 if (NDalicPINVOKE.SWIGPendingException.Pending)
2455 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2459 internal void SetOpacity(float opacity)
2461 NDalicPINVOKE.Actor_SetOpacity(swigCPtr, opacity);
2462 if (NDalicPINVOKE.SWIGPendingException.Pending)
2463 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2466 internal float GetCurrentOpacity()
2468 float ret = NDalicPINVOKE.Actor_GetCurrentOpacity(swigCPtr);
2469 if (NDalicPINVOKE.SWIGPendingException.Pending)
2470 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2474 internal void SetColor(Vector4 color)
2476 NDalicPINVOKE.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
2477 if (NDalicPINVOKE.SWIGPendingException.Pending)
2478 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2481 internal Vector4 GetCurrentColor()
2483 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentColor(swigCPtr), true);
2484 if (NDalicPINVOKE.SWIGPendingException.Pending)
2485 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2489 internal void SetColorMode(ColorMode colorMode)
2491 NDalicPINVOKE.Actor_SetColorMode(swigCPtr, (int)colorMode);
2492 if (NDalicPINVOKE.SWIGPendingException.Pending)
2493 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2496 internal ColorMode GetColorMode()
2498 ColorMode ret = (ColorMode)NDalicPINVOKE.Actor_GetColorMode(swigCPtr);
2499 if (NDalicPINVOKE.SWIGPendingException.Pending)
2500 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2504 internal Vector4 GetCurrentWorldColor()
2506 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentWorldColor(swigCPtr), true);
2507 if (NDalicPINVOKE.SWIGPendingException.Pending)
2508 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2512 internal void SetDrawMode(DrawModeType drawMode)
2514 NDalicPINVOKE.Actor_SetDrawMode(swigCPtr, (int)drawMode);
2515 if (NDalicPINVOKE.SWIGPendingException.Pending)
2516 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2519 internal DrawModeType GetDrawMode()
2521 DrawModeType ret = (DrawModeType)NDalicPINVOKE.Actor_GetDrawMode(swigCPtr);
2522 if (NDalicPINVOKE.SWIGPendingException.Pending)
2523 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2528 /// Converts screen coordinates into the view's coordinate system using the default camera.
2530 /// <pre>The View has been initialized.</pre>
2531 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5)</remarks>
2532 /// <param name="localX">On return, the X-coordinate relative to the view</param>
2533 /// <param name="localY">On return, the Y-coordinate relative to the view</param>
2534 /// <param name="screenX">The screen X-coordinate</param>
2535 /// <param name="screenY">The screen Y-coordinate</param>
2536 /// <returns>True if the conversion succeeded</returns>
2537 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
2539 bool ret = NDalicPINVOKE.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
2540 if (NDalicPINVOKE.SWIGPendingException.Pending)
2541 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2545 internal void SetKeyboardFocusable(bool focusable)
2547 NDalicPINVOKE.Actor_SetKeyboardFocusable(swigCPtr, focusable);
2548 if (NDalicPINVOKE.SWIGPendingException.Pending)
2549 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2552 internal bool IsKeyboardFocusable()
2554 bool ret = NDalicPINVOKE.Actor_IsKeyboardFocusable(swigCPtr);
2555 if (NDalicPINVOKE.SWIGPendingException.Pending)
2556 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2560 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
2562 NDalicPINVOKE.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
2563 if (NDalicPINVOKE.SWIGPendingException.Pending)
2564 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2567 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
2569 ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.Actor_GetResizePolicy(swigCPtr, (int)dimension);
2570 if (NDalicPINVOKE.SWIGPendingException.Pending)
2571 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2576 /// Sets the relative to parent size factor of the view.<br>
2577 /// This factor is only used when ResizePolicy is set to either:
2578 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br>
2579 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br>
2581 /// <pre>The View has been initialized.</pre>
2582 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis</param>
2583 public void SetSizeModeFactor(Vector3 factor)
2585 NDalicPINVOKE.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
2586 if (NDalicPINVOKE.SWIGPendingException.Pending)
2587 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2590 internal Vector3 GetSizeModeFactor()
2592 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetSizeModeFactor(swigCPtr), true);
2593 if (NDalicPINVOKE.SWIGPendingException.Pending)
2594 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2599 /// Calculates the height of the view given a width.<br>
2600 /// The natural size is used for default calculation. <br>
2601 /// size 0 is treated as aspect ratio 1:1.<br>
2603 /// <param name="width">Width to use</param>
2604 /// <returns>The height based on the width</returns>
2605 public float GetHeightForWidth(float width)
2607 float ret = NDalicPINVOKE.Actor_GetHeightForWidth(swigCPtr, width);
2608 if (NDalicPINVOKE.SWIGPendingException.Pending)
2609 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2614 /// Calculates the width of the view given a height.<br>
2615 /// The natural size is used for default calculation.<br>
2616 /// size 0 is treated as aspect ratio 1:1.<br>
2618 /// <param name="height">Height to use</param>
2619 /// <returns>The width based on the height</returns>
2620 public float GetWidthForHeight(float height)
2622 float ret = NDalicPINVOKE.Actor_GetWidthForHeight(swigCPtr, height);
2623 if (NDalicPINVOKE.SWIGPendingException.Pending)
2624 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2628 public float GetRelayoutSize(DimensionType dimension)
2630 float ret = NDalicPINVOKE.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
2631 if (NDalicPINVOKE.SWIGPendingException.Pending)
2632 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2636 public void SetPadding(PaddingType padding)
2638 NDalicPINVOKE.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
2639 if (NDalicPINVOKE.SWIGPendingException.Pending)
2640 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2643 public void GetPadding(PaddingType paddingOut)
2645 NDalicPINVOKE.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
2646 if (NDalicPINVOKE.SWIGPendingException.Pending)
2647 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2650 internal void SetMinimumSize(Vector2 size)
2652 NDalicPINVOKE.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
2653 if (NDalicPINVOKE.SWIGPendingException.Pending)
2654 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2657 internal Vector2 GetMinimumSize()
2659 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMinimumSize(swigCPtr), true);
2660 if (NDalicPINVOKE.SWIGPendingException.Pending)
2661 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2665 internal void SetMaximumSize(Vector2 size)
2667 NDalicPINVOKE.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
2668 if (NDalicPINVOKE.SWIGPendingException.Pending)
2669 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2672 internal Vector2 GetMaximumSize()
2674 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMaximumSize(swigCPtr), true);
2675 if (NDalicPINVOKE.SWIGPendingException.Pending)
2676 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2680 internal int GetHierarchyDepth()
2682 int ret = NDalicPINVOKE.Actor_GetHierarchyDepth(swigCPtr);
2683 if (NDalicPINVOKE.SWIGPendingException.Pending)
2684 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2688 public uint AddRenderer(Renderer renderer)
2690 uint ret = NDalicPINVOKE.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
2691 if (NDalicPINVOKE.SWIGPendingException.Pending)
2692 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2696 internal uint GetRendererCount()
2698 uint ret = NDalicPINVOKE.Actor_GetRendererCount(swigCPtr);
2699 if (NDalicPINVOKE.SWIGPendingException.Pending)
2700 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2704 public Renderer GetRendererAt(uint index)
2706 IntPtr cPtr = NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index);
2707 Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Renderer;
2709 if (NDalicPINVOKE.SWIGPendingException.Pending)
2710 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2714 public void RemoveRenderer(Renderer renderer)
2716 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
2717 if (NDalicPINVOKE.SWIGPendingException.Pending)
2718 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2721 public void RemoveRenderer(uint index)
2723 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
2724 if (NDalicPINVOKE.SWIGPendingException.Pending)
2725 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2728 internal TouchDataSignal TouchSignal()
2730 TouchDataSignal ret = new TouchDataSignal(NDalicPINVOKE.Actor_TouchSignal(swigCPtr), false);
2731 if (NDalicPINVOKE.SWIGPendingException.Pending)
2732 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2736 internal HoverSignal HoveredSignal()
2738 HoverSignal ret = new HoverSignal(NDalicPINVOKE.Actor_HoveredSignal(swigCPtr), false);
2739 if (NDalicPINVOKE.SWIGPendingException.Pending)
2740 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2744 internal WheelSignal WheelEventSignal()
2746 WheelSignal ret = new WheelSignal(NDalicPINVOKE.Actor_WheelEventSignal(swigCPtr), false);
2747 if (NDalicPINVOKE.SWIGPendingException.Pending)
2748 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2752 internal ViewSignal OnWindowSignal()
2754 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnStageSignal(swigCPtr), false);
2755 if (NDalicPINVOKE.SWIGPendingException.Pending)
2756 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2760 internal ViewSignal OffWindowSignal()
2762 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OffStageSignal(swigCPtr), false);
2763 if (NDalicPINVOKE.SWIGPendingException.Pending)
2764 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2768 internal ViewSignal OnRelayoutSignal()
2770 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnRelayoutSignal(swigCPtr), false);
2771 if (NDalicPINVOKE.SWIGPendingException.Pending)
2772 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2776 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view) {
2777 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
2778 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2782 internal ViewSignal ResourcesLoadedSignal()
2784 ViewSignal ret = new ViewSignal(NDalicPINVOKE.ResourceReadySignal(swigCPtr), false);
2785 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2790 /// Gets/Sets the origin of an view, within its parent's area.<br>
2791 /// 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>
2792 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br>
2793 /// An view's position is the distance between this origin, and the view's anchor-point.<br>
2795 /// <pre>The View has been initialized.</pre>
2796 public Position ParentOrigin
2800 Position temp = new Position(0.0f, 0.0f, 0.0f);
2801 GetProperty(View.Property.PARENT_ORIGIN).Get(temp);
2806 SetProperty(View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue(value));
2810 internal float ParentOriginX
2815 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
2820 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
2824 internal float ParentOriginY
2829 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
2834 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
2838 internal float ParentOriginZ
2843 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
2848 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
2853 /// Gets/Sets the anchor-point of an view.<br>
2854 /// 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>
2855 /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br>
2856 /// An view position is the distance between its parent-origin and this anchor-point.<br>
2857 /// An view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br>
2858 /// <pre>The View has been initialized.</pre>
2860 public Position PivotPoint
2864 Position temp = new Position(0.0f, 0.0f, 0.0f);
2865 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
2870 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
2874 internal float PivotPointX
2879 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
2884 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
2888 internal float PivotPointY
2893 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
2898 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
2902 internal float PivotPointZ
2907 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
2912 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
2917 /// Gets/Sets the size width of an view.
2919 public float SizeWidth
2924 GetProperty(View.Property.SIZE_WIDTH).Get(out temp);
2929 SetProperty(View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue(value));
2934 /// Gets/Sets the size height of an view.
2936 public float SizeHeight
2941 GetProperty(View.Property.SIZE_HEIGHT).Get(out temp);
2946 SetProperty(View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue(value));
2951 /// Gets/Sets the position of the View.<br>
2952 /// By default, sets the position vector between the parent origin and pivot point(default).<br>
2953 /// If Position inheritance if disabled, sets the world position.<br>
2955 public Position Position
2959 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
2960 GetProperty(View.Property.POSITION).Get(temp);
2965 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(value));
2970 /// Gets/Sets the position x of the View.
2972 public float PositionX
2977 GetProperty(View.Property.POSITION_X).Get(out temp);
2982 SetProperty(View.Property.POSITION_X, new Tizen.NUI.PropertyValue(value));
2987 /// Gets/Sets the position y of the View.
2989 public float PositionY
2994 GetProperty(View.Property.POSITION_Y).Get(out temp);
2999 SetProperty(View.Property.POSITION_Y, new Tizen.NUI.PropertyValue(value));
3004 /// Gets/Sets the position z of the View.
3006 public float PositionZ
3011 GetProperty(View.Property.POSITION_Z).Get(out temp);
3016 SetProperty(View.Property.POSITION_Z, new Tizen.NUI.PropertyValue(value));
3021 /// Gets/Sets the world position of the View.
3023 public Vector3 WorldPosition
3027 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3028 GetProperty(View.Property.WORLD_POSITION).Get(temp);
3033 internal float WorldPositionX
3038 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
3043 internal float WorldPositionY
3048 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
3053 internal float WorldPositionZ
3058 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
3064 /// Gets/Sets the orientation of the View.<br>
3065 /// An view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br>
3067 /// <remarks>This is an asynchronous method.</remarks>
3068 public Rotation Orientation
3072 Rotation temp = new Rotation();
3073 GetProperty(View.Property.ORIENTATION).Get(temp);
3078 SetProperty(View.Property.ORIENTATION, new Tizen.NUI.PropertyValue(value));
3083 /// Gets/Sets the world orientation of the View.<br>
3085 public Rotation WorldOrientation
3089 Rotation temp = new Rotation();
3090 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
3096 /// Gets/Sets the scale factor applied to an view.<br>
3098 public Vector3 Scale
3102 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3103 GetProperty(View.Property.SCALE).Get(temp);
3108 SetProperty(View.Property.SCALE, new Tizen.NUI.PropertyValue(value));
3113 /// Gets/Sets the scale x factor applied to an view.
3120 GetProperty(View.Property.SCALE_X).Get(out temp);
3125 SetProperty(View.Property.SCALE_X, new Tizen.NUI.PropertyValue(value));
3130 /// Gets/Sets the scale y factor applied to an view.
3137 GetProperty(View.Property.SCALE_Y).Get(out temp);
3142 SetProperty(View.Property.SCALE_Y, new Tizen.NUI.PropertyValue(value));
3147 /// Gets/Sets the scale z factor applied to an view.
3154 GetProperty(View.Property.SCALE_Z).Get(out temp);
3159 SetProperty(View.Property.SCALE_Z, new Tizen.NUI.PropertyValue(value));
3164 /// Gets the world scale of View.
3166 public Vector3 WorldScale
3170 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3171 GetProperty(View.Property.WORLD_SCALE).Get(temp);
3177 /// Retrieves the visibility flag of an view.
3180 /// If an view is not visible, then the view and its children will not be rendered.
3181 /// 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.
3188 GetProperty(View.Property.VISIBLE).Get(out temp);
3190 }/* only get is required : removed
3193 SetProperty(View.Property.VISIBLE, new Tizen.NUI.PropertyValue(value));
3198 /// Gets the view's world color.
3200 public Vector4 WorldColor
3204 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3205 GetProperty(View.Property.WORLD_COLOR).Get(temp);
3210 internal Matrix WorldMatrix
3214 Matrix temp = new Matrix();
3215 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
3221 /// Gets/Sets the View's name.
3228 GetProperty(View.Property.NAME).Get(out temp);
3233 SetProperty(View.Property.NAME, new Tizen.NUI.PropertyValue(value));
3238 /// Get the number of children held by the view.
3240 public uint ChildCount
3244 return GetChildCount();
3249 /// Gets the View's ID.
3261 /// Gets/Sets the status of whether an view should emit touch or hover signals.
3263 public bool Sensitive
3268 GetProperty(View.Property.SENSITIVE).Get(out temp);
3273 SetProperty(View.Property.SENSITIVE, new Tizen.NUI.PropertyValue(value));
3278 /// Gets/Sets the status of whether the view should receive a notification when touch or hover motion events leave the boundary of the view.
3280 public bool LeaveRequired
3285 GetProperty(View.Property.LEAVE_REQUIRED).Get(out temp);
3290 SetProperty(View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue(value));
3295 /// Gets/Sets the status of whether a child view inherits it's parent's orientation.
3297 public bool InheritOrientation
3302 GetProperty(View.Property.INHERIT_ORIENTATION).Get(out temp);
3307 SetProperty(View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue(value));
3312 /// Gets/Sets the status of whether a child view inherits it's parent's scale.
3314 public bool InheritScale
3319 GetProperty(View.Property.INHERIT_SCALE).Get(out temp);
3324 SetProperty(View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue(value));
3329 /// Gets/Sets the status of how the view and its children should be drawn.<br>
3330 /// Not all views are renderable, but DrawMode can be inherited from any view.<br>
3331 /// 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>
3332 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br>
3333 /// Overlay views are drawn in a separate pass, after all non-overlay views within the Layer.<br>
3334 /// For overlay views, the drawing order is with respect to tree levels of Views, and depth-testing will not be used.<br>
3336 public DrawModeType DrawMode
3341 if (GetProperty(View.Property.DRAW_MODE).Get(out temp) == false)
3343 NUILog.Error("DrawMode get error!");
3348 return DrawModeType.Normal;
3350 return DrawModeType.Overlay2D;
3352 return DrawModeType.Stencil;
3354 return DrawModeType.Normal;
3359 SetProperty(View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)value));
3364 /// Gets/Sets the relative to parent size factor of the view.<br>
3365 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br>
3366 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br>
3368 public Vector3 SizeModeFactor
3372 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3373 GetProperty(View.Property.SIZE_MODE_FACTOR).Get(temp);
3378 SetProperty(View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue(value));
3383 /// Gets/Sets the width resize policy to be used.
3385 public ResizePolicyType WidthResizePolicy
3390 if (GetProperty(View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
3392 NUILog.Error("WidthResizePolicy get error!");
3397 return ResizePolicyType.Fixed;
3398 case "USE_NATURAL_SIZE":
3399 return ResizePolicyType.UseNaturalSize;
3400 case "FILL_TO_PARENT":
3401 return ResizePolicyType.FillToParent;
3402 case "SIZE_RELATIVE_TO_PARENT":
3403 return ResizePolicyType.SizeRelativeToParent;
3404 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3405 return ResizePolicyType.SizeFixedOffsetFromParent;
3406 case "FIT_TO_CHILDREN":
3407 return ResizePolicyType.FitToChildren;
3408 case "DIMENSION_DEPENDENCY":
3409 return ResizePolicyType.DimensionDependency;
3410 case "USE_ASSIGNED_SIZE":
3411 return ResizePolicyType.UseAssignedSize;
3413 return ResizePolicyType.Fixed;
3418 SetProperty(View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3423 /// Gets/Sets the height resize policy to be used.
3425 public ResizePolicyType HeightResizePolicy
3430 if (GetProperty(View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
3432 NUILog.Error("HeightResizePolicy get error!");
3437 return ResizePolicyType.Fixed;
3438 case "USE_NATURAL_SIZE":
3439 return ResizePolicyType.UseNaturalSize;
3440 case "FILL_TO_PARENT":
3441 return ResizePolicyType.FillToParent;
3442 case "SIZE_RELATIVE_TO_PARENT":
3443 return ResizePolicyType.SizeRelativeToParent;
3444 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3445 return ResizePolicyType.SizeFixedOffsetFromParent;
3446 case "FIT_TO_CHILDREN":
3447 return ResizePolicyType.FitToChildren;
3448 case "DIMENSION_DEPENDENCY":
3449 return ResizePolicyType.DimensionDependency;
3450 case "USE_ASSIGNED_SIZE":
3451 return ResizePolicyType.UseAssignedSize;
3453 return ResizePolicyType.Fixed;
3458 SetProperty(View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3463 /// Gets/Sets the policy to use when setting size with size negotiation.<br>
3464 /// Defaults to SizeScalePolicyType.UseSizeSet.<br>
3466 public SizeScalePolicyType SizeScalePolicy
3471 if (GetProperty(View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
3473 NUILog.Error("SizeScalePolicy get error!");
3477 case "USE_SIZE_SET":
3478 return SizeScalePolicyType.UseSizeSet;
3479 case "FIT_WITH_ASPECT_RATIO":
3480 return SizeScalePolicyType.FitWithAspectRatio;
3481 case "FILL_WITH_ASPECT_RATIO":
3482 return SizeScalePolicyType.FillWithAspectRatio;
3484 return SizeScalePolicyType.UseSizeSet;
3489 string valueToString = "";
3492 case SizeScalePolicyType.UseSizeSet:
3494 valueToString = "USE_SIZE_SET";
3497 case SizeScalePolicyType.FitWithAspectRatio:
3499 valueToString = "FIT_WITH_ASPECT_RATIO";
3502 case SizeScalePolicyType.FillWithAspectRatio:
3504 valueToString = "FILL_WITH_ASPECT_RATIO";
3509 valueToString = "USE_SIZE_SET";
3513 SetProperty(View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
3518 /// Gets/Sets the status of whether the width size is dependent on height size.
3520 public bool WidthForHeight
3525 GetProperty(View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
3530 SetProperty(View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue(value));
3535 /// Gets/Sets the status of whether the height size is dependent on width size.
3537 public bool HeightForWidth
3542 GetProperty(View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
3547 SetProperty(View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue(value));
3552 /// Gets/Sets the padding for use in layout.
3554 public Vector4 Padding
3558 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3559 GetProperty(View.Property.PADDING).Get(temp);
3564 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
3569 /// Gets/Sets the minimum size an view can be assigned in size negotiation.
3571 public Size2D MinimumSize
3575 Size2D temp = new Size2D(0, 0);
3576 GetProperty(View.Property.MINIMUM_SIZE).Get(temp);
3581 SetProperty(View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3586 /// Gets/Sets the maximum size an view can be assigned in size negotiation.
3588 public Size2D MaximumSize
3592 Size2D temp = new Size2D(0, 0);
3593 GetProperty(View.Property.MAXIMUM_SIZE).Get(temp);
3598 SetProperty(View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3603 /// Gets/Sets whether a child view inherits it's parent's position.<br>
3604 /// Default is to inherit.<br>
3605 /// 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>
3607 public bool InheritPosition
3612 GetProperty(View.Property.INHERIT_POSITION).Get(out temp);
3617 SetProperty(View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue(value));
3622 /// Gets/Sets clipping behavior(mode) of it's children.
3624 public ClippingModeType ClippingMode
3629 if (GetProperty(View.Property.CLIPPING_MODE).Get(out temp) == false)
3631 NUILog.Error("ClippingMode get error!");
3636 return ClippingModeType.Disabled;
3637 case "CLIP_CHILDREN":
3638 return ClippingModeType.ClipChildren;
3640 return ClippingModeType.Disabled;
3645 SetProperty(View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)value));
3650 /// Get the number of renderers held by the view.
3652 public uint RendererCount
3656 return GetRendererCount();
3663 [Obsolete("Please do not use! this will be deprecated")]
3664 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> Touched
3668 if (_touchDataEventHandler == null)
3670 _touchDataCallback = OnTouch;
3671 this.TouchSignal().Connect(_touchDataCallback);
3674 _touchDataEventHandler += value;
3679 _touchDataEventHandler -= value;
3681 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
3683 this.TouchSignal().Disconnect(_touchDataCallback);
3689 [Obsolete("Please do not use! this will be deprecated")]
3690 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> Hovered
3694 if (_hoverEventHandler == null)
3696 _hoverEventCallback = OnHoverEvent;
3697 this.HoveredSignal().Connect(_hoverEventCallback);
3700 _hoverEventHandler += value;
3705 _hoverEventHandler -= value;
3707 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
3709 this.HoveredSignal().Disconnect(_hoverEventCallback);
3715 [Obsolete("Please do not use! this will be deprecated")]
3716 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelMoved
3720 if (_wheelEventHandler == null)
3722 _wheelEventCallback = OnWheelEvent;
3723 this.WheelEventSignal().Connect(_wheelEventCallback);
3726 _wheelEventHandler += value;
3731 _wheelEventHandler -= value;
3733 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
3735 this.WheelEventSignal().Disconnect(_wheelEventCallback);
3741 [Obsolete("Please do not use! this will be deprecated")]
3742 public Position AnchorPoint
3746 Position temp = new Position(0.0f, 0.0f, 0.0f);
3747 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
3752 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3756 [Obsolete("Please do not use! this will be deprecated")]
3761 Size temp = new Size(0.0f, 0.0f, 0.0f);
3762 GetProperty(View.Property.SIZE).Get(temp);
3767 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(value));
3771 [Obsolete("Please do not use! this will be deprecated")]
3772 public event EventHandler OnWindowEvent
3776 if (_onWindowEventHandler == null)
3778 _onWindowEventCallback = OnWindow;
3779 this.OnWindowSignal().Connect(_onWindowEventCallback);
3782 _onWindowEventHandler += value;
3787 _onWindowEventHandler -= value;
3789 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
3791 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
3796 [Obsolete("Please do not use! this will be deprecated")]
3797 public event EventHandler OffWindowEvent
3801 if (_offWindowEventHandler == null)
3803 _offWindowEventCallback = OffWindow;
3804 this.OffWindowSignal().Connect(_offWindowEventCallback);
3807 _offWindowEventHandler += value;
3812 _offWindowEventHandler -= value;
3814 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
3816 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
3821 [Obsolete("Please do not use! this will be deprecated")]
3822 public event EventHandler OnRelayoutEvent
3826 if (_onRelayoutEventHandler == null)
3828 _onRelayoutEventCallback = OnRelayout;
3829 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
3832 _onRelayoutEventHandler += value;
3837 _onRelayoutEventHandler -= value;
3839 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
3841 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);