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();
222 e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
224 if (_keyEventHandler != null)
226 return _keyEventHandler(this, e);
232 private EventHandler _onRelayoutEventHandler;
233 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
234 private delegate void OnRelayoutEventCallbackType(IntPtr control);
235 private OnRelayoutEventCallbackType _onRelayoutEventCallback;
238 /// Event for OnRelayout signal which can be used to subscribe/unsubscribe the event handler.<br>
239 /// OnRelayout signal is emitted after the size has been set on the view during relayout.<br>
241 public event EventHandler Relayout
245 if (_onRelayoutEventHandler == null)
247 _onRelayoutEventCallback = OnRelayout;
248 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
251 _onRelayoutEventHandler += value;
256 _onRelayoutEventHandler -= value;
258 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
260 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
266 // Callback for View OnRelayout signal
267 private void OnRelayout(IntPtr data)
269 if (_onRelayoutEventHandler != null)
271 _onRelayoutEventHandler(this, null);
276 /// Event arguments that passed via Touch signal.
278 public class TouchEventArgs : EventArgs
280 private Touch _touch;
283 /// Touch - contains the information of touch points
298 private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
299 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
300 private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
301 private TouchDataCallbackType _touchDataCallback;
304 /// Event for Touched signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
305 /// Touched signal is emitted when touch input is received.<br>
307 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
311 if (_touchDataEventHandler == null)
313 _touchDataCallback = OnTouch;
314 this.TouchSignal().Connect(_touchDataCallback);
317 _touchDataEventHandler += value;
322 _touchDataEventHandler -= value;
324 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
326 this.TouchSignal().Disconnect(_touchDataCallback);
332 // Callback for View TouchSignal
333 private bool OnTouch(IntPtr view, IntPtr touchData)
335 TouchEventArgs e = new TouchEventArgs();
337 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
339 if (_touchDataEventHandler != null)
341 return _touchDataEventHandler(this, e);
348 /// Event arguments that passed via Hover signal.
350 public class HoverEventArgs : EventArgs
352 private Hover _hover;
355 /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
370 private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
371 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
372 private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
373 private HoverEventCallbackType _hoverEventCallback;
376 /// Event for Hovered signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
377 /// Hovered signal is emitted when hover input is received.<br>
379 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
383 if (_hoverEventHandler == null)
385 _hoverEventCallback = OnHoverEvent;
386 this.HoveredSignal().Connect(_hoverEventCallback);
389 _hoverEventHandler += value;
394 _hoverEventHandler -= value;
396 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
398 this.HoveredSignal().Disconnect(_hoverEventCallback);
404 // Callback for View Hover signal
405 private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
407 HoverEventArgs e = new HoverEventArgs();
409 e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
411 if (_hoverEventHandler != null)
413 return _hoverEventHandler(this, e);
420 /// Event arguments that passed via Wheel signal.
422 public class WheelEventArgs : EventArgs
424 private Wheel _wheel;
427 /// WheelEvent - store a wheel rolling type : MOUSE_WHEEL or CUSTOM_WHEEL
442 private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
443 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
444 private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
445 private WheelEventCallbackType _wheelEventCallback;
448 /// Event for WheelMoved signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
449 /// WheelMoved signal is emitted when wheel event is received.<br>
451 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
455 if (_wheelEventHandler == null)
457 _wheelEventCallback = OnWheelEvent;
458 this.WheelEventSignal().Connect(_wheelEventCallback);
461 _wheelEventHandler += value;
466 _wheelEventHandler -= value;
468 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
470 this.WheelEventSignal().Disconnect(_wheelEventCallback);
476 // Callback for View Wheel signal
477 private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
479 WheelEventArgs e = new WheelEventArgs();
481 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
483 if (_wheelEventHandler != null)
485 return _wheelEventHandler(this, e);
491 private EventHandler _onWindowEventHandler;
492 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
493 private delegate void OnWindowEventCallbackType(IntPtr control);
494 private OnWindowEventCallbackType _onWindowEventCallback;
497 /// Event for OnWindow signal which can be used to subscribe/unsubscribe the event handler.<br>
498 /// OnWindow signal is emitted after the view has been connected to the Window.<br>
500 public event EventHandler AddedToWindow
504 if (_onWindowEventHandler == null)
506 _onWindowEventCallback = OnWindow;
507 this.OnWindowSignal().Connect(_onWindowEventCallback);
510 _onWindowEventHandler += value;
515 _onWindowEventHandler -= value;
517 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
519 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
524 // Callback for View OnWindow signal
525 private void OnWindow(IntPtr data)
527 if (_onWindowEventHandler != null)
529 _onWindowEventHandler(this, null);
534 private EventHandler _offWindowEventHandler;
535 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
536 private delegate void OffWindowEventCallbackType(IntPtr control);
537 private OffWindowEventCallbackType _offWindowEventCallback;
540 /// Event for OffWindow signal which can be used to subscribe/unsubscribe the event handler.<br>
541 /// OffWindow signal is emitted after the view has been disconnected from the Window.<br>
543 public event EventHandler RemovedFromWindow
547 if (_offWindowEventHandler == null)
549 _offWindowEventCallback = OffWindow;
550 this.OffWindowSignal().Connect(_offWindowEventCallback);
553 _offWindowEventHandler += value;
558 _offWindowEventHandler -= value;
560 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
562 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
567 // Callback for View OffWindow signal
568 private void OffWindow(IntPtr data)
570 if (_offWindowEventHandler != null)
572 _offWindowEventHandler(this, null);
577 /// Event arguments of visibility changed.
579 public class VisibilityChangedEventArgs : EventArgs
582 private bool _visibility;
583 private VisibilityChangeType _type;
586 /// The view, or child of view, whose visibility has changed.
601 /// Whether the view is now visible or not.
603 public bool Visibility
616 /// Whether the view's visible property has changed or a parent's.
618 public VisibilityChangeType Type
631 private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
632 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
633 private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
634 private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
637 /// Event for visibility change which can be used to subscribe/unsubscribe the event handler.<br>
638 /// This signal is emitted when the visible property of this or a parent view is changed.<br>
640 public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
644 if (_visibilityChangedEventHandler == null)
646 _visibilityChangedEventCallback = OnVisibilityChanged;
647 VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
650 _visibilityChangedEventHandler += value;
655 _visibilityChangedEventHandler -= value;
657 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
659 VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
664 // Callback for View visibility change signal
665 private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
667 VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
670 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
672 e.Visibility = visibility;
675 if (_visibilityChangedEventHandler != null)
677 _visibilityChangedEventHandler(this, e);
681 // Resource Ready Signal
683 private EventHandler _resourcesLoadedEventHandler;
684 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
685 private delegate void ResourcesLoadedCallbackType(IntPtr control);
686 private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
689 /// Event for ResourcesLoadedSignal signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
690 /// This signal is emitted after all resources required by a View are loaded and ready.<br>
692 public event EventHandler ResourcesLoaded
696 if (_resourcesLoadedEventHandler == null)
698 _ResourcesLoadedCallback = OnResourcesLoaded;
699 this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
702 _resourcesLoadedEventHandler += value;
707 _resourcesLoadedEventHandler -= value;
709 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
711 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
716 private void OnResourcesLoaded(IntPtr view)
718 if (_resourcesLoadedEventHandler != null)
720 _resourcesLoadedEventHandler(this, null);
724 internal IntPtr GetPtrfromView()
726 return (IntPtr)swigCPtr;
729 internal class Property
731 internal static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get();
732 internal static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get();
733 internal static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get();
734 internal static readonly int LEFT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
735 internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
736 internal static readonly int UP_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
737 internal static readonly int DOWN_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
738 internal static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get();
739 internal static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get();
740 internal static readonly int SIBLING_ORDER = NDalicManualPINVOKE.Actor_Property_SIBLING_ORDER_get();
741 internal static readonly int OPACITY = NDalicManualPINVOKE.Actor_Property_OPACITY_get();
742 internal static readonly int SCREEN_POSITION = NDalicManualPINVOKE.Actor_Property_SCREEN_POSITION_get();
743 internal static readonly int POSITION_USES_ANCHOR_POINT = NDalicManualPINVOKE.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
744 internal static readonly int PARENT_ORIGIN = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_get();
745 internal static readonly int PARENT_ORIGIN_X = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_X_get();
746 internal static readonly int PARENT_ORIGIN_Y = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Y_get();
747 internal static readonly int PARENT_ORIGIN_Z = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Z_get();
748 internal static readonly int ANCHOR_POINT = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_get();
749 internal static readonly int ANCHOR_POINT_X = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_X_get();
750 internal static readonly int ANCHOR_POINT_Y = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Y_get();
751 internal static readonly int ANCHOR_POINT_Z = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Z_get();
752 internal static readonly int SIZE = NDalicPINVOKE.Actor_Property_SIZE_get();
753 internal static readonly int SIZE_WIDTH = NDalicPINVOKE.Actor_Property_SIZE_WIDTH_get();
754 internal static readonly int SIZE_HEIGHT = NDalicPINVOKE.Actor_Property_SIZE_HEIGHT_get();
755 internal static readonly int SIZE_DEPTH = NDalicPINVOKE.Actor_Property_SIZE_DEPTH_get();
756 internal static readonly int POSITION = NDalicPINVOKE.Actor_Property_POSITION_get();
757 internal static readonly int POSITION_X = NDalicPINVOKE.Actor_Property_POSITION_X_get();
758 internal static readonly int POSITION_Y = NDalicPINVOKE.Actor_Property_POSITION_Y_get();
759 internal static readonly int POSITION_Z = NDalicPINVOKE.Actor_Property_POSITION_Z_get();
760 internal static readonly int WORLD_POSITION = NDalicPINVOKE.Actor_Property_WORLD_POSITION_get();
761 internal static readonly int WORLD_POSITION_X = NDalicPINVOKE.Actor_Property_WORLD_POSITION_X_get();
762 internal static readonly int WORLD_POSITION_Y = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Y_get();
763 internal static readonly int WORLD_POSITION_Z = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Z_get();
764 internal static readonly int ORIENTATION = NDalicPINVOKE.Actor_Property_ORIENTATION_get();
765 internal static readonly int WORLD_ORIENTATION = NDalicPINVOKE.Actor_Property_WORLD_ORIENTATION_get();
766 internal static readonly int SCALE = NDalicPINVOKE.Actor_Property_SCALE_get();
767 internal static readonly int SCALE_X = NDalicPINVOKE.Actor_Property_SCALE_X_get();
768 internal static readonly int SCALE_Y = NDalicPINVOKE.Actor_Property_SCALE_Y_get();
769 internal static readonly int SCALE_Z = NDalicPINVOKE.Actor_Property_SCALE_Z_get();
770 internal static readonly int WORLD_SCALE = NDalicPINVOKE.Actor_Property_WORLD_SCALE_get();
771 internal static readonly int VISIBLE = NDalicPINVOKE.Actor_Property_VISIBLE_get();
772 internal static readonly int WORLD_COLOR = NDalicPINVOKE.Actor_Property_WORLD_COLOR_get();
773 internal static readonly int WORLD_MATRIX = NDalicPINVOKE.Actor_Property_WORLD_MATRIX_get();
774 internal static readonly int NAME = NDalicPINVOKE.Actor_Property_NAME_get();
775 internal static readonly int SENSITIVE = NDalicPINVOKE.Actor_Property_SENSITIVE_get();
776 internal static readonly int LEAVE_REQUIRED = NDalicPINVOKE.Actor_Property_LEAVE_REQUIRED_get();
777 internal static readonly int INHERIT_ORIENTATION = NDalicPINVOKE.Actor_Property_INHERIT_ORIENTATION_get();
778 internal static readonly int INHERIT_SCALE = NDalicPINVOKE.Actor_Property_INHERIT_SCALE_get();
779 internal static readonly int DRAW_MODE = NDalicPINVOKE.Actor_Property_DRAW_MODE_get();
780 internal static readonly int SIZE_MODE_FACTOR = NDalicPINVOKE.Actor_Property_SIZE_MODE_FACTOR_get();
781 internal static readonly int WIDTH_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_WIDTH_RESIZE_POLICY_get();
782 internal static readonly int HEIGHT_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_HEIGHT_RESIZE_POLICY_get();
783 internal static readonly int SIZE_SCALE_POLICY = NDalicPINVOKE.Actor_Property_SIZE_SCALE_POLICY_get();
784 internal static readonly int WIDTH_FOR_HEIGHT = NDalicPINVOKE.Actor_Property_WIDTH_FOR_HEIGHT_get();
785 internal static readonly int HEIGHT_FOR_WIDTH = NDalicPINVOKE.Actor_Property_HEIGHT_FOR_WIDTH_get();
786 internal static readonly int PADDING = NDalicPINVOKE.Actor_Property_PADDING_get();
787 internal static readonly int MINIMUM_SIZE = NDalicPINVOKE.Actor_Property_MINIMUM_SIZE_get();
788 internal static readonly int MAXIMUM_SIZE = NDalicPINVOKE.Actor_Property_MAXIMUM_SIZE_get();
789 internal static readonly int INHERIT_POSITION = NDalicPINVOKE.Actor_Property_INHERIT_POSITION_get();
790 internal static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
794 /// Describes the direction to move the focus towards.
796 public enum FocusDirection
807 /// Creates a new instance of a View.
809 public View() : this(NDalicPINVOKE.View_New(), true)
811 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
814 internal View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true)
816 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
820 /// Downcasts a handle to View handle.<br>
821 /// If handle points to a View, the downcast produces valid handle.<br>
822 /// If not, the returned handle is left uninitialized.<br>
824 /// <param name="handle">Handle to an object</param>
825 /// <returns>A handle to a View or an uninitialized handle</returns>
826 public new static View DownCast(BaseHandle handle)
828 View ret = new View(NDalicPINVOKE.View_DownCast(BaseHandle.getCPtr(handle)), true);
829 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
833 [Obsolete("Please do not use! this will be deprecated")]
834 public static T DownCast<T>(View view) where T : View
836 //View ret = ViewRegistry.GetViewFromBaseHandle(view);
837 View ret = View.DownCast(view);
845 private View ConvertIdToView(uint id)
851 view = Parent.FindChildById(id);
856 view = Window.Instance.GetRootLayer().FindChildById(id);
862 internal void SetKeyInputFocus()
864 NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
865 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
869 /// Quries whether the view has focus.
871 /// <returns>true if this view has focus</returns>
872 public bool HasFocus()
874 bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
875 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
879 internal void ClearKeyInputFocus()
881 NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
882 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
885 internal PinchGestureDetector GetPinchGestureDetector()
887 PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
888 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
892 internal PanGestureDetector GetPanGestureDetector()
894 PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
895 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
899 internal TapGestureDetector GetTapGestureDetector()
901 TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
902 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
906 internal LongPressGestureDetector GetLongPressGestureDetector()
908 LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
909 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
914 /// Sets the name of the style to be applied to the view.
916 /// <param name="styleName">A string matching a style described in a stylesheet</param>
917 public void SetStyleName(string styleName)
919 NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
920 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
924 /// Retrieves the name of the style to be applied to the view (if any).
926 /// <returns>A string matching a style, or an empty string</returns>
927 public string GetStyleName()
929 string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
930 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
934 internal void SetBackgroundColor(Vector4 color)
936 NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
937 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
940 internal Vector4 GetBackgroundColor()
942 Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
943 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
947 internal void SetBackgroundImage(Image image)
949 NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
950 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
954 /// Clears the background.
956 public void ClearBackground()
958 NDalicPINVOKE.View_ClearBackground(swigCPtr);
959 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
962 internal ControlKeySignal KeyEventSignal()
964 ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
965 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
969 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
971 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
972 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
976 internal KeyInputFocusSignal KeyInputFocusLostSignal()
978 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
979 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
983 internal View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
985 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
988 internal enum PropertyRange
990 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
991 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
992 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
996 /// styleName, type string.
998 public string StyleName
1003 GetProperty(View.Property.STYLE_NAME).Get(out temp);
1008 SetProperty(View.Property.STYLE_NAME, new Tizen.NUI.PropertyValue(value));
1013 /// mutually exclusive with BACKGROUND_IMAGE & BACKGROUND, type Vector4.
1015 public Color BackgroundColor
1019 Color backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1021 Tizen.NUI.PropertyMap background = Background;
1023 background.Find(Visual.Property.Type)?.Get(out visualType);
1024 if (visualType == (int)Visual.Type.Color)
1026 background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor);
1029 return backgroundColor;
1033 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1038 /// Create an Animation to animate the background color visual. If there is no
1039 /// background visual, creates one with transparent black as it's mixColor.
1041 public Animation AnimateBackgroundColor( object destinationValue,
1044 AlphaFunction.BuiltinFunctions? alphaFunction = null,
1045 object initialValue = null)
1047 Tizen.NUI.PropertyMap background = Background;
1049 if( background.Empty() )
1051 // If there is no background yet, ensure there is a transparent
1053 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1054 background = Background;
1056 return AnimateColor( "background", destinationValue, startTime, endTime, alphaFunction, initialValue );
1060 /// Create an Animation to animate the mixColor of the named visual.
1062 public Animation AnimateColor( string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null )
1064 Animation animation = null;
1066 PropertyMap _animator = new PropertyMap();
1067 if( alphaFunction != null )
1069 _animator.Add("alphaFunction", new PropertyValue( AlphaFunction.BuiltinToPropertyKey(alphaFunction) ) );
1072 PropertyMap _timePeriod = new PropertyMap();
1073 _timePeriod.Add( "duration", new PropertyValue((endTime-startTime)/1000.0f) );
1074 _timePeriod.Add( "delay", new PropertyValue( startTime/1000.0f ) );
1075 _animator.Add( "timePeriod", new PropertyValue( _timePeriod ) );
1077 PropertyMap _transition = new PropertyMap();
1078 _transition.Add( "animator", new PropertyValue( _animator ) );
1079 _transition.Add( "target", new PropertyValue( targetVisual ) );
1080 _transition.Add( "property", new PropertyValue( "mixColor" ) );
1082 if( initialColor != null )
1084 PropertyValue initValue = PropertyValue.CreateFromObject( initialColor );
1085 _transition.Add( "initialValue", initValue );
1088 PropertyValue destValue = PropertyValue.CreateFromObject( destinationColor );
1089 _transition.Add( "targetValue", destValue );
1090 TransitionData _transitionData = new TransitionData( _transition );
1092 animation = new Animation( NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true );
1093 if (NDalicPINVOKE.SWIGPendingException.Pending)
1094 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1100 /// mutually exclusive with BACKGROUND_COLOR & BACKGROUND, type Map.
1102 public string BackgroundImage
1106 string backgroundImage = "";
1108 Tizen.NUI.PropertyMap background = Background;
1110 background.Find(Visual.Property.Type)?.Get(out visualType);
1111 if (visualType == (int)Visual.Type.Image)
1113 background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
1116 return backgroundImage;
1120 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1124 public Tizen.NUI.PropertyMap Background
1128 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1129 GetProperty( View.Property.BACKGROUND ).Get(temp);
1134 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1140 /// The current state of the view.
1147 if (GetProperty(View.Property.STATE).Get(out temp) == false)
1149 NUILog.Error("State get error!");
1155 return States.Normal;
1159 return States.Focused;
1163 return States.Disabled;
1167 return States.Normal;
1173 SetProperty(View.Property.STATE, new Tizen.NUI.PropertyValue((int)value));
1178 /// The current sub state of the view.
1180 public States SubState
1185 if (GetProperty(View.Property.SUB_STATE).Get(out temp) == false)
1187 NUILog.Error("subState get error!");
1192 return States.Normal;
1194 return States.Focused;
1196 return States.Disabled;
1198 return States.Normal;
1203 string valueToString = "";
1208 valueToString = "NORMAL";
1211 case States.Focused:
1213 valueToString = "FOCUSED";
1216 case States.Disabled:
1218 valueToString = "DISABLED";
1223 valueToString = "NORMAL";
1227 SetProperty(View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
1232 /// Displays a tooltip
1234 public Tizen.NUI.PropertyMap Tooltip
1238 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1239 GetProperty(View.Property.TOOLTIP).Get(temp);
1244 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1249 /// Displays a tooltip as Text
1251 public string TooltipText
1255 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1259 private int LeftFocusableViewId
1264 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
1269 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1273 private int RightFocusableViewId
1278 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
1283 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1287 private int UpFocusableViewId
1292 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
1297 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1301 private int DownFocusableViewId
1306 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
1311 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1316 /// Child Property of FlexContainer.<br>
1317 /// The proportion of the free space in the container the flex item will receive.<br>
1318 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br>
1325 GetProperty(FlexContainer.ChildProperty.FLEX).Get(out temp);
1330 SetProperty(FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue(value));
1335 /// Child Property of FlexContainer.<br>
1336 /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br>
1338 public int AlignSelf
1343 GetProperty(FlexContainer.ChildProperty.ALIGN_SELF).Get(out temp);
1348 SetProperty(FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue(value));
1353 /// Child Property of FlexContainer.<br>
1354 /// The space around the flex item.<br>
1356 public Vector4 FlexMargin
1360 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1361 GetProperty(FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
1366 SetProperty(FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue(value));
1371 /// The top-left cell this child occupies, if not set, the first available cell is used
1373 public Vector2 CellIndex
1377 Vector2 temp = new Vector2(0.0f, 0.0f);
1378 GetProperty(TableView.ChildProperty.CELL_INDEX).Get(temp);
1383 SetProperty(TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue(value));
1388 /// The number of rows this child occupies, if not set, default value is 1
1390 public float RowSpan
1395 GetProperty(TableView.ChildProperty.ROW_SPAN).Get(out temp);
1400 SetProperty(TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue(value));
1405 /// The number of columns this child occupies, if not set, default value is 1
1407 public float ColumnSpan
1412 GetProperty(TableView.ChildProperty.COLUMN_SPAN).Get(out temp);
1417 SetProperty(TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue(value));
1422 /// The horizontal alignment of this child inside the cells, if not set, default value is 'left'
1424 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
1429 if (GetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
1431 NUILog.Error("CellHorizontalAlignment get error!");
1437 return Tizen.NUI.HorizontalAlignmentType.Left;
1439 return Tizen.NUI.HorizontalAlignmentType.Center;
1441 return Tizen.NUI.HorizontalAlignmentType.Right;
1443 return Tizen.NUI.HorizontalAlignmentType.Left;
1448 string valueToString = "";
1451 case Tizen.NUI.HorizontalAlignmentType.Left:
1453 valueToString = "left";
1456 case Tizen.NUI.HorizontalAlignmentType.Center:
1458 valueToString = "center";
1461 case Tizen.NUI.HorizontalAlignmentType.Right:
1463 valueToString = "right";
1468 valueToString = "left";
1472 SetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1477 /// The vertical alignment of this child inside the cells, if not set, default value is 'top'
1479 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
1484 GetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
1486 NUILog.Error("CellVerticalAlignment get error!");
1492 return Tizen.NUI.VerticalAlignmentType.Top;
1494 return Tizen.NUI.VerticalAlignmentType.Center;
1496 return Tizen.NUI.VerticalAlignmentType.Bottom;
1498 return Tizen.NUI.VerticalAlignmentType.Top;
1503 string valueToString = "";
1506 case Tizen.NUI.VerticalAlignmentType.Top:
1508 valueToString = "top";
1511 case Tizen.NUI.VerticalAlignmentType.Center:
1513 valueToString = "center";
1516 case Tizen.NUI.VerticalAlignmentType.Bottom:
1518 valueToString = "bottom";
1523 valueToString = "top";
1527 SetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1532 /// The left focusable view.<br>
1533 /// This will return NULL if not set.<br>
1534 /// This will also return NULL if the specified left focusable view is not on Window.<br>
1536 public View LeftFocusableView
1538 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1541 if (LeftFocusableViewId >= 0)
1543 return ConvertIdToView((uint)LeftFocusableViewId);
1549 LeftFocusableViewId = (int)value.GetId();
1554 /// The right focusable view.<br>
1555 /// This will return NULL if not set.<br>
1556 /// This will also return NULL if the specified right focusable view is not on Window.<br>
1558 public View RightFocusableView
1560 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1563 if (RightFocusableViewId >= 0)
1565 return ConvertIdToView((uint)RightFocusableViewId);
1571 RightFocusableViewId = (int)value.GetId();
1576 /// The up focusable view.<br>
1577 /// This will return NULL if not set.<br>
1578 /// This will also return NULL if the specified up focusable view is not on Window.<br>
1580 public View UpFocusableView
1582 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1585 if (UpFocusableViewId >= 0)
1587 return ConvertIdToView((uint)UpFocusableViewId);
1593 UpFocusableViewId = (int)value.GetId();
1598 /// The down focusable view.<br>
1599 /// This will return NULL if not set.<br>
1600 /// This will also return NULL if the specified down focusable view is not on Window.<br>
1602 public View DownFocusableView
1604 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1607 if (DownFocusableViewId >= 0)
1609 return ConvertIdToView((uint)DownFocusableViewId);
1615 DownFocusableViewId = (int)value.GetId();
1620 /// whether the view should be focusable by keyboard navigation.
1622 public bool Focusable
1626 SetKeyboardFocusable(value);
1630 return IsKeyboardFocusable();
1635 /// Enumeration for describing the states of view.
1654 /// Retrieves the position of the View.<br>
1655 /// The coordinates are relative to the View's parent.<br>
1657 public Position CurrentPosition
1661 return GetCurrentPosition();
1666 /// Sets the size of an view for width and height.<br>
1667 /// Geometry can be scaled to fit within this area.<br>
1668 /// This does not interfere with the views scale factor.<br>
1669 /// The views default depth is the minimum of width & height.<br>
1671 public Size2D Size2D
1675 Size temp = new Size(0.0f, 0.0f, 0.0f);
1676 GetProperty(View.Property.SIZE).Get(temp);
1677 Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
1682 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(new Size(value)));
1687 /// Retrieves the size of the View.<br>
1688 /// The coordinates are relative to the View's parent.<br>
1690 public Size2D CurrentSize
1694 return GetCurrentSize();
1699 /// Retrieves the view's parent.<br>
1709 public bool Visibility
1718 /// Retrieves and sets the view's opacity.<br>
1720 public float Opacity
1725 GetProperty(View.Property.OPACITY).Get(out temp);
1730 SetProperty(View.Property.OPACITY, new Tizen.NUI.PropertyValue(value));
1735 /// Sets the position of the View for X and Y.<br>
1736 /// By default, sets the position vector between the parent origin and pivot point(default).<br>
1737 /// If Position inheritance if disabled, sets the world position.<br>
1739 public Position2D Position2D
1743 Position temp = new Position(0.0f, 0.0f, 0.0f);
1744 GetProperty(View.Property.POSITION).Get(temp);
1745 return new Position2D(temp);
1749 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(new Position(value)));
1754 /// Retrieves screen postion of view's.<br>
1756 public Vector2 ScreenPosition
1760 Vector2 temp = new Vector2(0.0f, 0.0f);
1761 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
1767 /// Determines whether the pivot point should be used to determine the position of the view.
1768 /// This is true by default.
1770 /// <remarks>If false, then the top-left of the view is used for the position.
1771 /// Setting this to false will allow scaling or rotation around the anchor-point without affecting the view's position.
1773 public bool PositionUsesPivotPoint
1778 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
1783 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
1787 [Obsolete("Please do not use! this will be deprecated")]
1788 public bool PositionUsesAnchorPoint
1793 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
1798 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
1802 internal bool FocusState
1806 return IsKeyboardFocusable();
1810 SetKeyboardFocusable(value);
1815 /// Queries whether the view is connected to the Stage.<br>
1816 /// When an view is connected, it will be directly or indirectly parented to the root View.<br>
1818 public bool IsOnWindow
1827 /// Gets depth in the hierarchy for the view.
1829 public int HierarchyDepth
1833 return GetHierarchyDepth();
1838 /// Sets the sibling order of the view so depth position can be defined within the same parent.
1841 /// Note The initial value is 0.
1842 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove and LowerBelow will override the sibling order.
1843 /// The values set by this Property will likely change.
1845 public int SiblingOrder
1850 GetProperty(View.Property.SIBLING_ORDER).Get(out temp);
1855 SetProperty(View.Property.SIBLING_ORDER, new Tizen.NUI.PropertyValue(value));
1859 [Obsolete("Please do not use! this will be internal property")]
1860 public Vector3 NaturalSize
1864 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
1865 if (NDalicPINVOKE.SWIGPendingException.Pending)
1866 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1875 /// This is an asynchronous method.
1886 /// This is an asynchronous method.
1887 /// If an view is hidden, then the view and its children will not be rendered.
1888 /// 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.
1895 internal void Raise()
1897 NDalicPINVOKE.Raise(swigCPtr);
1898 if (NDalicPINVOKE.SWIGPendingException.Pending)
1899 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1902 internal void Lower()
1904 NDalicPINVOKE.Lower(swigCPtr);
1905 if (NDalicPINVOKE.SWIGPendingException.Pending)
1906 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1910 /// Raise view above all other views.
1913 /// Sibling order of views within the parent will be updated automatically.
1914 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
1916 public void RaiseToTop()
1918 NDalicPINVOKE.RaiseToTop(swigCPtr);
1919 if (NDalicPINVOKE.SWIGPendingException.Pending)
1920 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1924 /// Lower view to the bottom of all views.
1927 /// Sibling order of views within the parent will be updated automatically.
1928 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
1930 public void LowerToBottom()
1932 NDalicPINVOKE.LowerToBottom(swigCPtr);
1933 if (NDalicPINVOKE.SWIGPendingException.Pending)
1934 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1938 /// Query if all resources required by a View are loaded and ready.
1940 /// <remarks>Most resources are only loaded when the control is placed on stage
1942 public bool IsResourceReady()
1944 bool ret = NDalicPINVOKE.IsResourceReady(swigCPtr);
1945 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1950 /// Raise the view to above the target view.
1952 /// <remarks>Sibling order of views within the parent will be updated automatically.
1953 /// Views on the level above the target view will still be shown above this view.
1954 /// Raising this view above views with the same sibling order as each other will raise this view above them.
1955 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
1957 /// <param name="target">Will be raised above this view</param>
1958 internal void RaiseAbove(View target)
1960 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
1961 if (NDalicPINVOKE.SWIGPendingException.Pending)
1962 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1966 /// Lower the view to below the target view.
1968 /// <remarks>Sibling order of views within the parent will be updated automatically.
1969 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
1970 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
1972 /// <param name="target">Will be lowered below this view</param>
1973 internal void LowerBelow(View target)
1975 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
1976 if (NDalicPINVOKE.SWIGPendingException.Pending)
1977 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1980 internal string GetName()
1982 string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);
1983 if (NDalicPINVOKE.SWIGPendingException.Pending)
1984 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1988 internal void SetName(string name)
1990 NDalicPINVOKE.Actor_SetName(swigCPtr, name);
1991 if (NDalicPINVOKE.SWIGPendingException.Pending)
1992 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1995 internal uint GetId()
1997 uint ret = NDalicPINVOKE.Actor_GetId(swigCPtr);
1998 if (NDalicPINVOKE.SWIGPendingException.Pending)
1999 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2003 internal bool IsRoot()
2005 bool ret = NDalicPINVOKE.Actor_IsRoot(swigCPtr);
2006 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2010 internal bool OnWindow()
2012 bool ret = NDalicPINVOKE.Actor_OnStage(swigCPtr);
2013 if (NDalicPINVOKE.SWIGPendingException.Pending)
2014 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2018 internal Layer GetLayer()
2020 Layer ret = new Layer(NDalicPINVOKE.Actor_GetLayer(swigCPtr), true);
2021 if (NDalicPINVOKE.SWIGPendingException.Pending)
2022 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2027 /// Adds a child view to this View.
2029 /// <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>
2030 /// <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>
2031 /// <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>
2032 /// <param name="child">The child</param>
2033 public void Add(View child)
2035 NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
2036 if (NDalicPINVOKE.SWIGPendingException.Pending)
2037 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2041 /// Removes a child View from this View. If the view was not a child of this view, this is a no-op.
2043 /// <pre>This View(the parent) has been initialized. The child view is not the same as the parent view.</pre>
2044 /// <param name="child">The child</param>
2045 public void Remove(View child)
2047 NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
2048 if (NDalicPINVOKE.SWIGPendingException.Pending)
2049 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2052 internal void Unparent()
2054 NDalicPINVOKE.Actor_Unparent(swigCPtr);
2055 if (NDalicPINVOKE.SWIGPendingException.Pending)
2056 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2060 /// Retrieves the number of children held by the view.
2062 /// <pre>The View has been initialized.</pre>
2063 /// <returns>The number of children</returns>
2064 internal uint GetChildCount()
2066 uint ret = NDalicPINVOKE.Actor_GetChildCount(swigCPtr);
2067 if (NDalicPINVOKE.SWIGPendingException.Pending)
2068 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2073 /// Retrieves child view by index.
2075 /// <pre>The View has been initialized.</pre>
2076 /// <param name="index">The index of the child to retrieve</param>
2077 /// <returns>The view for the given index or empty handle if children not initialized</returns>
2078 public View GetChildAt(uint index)
2080 IntPtr cPtr = NDalicPINVOKE.Actor_GetChildAt(swigCPtr, index);
2082 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2084 if (NDalicPINVOKE.SWIGPendingException.Pending)
2085 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2090 /// Search through this view's hierarchy for an view with the given name.
2091 /// The view itself is also considered in the search.
2093 /// <pre>The View has been initialized.</pre>
2094 /// <param name="viewName">The name of the view to find</param>
2095 /// <returns>A handle to the view if found, or an empty handle if not</returns>
2096 public View FindChildByName(string viewName)
2098 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
2100 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2102 if (NDalicPINVOKE.SWIGPendingException.Pending)
2103 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2107 internal View FindChildById(uint id)
2109 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
2111 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2113 if (NDalicPINVOKE.SWIGPendingException.Pending)
2114 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2118 internal View GetParent()
2120 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
2122 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2124 if (NDalicPINVOKE.SWIGPendingException.Pending)
2125 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2129 internal void SetParentOrigin(Vector3 origin)
2131 NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
2132 if (NDalicPINVOKE.SWIGPendingException.Pending)
2133 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2136 internal Vector3 GetCurrentParentOrigin()
2138 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentParentOrigin(swigCPtr), true);
2139 if (NDalicPINVOKE.SWIGPendingException.Pending)
2140 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2144 internal void SetAnchorPoint(Vector3 anchorPoint)
2146 NDalicPINVOKE.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
2147 if (NDalicPINVOKE.SWIGPendingException.Pending)
2148 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2151 internal Vector3 GetCurrentAnchorPoint()
2153 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentAnchorPoint(swigCPtr), true);
2154 if (NDalicPINVOKE.SWIGPendingException.Pending)
2155 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2159 internal void SetSize(float width, float height)
2161 NDalicPINVOKE.Actor_SetSize__SWIG_0(swigCPtr, width, height);
2162 if (NDalicPINVOKE.SWIGPendingException.Pending)
2163 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2166 internal void SetSize(float width, float height, float depth)
2168 NDalicPINVOKE.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
2169 if (NDalicPINVOKE.SWIGPendingException.Pending)
2170 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2173 internal void SetSize(Vector2 size)
2175 NDalicPINVOKE.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
2176 if (NDalicPINVOKE.SWIGPendingException.Pending)
2177 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2180 internal void SetSize(Vector3 size)
2182 NDalicPINVOKE.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
2183 if (NDalicPINVOKE.SWIGPendingException.Pending)
2184 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2187 internal Vector3 GetTargetSize()
2189 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetTargetSize(swigCPtr), true);
2190 if (NDalicPINVOKE.SWIGPendingException.Pending)
2191 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2195 internal Size2D GetCurrentSize()
2197 Size ret = new Size(NDalicPINVOKE.Actor_GetCurrentSize(swigCPtr), true);
2198 if (NDalicPINVOKE.SWIGPendingException.Pending)
2199 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2200 Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
2204 internal Vector3 GetNaturalSize()
2206 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2207 if (NDalicPINVOKE.SWIGPendingException.Pending)
2208 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2212 internal void SetPosition(float x, float y)
2214 NDalicPINVOKE.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
2215 if (NDalicPINVOKE.SWIGPendingException.Pending)
2216 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2219 internal void SetPosition(float x, float y, float z)
2221 NDalicPINVOKE.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
2222 if (NDalicPINVOKE.SWIGPendingException.Pending)
2223 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2226 internal void SetPosition(Vector3 position)
2228 NDalicPINVOKE.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
2229 if (NDalicPINVOKE.SWIGPendingException.Pending)
2230 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2233 internal void SetX(float x)
2235 NDalicPINVOKE.Actor_SetX(swigCPtr, x);
2236 if (NDalicPINVOKE.SWIGPendingException.Pending)
2237 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2240 internal void SetY(float y)
2242 NDalicPINVOKE.Actor_SetY(swigCPtr, y);
2243 if (NDalicPINVOKE.SWIGPendingException.Pending)
2244 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2247 internal void SetZ(float z)
2249 NDalicPINVOKE.Actor_SetZ(swigCPtr, z);
2250 if (NDalicPINVOKE.SWIGPendingException.Pending)
2251 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2254 internal void TranslateBy(Vector3 distance)
2256 NDalicPINVOKE.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
2257 if (NDalicPINVOKE.SWIGPendingException.Pending)
2258 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2261 internal Position GetCurrentPosition()
2263 Position ret = new Position(NDalicPINVOKE.Actor_GetCurrentPosition(swigCPtr), true);
2264 if (NDalicPINVOKE.SWIGPendingException.Pending)
2265 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2269 internal Vector3 GetCurrentWorldPosition()
2271 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldPosition(swigCPtr), true);
2272 if (NDalicPINVOKE.SWIGPendingException.Pending)
2273 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2277 internal void SetInheritPosition(bool inherit)
2279 NDalicPINVOKE.Actor_SetInheritPosition(swigCPtr, inherit);
2280 if (NDalicPINVOKE.SWIGPendingException.Pending)
2281 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2284 internal bool IsPositionInherited()
2286 bool ret = NDalicPINVOKE.Actor_IsPositionInherited(swigCPtr);
2287 if (NDalicPINVOKE.SWIGPendingException.Pending)
2288 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2292 internal void SetOrientation(Degree angle, Vector3 axis)
2294 NDalicPINVOKE.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2295 if (NDalicPINVOKE.SWIGPendingException.Pending)
2296 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2299 internal void SetOrientation(Radian angle, Vector3 axis)
2301 NDalicPINVOKE.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2302 if (NDalicPINVOKE.SWIGPendingException.Pending)
2303 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2306 internal void SetOrientation(Rotation orientation)
2308 NDalicPINVOKE.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
2309 if (NDalicPINVOKE.SWIGPendingException.Pending)
2310 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2313 internal void RotateBy(Degree angle, Vector3 axis)
2315 NDalicPINVOKE.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2316 if (NDalicPINVOKE.SWIGPendingException.Pending)
2317 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2320 internal void RotateBy(Radian angle, Vector3 axis)
2322 NDalicPINVOKE.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2323 if (NDalicPINVOKE.SWIGPendingException.Pending)
2324 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2327 internal void RotateBy(Rotation relativeRotation)
2329 NDalicPINVOKE.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
2330 if (NDalicPINVOKE.SWIGPendingException.Pending)
2331 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2334 internal Rotation GetCurrentOrientation()
2336 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentOrientation(swigCPtr), true);
2337 if (NDalicPINVOKE.SWIGPendingException.Pending)
2338 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2342 internal void SetInheritOrientation(bool inherit)
2344 NDalicPINVOKE.Actor_SetInheritOrientation(swigCPtr, inherit);
2345 if (NDalicPINVOKE.SWIGPendingException.Pending)
2346 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2349 internal bool IsOrientationInherited()
2351 bool ret = NDalicPINVOKE.Actor_IsOrientationInherited(swigCPtr);
2352 if (NDalicPINVOKE.SWIGPendingException.Pending)
2353 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2357 internal Rotation GetCurrentWorldOrientation()
2359 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentWorldOrientation(swigCPtr), true);
2360 if (NDalicPINVOKE.SWIGPendingException.Pending)
2361 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2365 internal void SetScale(float scale)
2367 NDalicPINVOKE.Actor_SetScale__SWIG_0(swigCPtr, scale);
2368 if (NDalicPINVOKE.SWIGPendingException.Pending)
2369 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2372 internal void SetScale(float scaleX, float scaleY, float scaleZ)
2374 NDalicPINVOKE.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
2375 if (NDalicPINVOKE.SWIGPendingException.Pending)
2376 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2379 internal void SetScale(Vector3 scale)
2381 NDalicPINVOKE.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
2382 if (NDalicPINVOKE.SWIGPendingException.Pending)
2383 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2386 internal void ScaleBy(Vector3 relativeScale)
2388 NDalicPINVOKE.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
2389 if (NDalicPINVOKE.SWIGPendingException.Pending)
2390 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2393 internal Vector3 GetCurrentScale()
2395 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentScale(swigCPtr), true);
2396 if (NDalicPINVOKE.SWIGPendingException.Pending)
2397 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2401 internal Vector3 GetCurrentWorldScale()
2403 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldScale(swigCPtr), true);
2404 if (NDalicPINVOKE.SWIGPendingException.Pending)
2405 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2409 internal void SetInheritScale(bool inherit)
2411 NDalicPINVOKE.Actor_SetInheritScale(swigCPtr, inherit);
2412 if (NDalicPINVOKE.SWIGPendingException.Pending)
2413 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2416 internal bool IsScaleInherited()
2418 bool ret = NDalicPINVOKE.Actor_IsScaleInherited(swigCPtr);
2419 if (NDalicPINVOKE.SWIGPendingException.Pending)
2420 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2424 internal Matrix GetCurrentWorldMatrix()
2426 Matrix ret = new Matrix(NDalicPINVOKE.Actor_GetCurrentWorldMatrix(swigCPtr), true);
2427 if (NDalicPINVOKE.SWIGPendingException.Pending)
2428 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2432 internal void SetVisible(bool visible)
2434 NDalicPINVOKE.Actor_SetVisible(swigCPtr, visible);
2435 if (NDalicPINVOKE.SWIGPendingException.Pending)
2436 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2439 internal bool IsVisible()
2441 bool ret = NDalicPINVOKE.Actor_IsVisible(swigCPtr);
2442 if (NDalicPINVOKE.SWIGPendingException.Pending)
2443 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2447 internal void SetOpacity(float opacity)
2449 NDalicPINVOKE.Actor_SetOpacity(swigCPtr, opacity);
2450 if (NDalicPINVOKE.SWIGPendingException.Pending)
2451 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2454 internal float GetCurrentOpacity()
2456 float ret = NDalicPINVOKE.Actor_GetCurrentOpacity(swigCPtr);
2457 if (NDalicPINVOKE.SWIGPendingException.Pending)
2458 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2462 internal void SetColor(Vector4 color)
2464 NDalicPINVOKE.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
2465 if (NDalicPINVOKE.SWIGPendingException.Pending)
2466 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2469 internal Vector4 GetCurrentColor()
2471 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentColor(swigCPtr), true);
2472 if (NDalicPINVOKE.SWIGPendingException.Pending)
2473 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2477 internal void SetColorMode(ColorMode colorMode)
2479 NDalicPINVOKE.Actor_SetColorMode(swigCPtr, (int)colorMode);
2480 if (NDalicPINVOKE.SWIGPendingException.Pending)
2481 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2484 internal ColorMode GetColorMode()
2486 ColorMode ret = (ColorMode)NDalicPINVOKE.Actor_GetColorMode(swigCPtr);
2487 if (NDalicPINVOKE.SWIGPendingException.Pending)
2488 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2492 internal Vector4 GetCurrentWorldColor()
2494 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentWorldColor(swigCPtr), true);
2495 if (NDalicPINVOKE.SWIGPendingException.Pending)
2496 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2500 internal void SetDrawMode(DrawModeType drawMode)
2502 NDalicPINVOKE.Actor_SetDrawMode(swigCPtr, (int)drawMode);
2503 if (NDalicPINVOKE.SWIGPendingException.Pending)
2504 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2507 internal DrawModeType GetDrawMode()
2509 DrawModeType ret = (DrawModeType)NDalicPINVOKE.Actor_GetDrawMode(swigCPtr);
2510 if (NDalicPINVOKE.SWIGPendingException.Pending)
2511 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2516 /// Converts screen coordinates into the view's coordinate system using the default camera.
2518 /// <pre>The View has been initialized.</pre>
2519 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5)</remarks>
2520 /// <param name="localX">On return, the X-coordinate relative to the view</param>
2521 /// <param name="localY">On return, the Y-coordinate relative to the view</param>
2522 /// <param name="screenX">The screen X-coordinate</param>
2523 /// <param name="screenY">The screen Y-coordinate</param>
2524 /// <returns>True if the conversion succeeded</returns>
2525 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
2527 bool ret = NDalicPINVOKE.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
2528 if (NDalicPINVOKE.SWIGPendingException.Pending)
2529 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2533 internal void SetKeyboardFocusable(bool focusable)
2535 NDalicPINVOKE.Actor_SetKeyboardFocusable(swigCPtr, focusable);
2536 if (NDalicPINVOKE.SWIGPendingException.Pending)
2537 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2540 internal bool IsKeyboardFocusable()
2542 bool ret = NDalicPINVOKE.Actor_IsKeyboardFocusable(swigCPtr);
2543 if (NDalicPINVOKE.SWIGPendingException.Pending)
2544 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2548 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
2550 NDalicPINVOKE.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
2551 if (NDalicPINVOKE.SWIGPendingException.Pending)
2552 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2555 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
2557 ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.Actor_GetResizePolicy(swigCPtr, (int)dimension);
2558 if (NDalicPINVOKE.SWIGPendingException.Pending)
2559 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2564 /// Sets the relative to parent size factor of the view.<br>
2565 /// This factor is only used when ResizePolicy is set to either:
2566 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br>
2567 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br>
2569 /// <pre>The View has been initialized.</pre>
2570 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis</param>
2571 public void SetSizeModeFactor(Vector3 factor)
2573 NDalicPINVOKE.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
2574 if (NDalicPINVOKE.SWIGPendingException.Pending)
2575 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2578 internal Vector3 GetSizeModeFactor()
2580 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetSizeModeFactor(swigCPtr), true);
2581 if (NDalicPINVOKE.SWIGPendingException.Pending)
2582 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2587 /// Calculates the height of the view given a width.<br>
2588 /// The natural size is used for default calculation. <br>
2589 /// size 0 is treated as aspect ratio 1:1.<br>
2591 /// <param name="width">Width to use</param>
2592 /// <returns>The height based on the width</returns>
2593 public float GetHeightForWidth(float width)
2595 float ret = NDalicPINVOKE.Actor_GetHeightForWidth(swigCPtr, width);
2596 if (NDalicPINVOKE.SWIGPendingException.Pending)
2597 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2602 /// Calculates the width of the view given a height.<br>
2603 /// The natural size is used for default calculation.<br>
2604 /// size 0 is treated as aspect ratio 1:1.<br>
2606 /// <param name="height">Height to use</param>
2607 /// <returns>The width based on the height</returns>
2608 public float GetWidthForHeight(float height)
2610 float ret = NDalicPINVOKE.Actor_GetWidthForHeight(swigCPtr, height);
2611 if (NDalicPINVOKE.SWIGPendingException.Pending)
2612 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2616 public float GetRelayoutSize(DimensionType dimension)
2618 float ret = NDalicPINVOKE.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
2619 if (NDalicPINVOKE.SWIGPendingException.Pending)
2620 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2624 public void SetPadding(PaddingType padding)
2626 NDalicPINVOKE.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
2627 if (NDalicPINVOKE.SWIGPendingException.Pending)
2628 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2631 public void GetPadding(PaddingType paddingOut)
2633 NDalicPINVOKE.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
2634 if (NDalicPINVOKE.SWIGPendingException.Pending)
2635 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2638 internal void SetMinimumSize(Vector2 size)
2640 NDalicPINVOKE.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
2641 if (NDalicPINVOKE.SWIGPendingException.Pending)
2642 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2645 internal Vector2 GetMinimumSize()
2647 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMinimumSize(swigCPtr), true);
2648 if (NDalicPINVOKE.SWIGPendingException.Pending)
2649 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2653 internal void SetMaximumSize(Vector2 size)
2655 NDalicPINVOKE.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
2656 if (NDalicPINVOKE.SWIGPendingException.Pending)
2657 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2660 internal Vector2 GetMaximumSize()
2662 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMaximumSize(swigCPtr), true);
2663 if (NDalicPINVOKE.SWIGPendingException.Pending)
2664 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2668 internal int GetHierarchyDepth()
2670 int ret = NDalicPINVOKE.Actor_GetHierarchyDepth(swigCPtr);
2671 if (NDalicPINVOKE.SWIGPendingException.Pending)
2672 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2676 public uint AddRenderer(Renderer renderer)
2678 uint ret = NDalicPINVOKE.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
2679 if (NDalicPINVOKE.SWIGPendingException.Pending)
2680 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2684 internal uint GetRendererCount()
2686 uint ret = NDalicPINVOKE.Actor_GetRendererCount(swigCPtr);
2687 if (NDalicPINVOKE.SWIGPendingException.Pending)
2688 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2692 public Renderer GetRendererAt(uint index)
2694 Renderer ret = new Renderer(NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index), true);
2695 if (NDalicPINVOKE.SWIGPendingException.Pending)
2696 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2700 public void RemoveRenderer(Renderer renderer)
2702 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
2703 if (NDalicPINVOKE.SWIGPendingException.Pending)
2704 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2707 public void RemoveRenderer(uint index)
2709 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
2710 if (NDalicPINVOKE.SWIGPendingException.Pending)
2711 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2714 internal TouchDataSignal TouchSignal()
2716 TouchDataSignal ret = new TouchDataSignal(NDalicPINVOKE.Actor_TouchSignal(swigCPtr), false);
2717 if (NDalicPINVOKE.SWIGPendingException.Pending)
2718 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2722 internal HoverSignal HoveredSignal()
2724 HoverSignal ret = new HoverSignal(NDalicPINVOKE.Actor_HoveredSignal(swigCPtr), false);
2725 if (NDalicPINVOKE.SWIGPendingException.Pending)
2726 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2730 internal WheelSignal WheelEventSignal()
2732 WheelSignal ret = new WheelSignal(NDalicPINVOKE.Actor_WheelEventSignal(swigCPtr), false);
2733 if (NDalicPINVOKE.SWIGPendingException.Pending)
2734 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2738 internal ViewSignal OnWindowSignal()
2740 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnStageSignal(swigCPtr), false);
2741 if (NDalicPINVOKE.SWIGPendingException.Pending)
2742 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2746 internal ViewSignal OffWindowSignal()
2748 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OffStageSignal(swigCPtr), false);
2749 if (NDalicPINVOKE.SWIGPendingException.Pending)
2750 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2754 internal ViewSignal OnRelayoutSignal()
2756 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnRelayoutSignal(swigCPtr), false);
2757 if (NDalicPINVOKE.SWIGPendingException.Pending)
2758 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2762 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view) {
2763 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
2764 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2768 internal ViewSignal ResourcesLoadedSignal()
2770 ViewSignal ret = new ViewSignal(NDalicPINVOKE.ResourceReadySignal(swigCPtr), false);
2771 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2776 /// Gets/Sets the origin of an view, within its parent's area.<br>
2777 /// 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>
2778 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br>
2779 /// An view's position is the distance between this origin, and the view's anchor-point.<br>
2781 /// <pre>The View has been initialized.</pre>
2782 public Position ParentOrigin
2786 Position temp = new Position(0.0f, 0.0f, 0.0f);
2787 GetProperty(View.Property.PARENT_ORIGIN).Get(temp);
2792 SetProperty(View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue(value));
2796 internal float ParentOriginX
2801 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
2806 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
2810 internal float ParentOriginY
2815 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
2820 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
2824 internal float ParentOriginZ
2829 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
2834 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
2839 /// Gets/Sets the anchor-point of an view.<br>
2840 /// 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>
2841 /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br>
2842 /// An view position is the distance between its parent-origin and this anchor-point.<br>
2843 /// An view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br>
2844 /// <pre>The View has been initialized.</pre>
2846 public Position PivotPoint
2850 Position temp = new Position(0.0f, 0.0f, 0.0f);
2851 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
2856 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
2860 internal float PivotPointX
2865 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
2870 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
2874 internal float PivotPointY
2879 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
2884 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
2888 internal float PivotPointZ
2893 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
2898 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
2903 /// Gets/Sets the size width of an view.
2905 public float SizeWidth
2910 GetProperty(View.Property.SIZE_WIDTH).Get(out temp);
2915 SetProperty(View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue(value));
2920 /// Gets/Sets the size height of an view.
2922 public float SizeHeight
2927 GetProperty(View.Property.SIZE_HEIGHT).Get(out temp);
2932 SetProperty(View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue(value));
2937 /// Gets/Sets the position of the View.<br>
2938 /// By default, sets the position vector between the parent origin and pivot point(default).<br>
2939 /// If Position inheritance if disabled, sets the world position.<br>
2941 public Position Position
2945 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
2946 GetProperty(View.Property.POSITION).Get(temp);
2951 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(value));
2956 /// Gets/Sets the position x of the View.
2958 public float PositionX
2963 GetProperty(View.Property.POSITION_X).Get(out temp);
2968 SetProperty(View.Property.POSITION_X, new Tizen.NUI.PropertyValue(value));
2973 /// Gets/Sets the position y of the View.
2975 public float PositionY
2980 GetProperty(View.Property.POSITION_Y).Get(out temp);
2985 SetProperty(View.Property.POSITION_Y, new Tizen.NUI.PropertyValue(value));
2990 /// Gets/Sets the position z of the View.
2992 public float PositionZ
2997 GetProperty(View.Property.POSITION_Z).Get(out temp);
3002 SetProperty(View.Property.POSITION_Z, new Tizen.NUI.PropertyValue(value));
3007 /// Gets/Sets the world position of the View.
3009 public Vector3 WorldPosition
3013 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3014 GetProperty(View.Property.WORLD_POSITION).Get(temp);
3019 internal float WorldPositionX
3024 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
3029 internal float WorldPositionY
3034 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
3039 internal float WorldPositionZ
3044 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
3050 /// Gets/Sets the orientation of the View.<br>
3051 /// An view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br>
3053 /// <remarks>This is an asynchronous method.</remarks>
3054 public Rotation Orientation
3058 Rotation temp = new Rotation();
3059 GetProperty(View.Property.ORIENTATION).Get(temp);
3064 SetProperty(View.Property.ORIENTATION, new Tizen.NUI.PropertyValue(value));
3069 /// Gets/Sets the world orientation of the View.<br>
3071 public Rotation WorldOrientation
3075 Rotation temp = new Rotation();
3076 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
3082 /// Gets/Sets the scale factor applied to an view.<br>
3084 public Vector3 Scale
3088 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3089 GetProperty(View.Property.SCALE).Get(temp);
3094 SetProperty(View.Property.SCALE, new Tizen.NUI.PropertyValue(value));
3099 /// Gets/Sets the scale x factor applied to an view.
3106 GetProperty(View.Property.SCALE_X).Get(out temp);
3111 SetProperty(View.Property.SCALE_X, new Tizen.NUI.PropertyValue(value));
3116 /// Gets/Sets the scale y factor applied to an view.
3123 GetProperty(View.Property.SCALE_Y).Get(out temp);
3128 SetProperty(View.Property.SCALE_Y, new Tizen.NUI.PropertyValue(value));
3133 /// Gets/Sets the scale z factor applied to an view.
3140 GetProperty(View.Property.SCALE_Z).Get(out temp);
3145 SetProperty(View.Property.SCALE_Z, new Tizen.NUI.PropertyValue(value));
3150 /// Gets the world scale of View.
3152 public Vector3 WorldScale
3156 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3157 GetProperty(View.Property.WORLD_SCALE).Get(temp);
3163 /// Retrieves the visibility flag of an view.
3166 /// If an view is not visible, then the view and its children will not be rendered.
3167 /// 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.
3174 GetProperty(View.Property.VISIBLE).Get(out temp);
3176 }/* only get is required : removed
3179 SetProperty(View.Property.VISIBLE, new Tizen.NUI.PropertyValue(value));
3184 /// Gets the view's world color.
3186 public Vector4 WorldColor
3190 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3191 GetProperty(View.Property.WORLD_COLOR).Get(temp);
3196 internal Matrix WorldMatrix
3200 Matrix temp = new Matrix();
3201 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
3207 /// Gets/Sets the View's name.
3214 GetProperty(View.Property.NAME).Get(out temp);
3219 SetProperty(View.Property.NAME, new Tizen.NUI.PropertyValue(value));
3224 /// Get the number of children held by the view.
3226 public uint ChildCount
3230 return GetChildCount();
3235 /// Gets the View's ID.
3247 /// Gets/Sets the status of whether an view should emit touch or hover signals.
3249 public bool Sensitive
3254 GetProperty(View.Property.SENSITIVE).Get(out temp);
3259 SetProperty(View.Property.SENSITIVE, new Tizen.NUI.PropertyValue(value));
3264 /// Gets/Sets the status of whether the view should receive a notification when touch or hover motion events leave the boundary of the view.
3266 public bool LeaveRequired
3271 GetProperty(View.Property.LEAVE_REQUIRED).Get(out temp);
3276 SetProperty(View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue(value));
3281 /// Gets/Sets the status of whether a child view inherits it's parent's orientation.
3283 public bool InheritOrientation
3288 GetProperty(View.Property.INHERIT_ORIENTATION).Get(out temp);
3293 SetProperty(View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue(value));
3298 /// Gets/Sets the status of whether a child view inherits it's parent's scale.
3300 public bool InheritScale
3305 GetProperty(View.Property.INHERIT_SCALE).Get(out temp);
3310 SetProperty(View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue(value));
3315 /// Gets/Sets the status of how the view and its children should be drawn.<br>
3316 /// Not all views are renderable, but DrawMode can be inherited from any view.<br>
3317 /// 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>
3318 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br>
3319 /// Overlay views are drawn in a separate pass, after all non-overlay views within the Layer.<br>
3320 /// For overlay views, the drawing order is with respect to tree levels of Views, and depth-testing will not be used.<br>
3322 public DrawModeType DrawMode
3327 if (GetProperty(View.Property.DRAW_MODE).Get(out temp) == false)
3329 NUILog.Error("DrawMode get error!");
3334 return DrawModeType.Normal;
3336 return DrawModeType.Overlay2D;
3338 return DrawModeType.Stencil;
3340 return DrawModeType.Normal;
3345 SetProperty(View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)value));
3350 /// Gets/Sets the relative to parent size factor of the view.<br>
3351 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br>
3352 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br>
3354 public Vector3 SizeModeFactor
3358 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3359 GetProperty(View.Property.SIZE_MODE_FACTOR).Get(temp);
3364 SetProperty(View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue(value));
3369 /// Gets/Sets the width resize policy to be used.
3371 public ResizePolicyType WidthResizePolicy
3376 if (GetProperty(View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
3378 NUILog.Error("WidthResizePolicy get error!");
3383 return ResizePolicyType.Fixed;
3384 case "USE_NATURAL_SIZE":
3385 return ResizePolicyType.UseNaturalSize;
3386 case "FILL_TO_PARENT":
3387 return ResizePolicyType.FillToParent;
3388 case "SIZE_RELATIVE_TO_PARENT":
3389 return ResizePolicyType.SizeRelativeToParent;
3390 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3391 return ResizePolicyType.SizeFixedOffsetFromParent;
3392 case "FIT_TO_CHILDREN":
3393 return ResizePolicyType.FitToChildren;
3394 case "DIMENSION_DEPENDENCY":
3395 return ResizePolicyType.DimensionDependency;
3396 case "USE_ASSIGNED_SIZE":
3397 return ResizePolicyType.UseAssignedSize;
3399 return ResizePolicyType.Fixed;
3404 SetProperty(View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3409 /// Gets/Sets the height resize policy to be used.
3411 public ResizePolicyType HeightResizePolicy
3416 if (GetProperty(View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
3418 NUILog.Error("HeightResizePolicy get error!");
3423 return ResizePolicyType.Fixed;
3424 case "USE_NATURAL_SIZE":
3425 return ResizePolicyType.UseNaturalSize;
3426 case "FILL_TO_PARENT":
3427 return ResizePolicyType.FillToParent;
3428 case "SIZE_RELATIVE_TO_PARENT":
3429 return ResizePolicyType.SizeRelativeToParent;
3430 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3431 return ResizePolicyType.SizeFixedOffsetFromParent;
3432 case "FIT_TO_CHILDREN":
3433 return ResizePolicyType.FitToChildren;
3434 case "DIMENSION_DEPENDENCY":
3435 return ResizePolicyType.DimensionDependency;
3436 case "USE_ASSIGNED_SIZE":
3437 return ResizePolicyType.UseAssignedSize;
3439 return ResizePolicyType.Fixed;
3444 SetProperty(View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3449 /// Gets/Sets the policy to use when setting size with size negotiation.<br>
3450 /// Defaults to SizeScalePolicyType.UseSizeSet.<br>
3452 public SizeScalePolicyType SizeScalePolicy
3457 if (GetProperty(View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
3459 NUILog.Error("SizeScalePolicy get error!");
3463 case "USE_SIZE_SET":
3464 return SizeScalePolicyType.UseSizeSet;
3465 case "FIT_WITH_ASPECT_RATIO":
3466 return SizeScalePolicyType.FitWithAspectRatio;
3467 case "FILL_WITH_ASPECT_RATIO":
3468 return SizeScalePolicyType.FillWithAspectRatio;
3470 return SizeScalePolicyType.UseSizeSet;
3475 string valueToString = "";
3478 case SizeScalePolicyType.UseSizeSet:
3480 valueToString = "USE_SIZE_SET";
3483 case SizeScalePolicyType.FitWithAspectRatio:
3485 valueToString = "FIT_WITH_ASPECT_RATIO";
3488 case SizeScalePolicyType.FillWithAspectRatio:
3490 valueToString = "FILL_WITH_ASPECT_RATIO";
3495 valueToString = "USE_SIZE_SET";
3499 SetProperty(View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
3504 /// Gets/Sets the status of whether the width size is dependent on height size.
3506 public bool WidthForHeight
3511 GetProperty(View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
3516 SetProperty(View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue(value));
3521 /// Gets/Sets the status of whether the height size is dependent on width size.
3523 public bool HeightForWidth
3528 GetProperty(View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
3533 SetProperty(View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue(value));
3538 /// Gets/Sets the padding for use in layout.
3540 public Vector4 Padding
3544 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3545 GetProperty(View.Property.PADDING).Get(temp);
3550 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
3555 /// Gets/Sets the minimum size an view can be assigned in size negotiation.
3557 public Size2D MinimumSize
3561 Size2D temp = new Size2D(0, 0);
3562 GetProperty(View.Property.MINIMUM_SIZE).Get(temp);
3567 SetProperty(View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3572 /// Gets/Sets the maximum size an view can be assigned in size negotiation.
3574 public Size2D MaximumSize
3578 Size2D temp = new Size2D(0, 0);
3579 GetProperty(View.Property.MAXIMUM_SIZE).Get(temp);
3584 SetProperty(View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3589 /// Gets/Sets whether a child view inherits it's parent's position.<br>
3590 /// Default is to inherit.<br>
3591 /// 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>
3593 public bool InheritPosition
3598 GetProperty(View.Property.INHERIT_POSITION).Get(out temp);
3603 SetProperty(View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue(value));
3608 /// Gets/Sets clipping behavior(mode) of it's children.
3610 public ClippingModeType ClippingMode
3615 if (GetProperty(View.Property.CLIPPING_MODE).Get(out temp) == false)
3617 NUILog.Error("ClippingMode get error!");
3622 return ClippingModeType.Disabled;
3623 case "CLIP_CHILDREN":
3624 return ClippingModeType.ClipChildren;
3626 return ClippingModeType.Disabled;
3631 SetProperty(View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)value));
3636 /// Get the number of renderers held by the view.
3638 public uint RendererCount
3642 return GetRendererCount();
3649 [Obsolete("Please do not use! this will be deprecated")]
3650 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> Touched
3654 if (_touchDataEventHandler == null)
3656 _touchDataCallback = OnTouch;
3657 this.TouchSignal().Connect(_touchDataCallback);
3660 _touchDataEventHandler += value;
3665 _touchDataEventHandler -= value;
3667 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
3669 this.TouchSignal().Disconnect(_touchDataCallback);
3675 [Obsolete("Please do not use! this will be deprecated")]
3676 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> Hovered
3680 if (_hoverEventHandler == null)
3682 _hoverEventCallback = OnHoverEvent;
3683 this.HoveredSignal().Connect(_hoverEventCallback);
3686 _hoverEventHandler += value;
3691 _hoverEventHandler -= value;
3693 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
3695 this.HoveredSignal().Disconnect(_hoverEventCallback);
3701 [Obsolete("Please do not use! this will be deprecated")]
3702 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelMoved
3706 if (_wheelEventHandler == null)
3708 _wheelEventCallback = OnWheelEvent;
3709 this.WheelEventSignal().Connect(_wheelEventCallback);
3712 _wheelEventHandler += value;
3717 _wheelEventHandler -= value;
3719 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
3721 this.WheelEventSignal().Disconnect(_wheelEventCallback);
3727 [Obsolete("Please do not use! this will be deprecated")]
3728 public Position AnchorPoint
3732 Position temp = new Position(0.0f, 0.0f, 0.0f);
3733 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
3738 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3742 [Obsolete("Please do not use! this will be deprecated")]
3747 Size temp = new Size(0.0f, 0.0f, 0.0f);
3748 GetProperty(View.Property.SIZE).Get(temp);
3753 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(value));
3757 [Obsolete("Please do not use! this will be deprecated")]
3758 public event EventHandler OnWindowEvent
3762 if (_onWindowEventHandler == null)
3764 _onWindowEventCallback = OnWindow;
3765 this.OnWindowSignal().Connect(_onWindowEventCallback);
3768 _onWindowEventHandler += value;
3773 _onWindowEventHandler -= value;
3775 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
3777 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
3782 [Obsolete("Please do not use! this will be deprecated")]
3783 public event EventHandler OffWindowEvent
3787 if (_offWindowEventHandler == null)
3789 _offWindowEventCallback = OffWindow;
3790 this.OffWindowSignal().Connect(_offWindowEventCallback);
3793 _offWindowEventHandler += value;
3798 _offWindowEventHandler -= value;
3800 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
3802 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
3807 [Obsolete("Please do not use! this will be deprecated")]
3808 public event EventHandler OnRelayoutEvent
3812 if (_onRelayoutEventHandler == null)
3814 _onRelayoutEventCallback = OnRelayout;
3815 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
3818 _onRelayoutEventHandler += value;
3823 _onRelayoutEventHandler -= value;
3825 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
3827 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);