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();
220 e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
222 if (_keyEventHandler != null)
224 Delegate[] delegateList = _keyEventHandler.GetInvocationList();
226 // Oring the result of each callback.
227 foreach ( EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList )
229 result |= del( this, e );
236 private EventHandler _onRelayoutEventHandler;
237 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
238 private delegate void OnRelayoutEventCallbackType(IntPtr control);
239 private OnRelayoutEventCallbackType _onRelayoutEventCallback;
242 /// Event for OnRelayout signal which can be used to subscribe/unsubscribe the event handler.<br>
243 /// OnRelayout signal is emitted after the size has been set on the view during relayout.<br>
245 public event EventHandler Relayout
249 if (_onRelayoutEventHandler == null)
251 _onRelayoutEventCallback = OnRelayout;
252 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
255 _onRelayoutEventHandler += value;
260 _onRelayoutEventHandler -= value;
262 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
264 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
270 // Callback for View OnRelayout signal
271 private void OnRelayout(IntPtr data)
273 if (_onRelayoutEventHandler != null)
275 _onRelayoutEventHandler(this, null);
280 /// Event arguments that passed via Touch signal.
282 public class TouchEventArgs : EventArgs
284 private Touch _touch;
287 /// Touch - contains the information of touch points
302 private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
303 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
304 private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
305 private TouchDataCallbackType _touchDataCallback;
308 /// Event for Touched signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
309 /// Touched signal is emitted when touch input is received.<br>
311 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
315 if (_touchDataEventHandler == null)
317 _touchDataCallback = OnTouch;
318 this.TouchSignal().Connect(_touchDataCallback);
321 _touchDataEventHandler += value;
326 _touchDataEventHandler -= value;
328 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
330 this.TouchSignal().Disconnect(_touchDataCallback);
336 // Callback for View TouchSignal
337 private bool OnTouch(IntPtr view, IntPtr touchData)
339 TouchEventArgs e = new TouchEventArgs();
341 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
343 if (_touchDataEventHandler != null)
345 return _touchDataEventHandler(this, e);
352 /// Event arguments that passed via Hover signal.
354 public class HoverEventArgs : EventArgs
356 private Hover _hover;
359 /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
374 private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
375 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
376 private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
377 private HoverEventCallbackType _hoverEventCallback;
380 /// Event for Hovered signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
381 /// Hovered signal is emitted when hover input is received.<br>
383 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
387 if (_hoverEventHandler == null)
389 _hoverEventCallback = OnHoverEvent;
390 this.HoveredSignal().Connect(_hoverEventCallback);
393 _hoverEventHandler += value;
398 _hoverEventHandler -= value;
400 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
402 this.HoveredSignal().Disconnect(_hoverEventCallback);
408 // Callback for View Hover signal
409 private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
411 HoverEventArgs e = new HoverEventArgs();
413 e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
415 if (_hoverEventHandler != null)
417 return _hoverEventHandler(this, e);
424 /// Event arguments that passed via Wheel signal.
426 public class WheelEventArgs : EventArgs
428 private Wheel _wheel;
431 /// WheelEvent - store a wheel rolling type : MOUSE_WHEEL or CUSTOM_WHEEL
446 private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
447 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
448 private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
449 private WheelEventCallbackType _wheelEventCallback;
452 /// Event for WheelMoved signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
453 /// WheelMoved signal is emitted when wheel event is received.<br>
455 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
459 if (_wheelEventHandler == null)
461 _wheelEventCallback = OnWheelEvent;
462 this.WheelEventSignal().Connect(_wheelEventCallback);
465 _wheelEventHandler += value;
470 _wheelEventHandler -= value;
472 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
474 this.WheelEventSignal().Disconnect(_wheelEventCallback);
480 // Callback for View Wheel signal
481 private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
483 WheelEventArgs e = new WheelEventArgs();
485 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
487 if (_wheelEventHandler != null)
489 return _wheelEventHandler(this, e);
495 private EventHandler _onWindowEventHandler;
496 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
497 private delegate void OnWindowEventCallbackType(IntPtr control);
498 private OnWindowEventCallbackType _onWindowEventCallback;
501 /// Event for OnWindow signal which can be used to subscribe/unsubscribe the event handler.<br>
502 /// OnWindow signal is emitted after the view has been connected to the Window.<br>
504 public event EventHandler AddedToWindow
508 if (_onWindowEventHandler == null)
510 _onWindowEventCallback = OnWindow;
511 this.OnWindowSignal().Connect(_onWindowEventCallback);
514 _onWindowEventHandler += value;
519 _onWindowEventHandler -= value;
521 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
523 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
528 // Callback for View OnWindow signal
529 private void OnWindow(IntPtr data)
531 if (_onWindowEventHandler != null)
533 _onWindowEventHandler(this, null);
538 private EventHandler _offWindowEventHandler;
539 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
540 private delegate void OffWindowEventCallbackType(IntPtr control);
541 private OffWindowEventCallbackType _offWindowEventCallback;
544 /// Event for OffWindow signal which can be used to subscribe/unsubscribe the event handler.<br>
545 /// OffWindow signal is emitted after the view has been disconnected from the Window.<br>
547 public event EventHandler RemovedFromWindow
551 if (_offWindowEventHandler == null)
553 _offWindowEventCallback = OffWindow;
554 this.OffWindowSignal().Connect(_offWindowEventCallback);
557 _offWindowEventHandler += value;
562 _offWindowEventHandler -= value;
564 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
566 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
571 // Callback for View OffWindow signal
572 private void OffWindow(IntPtr data)
574 if (_offWindowEventHandler != null)
576 _offWindowEventHandler(this, null);
581 /// Event arguments of visibility changed.
583 public class VisibilityChangedEventArgs : EventArgs
586 private bool _visibility;
587 private VisibilityChangeType _type;
590 /// The view, or child of view, whose visibility has changed.
605 /// Whether the view is now visible or not.
607 public bool Visibility
620 /// Whether the view's visible property has changed or a parent's.
622 public VisibilityChangeType Type
635 private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
636 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
637 private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
638 private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
641 /// Event for visibility change which can be used to subscribe/unsubscribe the event handler.<br>
642 /// This signal is emitted when the visible property of this or a parent view is changed.<br>
644 public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
648 if (_visibilityChangedEventHandler == null)
650 _visibilityChangedEventCallback = OnVisibilityChanged;
651 VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
654 _visibilityChangedEventHandler += value;
659 _visibilityChangedEventHandler -= value;
661 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
663 VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
668 // Callback for View visibility change signal
669 private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
671 VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
674 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
676 e.Visibility = visibility;
679 if (_visibilityChangedEventHandler != null)
681 _visibilityChangedEventHandler(this, e);
685 // Resource Ready Signal
687 private EventHandler _resourcesLoadedEventHandler;
688 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
689 private delegate void ResourcesLoadedCallbackType(IntPtr control);
690 private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
693 /// Event for ResourcesLoadedSignal signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
694 /// This signal is emitted after all resources required by a View are loaded and ready.<br>
696 public event EventHandler ResourcesLoaded
700 if (_resourcesLoadedEventHandler == null)
702 _ResourcesLoadedCallback = OnResourcesLoaded;
703 this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
706 _resourcesLoadedEventHandler += value;
711 _resourcesLoadedEventHandler -= value;
713 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
715 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
720 private void OnResourcesLoaded(IntPtr view)
722 if (_resourcesLoadedEventHandler != null)
724 _resourcesLoadedEventHandler(this, null);
728 internal IntPtr GetPtrfromView()
730 return (IntPtr)swigCPtr;
733 internal class Property
735 internal static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get();
736 internal static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get();
737 internal static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get();
738 internal static readonly int LEFT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
739 internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
740 internal static readonly int UP_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
741 internal static readonly int DOWN_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
742 internal static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get();
743 internal static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get();
744 internal static readonly int SIBLING_ORDER = NDalicManualPINVOKE.Actor_Property_SIBLING_ORDER_get();
745 internal static readonly int OPACITY = NDalicManualPINVOKE.Actor_Property_OPACITY_get();
746 internal static readonly int SCREEN_POSITION = NDalicManualPINVOKE.Actor_Property_SCREEN_POSITION_get();
747 internal static readonly int POSITION_USES_ANCHOR_POINT = NDalicManualPINVOKE.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
748 internal static readonly int PARENT_ORIGIN = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_get();
749 internal static readonly int PARENT_ORIGIN_X = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_X_get();
750 internal static readonly int PARENT_ORIGIN_Y = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Y_get();
751 internal static readonly int PARENT_ORIGIN_Z = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Z_get();
752 internal static readonly int ANCHOR_POINT = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_get();
753 internal static readonly int ANCHOR_POINT_X = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_X_get();
754 internal static readonly int ANCHOR_POINT_Y = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Y_get();
755 internal static readonly int ANCHOR_POINT_Z = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Z_get();
756 internal static readonly int SIZE = NDalicPINVOKE.Actor_Property_SIZE_get();
757 internal static readonly int SIZE_WIDTH = NDalicPINVOKE.Actor_Property_SIZE_WIDTH_get();
758 internal static readonly int SIZE_HEIGHT = NDalicPINVOKE.Actor_Property_SIZE_HEIGHT_get();
759 internal static readonly int SIZE_DEPTH = NDalicPINVOKE.Actor_Property_SIZE_DEPTH_get();
760 internal static readonly int POSITION = NDalicPINVOKE.Actor_Property_POSITION_get();
761 internal static readonly int POSITION_X = NDalicPINVOKE.Actor_Property_POSITION_X_get();
762 internal static readonly int POSITION_Y = NDalicPINVOKE.Actor_Property_POSITION_Y_get();
763 internal static readonly int POSITION_Z = NDalicPINVOKE.Actor_Property_POSITION_Z_get();
764 internal static readonly int WORLD_POSITION = NDalicPINVOKE.Actor_Property_WORLD_POSITION_get();
765 internal static readonly int WORLD_POSITION_X = NDalicPINVOKE.Actor_Property_WORLD_POSITION_X_get();
766 internal static readonly int WORLD_POSITION_Y = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Y_get();
767 internal static readonly int WORLD_POSITION_Z = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Z_get();
768 internal static readonly int ORIENTATION = NDalicPINVOKE.Actor_Property_ORIENTATION_get();
769 internal static readonly int WORLD_ORIENTATION = NDalicPINVOKE.Actor_Property_WORLD_ORIENTATION_get();
770 internal static readonly int SCALE = NDalicPINVOKE.Actor_Property_SCALE_get();
771 internal static readonly int SCALE_X = NDalicPINVOKE.Actor_Property_SCALE_X_get();
772 internal static readonly int SCALE_Y = NDalicPINVOKE.Actor_Property_SCALE_Y_get();
773 internal static readonly int SCALE_Z = NDalicPINVOKE.Actor_Property_SCALE_Z_get();
774 internal static readonly int WORLD_SCALE = NDalicPINVOKE.Actor_Property_WORLD_SCALE_get();
775 internal static readonly int VISIBLE = NDalicPINVOKE.Actor_Property_VISIBLE_get();
776 internal static readonly int WORLD_COLOR = NDalicPINVOKE.Actor_Property_WORLD_COLOR_get();
777 internal static readonly int WORLD_MATRIX = NDalicPINVOKE.Actor_Property_WORLD_MATRIX_get();
778 internal static readonly int NAME = NDalicPINVOKE.Actor_Property_NAME_get();
779 internal static readonly int SENSITIVE = NDalicPINVOKE.Actor_Property_SENSITIVE_get();
780 internal static readonly int LEAVE_REQUIRED = NDalicPINVOKE.Actor_Property_LEAVE_REQUIRED_get();
781 internal static readonly int INHERIT_ORIENTATION = NDalicPINVOKE.Actor_Property_INHERIT_ORIENTATION_get();
782 internal static readonly int INHERIT_SCALE = NDalicPINVOKE.Actor_Property_INHERIT_SCALE_get();
783 internal static readonly int DRAW_MODE = NDalicPINVOKE.Actor_Property_DRAW_MODE_get();
784 internal static readonly int SIZE_MODE_FACTOR = NDalicPINVOKE.Actor_Property_SIZE_MODE_FACTOR_get();
785 internal static readonly int WIDTH_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_WIDTH_RESIZE_POLICY_get();
786 internal static readonly int HEIGHT_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_HEIGHT_RESIZE_POLICY_get();
787 internal static readonly int SIZE_SCALE_POLICY = NDalicPINVOKE.Actor_Property_SIZE_SCALE_POLICY_get();
788 internal static readonly int WIDTH_FOR_HEIGHT = NDalicPINVOKE.Actor_Property_WIDTH_FOR_HEIGHT_get();
789 internal static readonly int HEIGHT_FOR_WIDTH = NDalicPINVOKE.Actor_Property_HEIGHT_FOR_WIDTH_get();
790 internal static readonly int PADDING = NDalicPINVOKE.Actor_Property_PADDING_get();
791 internal static readonly int MINIMUM_SIZE = NDalicPINVOKE.Actor_Property_MINIMUM_SIZE_get();
792 internal static readonly int MAXIMUM_SIZE = NDalicPINVOKE.Actor_Property_MAXIMUM_SIZE_get();
793 internal static readonly int INHERIT_POSITION = NDalicPINVOKE.Actor_Property_INHERIT_POSITION_get();
794 internal static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
798 /// Describes the direction to move the focus towards.
800 public enum FocusDirection
811 /// Creates a new instance of a View.
813 public View() : this(NDalicPINVOKE.View_New(), true)
815 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
818 internal View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true)
820 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
823 [Obsolete("Please do not use! this will be deprecated, instead please us as keyword.")]
824 public new static View DownCast(BaseHandle handle)
826 View ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as View;
827 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
831 [Obsolete("Please do not use! this will be deprecated, instead please us as keyword.")]
832 public static T DownCast<T>(View view) where T : View
834 T ret = Registry.GetManagedBaseHandleFromNativePtr(view) as T;
842 private View ConvertIdToView(uint id)
848 view = Parent.FindChildById(id);
853 view = Window.Instance.GetRootLayer().FindChildById(id);
859 internal void SetKeyInputFocus()
861 NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
862 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
866 /// Quries whether the view has focus.
868 /// <returns>true if this view has focus</returns>
869 public bool HasFocus()
871 bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
872 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
876 internal void ClearKeyInputFocus()
878 NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
879 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
882 internal PinchGestureDetector GetPinchGestureDetector()
884 PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
885 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
889 internal PanGestureDetector GetPanGestureDetector()
891 PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
892 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
896 internal TapGestureDetector GetTapGestureDetector()
898 TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
899 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
903 internal LongPressGestureDetector GetLongPressGestureDetector()
905 LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
906 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
911 /// Sets the name of the style to be applied to the view.
913 /// <param name="styleName">A string matching a style described in a stylesheet</param>
914 public void SetStyleName(string styleName)
916 NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
917 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
921 /// Retrieves the name of the style to be applied to the view (if any).
923 /// <returns>A string matching a style, or an empty string</returns>
924 public string GetStyleName()
926 string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
927 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
931 internal void SetBackgroundColor(Vector4 color)
933 NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
934 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
937 internal Vector4 GetBackgroundColor()
939 Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
940 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
944 internal void SetBackgroundImage(Image image)
946 NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
947 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
951 /// Clears the background.
953 public void ClearBackground()
955 NDalicPINVOKE.View_ClearBackground(swigCPtr);
956 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
959 internal ControlKeySignal KeyEventSignal()
961 ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
962 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
966 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
968 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
969 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
973 internal KeyInputFocusSignal KeyInputFocusLostSignal()
975 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
976 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
980 internal View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
982 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
985 internal enum PropertyRange
987 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
988 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
989 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
993 /// styleName, type string.
995 public string StyleName
1000 GetProperty(View.Property.STYLE_NAME).Get(out temp);
1005 SetProperty(View.Property.STYLE_NAME, new Tizen.NUI.PropertyValue(value));
1010 /// mutually exclusive with BACKGROUND_IMAGE & BACKGROUND, type Vector4.
1012 public Color BackgroundColor
1016 Color backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1018 Tizen.NUI.PropertyMap background = Background;
1020 background.Find(Visual.Property.Type)?.Get(out visualType);
1021 if (visualType == (int)Visual.Type.Color)
1023 background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor);
1026 return backgroundColor;
1030 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1035 /// Create an Animation to animate the background color visual. If there is no
1036 /// background visual, creates one with transparent black as it's mixColor.
1038 public Animation AnimateBackgroundColor( object destinationValue,
1041 AlphaFunction.BuiltinFunctions? alphaFunction = null,
1042 object initialValue = null)
1044 Tizen.NUI.PropertyMap background = Background;
1046 if( background.Empty() )
1048 // If there is no background yet, ensure there is a transparent
1050 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1051 background = Background;
1053 return AnimateColor( "background", destinationValue, startTime, endTime, alphaFunction, initialValue );
1057 /// Create an Animation to animate the mixColor of the named visual.
1059 public Animation AnimateColor( string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null )
1061 Animation animation = null;
1063 PropertyMap _animator = new PropertyMap();
1064 if( alphaFunction != null )
1066 _animator.Add("alphaFunction", new PropertyValue( AlphaFunction.BuiltinToPropertyKey(alphaFunction) ) );
1069 PropertyMap _timePeriod = new PropertyMap();
1070 _timePeriod.Add( "duration", new PropertyValue((endTime-startTime)/1000.0f) );
1071 _timePeriod.Add( "delay", new PropertyValue( startTime/1000.0f ) );
1072 _animator.Add( "timePeriod", new PropertyValue( _timePeriod ) );
1074 PropertyMap _transition = new PropertyMap();
1075 _transition.Add( "animator", new PropertyValue( _animator ) );
1076 _transition.Add( "target", new PropertyValue( targetVisual ) );
1077 _transition.Add( "property", new PropertyValue( "mixColor" ) );
1079 if( initialColor != null )
1081 PropertyValue initValue = PropertyValue.CreateFromObject( initialColor );
1082 _transition.Add( "initialValue", initValue );
1085 PropertyValue destValue = PropertyValue.CreateFromObject( destinationColor );
1086 _transition.Add( "targetValue", destValue );
1087 TransitionData _transitionData = new TransitionData( _transition );
1089 animation = new Animation( NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true );
1090 if (NDalicPINVOKE.SWIGPendingException.Pending)
1091 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1097 /// mutually exclusive with BACKGROUND_COLOR & BACKGROUND, type Map.
1099 public string BackgroundImage
1103 string backgroundImage = "";
1105 Tizen.NUI.PropertyMap background = Background;
1107 background.Find(Visual.Property.Type)?.Get(out visualType);
1108 if (visualType == (int)Visual.Type.Image)
1110 background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
1113 return backgroundImage;
1117 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1121 public Tizen.NUI.PropertyMap Background
1125 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1126 GetProperty( View.Property.BACKGROUND ).Get(temp);
1131 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1137 /// The current state of the view.
1144 if (GetProperty(View.Property.STATE).Get(out temp) == false)
1146 NUILog.Error("State get error!");
1152 return States.Normal;
1156 return States.Focused;
1160 return States.Disabled;
1164 return States.Normal;
1170 SetProperty(View.Property.STATE, new Tizen.NUI.PropertyValue((int)value));
1175 /// The current sub state of the view.
1177 public States SubState
1182 if (GetProperty(View.Property.SUB_STATE).Get(out temp) == false)
1184 NUILog.Error("subState get error!");
1189 return States.Normal;
1191 return States.Focused;
1193 return States.Disabled;
1195 return States.Normal;
1200 string valueToString = "";
1205 valueToString = "NORMAL";
1208 case States.Focused:
1210 valueToString = "FOCUSED";
1213 case States.Disabled:
1215 valueToString = "DISABLED";
1220 valueToString = "NORMAL";
1224 SetProperty(View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
1229 /// Displays a tooltip
1231 public Tizen.NUI.PropertyMap Tooltip
1235 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1236 GetProperty(View.Property.TOOLTIP).Get(temp);
1241 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1246 /// Displays a tooltip as Text
1248 public string TooltipText
1252 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1256 private int LeftFocusableViewId
1261 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
1266 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1270 private int RightFocusableViewId
1275 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
1280 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1284 private int UpFocusableViewId
1289 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
1294 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1298 private int DownFocusableViewId
1303 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
1308 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1313 /// Child Property of FlexContainer.<br>
1314 /// The proportion of the free space in the container the flex item will receive.<br>
1315 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br>
1322 GetProperty(FlexContainer.ChildProperty.FLEX).Get(out temp);
1327 SetProperty(FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue(value));
1332 /// Child Property of FlexContainer.<br>
1333 /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br>
1335 public int AlignSelf
1340 GetProperty(FlexContainer.ChildProperty.ALIGN_SELF).Get(out temp);
1345 SetProperty(FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue(value));
1350 /// Child Property of FlexContainer.<br>
1351 /// The space around the flex item.<br>
1353 public Vector4 FlexMargin
1357 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1358 GetProperty(FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
1363 SetProperty(FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue(value));
1368 /// The top-left cell this child occupies, if not set, the first available cell is used
1370 public Vector2 CellIndex
1374 Vector2 temp = new Vector2(0.0f, 0.0f);
1375 GetProperty(TableView.ChildProperty.CELL_INDEX).Get(temp);
1380 SetProperty(TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue(value));
1385 /// The number of rows this child occupies, if not set, default value is 1
1387 public float RowSpan
1392 GetProperty(TableView.ChildProperty.ROW_SPAN).Get(out temp);
1397 SetProperty(TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue(value));
1402 /// The number of columns this child occupies, if not set, default value is 1
1404 public float ColumnSpan
1409 GetProperty(TableView.ChildProperty.COLUMN_SPAN).Get(out temp);
1414 SetProperty(TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue(value));
1419 /// The horizontal alignment of this child inside the cells, if not set, default value is 'left'
1421 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
1426 if (GetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
1428 NUILog.Error("CellHorizontalAlignment get error!");
1434 return Tizen.NUI.HorizontalAlignmentType.Left;
1436 return Tizen.NUI.HorizontalAlignmentType.Center;
1438 return Tizen.NUI.HorizontalAlignmentType.Right;
1440 return Tizen.NUI.HorizontalAlignmentType.Left;
1445 string valueToString = "";
1448 case Tizen.NUI.HorizontalAlignmentType.Left:
1450 valueToString = "left";
1453 case Tizen.NUI.HorizontalAlignmentType.Center:
1455 valueToString = "center";
1458 case Tizen.NUI.HorizontalAlignmentType.Right:
1460 valueToString = "right";
1465 valueToString = "left";
1469 SetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1474 /// The vertical alignment of this child inside the cells, if not set, default value is 'top'
1476 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
1481 GetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
1483 NUILog.Error("CellVerticalAlignment get error!");
1489 return Tizen.NUI.VerticalAlignmentType.Top;
1491 return Tizen.NUI.VerticalAlignmentType.Center;
1493 return Tizen.NUI.VerticalAlignmentType.Bottom;
1495 return Tizen.NUI.VerticalAlignmentType.Top;
1500 string valueToString = "";
1503 case Tizen.NUI.VerticalAlignmentType.Top:
1505 valueToString = "top";
1508 case Tizen.NUI.VerticalAlignmentType.Center:
1510 valueToString = "center";
1513 case Tizen.NUI.VerticalAlignmentType.Bottom:
1515 valueToString = "bottom";
1520 valueToString = "top";
1524 SetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1529 /// The left focusable view.<br>
1530 /// This will return NULL if not set.<br>
1531 /// This will also return NULL if the specified left focusable view is not on Window.<br>
1533 public View LeftFocusableView
1535 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1538 if (LeftFocusableViewId >= 0)
1540 return ConvertIdToView((uint)LeftFocusableViewId);
1546 LeftFocusableViewId = (int)value.GetId();
1551 /// The right focusable view.<br>
1552 /// This will return NULL if not set.<br>
1553 /// This will also return NULL if the specified right focusable view is not on Window.<br>
1555 public View RightFocusableView
1557 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1560 if (RightFocusableViewId >= 0)
1562 return ConvertIdToView((uint)RightFocusableViewId);
1568 RightFocusableViewId = (int)value.GetId();
1573 /// The up focusable view.<br>
1574 /// This will return NULL if not set.<br>
1575 /// This will also return NULL if the specified up focusable view is not on Window.<br>
1577 public View UpFocusableView
1579 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1582 if (UpFocusableViewId >= 0)
1584 return ConvertIdToView((uint)UpFocusableViewId);
1590 UpFocusableViewId = (int)value.GetId();
1595 /// The down focusable view.<br>
1596 /// This will return NULL if not set.<br>
1597 /// This will also return NULL if the specified down focusable view is not on Window.<br>
1599 public View DownFocusableView
1601 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1604 if (DownFocusableViewId >= 0)
1606 return ConvertIdToView((uint)DownFocusableViewId);
1612 DownFocusableViewId = (int)value.GetId();
1617 /// whether the view should be focusable by keyboard navigation.
1619 public bool Focusable
1623 SetKeyboardFocusable(value);
1627 return IsKeyboardFocusable();
1632 /// Enumeration for describing the states of view.
1651 /// Retrieves the position of the View.<br>
1652 /// The coordinates are relative to the View's parent.<br>
1654 public Position CurrentPosition
1658 return GetCurrentPosition();
1663 /// Sets the size of an view for width and height.<br>
1664 /// Geometry can be scaled to fit within this area.<br>
1665 /// This does not interfere with the views scale factor.<br>
1666 /// The views default depth is the minimum of width & height.<br>
1668 public Size2D Size2D
1672 Size temp = new Size(0.0f, 0.0f, 0.0f);
1673 GetProperty(View.Property.SIZE).Get(temp);
1674 Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
1679 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(new Size(value)));
1684 /// Retrieves the size of the View.<br>
1685 /// The coordinates are relative to the View's parent.<br>
1687 public Size2D CurrentSize
1691 return GetCurrentSize();
1696 /// Retrieves the view's parent.<br>
1706 [Obsolete("Please do not use! this will be deprecated. Please use Visibility instead.")]
1716 /// Retrieves and sets the view's opacity.<br>
1718 public float Opacity
1723 GetProperty(View.Property.OPACITY).Get(out temp);
1728 SetProperty(View.Property.OPACITY, new Tizen.NUI.PropertyValue(value));
1733 /// Sets the position of the View for X and Y.<br>
1734 /// By default, sets the position vector between the parent origin and pivot point(default).<br>
1735 /// If Position inheritance if disabled, sets the world position.<br>
1737 public Position2D Position2D
1741 Position temp = new Position(0.0f, 0.0f, 0.0f);
1742 GetProperty(View.Property.POSITION).Get(temp);
1743 return new Position2D(temp);
1747 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(new Position(value)));
1752 /// Retrieves screen postion of view's.<br>
1754 public Vector2 ScreenPosition
1758 Vector2 temp = new Vector2(0.0f, 0.0f);
1759 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
1765 /// Determines whether the pivot point should be used to determine the position of the view.
1766 /// This is true by default.
1768 /// <remarks>If false, then the top-left of the view is used for the position.
1769 /// Setting this to false will allow scaling or rotation around the anchor-point without affecting the view's position.
1771 public bool PositionUsesPivotPoint
1776 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
1781 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
1785 [Obsolete("Please do not use! this will be deprecated")]
1786 public bool PositionUsesAnchorPoint
1791 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
1796 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
1800 internal bool FocusState
1804 return IsKeyboardFocusable();
1808 SetKeyboardFocusable(value);
1813 /// Queries whether the view is connected to the Stage.<br>
1814 /// When an view is connected, it will be directly or indirectly parented to the root View.<br>
1816 public bool IsOnWindow
1825 /// Gets depth in the hierarchy for the view.
1827 public int HierarchyDepth
1831 return GetHierarchyDepth();
1836 /// Sets the sibling order of the view so depth position can be defined within the same parent.
1839 /// Note The initial value is 0.
1840 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove and LowerBelow will override the sibling order.
1841 /// The values set by this Property will likely change.
1843 public int SiblingOrder
1848 GetProperty(View.Property.SIBLING_ORDER).Get(out temp);
1853 SetProperty(View.Property.SIBLING_ORDER, new Tizen.NUI.PropertyValue(value));
1858 /// Returns the natural size of the view.
1861 /// Deriving classes stipulate the natural size and by default a view has a ZERO natural size.
1863 [Obsolete("Please do not use! this will be deprecated, please use NaturalSize2D instead")]
1864 public Vector3 NaturalSize
1868 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
1869 if (NDalicPINVOKE.SWIGPendingException.Pending)
1870 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1876 /// Returns the natural size (Size2D) of the view.
1879 /// Deriving classes stipulate the natural size and by default a view has a ZERO natural size.
1881 public Size2D NaturalSize2D
1885 Vector3 temp = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
1886 if (NDalicPINVOKE.SWIGPendingException.Pending)
1887 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1889 return new Size2D((int)temp.Width, (int)temp.Height);
1897 /// This is an asynchronous method.
1908 /// This is an asynchronous method.
1909 /// If an view is hidden, then the view and its children will not be rendered.
1910 /// 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.
1917 internal void Raise()
1919 NDalicPINVOKE.Raise(swigCPtr);
1920 if (NDalicPINVOKE.SWIGPendingException.Pending)
1921 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1924 internal void Lower()
1926 NDalicPINVOKE.Lower(swigCPtr);
1927 if (NDalicPINVOKE.SWIGPendingException.Pending)
1928 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1932 /// Raise view above all other views.
1935 /// Sibling order of views within the parent will be updated automatically.
1936 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
1938 public void RaiseToTop()
1940 NDalicPINVOKE.RaiseToTop(swigCPtr);
1941 if (NDalicPINVOKE.SWIGPendingException.Pending)
1942 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1946 /// Lower view to the bottom of all views.
1949 /// Sibling order of views within the parent will be updated automatically.
1950 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
1952 public void LowerToBottom()
1954 NDalicPINVOKE.LowerToBottom(swigCPtr);
1955 if (NDalicPINVOKE.SWIGPendingException.Pending)
1956 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1960 /// Query if all resources required by a View are loaded and ready.
1962 /// <remarks>Most resources are only loaded when the control is placed on stage
1964 public bool IsResourceReady()
1966 bool ret = NDalicPINVOKE.IsResourceReady(swigCPtr);
1967 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1972 /// Raise the view to above the target view.
1974 /// <remarks>Sibling order of views within the parent will be updated automatically.
1975 /// Views on the level above the target view will still be shown above this view.
1976 /// Raising this view above views with the same sibling order as each other will raise this view above them.
1977 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
1979 /// <param name="target">Will be raised above this view</param>
1980 internal void RaiseAbove(View target)
1982 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
1983 if (NDalicPINVOKE.SWIGPendingException.Pending)
1984 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1988 /// Lower the view to below the target view.
1990 /// <remarks>Sibling order of views within the parent will be updated automatically.
1991 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
1992 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
1994 /// <param name="target">Will be lowered below this view</param>
1995 internal void LowerBelow(View target)
1997 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
1998 if (NDalicPINVOKE.SWIGPendingException.Pending)
1999 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2002 internal string GetName()
2004 string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);
2005 if (NDalicPINVOKE.SWIGPendingException.Pending)
2006 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2010 internal void SetName(string name)
2012 NDalicPINVOKE.Actor_SetName(swigCPtr, name);
2013 if (NDalicPINVOKE.SWIGPendingException.Pending)
2014 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2017 internal uint GetId()
2019 uint ret = NDalicPINVOKE.Actor_GetId(swigCPtr);
2020 if (NDalicPINVOKE.SWIGPendingException.Pending)
2021 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2025 internal bool IsRoot()
2027 bool ret = NDalicPINVOKE.Actor_IsRoot(swigCPtr);
2028 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2032 internal bool OnWindow()
2034 bool ret = NDalicPINVOKE.Actor_OnStage(swigCPtr);
2035 if (NDalicPINVOKE.SWIGPendingException.Pending)
2036 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2040 internal Layer GetLayer()
2042 IntPtr cPtr = NDalicPINVOKE.Actor_GetLayer(swigCPtr);
2043 Layer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Layer;
2045 if (NDalicPINVOKE.SWIGPendingException.Pending)
2046 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2051 /// Adds a child view to this View.
2053 /// <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>
2054 /// <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>
2055 /// <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>
2056 /// <param name="child">The child</param>
2057 public void Add(View child)
2059 NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
2060 if (NDalicPINVOKE.SWIGPendingException.Pending)
2061 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2065 /// Removes a child View from this View. If the view was not a child of this view, this is a no-op.
2067 /// <pre>This View(the parent) has been initialized. The child view is not the same as the parent view.</pre>
2068 /// <param name="child">The child</param>
2069 public void Remove(View child)
2071 NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
2072 if (NDalicPINVOKE.SWIGPendingException.Pending)
2073 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2077 /// Removes a View from its Parent View / Layer. If the View has no parent, this method does nothing.
2079 /// <pre>The (child) View has been initialized. </pre>
2080 public void Unparent()
2082 NDalicPINVOKE.Actor_Unparent(swigCPtr);
2083 if (NDalicPINVOKE.SWIGPendingException.Pending)
2084 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2088 /// Retrieves the number of children held by the view.
2090 /// <pre>The View has been initialized.</pre>
2091 /// <returns>The number of children</returns>
2092 internal uint GetChildCount()
2094 uint ret = NDalicPINVOKE.Actor_GetChildCount(swigCPtr);
2095 if (NDalicPINVOKE.SWIGPendingException.Pending)
2096 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2101 /// Retrieves child view by index.
2103 /// <pre>The View has been initialized.</pre>
2104 /// <param name="index">The index of the child to retrieve</param>
2105 /// <returns>The view for the given index or empty handle if children not initialized</returns>
2106 public View GetChildAt(uint index)
2108 IntPtr cPtr = NDalicPINVOKE.Actor_GetChildAt(swigCPtr, index);
2110 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2112 if (NDalicPINVOKE.SWIGPendingException.Pending)
2113 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2118 /// Search through this view's hierarchy for an view with the given name.
2119 /// The view itself is also considered in the search.
2121 /// <pre>The View has been initialized.</pre>
2122 /// <param name="viewName">The name of the view to find</param>
2123 /// <returns>A handle to the view if found, or an empty handle if not</returns>
2124 public View FindChildByName(string viewName)
2126 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
2128 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2130 if (NDalicPINVOKE.SWIGPendingException.Pending)
2131 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2135 internal View FindChildById(uint id)
2137 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
2139 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2141 if (NDalicPINVOKE.SWIGPendingException.Pending)
2142 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2146 /*internal View GetParent()
2148 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
2150 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2152 if (NDalicPINVOKE.SWIGPendingException.Pending)
2153 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2157 internal View GetParent()
2160 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
2162 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(cPtr);
2164 if(basehandle is Layer)
2166 View ret2 = new View(cPtr,false);
2170 ret = basehandle as View;
2172 if (NDalicPINVOKE.SWIGPendingException.Pending)
2173 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2177 internal void SetParentOrigin(Vector3 origin)
2179 NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
2180 if (NDalicPINVOKE.SWIGPendingException.Pending)
2181 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2184 internal Vector3 GetCurrentParentOrigin()
2186 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentParentOrigin(swigCPtr), true);
2187 if (NDalicPINVOKE.SWIGPendingException.Pending)
2188 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2192 internal void SetAnchorPoint(Vector3 anchorPoint)
2194 NDalicPINVOKE.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
2195 if (NDalicPINVOKE.SWIGPendingException.Pending)
2196 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2199 internal Vector3 GetCurrentAnchorPoint()
2201 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentAnchorPoint(swigCPtr), true);
2202 if (NDalicPINVOKE.SWIGPendingException.Pending)
2203 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2207 internal void SetSize(float width, float height)
2209 NDalicPINVOKE.Actor_SetSize__SWIG_0(swigCPtr, width, height);
2210 if (NDalicPINVOKE.SWIGPendingException.Pending)
2211 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2214 internal void SetSize(float width, float height, float depth)
2216 NDalicPINVOKE.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
2217 if (NDalicPINVOKE.SWIGPendingException.Pending)
2218 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2221 internal void SetSize(Vector2 size)
2223 NDalicPINVOKE.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
2224 if (NDalicPINVOKE.SWIGPendingException.Pending)
2225 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2228 internal void SetSize(Vector3 size)
2230 NDalicPINVOKE.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
2231 if (NDalicPINVOKE.SWIGPendingException.Pending)
2232 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2235 internal Vector3 GetTargetSize()
2237 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetTargetSize(swigCPtr), true);
2238 if (NDalicPINVOKE.SWIGPendingException.Pending)
2239 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2243 internal Size2D GetCurrentSize()
2245 Size ret = new Size(NDalicPINVOKE.Actor_GetCurrentSize(swigCPtr), true);
2246 if (NDalicPINVOKE.SWIGPendingException.Pending)
2247 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2248 Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
2252 internal Vector3 GetNaturalSize()
2254 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2255 if (NDalicPINVOKE.SWIGPendingException.Pending)
2256 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2260 internal void SetPosition(float x, float y)
2262 NDalicPINVOKE.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
2263 if (NDalicPINVOKE.SWIGPendingException.Pending)
2264 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2267 internal void SetPosition(float x, float y, float z)
2269 NDalicPINVOKE.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
2270 if (NDalicPINVOKE.SWIGPendingException.Pending)
2271 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2274 internal void SetPosition(Vector3 position)
2276 NDalicPINVOKE.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
2277 if (NDalicPINVOKE.SWIGPendingException.Pending)
2278 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2281 internal void SetX(float x)
2283 NDalicPINVOKE.Actor_SetX(swigCPtr, x);
2284 if (NDalicPINVOKE.SWIGPendingException.Pending)
2285 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2288 internal void SetY(float y)
2290 NDalicPINVOKE.Actor_SetY(swigCPtr, y);
2291 if (NDalicPINVOKE.SWIGPendingException.Pending)
2292 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2295 internal void SetZ(float z)
2297 NDalicPINVOKE.Actor_SetZ(swigCPtr, z);
2298 if (NDalicPINVOKE.SWIGPendingException.Pending)
2299 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2302 internal void TranslateBy(Vector3 distance)
2304 NDalicPINVOKE.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
2305 if (NDalicPINVOKE.SWIGPendingException.Pending)
2306 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2309 internal Position GetCurrentPosition()
2311 Position ret = new Position(NDalicPINVOKE.Actor_GetCurrentPosition(swigCPtr), true);
2312 if (NDalicPINVOKE.SWIGPendingException.Pending)
2313 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2317 internal Vector3 GetCurrentWorldPosition()
2319 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldPosition(swigCPtr), true);
2320 if (NDalicPINVOKE.SWIGPendingException.Pending)
2321 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2325 internal void SetInheritPosition(bool inherit)
2327 NDalicPINVOKE.Actor_SetInheritPosition(swigCPtr, inherit);
2328 if (NDalicPINVOKE.SWIGPendingException.Pending)
2329 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2332 internal bool IsPositionInherited()
2334 bool ret = NDalicPINVOKE.Actor_IsPositionInherited(swigCPtr);
2335 if (NDalicPINVOKE.SWIGPendingException.Pending)
2336 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2340 internal void SetOrientation(Degree angle, Vector3 axis)
2342 NDalicPINVOKE.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2343 if (NDalicPINVOKE.SWIGPendingException.Pending)
2344 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2347 internal void SetOrientation(Radian angle, Vector3 axis)
2349 NDalicPINVOKE.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2350 if (NDalicPINVOKE.SWIGPendingException.Pending)
2351 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2354 internal void SetOrientation(Rotation orientation)
2356 NDalicPINVOKE.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
2357 if (NDalicPINVOKE.SWIGPendingException.Pending)
2358 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2361 internal void RotateBy(Degree angle, Vector3 axis)
2363 NDalicPINVOKE.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2364 if (NDalicPINVOKE.SWIGPendingException.Pending)
2365 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2368 internal void RotateBy(Radian angle, Vector3 axis)
2370 NDalicPINVOKE.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2371 if (NDalicPINVOKE.SWIGPendingException.Pending)
2372 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2375 internal void RotateBy(Rotation relativeRotation)
2377 NDalicPINVOKE.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
2378 if (NDalicPINVOKE.SWIGPendingException.Pending)
2379 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2382 internal Rotation GetCurrentOrientation()
2384 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentOrientation(swigCPtr), true);
2385 if (NDalicPINVOKE.SWIGPendingException.Pending)
2386 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2390 internal void SetInheritOrientation(bool inherit)
2392 NDalicPINVOKE.Actor_SetInheritOrientation(swigCPtr, inherit);
2393 if (NDalicPINVOKE.SWIGPendingException.Pending)
2394 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2397 internal bool IsOrientationInherited()
2399 bool ret = NDalicPINVOKE.Actor_IsOrientationInherited(swigCPtr);
2400 if (NDalicPINVOKE.SWIGPendingException.Pending)
2401 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2405 internal Rotation GetCurrentWorldOrientation()
2407 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentWorldOrientation(swigCPtr), true);
2408 if (NDalicPINVOKE.SWIGPendingException.Pending)
2409 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2413 internal void SetScale(float scale)
2415 NDalicPINVOKE.Actor_SetScale__SWIG_0(swigCPtr, scale);
2416 if (NDalicPINVOKE.SWIGPendingException.Pending)
2417 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2420 internal void SetScale(float scaleX, float scaleY, float scaleZ)
2422 NDalicPINVOKE.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
2423 if (NDalicPINVOKE.SWIGPendingException.Pending)
2424 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2427 internal void SetScale(Vector3 scale)
2429 NDalicPINVOKE.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
2430 if (NDalicPINVOKE.SWIGPendingException.Pending)
2431 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2434 internal void ScaleBy(Vector3 relativeScale)
2436 NDalicPINVOKE.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
2437 if (NDalicPINVOKE.SWIGPendingException.Pending)
2438 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2441 internal Vector3 GetCurrentScale()
2443 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentScale(swigCPtr), true);
2444 if (NDalicPINVOKE.SWIGPendingException.Pending)
2445 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2449 internal Vector3 GetCurrentWorldScale()
2451 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldScale(swigCPtr), true);
2452 if (NDalicPINVOKE.SWIGPendingException.Pending)
2453 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2457 internal void SetInheritScale(bool inherit)
2459 NDalicPINVOKE.Actor_SetInheritScale(swigCPtr, inherit);
2460 if (NDalicPINVOKE.SWIGPendingException.Pending)
2461 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2464 internal bool IsScaleInherited()
2466 bool ret = NDalicPINVOKE.Actor_IsScaleInherited(swigCPtr);
2467 if (NDalicPINVOKE.SWIGPendingException.Pending)
2468 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2472 internal Matrix GetCurrentWorldMatrix()
2474 Matrix ret = new Matrix(NDalicPINVOKE.Actor_GetCurrentWorldMatrix(swigCPtr), true);
2475 if (NDalicPINVOKE.SWIGPendingException.Pending)
2476 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2480 internal void SetVisible(bool visible)
2482 NDalicPINVOKE.Actor_SetVisible(swigCPtr, visible);
2483 if (NDalicPINVOKE.SWIGPendingException.Pending)
2484 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2487 internal bool IsVisible()
2489 bool ret = NDalicPINVOKE.Actor_IsVisible(swigCPtr);
2490 if (NDalicPINVOKE.SWIGPendingException.Pending)
2491 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2495 internal void SetOpacity(float opacity)
2497 NDalicPINVOKE.Actor_SetOpacity(swigCPtr, opacity);
2498 if (NDalicPINVOKE.SWIGPendingException.Pending)
2499 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2502 internal float GetCurrentOpacity()
2504 float ret = NDalicPINVOKE.Actor_GetCurrentOpacity(swigCPtr);
2505 if (NDalicPINVOKE.SWIGPendingException.Pending)
2506 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2510 internal void SetColor(Vector4 color)
2512 NDalicPINVOKE.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
2513 if (NDalicPINVOKE.SWIGPendingException.Pending)
2514 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2517 internal Vector4 GetCurrentColor()
2519 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentColor(swigCPtr), true);
2520 if (NDalicPINVOKE.SWIGPendingException.Pending)
2521 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2525 internal void SetColorMode(ColorMode colorMode)
2527 NDalicPINVOKE.Actor_SetColorMode(swigCPtr, (int)colorMode);
2528 if (NDalicPINVOKE.SWIGPendingException.Pending)
2529 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2532 internal ColorMode GetColorMode()
2534 ColorMode ret = (ColorMode)NDalicPINVOKE.Actor_GetColorMode(swigCPtr);
2535 if (NDalicPINVOKE.SWIGPendingException.Pending)
2536 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2540 internal Vector4 GetCurrentWorldColor()
2542 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentWorldColor(swigCPtr), true);
2543 if (NDalicPINVOKE.SWIGPendingException.Pending)
2544 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2548 internal void SetDrawMode(DrawModeType drawMode)
2550 NDalicPINVOKE.Actor_SetDrawMode(swigCPtr, (int)drawMode);
2551 if (NDalicPINVOKE.SWIGPendingException.Pending)
2552 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2555 internal DrawModeType GetDrawMode()
2557 DrawModeType ret = (DrawModeType)NDalicPINVOKE.Actor_GetDrawMode(swigCPtr);
2558 if (NDalicPINVOKE.SWIGPendingException.Pending)
2559 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2564 /// Converts screen coordinates into the view's coordinate system using the default camera.
2566 /// <pre>The View has been initialized.</pre>
2567 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5)</remarks>
2568 /// <param name="localX">On return, the X-coordinate relative to the view</param>
2569 /// <param name="localY">On return, the Y-coordinate relative to the view</param>
2570 /// <param name="screenX">The screen X-coordinate</param>
2571 /// <param name="screenY">The screen Y-coordinate</param>
2572 /// <returns>True if the conversion succeeded</returns>
2573 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
2575 bool ret = NDalicPINVOKE.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
2576 if (NDalicPINVOKE.SWIGPendingException.Pending)
2577 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2581 internal void SetKeyboardFocusable(bool focusable)
2583 NDalicPINVOKE.Actor_SetKeyboardFocusable(swigCPtr, focusable);
2584 if (NDalicPINVOKE.SWIGPendingException.Pending)
2585 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2588 internal bool IsKeyboardFocusable()
2590 bool ret = NDalicPINVOKE.Actor_IsKeyboardFocusable(swigCPtr);
2591 if (NDalicPINVOKE.SWIGPendingException.Pending)
2592 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2596 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
2598 NDalicPINVOKE.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
2599 if (NDalicPINVOKE.SWIGPendingException.Pending)
2600 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2603 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
2605 ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.Actor_GetResizePolicy(swigCPtr, (int)dimension);
2606 if (NDalicPINVOKE.SWIGPendingException.Pending)
2607 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2612 /// Sets the relative to parent size factor of the view.<br>
2613 /// This factor is only used when ResizePolicy is set to either:
2614 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br>
2615 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br>
2617 /// <pre>The View has been initialized.</pre>
2618 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis</param>
2619 public void SetSizeModeFactor(Vector3 factor)
2621 NDalicPINVOKE.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
2622 if (NDalicPINVOKE.SWIGPendingException.Pending)
2623 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2626 internal Vector3 GetSizeModeFactor()
2628 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetSizeModeFactor(swigCPtr), true);
2629 if (NDalicPINVOKE.SWIGPendingException.Pending)
2630 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2635 /// Calculates the height of the view given a width.<br>
2636 /// The natural size is used for default calculation. <br>
2637 /// size 0 is treated as aspect ratio 1:1.<br>
2639 /// <param name="width">Width to use</param>
2640 /// <returns>The height based on the width</returns>
2641 public float GetHeightForWidth(float width)
2643 float ret = NDalicPINVOKE.Actor_GetHeightForWidth(swigCPtr, width);
2644 if (NDalicPINVOKE.SWIGPendingException.Pending)
2645 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2650 /// Calculates the width of the view given a height.<br>
2651 /// The natural size is used for default calculation.<br>
2652 /// size 0 is treated as aspect ratio 1:1.<br>
2654 /// <param name="height">Height to use</param>
2655 /// <returns>The width based on the height</returns>
2656 public float GetWidthForHeight(float height)
2658 float ret = NDalicPINVOKE.Actor_GetWidthForHeight(swigCPtr, height);
2659 if (NDalicPINVOKE.SWIGPendingException.Pending)
2660 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2664 public float GetRelayoutSize(DimensionType dimension)
2666 float ret = NDalicPINVOKE.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
2667 if (NDalicPINVOKE.SWIGPendingException.Pending)
2668 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2672 public void SetPadding(PaddingType padding)
2674 NDalicPINVOKE.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
2675 if (NDalicPINVOKE.SWIGPendingException.Pending)
2676 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2679 public void GetPadding(PaddingType paddingOut)
2681 NDalicPINVOKE.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
2682 if (NDalicPINVOKE.SWIGPendingException.Pending)
2683 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2686 internal void SetMinimumSize(Vector2 size)
2688 NDalicPINVOKE.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
2689 if (NDalicPINVOKE.SWIGPendingException.Pending)
2690 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2693 internal Vector2 GetMinimumSize()
2695 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMinimumSize(swigCPtr), true);
2696 if (NDalicPINVOKE.SWIGPendingException.Pending)
2697 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2701 internal void SetMaximumSize(Vector2 size)
2703 NDalicPINVOKE.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
2704 if (NDalicPINVOKE.SWIGPendingException.Pending)
2705 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2708 internal Vector2 GetMaximumSize()
2710 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMaximumSize(swigCPtr), true);
2711 if (NDalicPINVOKE.SWIGPendingException.Pending)
2712 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2716 internal int GetHierarchyDepth()
2718 int ret = NDalicPINVOKE.Actor_GetHierarchyDepth(swigCPtr);
2719 if (NDalicPINVOKE.SWIGPendingException.Pending)
2720 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2724 public uint AddRenderer(Renderer renderer)
2726 uint ret = NDalicPINVOKE.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
2727 if (NDalicPINVOKE.SWIGPendingException.Pending)
2728 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2732 internal uint GetRendererCount()
2734 uint ret = NDalicPINVOKE.Actor_GetRendererCount(swigCPtr);
2735 if (NDalicPINVOKE.SWIGPendingException.Pending)
2736 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2740 public Renderer GetRendererAt(uint index)
2742 IntPtr cPtr = NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index);
2743 Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Renderer;
2745 if (NDalicPINVOKE.SWIGPendingException.Pending)
2746 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2750 public void RemoveRenderer(Renderer renderer)
2752 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
2753 if (NDalicPINVOKE.SWIGPendingException.Pending)
2754 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2757 public void RemoveRenderer(uint index)
2759 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
2760 if (NDalicPINVOKE.SWIGPendingException.Pending)
2761 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2764 internal TouchDataSignal TouchSignal()
2766 TouchDataSignal ret = new TouchDataSignal(NDalicPINVOKE.Actor_TouchSignal(swigCPtr), false);
2767 if (NDalicPINVOKE.SWIGPendingException.Pending)
2768 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2772 internal HoverSignal HoveredSignal()
2774 HoverSignal ret = new HoverSignal(NDalicPINVOKE.Actor_HoveredSignal(swigCPtr), false);
2775 if (NDalicPINVOKE.SWIGPendingException.Pending)
2776 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2780 internal WheelSignal WheelEventSignal()
2782 WheelSignal ret = new WheelSignal(NDalicPINVOKE.Actor_WheelEventSignal(swigCPtr), false);
2783 if (NDalicPINVOKE.SWIGPendingException.Pending)
2784 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2788 internal ViewSignal OnWindowSignal()
2790 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnStageSignal(swigCPtr), false);
2791 if (NDalicPINVOKE.SWIGPendingException.Pending)
2792 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2796 internal ViewSignal OffWindowSignal()
2798 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OffStageSignal(swigCPtr), false);
2799 if (NDalicPINVOKE.SWIGPendingException.Pending)
2800 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2804 internal ViewSignal OnRelayoutSignal()
2806 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnRelayoutSignal(swigCPtr), false);
2807 if (NDalicPINVOKE.SWIGPendingException.Pending)
2808 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2812 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view) {
2813 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
2814 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2818 internal ViewSignal ResourcesLoadedSignal()
2820 ViewSignal ret = new ViewSignal(NDalicPINVOKE.ResourceReadySignal(swigCPtr), false);
2821 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2826 /// Gets/Sets the origin of an view, within its parent's area.<br>
2827 /// 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>
2828 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br>
2829 /// An view's position is the distance between this origin, and the view's anchor-point.<br>
2831 /// <pre>The View has been initialized.</pre>
2832 public Position ParentOrigin
2836 Position temp = new Position(0.0f, 0.0f, 0.0f);
2837 GetProperty(View.Property.PARENT_ORIGIN).Get(temp);
2842 SetProperty(View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue(value));
2846 internal float ParentOriginX
2851 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
2856 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
2860 internal float ParentOriginY
2865 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
2870 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
2874 internal float ParentOriginZ
2879 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
2884 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
2889 /// Gets/Sets the anchor-point of an view.<br>
2890 /// 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>
2891 /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br>
2892 /// An view position is the distance between its parent-origin and this anchor-point.<br>
2893 /// An view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br>
2894 /// <pre>The View has been initialized.</pre>
2896 public Position PivotPoint
2900 Position temp = new Position(0.0f, 0.0f, 0.0f);
2901 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
2906 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
2910 internal float PivotPointX
2915 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
2920 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
2924 internal float PivotPointY
2929 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
2934 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
2938 internal float PivotPointZ
2943 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
2948 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
2953 /// Gets/Sets the size width of an view.
2955 public float SizeWidth
2960 GetProperty(View.Property.SIZE_WIDTH).Get(out temp);
2965 SetProperty(View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue(value));
2970 /// Gets/Sets the size height of an view.
2972 public float SizeHeight
2977 GetProperty(View.Property.SIZE_HEIGHT).Get(out temp);
2982 SetProperty(View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue(value));
2987 /// Gets/Sets the position of the View.<br>
2988 /// By default, sets the position vector between the parent origin and pivot point(default).<br>
2989 /// If Position inheritance if disabled, sets the world position.<br>
2991 public Position Position
2995 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
2996 GetProperty(View.Property.POSITION).Get(temp);
3001 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(value));
3006 /// Gets/Sets the position x of the View.
3008 public float PositionX
3013 GetProperty(View.Property.POSITION_X).Get(out temp);
3018 SetProperty(View.Property.POSITION_X, new Tizen.NUI.PropertyValue(value));
3023 /// Gets/Sets the position y of the View.
3025 public float PositionY
3030 GetProperty(View.Property.POSITION_Y).Get(out temp);
3035 SetProperty(View.Property.POSITION_Y, new Tizen.NUI.PropertyValue(value));
3040 /// Gets/Sets the position z of the View.
3042 public float PositionZ
3047 GetProperty(View.Property.POSITION_Z).Get(out temp);
3052 SetProperty(View.Property.POSITION_Z, new Tizen.NUI.PropertyValue(value));
3057 /// Gets/Sets the world position of the View.
3059 public Vector3 WorldPosition
3063 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3064 GetProperty(View.Property.WORLD_POSITION).Get(temp);
3069 internal float WorldPositionX
3074 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
3079 internal float WorldPositionY
3084 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
3089 internal float WorldPositionZ
3094 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
3100 /// Gets/Sets the orientation of the View.<br>
3101 /// An view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br>
3103 /// <remarks>This is an asynchronous method.</remarks>
3104 public Rotation Orientation
3108 Rotation temp = new Rotation();
3109 GetProperty(View.Property.ORIENTATION).Get(temp);
3114 SetProperty(View.Property.ORIENTATION, new Tizen.NUI.PropertyValue(value));
3119 /// Gets/Sets the world orientation of the View.<br>
3121 public Rotation WorldOrientation
3125 Rotation temp = new Rotation();
3126 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
3132 /// Gets/Sets the scale factor applied to an view.<br>
3134 public Vector3 Scale
3138 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3139 GetProperty(View.Property.SCALE).Get(temp);
3144 SetProperty(View.Property.SCALE, new Tizen.NUI.PropertyValue(value));
3149 /// Gets/Sets the scale x factor applied to an view.
3156 GetProperty(View.Property.SCALE_X).Get(out temp);
3161 SetProperty(View.Property.SCALE_X, new Tizen.NUI.PropertyValue(value));
3166 /// Gets/Sets the scale y factor applied to an view.
3173 GetProperty(View.Property.SCALE_Y).Get(out temp);
3178 SetProperty(View.Property.SCALE_Y, new Tizen.NUI.PropertyValue(value));
3183 /// Gets/Sets the scale z factor applied to an view.
3190 GetProperty(View.Property.SCALE_Z).Get(out temp);
3195 SetProperty(View.Property.SCALE_Z, new Tizen.NUI.PropertyValue(value));
3200 /// Gets the world scale of View.
3202 public Vector3 WorldScale
3206 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3207 GetProperty(View.Property.WORLD_SCALE).Get(temp);
3213 /// Retrieves the visibility flag of an view.
3216 /// If an view is not visible, then the view and its children will not be rendered.
3217 /// 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.
3219 public bool Visibility
3224 GetProperty(View.Property.VISIBLE).Get(out temp);
3230 /// Gets the view's world color.
3232 public Vector4 WorldColor
3236 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3237 GetProperty(View.Property.WORLD_COLOR).Get(temp);
3242 internal Matrix WorldMatrix
3246 Matrix temp = new Matrix();
3247 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
3253 /// Gets/Sets the View's name.
3260 GetProperty(View.Property.NAME).Get(out temp);
3265 SetProperty(View.Property.NAME, new Tizen.NUI.PropertyValue(value));
3270 /// Get the number of children held by the view.
3272 public uint ChildCount
3276 return GetChildCount();
3281 /// Gets the View's ID.
3293 /// Gets/Sets the status of whether an view should emit touch or hover signals.
3295 public bool Sensitive
3300 GetProperty(View.Property.SENSITIVE).Get(out temp);
3305 SetProperty(View.Property.SENSITIVE, new Tizen.NUI.PropertyValue(value));
3310 /// Gets/Sets the status of whether the view should receive a notification when touch or hover motion events leave the boundary of the view.
3312 public bool LeaveRequired
3317 GetProperty(View.Property.LEAVE_REQUIRED).Get(out temp);
3322 SetProperty(View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue(value));
3327 /// Gets/Sets the status of whether a child view inherits it's parent's orientation.
3329 public bool InheritOrientation
3334 GetProperty(View.Property.INHERIT_ORIENTATION).Get(out temp);
3339 SetProperty(View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue(value));
3344 /// Gets/Sets the status of whether a child view inherits it's parent's scale.
3346 public bool InheritScale
3351 GetProperty(View.Property.INHERIT_SCALE).Get(out temp);
3356 SetProperty(View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue(value));
3361 /// Gets/Sets the status of how the view and its children should be drawn.<br>
3362 /// Not all views are renderable, but DrawMode can be inherited from any view.<br>
3363 /// 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>
3364 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br>
3365 /// Overlay views are drawn in a separate pass, after all non-overlay views within the Layer.<br>
3366 /// For overlay views, the drawing order is with respect to tree levels of Views, and depth-testing will not be used.<br>
3368 public DrawModeType DrawMode
3373 if (GetProperty(View.Property.DRAW_MODE).Get(out temp) == false)
3375 NUILog.Error("DrawMode get error!");
3380 return DrawModeType.Normal;
3382 return DrawModeType.Overlay2D;
3384 return DrawModeType.Stencil;
3386 return DrawModeType.Normal;
3391 SetProperty(View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)value));
3396 /// Gets/Sets the relative to parent size factor of the view.<br>
3397 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br>
3398 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br>
3400 public Vector3 SizeModeFactor
3404 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3405 GetProperty(View.Property.SIZE_MODE_FACTOR).Get(temp);
3410 SetProperty(View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue(value));
3415 /// Gets/Sets the width resize policy to be used.
3417 public ResizePolicyType WidthResizePolicy
3422 if (GetProperty(View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
3424 NUILog.Error("WidthResizePolicy get error!");
3429 return ResizePolicyType.Fixed;
3430 case "USE_NATURAL_SIZE":
3431 return ResizePolicyType.UseNaturalSize;
3432 case "FILL_TO_PARENT":
3433 return ResizePolicyType.FillToParent;
3434 case "SIZE_RELATIVE_TO_PARENT":
3435 return ResizePolicyType.SizeRelativeToParent;
3436 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3437 return ResizePolicyType.SizeFixedOffsetFromParent;
3438 case "FIT_TO_CHILDREN":
3439 return ResizePolicyType.FitToChildren;
3440 case "DIMENSION_DEPENDENCY":
3441 return ResizePolicyType.DimensionDependency;
3442 case "USE_ASSIGNED_SIZE":
3443 return ResizePolicyType.UseAssignedSize;
3445 return ResizePolicyType.Fixed;
3450 SetProperty(View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3455 /// Gets/Sets the height resize policy to be used.
3457 public ResizePolicyType HeightResizePolicy
3462 if (GetProperty(View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
3464 NUILog.Error("HeightResizePolicy get error!");
3469 return ResizePolicyType.Fixed;
3470 case "USE_NATURAL_SIZE":
3471 return ResizePolicyType.UseNaturalSize;
3472 case "FILL_TO_PARENT":
3473 return ResizePolicyType.FillToParent;
3474 case "SIZE_RELATIVE_TO_PARENT":
3475 return ResizePolicyType.SizeRelativeToParent;
3476 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3477 return ResizePolicyType.SizeFixedOffsetFromParent;
3478 case "FIT_TO_CHILDREN":
3479 return ResizePolicyType.FitToChildren;
3480 case "DIMENSION_DEPENDENCY":
3481 return ResizePolicyType.DimensionDependency;
3482 case "USE_ASSIGNED_SIZE":
3483 return ResizePolicyType.UseAssignedSize;
3485 return ResizePolicyType.Fixed;
3490 SetProperty(View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3495 /// Gets/Sets the policy to use when setting size with size negotiation.<br>
3496 /// Defaults to SizeScalePolicyType.UseSizeSet.<br>
3498 public SizeScalePolicyType SizeScalePolicy
3503 if (GetProperty(View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
3505 NUILog.Error("SizeScalePolicy get error!");
3509 case "USE_SIZE_SET":
3510 return SizeScalePolicyType.UseSizeSet;
3511 case "FIT_WITH_ASPECT_RATIO":
3512 return SizeScalePolicyType.FitWithAspectRatio;
3513 case "FILL_WITH_ASPECT_RATIO":
3514 return SizeScalePolicyType.FillWithAspectRatio;
3516 return SizeScalePolicyType.UseSizeSet;
3521 string valueToString = "";
3524 case SizeScalePolicyType.UseSizeSet:
3526 valueToString = "USE_SIZE_SET";
3529 case SizeScalePolicyType.FitWithAspectRatio:
3531 valueToString = "FIT_WITH_ASPECT_RATIO";
3534 case SizeScalePolicyType.FillWithAspectRatio:
3536 valueToString = "FILL_WITH_ASPECT_RATIO";
3541 valueToString = "USE_SIZE_SET";
3545 SetProperty(View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
3550 /// Gets/Sets the status of whether the width size is dependent on height size.
3552 public bool WidthForHeight
3557 GetProperty(View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
3562 SetProperty(View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue(value));
3567 /// Gets/Sets the status of whether the height size is dependent on width size.
3569 public bool HeightForWidth
3574 GetProperty(View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
3579 SetProperty(View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue(value));
3584 /// Gets/Sets the padding for use in layout.
3586 public Vector4 Padding
3590 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3591 GetProperty(View.Property.PADDING).Get(temp);
3596 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
3601 /// Gets/Sets the minimum size an view can be assigned in size negotiation.
3603 public Size2D MinimumSize
3607 Size2D temp = new Size2D(0, 0);
3608 GetProperty(View.Property.MINIMUM_SIZE).Get(temp);
3613 SetProperty(View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3618 /// Gets/Sets the maximum size an view can be assigned in size negotiation.
3620 public Size2D MaximumSize
3624 Size2D temp = new Size2D(0, 0);
3625 GetProperty(View.Property.MAXIMUM_SIZE).Get(temp);
3630 SetProperty(View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3635 /// Gets/Sets whether a child view inherits it's parent's position.<br>
3636 /// Default is to inherit.<br>
3637 /// 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>
3639 public bool InheritPosition
3644 GetProperty(View.Property.INHERIT_POSITION).Get(out temp);
3649 SetProperty(View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue(value));
3654 /// Gets/Sets clipping behavior(mode) of it's children.
3656 public ClippingModeType ClippingMode
3661 if (GetProperty(View.Property.CLIPPING_MODE).Get(out temp) == false)
3663 NUILog.Error("ClippingMode get error!");
3668 return ClippingModeType.Disabled;
3669 case "CLIP_CHILDREN":
3670 return ClippingModeType.ClipChildren;
3672 return ClippingModeType.Disabled;
3677 SetProperty(View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)value));
3682 /// Get the number of renderers held by the view.
3684 public uint RendererCount
3688 return GetRendererCount();
3695 [Obsolete("Please do not use! this will be deprecated")]
3696 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> Touched
3700 if (_touchDataEventHandler == null)
3702 _touchDataCallback = OnTouch;
3703 this.TouchSignal().Connect(_touchDataCallback);
3706 _touchDataEventHandler += value;
3711 _touchDataEventHandler -= value;
3713 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
3715 this.TouchSignal().Disconnect(_touchDataCallback);
3721 [Obsolete("Please do not use! this will be deprecated")]
3722 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> Hovered
3726 if (_hoverEventHandler == null)
3728 _hoverEventCallback = OnHoverEvent;
3729 this.HoveredSignal().Connect(_hoverEventCallback);
3732 _hoverEventHandler += value;
3737 _hoverEventHandler -= value;
3739 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
3741 this.HoveredSignal().Disconnect(_hoverEventCallback);
3747 [Obsolete("Please do not use! this will be deprecated")]
3748 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelMoved
3752 if (_wheelEventHandler == null)
3754 _wheelEventCallback = OnWheelEvent;
3755 this.WheelEventSignal().Connect(_wheelEventCallback);
3758 _wheelEventHandler += value;
3763 _wheelEventHandler -= value;
3765 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
3767 this.WheelEventSignal().Disconnect(_wheelEventCallback);
3773 [Obsolete("Please do not use! this will be deprecated")]
3774 public Position AnchorPoint
3778 Position temp = new Position(0.0f, 0.0f, 0.0f);
3779 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
3784 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3788 [Obsolete("Please do not use! this will be deprecated, please use Size2D instead")]
3793 Size temp = new Size(0.0f, 0.0f, 0.0f);
3794 GetProperty(View.Property.SIZE).Get(temp);
3799 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(value));
3803 [Obsolete("Please do not use! this will be deprecated")]
3804 public event EventHandler OnWindowEvent
3808 if (_onWindowEventHandler == null)
3810 _onWindowEventCallback = OnWindow;
3811 this.OnWindowSignal().Connect(_onWindowEventCallback);
3814 _onWindowEventHandler += value;
3819 _onWindowEventHandler -= value;
3821 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
3823 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
3828 [Obsolete("Please do not use! this will be deprecated")]
3829 public event EventHandler OffWindowEvent
3833 if (_offWindowEventHandler == null)
3835 _offWindowEventCallback = OffWindow;
3836 this.OffWindowSignal().Connect(_offWindowEventCallback);
3839 _offWindowEventHandler += value;
3844 _offWindowEventHandler -= value;
3846 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
3848 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
3853 [Obsolete("Please do not use! this will be deprecated")]
3854 public event EventHandler OnRelayoutEvent
3858 if (_onRelayoutEventHandler == null)
3860 _onRelayoutEventCallback = OnRelayout;
3861 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
3864 _onRelayoutEventHandler += value;
3869 _onRelayoutEventHandler -= value;
3871 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
3873 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);