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();
824 /// Downcasts a handle to View handle.<br>
825 /// If handle points to a View, the downcast produces valid handle.<br>
826 /// If not, the returned handle is left uninitialized.<br>
828 /// <param name="handle">Handle to an object</param>
829 /// <returns>A handle to a View or an uninitialized handle</returns>
830 public new static View DownCast(BaseHandle handle)
832 View ret = new View(NDalicPINVOKE.View_DownCast(BaseHandle.getCPtr(handle)), true);
833 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
837 [Obsolete("Please do not use! this will be deprecated")]
838 public static T DownCast<T>(View view) where T : View
840 //View ret = ViewRegistry.GetViewFromBaseHandle(view);
841 View ret = View.DownCast(view);
849 private View ConvertIdToView(uint id)
855 view = Parent.FindChildById(id);
860 view = Window.Instance.GetRootLayer().FindChildById(id);
866 internal void SetKeyInputFocus()
868 NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
869 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
873 /// Quries whether the view has focus.
875 /// <returns>true if this view has focus</returns>
876 public bool HasFocus()
878 bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
879 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
883 internal void ClearKeyInputFocus()
885 NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
886 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
889 internal PinchGestureDetector GetPinchGestureDetector()
891 PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
892 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
896 internal PanGestureDetector GetPanGestureDetector()
898 PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
899 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
903 internal TapGestureDetector GetTapGestureDetector()
905 TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
906 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
910 internal LongPressGestureDetector GetLongPressGestureDetector()
912 LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
913 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
918 /// Sets the name of the style to be applied to the view.
920 /// <param name="styleName">A string matching a style described in a stylesheet</param>
921 public void SetStyleName(string styleName)
923 NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
924 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
928 /// Retrieves the name of the style to be applied to the view (if any).
930 /// <returns>A string matching a style, or an empty string</returns>
931 public string GetStyleName()
933 string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
934 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
938 internal void SetBackgroundColor(Vector4 color)
940 NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
941 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
944 internal Vector4 GetBackgroundColor()
946 Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
947 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
951 internal void SetBackgroundImage(Image image)
953 NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
954 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
958 /// Clears the background.
960 public void ClearBackground()
962 NDalicPINVOKE.View_ClearBackground(swigCPtr);
963 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
966 internal ControlKeySignal KeyEventSignal()
968 ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
969 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
973 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
975 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
976 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
980 internal KeyInputFocusSignal KeyInputFocusLostSignal()
982 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
983 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
987 internal View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
989 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
992 internal enum PropertyRange
994 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
995 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
996 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
1000 /// styleName, type string.
1002 public string StyleName
1007 GetProperty(View.Property.STYLE_NAME).Get(out temp);
1012 SetProperty(View.Property.STYLE_NAME, new Tizen.NUI.PropertyValue(value));
1017 /// mutually exclusive with BACKGROUND_IMAGE & BACKGROUND, type Vector4.
1019 public Color BackgroundColor
1023 Color backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1025 Tizen.NUI.PropertyMap background = Background;
1027 background.Find(Visual.Property.Type)?.Get(out visualType);
1028 if (visualType == (int)Visual.Type.Color)
1030 background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor);
1033 return backgroundColor;
1037 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1042 /// Create an Animation to animate the background color visual. If there is no
1043 /// background visual, creates one with transparent black as it's mixColor.
1045 public Animation AnimateBackgroundColor( object destinationValue,
1048 AlphaFunction.BuiltinFunctions? alphaFunction = null,
1049 object initialValue = null)
1051 Tizen.NUI.PropertyMap background = Background;
1053 if( background.Empty() )
1055 // If there is no background yet, ensure there is a transparent
1057 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1058 background = Background;
1060 return AnimateColor( "background", destinationValue, startTime, endTime, alphaFunction, initialValue );
1064 /// Create an Animation to animate the mixColor of the named visual.
1066 public Animation AnimateColor( string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null )
1068 Animation animation = null;
1070 PropertyMap _animator = new PropertyMap();
1071 if( alphaFunction != null )
1073 _animator.Add("alphaFunction", new PropertyValue( AlphaFunction.BuiltinToPropertyKey(alphaFunction) ) );
1076 PropertyMap _timePeriod = new PropertyMap();
1077 _timePeriod.Add( "duration", new PropertyValue((endTime-startTime)/1000.0f) );
1078 _timePeriod.Add( "delay", new PropertyValue( startTime/1000.0f ) );
1079 _animator.Add( "timePeriod", new PropertyValue( _timePeriod ) );
1081 PropertyMap _transition = new PropertyMap();
1082 _transition.Add( "animator", new PropertyValue( _animator ) );
1083 _transition.Add( "target", new PropertyValue( targetVisual ) );
1084 _transition.Add( "property", new PropertyValue( "mixColor" ) );
1086 if( initialColor != null )
1088 PropertyValue initValue = PropertyValue.CreateFromObject( initialColor );
1089 _transition.Add( "initialValue", initValue );
1092 PropertyValue destValue = PropertyValue.CreateFromObject( destinationColor );
1093 _transition.Add( "targetValue", destValue );
1094 TransitionData _transitionData = new TransitionData( _transition );
1096 animation = new Animation( NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true );
1097 if (NDalicPINVOKE.SWIGPendingException.Pending)
1098 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1104 /// mutually exclusive with BACKGROUND_COLOR & BACKGROUND, type Map.
1106 public string BackgroundImage
1110 string backgroundImage = "";
1112 Tizen.NUI.PropertyMap background = Background;
1114 background.Find(Visual.Property.Type)?.Get(out visualType);
1115 if (visualType == (int)Visual.Type.Image)
1117 background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
1120 return backgroundImage;
1124 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1128 public Tizen.NUI.PropertyMap Background
1132 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1133 GetProperty( View.Property.BACKGROUND ).Get(temp);
1138 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1144 /// The current state of the view.
1151 if (GetProperty(View.Property.STATE).Get(out temp) == false)
1153 NUILog.Error("State get error!");
1159 return States.Normal;
1163 return States.Focused;
1167 return States.Disabled;
1171 return States.Normal;
1177 SetProperty(View.Property.STATE, new Tizen.NUI.PropertyValue((int)value));
1182 /// The current sub state of the view.
1184 public States SubState
1189 if (GetProperty(View.Property.SUB_STATE).Get(out temp) == false)
1191 NUILog.Error("subState get error!");
1196 return States.Normal;
1198 return States.Focused;
1200 return States.Disabled;
1202 return States.Normal;
1207 string valueToString = "";
1212 valueToString = "NORMAL";
1215 case States.Focused:
1217 valueToString = "FOCUSED";
1220 case States.Disabled:
1222 valueToString = "DISABLED";
1227 valueToString = "NORMAL";
1231 SetProperty(View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
1236 /// Displays a tooltip
1238 public Tizen.NUI.PropertyMap Tooltip
1242 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1243 GetProperty(View.Property.TOOLTIP).Get(temp);
1248 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1253 /// Displays a tooltip as Text
1255 public string TooltipText
1259 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1263 private int LeftFocusableViewId
1268 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
1273 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1277 private int RightFocusableViewId
1282 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
1287 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1291 private int UpFocusableViewId
1296 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
1301 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1305 private int DownFocusableViewId
1310 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
1315 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1320 /// Child Property of FlexContainer.<br>
1321 /// The proportion of the free space in the container the flex item will receive.<br>
1322 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br>
1329 GetProperty(FlexContainer.ChildProperty.FLEX).Get(out temp);
1334 SetProperty(FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue(value));
1339 /// Child Property of FlexContainer.<br>
1340 /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br>
1342 public int AlignSelf
1347 GetProperty(FlexContainer.ChildProperty.ALIGN_SELF).Get(out temp);
1352 SetProperty(FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue(value));
1357 /// Child Property of FlexContainer.<br>
1358 /// The space around the flex item.<br>
1360 public Vector4 FlexMargin
1364 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1365 GetProperty(FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
1370 SetProperty(FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue(value));
1375 /// The top-left cell this child occupies, if not set, the first available cell is used
1377 public Vector2 CellIndex
1381 Vector2 temp = new Vector2(0.0f, 0.0f);
1382 GetProperty(TableView.ChildProperty.CELL_INDEX).Get(temp);
1387 SetProperty(TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue(value));
1392 /// The number of rows this child occupies, if not set, default value is 1
1394 public float RowSpan
1399 GetProperty(TableView.ChildProperty.ROW_SPAN).Get(out temp);
1404 SetProperty(TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue(value));
1409 /// The number of columns this child occupies, if not set, default value is 1
1411 public float ColumnSpan
1416 GetProperty(TableView.ChildProperty.COLUMN_SPAN).Get(out temp);
1421 SetProperty(TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue(value));
1426 /// The horizontal alignment of this child inside the cells, if not set, default value is 'left'
1428 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
1433 if (GetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
1435 NUILog.Error("CellHorizontalAlignment get error!");
1441 return Tizen.NUI.HorizontalAlignmentType.Left;
1443 return Tizen.NUI.HorizontalAlignmentType.Center;
1445 return Tizen.NUI.HorizontalAlignmentType.Right;
1447 return Tizen.NUI.HorizontalAlignmentType.Left;
1452 string valueToString = "";
1455 case Tizen.NUI.HorizontalAlignmentType.Left:
1457 valueToString = "left";
1460 case Tizen.NUI.HorizontalAlignmentType.Center:
1462 valueToString = "center";
1465 case Tizen.NUI.HorizontalAlignmentType.Right:
1467 valueToString = "right";
1472 valueToString = "left";
1476 SetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1481 /// The vertical alignment of this child inside the cells, if not set, default value is 'top'
1483 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
1488 GetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
1490 NUILog.Error("CellVerticalAlignment get error!");
1496 return Tizen.NUI.VerticalAlignmentType.Top;
1498 return Tizen.NUI.VerticalAlignmentType.Center;
1500 return Tizen.NUI.VerticalAlignmentType.Bottom;
1502 return Tizen.NUI.VerticalAlignmentType.Top;
1507 string valueToString = "";
1510 case Tizen.NUI.VerticalAlignmentType.Top:
1512 valueToString = "top";
1515 case Tizen.NUI.VerticalAlignmentType.Center:
1517 valueToString = "center";
1520 case Tizen.NUI.VerticalAlignmentType.Bottom:
1522 valueToString = "bottom";
1527 valueToString = "top";
1531 SetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1536 /// The left focusable view.<br>
1537 /// This will return NULL if not set.<br>
1538 /// This will also return NULL if the specified left focusable view is not on Window.<br>
1540 public View LeftFocusableView
1542 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1545 if (LeftFocusableViewId >= 0)
1547 return ConvertIdToView((uint)LeftFocusableViewId);
1553 LeftFocusableViewId = (int)value.GetId();
1558 /// The right focusable view.<br>
1559 /// This will return NULL if not set.<br>
1560 /// This will also return NULL if the specified right focusable view is not on Window.<br>
1562 public View RightFocusableView
1564 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1567 if (RightFocusableViewId >= 0)
1569 return ConvertIdToView((uint)RightFocusableViewId);
1575 RightFocusableViewId = (int)value.GetId();
1580 /// The up focusable view.<br>
1581 /// This will return NULL if not set.<br>
1582 /// This will also return NULL if the specified up focusable view is not on Window.<br>
1584 public View UpFocusableView
1586 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1589 if (UpFocusableViewId >= 0)
1591 return ConvertIdToView((uint)UpFocusableViewId);
1597 UpFocusableViewId = (int)value.GetId();
1602 /// The down focusable view.<br>
1603 /// This will return NULL if not set.<br>
1604 /// This will also return NULL if the specified down focusable view is not on Window.<br>
1606 public View DownFocusableView
1608 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1611 if (DownFocusableViewId >= 0)
1613 return ConvertIdToView((uint)DownFocusableViewId);
1619 DownFocusableViewId = (int)value.GetId();
1624 /// whether the view should be focusable by keyboard navigation.
1626 public bool Focusable
1630 SetKeyboardFocusable(value);
1634 return IsKeyboardFocusable();
1639 /// Enumeration for describing the states of view.
1658 /// Retrieves the position of the View.<br>
1659 /// The coordinates are relative to the View's parent.<br>
1661 public Position CurrentPosition
1665 return GetCurrentPosition();
1670 /// Sets the size of an view for width and height.<br>
1671 /// Geometry can be scaled to fit within this area.<br>
1672 /// This does not interfere with the views scale factor.<br>
1673 /// The views default depth is the minimum of width & height.<br>
1675 public Size2D Size2D
1679 Size temp = new Size(0.0f, 0.0f, 0.0f);
1680 GetProperty(View.Property.SIZE).Get(temp);
1681 Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
1686 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(new Size(value)));
1691 /// Retrieves the size of the View.<br>
1692 /// The coordinates are relative to the View's parent.<br>
1694 public Size2D CurrentSize
1698 return GetCurrentSize();
1703 /// Retrieves the view's parent.<br>
1713 public bool Visibility
1722 /// Retrieves and sets the view's opacity.<br>
1724 public float Opacity
1729 GetProperty(View.Property.OPACITY).Get(out temp);
1734 SetProperty(View.Property.OPACITY, new Tizen.NUI.PropertyValue(value));
1739 /// Sets the position of the View for X and Y.<br>
1740 /// By default, sets the position vector between the parent origin and pivot point(default).<br>
1741 /// If Position inheritance if disabled, sets the world position.<br>
1743 public Position2D Position2D
1747 Position temp = new Position(0.0f, 0.0f, 0.0f);
1748 GetProperty(View.Property.POSITION).Get(temp);
1749 return new Position2D(temp);
1753 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(new Position(value)));
1758 /// Retrieves screen postion of view's.<br>
1760 public Vector2 ScreenPosition
1764 Vector2 temp = new Vector2(0.0f, 0.0f);
1765 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
1771 /// Determines whether the pivot point should be used to determine the position of the view.
1772 /// This is true by default.
1774 /// <remarks>If false, then the top-left of the view is used for the position.
1775 /// Setting this to false will allow scaling or rotation around the anchor-point without affecting the view's position.
1777 public bool PositionUsesPivotPoint
1782 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
1787 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
1791 [Obsolete("Please do not use! this will be deprecated")]
1792 public bool PositionUsesAnchorPoint
1797 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
1802 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
1806 internal bool FocusState
1810 return IsKeyboardFocusable();
1814 SetKeyboardFocusable(value);
1819 /// Queries whether the view is connected to the Stage.<br>
1820 /// When an view is connected, it will be directly or indirectly parented to the root View.<br>
1822 public bool IsOnWindow
1831 /// Gets depth in the hierarchy for the view.
1833 public int HierarchyDepth
1837 return GetHierarchyDepth();
1842 /// Sets the sibling order of the view so depth position can be defined within the same parent.
1845 /// Note The initial value is 0.
1846 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove and LowerBelow will override the sibling order.
1847 /// The values set by this Property will likely change.
1849 public int SiblingOrder
1854 GetProperty(View.Property.SIBLING_ORDER).Get(out temp);
1859 SetProperty(View.Property.SIBLING_ORDER, new Tizen.NUI.PropertyValue(value));
1863 [Obsolete("Please do not use! this will be internal property")]
1864 public Vector3 NaturalSize
1868 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
1869 if (NDalicPINVOKE.SWIGPendingException.Pending)
1870 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1879 /// This is an asynchronous method.
1890 /// This is an asynchronous method.
1891 /// If an view is hidden, then the view and its children will not be rendered.
1892 /// 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.
1899 internal void Raise()
1901 NDalicPINVOKE.Raise(swigCPtr);
1902 if (NDalicPINVOKE.SWIGPendingException.Pending)
1903 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1906 internal void Lower()
1908 NDalicPINVOKE.Lower(swigCPtr);
1909 if (NDalicPINVOKE.SWIGPendingException.Pending)
1910 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1914 /// Raise view above all other views.
1917 /// Sibling order of views within the parent will be updated automatically.
1918 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
1920 public void RaiseToTop()
1922 NDalicPINVOKE.RaiseToTop(swigCPtr);
1923 if (NDalicPINVOKE.SWIGPendingException.Pending)
1924 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1928 /// Lower view to the bottom of all views.
1931 /// Sibling order of views within the parent will be updated automatically.
1932 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
1934 public void LowerToBottom()
1936 NDalicPINVOKE.LowerToBottom(swigCPtr);
1937 if (NDalicPINVOKE.SWIGPendingException.Pending)
1938 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1942 /// Query if all resources required by a View are loaded and ready.
1944 /// <remarks>Most resources are only loaded when the control is placed on stage
1946 public bool IsResourceReady()
1948 bool ret = NDalicPINVOKE.IsResourceReady(swigCPtr);
1949 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1954 /// Raise the view to above the target view.
1956 /// <remarks>Sibling order of views within the parent will be updated automatically.
1957 /// Views on the level above the target view will still be shown above this view.
1958 /// Raising this view above views with the same sibling order as each other will raise this view above them.
1959 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
1961 /// <param name="target">Will be raised above this view</param>
1962 internal void RaiseAbove(View target)
1964 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
1965 if (NDalicPINVOKE.SWIGPendingException.Pending)
1966 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1970 /// Lower the view to below the target view.
1972 /// <remarks>Sibling order of views within the parent will be updated automatically.
1973 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
1974 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
1976 /// <param name="target">Will be lowered below this view</param>
1977 internal void LowerBelow(View target)
1979 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
1980 if (NDalicPINVOKE.SWIGPendingException.Pending)
1981 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1984 internal string GetName()
1986 string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);
1987 if (NDalicPINVOKE.SWIGPendingException.Pending)
1988 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1992 internal void SetName(string name)
1994 NDalicPINVOKE.Actor_SetName(swigCPtr, name);
1995 if (NDalicPINVOKE.SWIGPendingException.Pending)
1996 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1999 internal uint GetId()
2001 uint ret = NDalicPINVOKE.Actor_GetId(swigCPtr);
2002 if (NDalicPINVOKE.SWIGPendingException.Pending)
2003 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2007 internal bool IsRoot()
2009 bool ret = NDalicPINVOKE.Actor_IsRoot(swigCPtr);
2010 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2014 internal bool OnWindow()
2016 bool ret = NDalicPINVOKE.Actor_OnStage(swigCPtr);
2017 if (NDalicPINVOKE.SWIGPendingException.Pending)
2018 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2022 internal Layer GetLayer()
2024 Layer ret = new Layer(NDalicPINVOKE.Actor_GetLayer(swigCPtr), true);
2025 if (NDalicPINVOKE.SWIGPendingException.Pending)
2026 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2031 /// Adds a child view to this View.
2033 /// <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>
2034 /// <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>
2035 /// <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>
2036 /// <param name="child">The child</param>
2037 public void Add(View child)
2039 NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
2040 if (NDalicPINVOKE.SWIGPendingException.Pending)
2041 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2045 /// Removes a child View from this View. If the view was not a child of this view, this is a no-op.
2047 /// <pre>This View(the parent) has been initialized. The child view is not the same as the parent view.</pre>
2048 /// <param name="child">The child</param>
2049 public void Remove(View child)
2051 NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
2052 if (NDalicPINVOKE.SWIGPendingException.Pending)
2053 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2056 internal void Unparent()
2058 NDalicPINVOKE.Actor_Unparent(swigCPtr);
2059 if (NDalicPINVOKE.SWIGPendingException.Pending)
2060 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2064 /// Retrieves the number of children held by the view.
2066 /// <pre>The View has been initialized.</pre>
2067 /// <returns>The number of children</returns>
2068 internal uint GetChildCount()
2070 uint ret = NDalicPINVOKE.Actor_GetChildCount(swigCPtr);
2071 if (NDalicPINVOKE.SWIGPendingException.Pending)
2072 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2077 /// Retrieves child view by index.
2079 /// <pre>The View has been initialized.</pre>
2080 /// <param name="index">The index of the child to retrieve</param>
2081 /// <returns>The view for the given index or empty handle if children not initialized</returns>
2082 public View GetChildAt(uint index)
2084 IntPtr cPtr = NDalicPINVOKE.Actor_GetChildAt(swigCPtr, index);
2086 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2088 if (NDalicPINVOKE.SWIGPendingException.Pending)
2089 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2094 /// Search through this view's hierarchy for an view with the given name.
2095 /// The view itself is also considered in the search.
2097 /// <pre>The View has been initialized.</pre>
2098 /// <param name="viewName">The name of the view to find</param>
2099 /// <returns>A handle to the view if found, or an empty handle if not</returns>
2100 public View FindChildByName(string viewName)
2102 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
2104 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2106 if (NDalicPINVOKE.SWIGPendingException.Pending)
2107 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2111 internal View FindChildById(uint id)
2113 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
2115 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2117 if (NDalicPINVOKE.SWIGPendingException.Pending)
2118 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2122 /*internal View GetParent()
2124 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
2126 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2128 if (NDalicPINVOKE.SWIGPendingException.Pending)
2129 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2133 internal View GetParent()
2136 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
2138 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(cPtr);
2140 if(basehandle is Layer)
2142 View ret2 = new View(cPtr,false);
2146 ret = basehandle as View;
2148 if (NDalicPINVOKE.SWIGPendingException.Pending)
2149 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2153 internal void SetParentOrigin(Vector3 origin)
2155 NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
2156 if (NDalicPINVOKE.SWIGPendingException.Pending)
2157 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2160 internal Vector3 GetCurrentParentOrigin()
2162 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentParentOrigin(swigCPtr), true);
2163 if (NDalicPINVOKE.SWIGPendingException.Pending)
2164 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2168 internal void SetAnchorPoint(Vector3 anchorPoint)
2170 NDalicPINVOKE.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
2171 if (NDalicPINVOKE.SWIGPendingException.Pending)
2172 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2175 internal Vector3 GetCurrentAnchorPoint()
2177 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentAnchorPoint(swigCPtr), true);
2178 if (NDalicPINVOKE.SWIGPendingException.Pending)
2179 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2183 internal void SetSize(float width, float height)
2185 NDalicPINVOKE.Actor_SetSize__SWIG_0(swigCPtr, width, height);
2186 if (NDalicPINVOKE.SWIGPendingException.Pending)
2187 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2190 internal void SetSize(float width, float height, float depth)
2192 NDalicPINVOKE.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
2193 if (NDalicPINVOKE.SWIGPendingException.Pending)
2194 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2197 internal void SetSize(Vector2 size)
2199 NDalicPINVOKE.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
2200 if (NDalicPINVOKE.SWIGPendingException.Pending)
2201 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2204 internal void SetSize(Vector3 size)
2206 NDalicPINVOKE.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
2207 if (NDalicPINVOKE.SWIGPendingException.Pending)
2208 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2211 internal Vector3 GetTargetSize()
2213 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetTargetSize(swigCPtr), true);
2214 if (NDalicPINVOKE.SWIGPendingException.Pending)
2215 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2219 internal Size2D GetCurrentSize()
2221 Size ret = new Size(NDalicPINVOKE.Actor_GetCurrentSize(swigCPtr), true);
2222 if (NDalicPINVOKE.SWIGPendingException.Pending)
2223 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2224 Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
2228 internal Vector3 GetNaturalSize()
2230 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2231 if (NDalicPINVOKE.SWIGPendingException.Pending)
2232 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2236 internal void SetPosition(float x, float y)
2238 NDalicPINVOKE.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
2239 if (NDalicPINVOKE.SWIGPendingException.Pending)
2240 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2243 internal void SetPosition(float x, float y, float z)
2245 NDalicPINVOKE.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
2246 if (NDalicPINVOKE.SWIGPendingException.Pending)
2247 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2250 internal void SetPosition(Vector3 position)
2252 NDalicPINVOKE.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
2253 if (NDalicPINVOKE.SWIGPendingException.Pending)
2254 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2257 internal void SetX(float x)
2259 NDalicPINVOKE.Actor_SetX(swigCPtr, x);
2260 if (NDalicPINVOKE.SWIGPendingException.Pending)
2261 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2264 internal void SetY(float y)
2266 NDalicPINVOKE.Actor_SetY(swigCPtr, y);
2267 if (NDalicPINVOKE.SWIGPendingException.Pending)
2268 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2271 internal void SetZ(float z)
2273 NDalicPINVOKE.Actor_SetZ(swigCPtr, z);
2274 if (NDalicPINVOKE.SWIGPendingException.Pending)
2275 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2278 internal void TranslateBy(Vector3 distance)
2280 NDalicPINVOKE.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
2281 if (NDalicPINVOKE.SWIGPendingException.Pending)
2282 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2285 internal Position GetCurrentPosition()
2287 Position ret = new Position(NDalicPINVOKE.Actor_GetCurrentPosition(swigCPtr), true);
2288 if (NDalicPINVOKE.SWIGPendingException.Pending)
2289 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2293 internal Vector3 GetCurrentWorldPosition()
2295 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldPosition(swigCPtr), true);
2296 if (NDalicPINVOKE.SWIGPendingException.Pending)
2297 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2301 internal void SetInheritPosition(bool inherit)
2303 NDalicPINVOKE.Actor_SetInheritPosition(swigCPtr, inherit);
2304 if (NDalicPINVOKE.SWIGPendingException.Pending)
2305 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2308 internal bool IsPositionInherited()
2310 bool ret = NDalicPINVOKE.Actor_IsPositionInherited(swigCPtr);
2311 if (NDalicPINVOKE.SWIGPendingException.Pending)
2312 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2316 internal void SetOrientation(Degree angle, Vector3 axis)
2318 NDalicPINVOKE.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2319 if (NDalicPINVOKE.SWIGPendingException.Pending)
2320 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2323 internal void SetOrientation(Radian angle, Vector3 axis)
2325 NDalicPINVOKE.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2326 if (NDalicPINVOKE.SWIGPendingException.Pending)
2327 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2330 internal void SetOrientation(Rotation orientation)
2332 NDalicPINVOKE.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
2333 if (NDalicPINVOKE.SWIGPendingException.Pending)
2334 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2337 internal void RotateBy(Degree angle, Vector3 axis)
2339 NDalicPINVOKE.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2340 if (NDalicPINVOKE.SWIGPendingException.Pending)
2341 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2344 internal void RotateBy(Radian angle, Vector3 axis)
2346 NDalicPINVOKE.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2347 if (NDalicPINVOKE.SWIGPendingException.Pending)
2348 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2351 internal void RotateBy(Rotation relativeRotation)
2353 NDalicPINVOKE.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
2354 if (NDalicPINVOKE.SWIGPendingException.Pending)
2355 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2358 internal Rotation GetCurrentOrientation()
2360 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentOrientation(swigCPtr), true);
2361 if (NDalicPINVOKE.SWIGPendingException.Pending)
2362 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2366 internal void SetInheritOrientation(bool inherit)
2368 NDalicPINVOKE.Actor_SetInheritOrientation(swigCPtr, inherit);
2369 if (NDalicPINVOKE.SWIGPendingException.Pending)
2370 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2373 internal bool IsOrientationInherited()
2375 bool ret = NDalicPINVOKE.Actor_IsOrientationInherited(swigCPtr);
2376 if (NDalicPINVOKE.SWIGPendingException.Pending)
2377 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2381 internal Rotation GetCurrentWorldOrientation()
2383 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentWorldOrientation(swigCPtr), true);
2384 if (NDalicPINVOKE.SWIGPendingException.Pending)
2385 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2389 internal void SetScale(float scale)
2391 NDalicPINVOKE.Actor_SetScale__SWIG_0(swigCPtr, scale);
2392 if (NDalicPINVOKE.SWIGPendingException.Pending)
2393 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2396 internal void SetScale(float scaleX, float scaleY, float scaleZ)
2398 NDalicPINVOKE.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
2399 if (NDalicPINVOKE.SWIGPendingException.Pending)
2400 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2403 internal void SetScale(Vector3 scale)
2405 NDalicPINVOKE.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
2406 if (NDalicPINVOKE.SWIGPendingException.Pending)
2407 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2410 internal void ScaleBy(Vector3 relativeScale)
2412 NDalicPINVOKE.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
2413 if (NDalicPINVOKE.SWIGPendingException.Pending)
2414 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2417 internal Vector3 GetCurrentScale()
2419 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentScale(swigCPtr), true);
2420 if (NDalicPINVOKE.SWIGPendingException.Pending)
2421 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2425 internal Vector3 GetCurrentWorldScale()
2427 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldScale(swigCPtr), true);
2428 if (NDalicPINVOKE.SWIGPendingException.Pending)
2429 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2433 internal void SetInheritScale(bool inherit)
2435 NDalicPINVOKE.Actor_SetInheritScale(swigCPtr, inherit);
2436 if (NDalicPINVOKE.SWIGPendingException.Pending)
2437 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2440 internal bool IsScaleInherited()
2442 bool ret = NDalicPINVOKE.Actor_IsScaleInherited(swigCPtr);
2443 if (NDalicPINVOKE.SWIGPendingException.Pending)
2444 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2448 internal Matrix GetCurrentWorldMatrix()
2450 Matrix ret = new Matrix(NDalicPINVOKE.Actor_GetCurrentWorldMatrix(swigCPtr), true);
2451 if (NDalicPINVOKE.SWIGPendingException.Pending)
2452 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2456 internal void SetVisible(bool visible)
2458 NDalicPINVOKE.Actor_SetVisible(swigCPtr, visible);
2459 if (NDalicPINVOKE.SWIGPendingException.Pending)
2460 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2463 internal bool IsVisible()
2465 bool ret = NDalicPINVOKE.Actor_IsVisible(swigCPtr);
2466 if (NDalicPINVOKE.SWIGPendingException.Pending)
2467 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2471 internal void SetOpacity(float opacity)
2473 NDalicPINVOKE.Actor_SetOpacity(swigCPtr, opacity);
2474 if (NDalicPINVOKE.SWIGPendingException.Pending)
2475 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2478 internal float GetCurrentOpacity()
2480 float ret = NDalicPINVOKE.Actor_GetCurrentOpacity(swigCPtr);
2481 if (NDalicPINVOKE.SWIGPendingException.Pending)
2482 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2486 internal void SetColor(Vector4 color)
2488 NDalicPINVOKE.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
2489 if (NDalicPINVOKE.SWIGPendingException.Pending)
2490 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2493 internal Vector4 GetCurrentColor()
2495 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentColor(swigCPtr), true);
2496 if (NDalicPINVOKE.SWIGPendingException.Pending)
2497 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2501 internal void SetColorMode(ColorMode colorMode)
2503 NDalicPINVOKE.Actor_SetColorMode(swigCPtr, (int)colorMode);
2504 if (NDalicPINVOKE.SWIGPendingException.Pending)
2505 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2508 internal ColorMode GetColorMode()
2510 ColorMode ret = (ColorMode)NDalicPINVOKE.Actor_GetColorMode(swigCPtr);
2511 if (NDalicPINVOKE.SWIGPendingException.Pending)
2512 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2516 internal Vector4 GetCurrentWorldColor()
2518 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentWorldColor(swigCPtr), true);
2519 if (NDalicPINVOKE.SWIGPendingException.Pending)
2520 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2524 internal void SetDrawMode(DrawModeType drawMode)
2526 NDalicPINVOKE.Actor_SetDrawMode(swigCPtr, (int)drawMode);
2527 if (NDalicPINVOKE.SWIGPendingException.Pending)
2528 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2531 internal DrawModeType GetDrawMode()
2533 DrawModeType ret = (DrawModeType)NDalicPINVOKE.Actor_GetDrawMode(swigCPtr);
2534 if (NDalicPINVOKE.SWIGPendingException.Pending)
2535 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2540 /// Converts screen coordinates into the view's coordinate system using the default camera.
2542 /// <pre>The View has been initialized.</pre>
2543 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5)</remarks>
2544 /// <param name="localX">On return, the X-coordinate relative to the view</param>
2545 /// <param name="localY">On return, the Y-coordinate relative to the view</param>
2546 /// <param name="screenX">The screen X-coordinate</param>
2547 /// <param name="screenY">The screen Y-coordinate</param>
2548 /// <returns>True if the conversion succeeded</returns>
2549 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
2551 bool ret = NDalicPINVOKE.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
2552 if (NDalicPINVOKE.SWIGPendingException.Pending)
2553 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2557 internal void SetKeyboardFocusable(bool focusable)
2559 NDalicPINVOKE.Actor_SetKeyboardFocusable(swigCPtr, focusable);
2560 if (NDalicPINVOKE.SWIGPendingException.Pending)
2561 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2564 internal bool IsKeyboardFocusable()
2566 bool ret = NDalicPINVOKE.Actor_IsKeyboardFocusable(swigCPtr);
2567 if (NDalicPINVOKE.SWIGPendingException.Pending)
2568 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2572 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
2574 NDalicPINVOKE.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
2575 if (NDalicPINVOKE.SWIGPendingException.Pending)
2576 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2579 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
2581 ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.Actor_GetResizePolicy(swigCPtr, (int)dimension);
2582 if (NDalicPINVOKE.SWIGPendingException.Pending)
2583 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2588 /// Sets the relative to parent size factor of the view.<br>
2589 /// This factor is only used when ResizePolicy is set to either:
2590 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br>
2591 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br>
2593 /// <pre>The View has been initialized.</pre>
2594 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis</param>
2595 public void SetSizeModeFactor(Vector3 factor)
2597 NDalicPINVOKE.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
2598 if (NDalicPINVOKE.SWIGPendingException.Pending)
2599 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2602 internal Vector3 GetSizeModeFactor()
2604 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetSizeModeFactor(swigCPtr), true);
2605 if (NDalicPINVOKE.SWIGPendingException.Pending)
2606 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2611 /// Calculates the height of the view given a width.<br>
2612 /// The natural size is used for default calculation. <br>
2613 /// size 0 is treated as aspect ratio 1:1.<br>
2615 /// <param name="width">Width to use</param>
2616 /// <returns>The height based on the width</returns>
2617 public float GetHeightForWidth(float width)
2619 float ret = NDalicPINVOKE.Actor_GetHeightForWidth(swigCPtr, width);
2620 if (NDalicPINVOKE.SWIGPendingException.Pending)
2621 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2626 /// Calculates the width of the view given a height.<br>
2627 /// The natural size is used for default calculation.<br>
2628 /// size 0 is treated as aspect ratio 1:1.<br>
2630 /// <param name="height">Height to use</param>
2631 /// <returns>The width based on the height</returns>
2632 public float GetWidthForHeight(float height)
2634 float ret = NDalicPINVOKE.Actor_GetWidthForHeight(swigCPtr, height);
2635 if (NDalicPINVOKE.SWIGPendingException.Pending)
2636 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2640 public float GetRelayoutSize(DimensionType dimension)
2642 float ret = NDalicPINVOKE.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
2643 if (NDalicPINVOKE.SWIGPendingException.Pending)
2644 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2648 public void SetPadding(PaddingType padding)
2650 NDalicPINVOKE.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
2651 if (NDalicPINVOKE.SWIGPendingException.Pending)
2652 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2655 public void GetPadding(PaddingType paddingOut)
2657 NDalicPINVOKE.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
2658 if (NDalicPINVOKE.SWIGPendingException.Pending)
2659 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2662 internal void SetMinimumSize(Vector2 size)
2664 NDalicPINVOKE.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
2665 if (NDalicPINVOKE.SWIGPendingException.Pending)
2666 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2669 internal Vector2 GetMinimumSize()
2671 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMinimumSize(swigCPtr), true);
2672 if (NDalicPINVOKE.SWIGPendingException.Pending)
2673 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2677 internal void SetMaximumSize(Vector2 size)
2679 NDalicPINVOKE.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
2680 if (NDalicPINVOKE.SWIGPendingException.Pending)
2681 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2684 internal Vector2 GetMaximumSize()
2686 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMaximumSize(swigCPtr), true);
2687 if (NDalicPINVOKE.SWIGPendingException.Pending)
2688 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2692 internal int GetHierarchyDepth()
2694 int ret = NDalicPINVOKE.Actor_GetHierarchyDepth(swigCPtr);
2695 if (NDalicPINVOKE.SWIGPendingException.Pending)
2696 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2700 public uint AddRenderer(Renderer renderer)
2702 uint ret = NDalicPINVOKE.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
2703 if (NDalicPINVOKE.SWIGPendingException.Pending)
2704 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2708 internal uint GetRendererCount()
2710 uint ret = NDalicPINVOKE.Actor_GetRendererCount(swigCPtr);
2711 if (NDalicPINVOKE.SWIGPendingException.Pending)
2712 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2716 public Renderer GetRendererAt(uint index)
2718 Renderer ret = new Renderer(NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index), true);
2719 if (NDalicPINVOKE.SWIGPendingException.Pending)
2720 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2724 public void RemoveRenderer(Renderer renderer)
2726 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
2727 if (NDalicPINVOKE.SWIGPendingException.Pending)
2728 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2731 public void RemoveRenderer(uint index)
2733 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
2734 if (NDalicPINVOKE.SWIGPendingException.Pending)
2735 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2738 internal TouchDataSignal TouchSignal()
2740 TouchDataSignal ret = new TouchDataSignal(NDalicPINVOKE.Actor_TouchSignal(swigCPtr), false);
2741 if (NDalicPINVOKE.SWIGPendingException.Pending)
2742 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2746 internal HoverSignal HoveredSignal()
2748 HoverSignal ret = new HoverSignal(NDalicPINVOKE.Actor_HoveredSignal(swigCPtr), false);
2749 if (NDalicPINVOKE.SWIGPendingException.Pending)
2750 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2754 internal WheelSignal WheelEventSignal()
2756 WheelSignal ret = new WheelSignal(NDalicPINVOKE.Actor_WheelEventSignal(swigCPtr), false);
2757 if (NDalicPINVOKE.SWIGPendingException.Pending)
2758 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2762 internal ViewSignal OnWindowSignal()
2764 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnStageSignal(swigCPtr), false);
2765 if (NDalicPINVOKE.SWIGPendingException.Pending)
2766 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2770 internal ViewSignal OffWindowSignal()
2772 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OffStageSignal(swigCPtr), false);
2773 if (NDalicPINVOKE.SWIGPendingException.Pending)
2774 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2778 internal ViewSignal OnRelayoutSignal()
2780 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnRelayoutSignal(swigCPtr), false);
2781 if (NDalicPINVOKE.SWIGPendingException.Pending)
2782 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2786 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view) {
2787 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
2788 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2792 internal ViewSignal ResourcesLoadedSignal()
2794 ViewSignal ret = new ViewSignal(NDalicPINVOKE.ResourceReadySignal(swigCPtr), false);
2795 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2800 /// Gets/Sets the origin of an view, within its parent's area.<br>
2801 /// 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>
2802 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br>
2803 /// An view's position is the distance between this origin, and the view's anchor-point.<br>
2805 /// <pre>The View has been initialized.</pre>
2806 public Position ParentOrigin
2810 Position temp = new Position(0.0f, 0.0f, 0.0f);
2811 GetProperty(View.Property.PARENT_ORIGIN).Get(temp);
2816 SetProperty(View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue(value));
2820 internal float ParentOriginX
2825 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
2830 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
2834 internal float ParentOriginY
2839 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
2844 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
2848 internal float ParentOriginZ
2853 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
2858 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
2863 /// Gets/Sets the anchor-point of an view.<br>
2864 /// 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>
2865 /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br>
2866 /// An view position is the distance between its parent-origin and this anchor-point.<br>
2867 /// An view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br>
2868 /// <pre>The View has been initialized.</pre>
2870 public Position PivotPoint
2874 Position temp = new Position(0.0f, 0.0f, 0.0f);
2875 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
2880 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
2884 internal float PivotPointX
2889 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
2894 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
2898 internal float PivotPointY
2903 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
2908 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
2912 internal float PivotPointZ
2917 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
2922 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
2927 /// Gets/Sets the size width of an view.
2929 public float SizeWidth
2934 GetProperty(View.Property.SIZE_WIDTH).Get(out temp);
2939 SetProperty(View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue(value));
2944 /// Gets/Sets the size height of an view.
2946 public float SizeHeight
2951 GetProperty(View.Property.SIZE_HEIGHT).Get(out temp);
2956 SetProperty(View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue(value));
2961 /// Gets/Sets the position of the View.<br>
2962 /// By default, sets the position vector between the parent origin and pivot point(default).<br>
2963 /// If Position inheritance if disabled, sets the world position.<br>
2965 public Position Position
2969 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
2970 GetProperty(View.Property.POSITION).Get(temp);
2975 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(value));
2980 /// Gets/Sets the position x of the View.
2982 public float PositionX
2987 GetProperty(View.Property.POSITION_X).Get(out temp);
2992 SetProperty(View.Property.POSITION_X, new Tizen.NUI.PropertyValue(value));
2997 /// Gets/Sets the position y of the View.
2999 public float PositionY
3004 GetProperty(View.Property.POSITION_Y).Get(out temp);
3009 SetProperty(View.Property.POSITION_Y, new Tizen.NUI.PropertyValue(value));
3014 /// Gets/Sets the position z of the View.
3016 public float PositionZ
3021 GetProperty(View.Property.POSITION_Z).Get(out temp);
3026 SetProperty(View.Property.POSITION_Z, new Tizen.NUI.PropertyValue(value));
3031 /// Gets/Sets the world position of the View.
3033 public Vector3 WorldPosition
3037 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3038 GetProperty(View.Property.WORLD_POSITION).Get(temp);
3043 internal float WorldPositionX
3048 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
3053 internal float WorldPositionY
3058 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
3063 internal float WorldPositionZ
3068 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
3074 /// Gets/Sets the orientation of the View.<br>
3075 /// An view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br>
3077 /// <remarks>This is an asynchronous method.</remarks>
3078 public Rotation Orientation
3082 Rotation temp = new Rotation();
3083 GetProperty(View.Property.ORIENTATION).Get(temp);
3088 SetProperty(View.Property.ORIENTATION, new Tizen.NUI.PropertyValue(value));
3093 /// Gets/Sets the world orientation of the View.<br>
3095 public Rotation WorldOrientation
3099 Rotation temp = new Rotation();
3100 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
3106 /// Gets/Sets the scale factor applied to an view.<br>
3108 public Vector3 Scale
3112 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3113 GetProperty(View.Property.SCALE).Get(temp);
3118 SetProperty(View.Property.SCALE, new Tizen.NUI.PropertyValue(value));
3123 /// Gets/Sets the scale x factor applied to an view.
3130 GetProperty(View.Property.SCALE_X).Get(out temp);
3135 SetProperty(View.Property.SCALE_X, new Tizen.NUI.PropertyValue(value));
3140 /// Gets/Sets the scale y factor applied to an view.
3147 GetProperty(View.Property.SCALE_Y).Get(out temp);
3152 SetProperty(View.Property.SCALE_Y, new Tizen.NUI.PropertyValue(value));
3157 /// Gets/Sets the scale z factor applied to an view.
3164 GetProperty(View.Property.SCALE_Z).Get(out temp);
3169 SetProperty(View.Property.SCALE_Z, new Tizen.NUI.PropertyValue(value));
3174 /// Gets the world scale of View.
3176 public Vector3 WorldScale
3180 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3181 GetProperty(View.Property.WORLD_SCALE).Get(temp);
3187 /// Retrieves the visibility flag of an view.
3190 /// If an view is not visible, then the view and its children will not be rendered.
3191 /// 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.
3198 GetProperty(View.Property.VISIBLE).Get(out temp);
3200 }/* only get is required : removed
3203 SetProperty(View.Property.VISIBLE, new Tizen.NUI.PropertyValue(value));
3208 /// Gets the view's world color.
3210 public Vector4 WorldColor
3214 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3215 GetProperty(View.Property.WORLD_COLOR).Get(temp);
3220 internal Matrix WorldMatrix
3224 Matrix temp = new Matrix();
3225 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
3231 /// Gets/Sets the View's name.
3238 GetProperty(View.Property.NAME).Get(out temp);
3243 SetProperty(View.Property.NAME, new Tizen.NUI.PropertyValue(value));
3248 /// Get the number of children held by the view.
3250 public uint ChildCount
3254 return GetChildCount();
3259 /// Gets the View's ID.
3271 /// Gets/Sets the status of whether an view should emit touch or hover signals.
3273 public bool Sensitive
3278 GetProperty(View.Property.SENSITIVE).Get(out temp);
3283 SetProperty(View.Property.SENSITIVE, new Tizen.NUI.PropertyValue(value));
3288 /// Gets/Sets the status of whether the view should receive a notification when touch or hover motion events leave the boundary of the view.
3290 public bool LeaveRequired
3295 GetProperty(View.Property.LEAVE_REQUIRED).Get(out temp);
3300 SetProperty(View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue(value));
3305 /// Gets/Sets the status of whether a child view inherits it's parent's orientation.
3307 public bool InheritOrientation
3312 GetProperty(View.Property.INHERIT_ORIENTATION).Get(out temp);
3317 SetProperty(View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue(value));
3322 /// Gets/Sets the status of whether a child view inherits it's parent's scale.
3324 public bool InheritScale
3329 GetProperty(View.Property.INHERIT_SCALE).Get(out temp);
3334 SetProperty(View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue(value));
3339 /// Gets/Sets the status of how the view and its children should be drawn.<br>
3340 /// Not all views are renderable, but DrawMode can be inherited from any view.<br>
3341 /// 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>
3342 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br>
3343 /// Overlay views are drawn in a separate pass, after all non-overlay views within the Layer.<br>
3344 /// For overlay views, the drawing order is with respect to tree levels of Views, and depth-testing will not be used.<br>
3346 public DrawModeType DrawMode
3351 if (GetProperty(View.Property.DRAW_MODE).Get(out temp) == false)
3353 NUILog.Error("DrawMode get error!");
3358 return DrawModeType.Normal;
3360 return DrawModeType.Overlay2D;
3362 return DrawModeType.Stencil;
3364 return DrawModeType.Normal;
3369 SetProperty(View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)value));
3374 /// Gets/Sets the relative to parent size factor of the view.<br>
3375 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br>
3376 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br>
3378 public Vector3 SizeModeFactor
3382 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3383 GetProperty(View.Property.SIZE_MODE_FACTOR).Get(temp);
3388 SetProperty(View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue(value));
3393 /// Gets/Sets the width resize policy to be used.
3395 public ResizePolicyType WidthResizePolicy
3400 if (GetProperty(View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
3402 NUILog.Error("WidthResizePolicy get error!");
3407 return ResizePolicyType.Fixed;
3408 case "USE_NATURAL_SIZE":
3409 return ResizePolicyType.UseNaturalSize;
3410 case "FILL_TO_PARENT":
3411 return ResizePolicyType.FillToParent;
3412 case "SIZE_RELATIVE_TO_PARENT":
3413 return ResizePolicyType.SizeRelativeToParent;
3414 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3415 return ResizePolicyType.SizeFixedOffsetFromParent;
3416 case "FIT_TO_CHILDREN":
3417 return ResizePolicyType.FitToChildren;
3418 case "DIMENSION_DEPENDENCY":
3419 return ResizePolicyType.DimensionDependency;
3420 case "USE_ASSIGNED_SIZE":
3421 return ResizePolicyType.UseAssignedSize;
3423 return ResizePolicyType.Fixed;
3428 SetProperty(View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3433 /// Gets/Sets the height resize policy to be used.
3435 public ResizePolicyType HeightResizePolicy
3440 if (GetProperty(View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
3442 NUILog.Error("HeightResizePolicy get error!");
3447 return ResizePolicyType.Fixed;
3448 case "USE_NATURAL_SIZE":
3449 return ResizePolicyType.UseNaturalSize;
3450 case "FILL_TO_PARENT":
3451 return ResizePolicyType.FillToParent;
3452 case "SIZE_RELATIVE_TO_PARENT":
3453 return ResizePolicyType.SizeRelativeToParent;
3454 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3455 return ResizePolicyType.SizeFixedOffsetFromParent;
3456 case "FIT_TO_CHILDREN":
3457 return ResizePolicyType.FitToChildren;
3458 case "DIMENSION_DEPENDENCY":
3459 return ResizePolicyType.DimensionDependency;
3460 case "USE_ASSIGNED_SIZE":
3461 return ResizePolicyType.UseAssignedSize;
3463 return ResizePolicyType.Fixed;
3468 SetProperty(View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3473 /// Gets/Sets the policy to use when setting size with size negotiation.<br>
3474 /// Defaults to SizeScalePolicyType.UseSizeSet.<br>
3476 public SizeScalePolicyType SizeScalePolicy
3481 if (GetProperty(View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
3483 NUILog.Error("SizeScalePolicy get error!");
3487 case "USE_SIZE_SET":
3488 return SizeScalePolicyType.UseSizeSet;
3489 case "FIT_WITH_ASPECT_RATIO":
3490 return SizeScalePolicyType.FitWithAspectRatio;
3491 case "FILL_WITH_ASPECT_RATIO":
3492 return SizeScalePolicyType.FillWithAspectRatio;
3494 return SizeScalePolicyType.UseSizeSet;
3499 string valueToString = "";
3502 case SizeScalePolicyType.UseSizeSet:
3504 valueToString = "USE_SIZE_SET";
3507 case SizeScalePolicyType.FitWithAspectRatio:
3509 valueToString = "FIT_WITH_ASPECT_RATIO";
3512 case SizeScalePolicyType.FillWithAspectRatio:
3514 valueToString = "FILL_WITH_ASPECT_RATIO";
3519 valueToString = "USE_SIZE_SET";
3523 SetProperty(View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
3528 /// Gets/Sets the status of whether the width size is dependent on height size.
3530 public bool WidthForHeight
3535 GetProperty(View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
3540 SetProperty(View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue(value));
3545 /// Gets/Sets the status of whether the height size is dependent on width size.
3547 public bool HeightForWidth
3552 GetProperty(View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
3557 SetProperty(View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue(value));
3562 /// Gets/Sets the padding for use in layout.
3564 public Vector4 Padding
3568 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3569 GetProperty(View.Property.PADDING).Get(temp);
3574 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
3579 /// Gets/Sets the minimum size an view can be assigned in size negotiation.
3581 public Size2D MinimumSize
3585 Size2D temp = new Size2D(0, 0);
3586 GetProperty(View.Property.MINIMUM_SIZE).Get(temp);
3591 SetProperty(View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3596 /// Gets/Sets the maximum size an view can be assigned in size negotiation.
3598 public Size2D MaximumSize
3602 Size2D temp = new Size2D(0, 0);
3603 GetProperty(View.Property.MAXIMUM_SIZE).Get(temp);
3608 SetProperty(View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3613 /// Gets/Sets whether a child view inherits it's parent's position.<br>
3614 /// Default is to inherit.<br>
3615 /// 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>
3617 public bool InheritPosition
3622 GetProperty(View.Property.INHERIT_POSITION).Get(out temp);
3627 SetProperty(View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue(value));
3632 /// Gets/Sets clipping behavior(mode) of it's children.
3634 public ClippingModeType ClippingMode
3639 if (GetProperty(View.Property.CLIPPING_MODE).Get(out temp) == false)
3641 NUILog.Error("ClippingMode get error!");
3646 return ClippingModeType.Disabled;
3647 case "CLIP_CHILDREN":
3648 return ClippingModeType.ClipChildren;
3650 return ClippingModeType.Disabled;
3655 SetProperty(View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)value));
3660 /// Get the number of renderers held by the view.
3662 public uint RendererCount
3666 return GetRendererCount();
3673 [Obsolete("Please do not use! this will be deprecated")]
3674 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> Touched
3678 if (_touchDataEventHandler == null)
3680 _touchDataCallback = OnTouch;
3681 this.TouchSignal().Connect(_touchDataCallback);
3684 _touchDataEventHandler += value;
3689 _touchDataEventHandler -= value;
3691 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
3693 this.TouchSignal().Disconnect(_touchDataCallback);
3699 [Obsolete("Please do not use! this will be deprecated")]
3700 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> Hovered
3704 if (_hoverEventHandler == null)
3706 _hoverEventCallback = OnHoverEvent;
3707 this.HoveredSignal().Connect(_hoverEventCallback);
3710 _hoverEventHandler += value;
3715 _hoverEventHandler -= value;
3717 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
3719 this.HoveredSignal().Disconnect(_hoverEventCallback);
3725 [Obsolete("Please do not use! this will be deprecated")]
3726 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelMoved
3730 if (_wheelEventHandler == null)
3732 _wheelEventCallback = OnWheelEvent;
3733 this.WheelEventSignal().Connect(_wheelEventCallback);
3736 _wheelEventHandler += value;
3741 _wheelEventHandler -= value;
3743 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
3745 this.WheelEventSignal().Disconnect(_wheelEventCallback);
3751 [Obsolete("Please do not use! this will be deprecated")]
3752 public Position AnchorPoint
3756 Position temp = new Position(0.0f, 0.0f, 0.0f);
3757 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
3762 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3766 [Obsolete("Please do not use! this will be deprecated")]
3771 Size temp = new Size(0.0f, 0.0f, 0.0f);
3772 GetProperty(View.Property.SIZE).Get(temp);
3777 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(value));
3781 [Obsolete("Please do not use! this will be deprecated")]
3782 public event EventHandler OnWindowEvent
3786 if (_onWindowEventHandler == null)
3788 _onWindowEventCallback = OnWindow;
3789 this.OnWindowSignal().Connect(_onWindowEventCallback);
3792 _onWindowEventHandler += value;
3797 _onWindowEventHandler -= value;
3799 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
3801 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
3806 [Obsolete("Please do not use! this will be deprecated")]
3807 public event EventHandler OffWindowEvent
3811 if (_offWindowEventHandler == null)
3813 _offWindowEventCallback = OffWindow;
3814 this.OffWindowSignal().Connect(_offWindowEventCallback);
3817 _offWindowEventHandler += value;
3822 _offWindowEventHandler -= value;
3824 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
3826 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
3831 [Obsolete("Please do not use! this will be deprecated")]
3832 public event EventHandler OnRelayoutEvent
3836 if (_onRelayoutEventHandler == null)
3838 _onRelayoutEventCallback = OnRelayout;
3839 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
3842 _onRelayoutEventHandler += value;
3847 _onRelayoutEventHandler -= value;
3849 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
3851 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);