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;
24 /// View is the base class for all views.
26 public class View : Container
28 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
30 internal View(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.View_SWIGUpcast(cPtr), cMemoryOwn)
32 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
33 PositionUsesPivotPoint = false;
36 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
38 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
41 // From Container Base class
44 /// Adds a child view to this View.
46 /// <seealso cref="Container::Add()">
48 public override void Add(View child)
50 NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
51 if (NDalicPINVOKE.SWIGPendingException.Pending)
52 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
56 /// Removes a child View from this View. If the view was not a child of this view, this is a no-op.
58 /// <seealso cref="Container::Remove()">
60 public override void Remove(View child)
62 NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
63 if (NDalicPINVOKE.SWIGPendingException.Pending)
64 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
68 /// Retrieves child view by index.
70 /// <seealso cref="Container::GetChildAt()">
72 public override View GetChildAt(uint index)
74 IntPtr cPtr = NDalicPINVOKE.Actor_GetChildAt(swigCPtr, index);
76 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
78 if (NDalicPINVOKE.SWIGPendingException.Pending)
79 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
84 /// Retrieves the number of children held by the view.
86 /// <seealso cref="Container::GetChildCount()">
88 protected override uint GetChildCount()
90 uint ret = NDalicPINVOKE.Actor_GetChildCount(swigCPtr);
91 if (NDalicPINVOKE.SWIGPendingException.Pending)
92 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
97 /// Get the Views parent
99 /// <seealso cref="Container::GetParent()">
101 protected override Container GetParent()
104 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
106 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(cPtr);
108 if(basehandle is Layer)
110 ret = basehandle as Layer;
114 ret = basehandle as View;
117 if (NDalicPINVOKE.SWIGPendingException.Pending)
118 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
124 // you can override it to clean-up your own resources.
125 protected override void Dispose(DisposeTypes type)
132 if(type == DisposeTypes.Explicit)
135 //Release your own managed resources here.
136 //You should release all of your own disposable objects here.
139 //Release your own unmanaged resources here.
140 //You should not access any managed member here except static instance.
141 //because the execution order of Finalizes is non-deterministic.
143 if (_onRelayoutEventCallback != null)
145 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
148 if (_offWindowEventCallback != null)
150 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
153 if (_onWindowEventCallback != null)
155 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
158 if (_wheelEventCallback != null)
160 this.WheelEventSignal().Disconnect(_wheelEventCallback);
163 if (_hoverEventCallback != null)
165 this.HoveredSignal().Disconnect(_hoverEventCallback);
168 if (_touchDataCallback != null)
170 this.TouchSignal().Disconnect(_touchDataCallback);
173 if (_ResourcesLoadedCallback != null)
175 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
178 if (_offWindowEventCallback != null)
180 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
183 if (_onWindowEventCallback != null)
185 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
188 if (_wheelEventCallback != null)
190 this.WheelEventSignal().Disconnect(_wheelEventCallback);
193 if (_hoverEventCallback != null)
195 this.HoveredSignal().Disconnect(_hoverEventCallback);
198 if (_touchDataCallback != null)
200 this.TouchSignal().Disconnect(_touchDataCallback);
203 if (_onRelayoutEventCallback != null)
205 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
208 if (_keyCallback != null)
210 this.KeyEventSignal().Disconnect(_keyCallback);
213 if (_keyInputFocusLostCallback != null)
215 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
218 if (_keyInputFocusGainedCallback != null)
220 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
223 if (swigCPtr.Handle != global::System.IntPtr.Zero)
228 NDalicPINVOKE.delete_View(swigCPtr);
230 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
236 private EventHandler _keyInputFocusGainedEventHandler;
237 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
238 private delegate void KeyInputFocusGainedCallbackType(IntPtr control);
239 private KeyInputFocusGainedCallbackType _keyInputFocusGainedCallback;
242 /// Event for KeyInputFocusGained signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
243 /// KeyInputFocusGained signal is emitted when the control gets Key Input Focus.<br>
245 public event EventHandler FocusGained
249 if (_keyInputFocusGainedEventHandler == null)
251 _keyInputFocusGainedCallback = OnKeyInputFocusGained;
252 this.KeyInputFocusGainedSignal().Connect(_keyInputFocusGainedCallback);
255 _keyInputFocusGainedEventHandler += value;
260 _keyInputFocusGainedEventHandler -= value;
262 if (_keyInputFocusGainedEventHandler == null && KeyInputFocusGainedSignal().Empty() == false)
264 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
269 private void OnKeyInputFocusGained(IntPtr view)
271 if (_keyInputFocusGainedEventHandler != null)
273 _keyInputFocusGainedEventHandler(this, null);
278 private EventHandler _keyInputFocusLostEventHandler;
279 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
280 private delegate void KeyInputFocusLostCallbackType(IntPtr control);
281 private KeyInputFocusLostCallbackType _keyInputFocusLostCallback;
284 /// Event for KeyInputFocusLost signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
285 /// KeyInputFocusLost signal is emitted when the control loses Key Input Focus.<br>
287 public event EventHandler FocusLost
291 if (_keyInputFocusLostEventHandler == null)
293 _keyInputFocusLostCallback = OnKeyInputFocusLost;
294 this.KeyInputFocusLostSignal().Connect(_keyInputFocusLostCallback);
297 _keyInputFocusLostEventHandler += value;
302 _keyInputFocusLostEventHandler -= value;
304 if (_keyInputFocusLostEventHandler == null && KeyInputFocusLostSignal().Empty() == false)
306 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
311 private void OnKeyInputFocusLost(IntPtr view)
313 if (_keyInputFocusLostEventHandler != null)
315 _keyInputFocusLostEventHandler(this, null);
320 /// Event arguments that passed via KeyEvent signal.
322 public class KeyEventArgs : EventArgs
327 /// Key - is the key sent to the View.
342 private EventHandlerWithReturnType<object, KeyEventArgs, bool> _keyEventHandler;
343 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
344 private delegate bool KeyCallbackType(IntPtr control, IntPtr keyEvent);
345 private KeyCallbackType _keyCallback;
348 /// Event for KeyPressed signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
349 /// KeyPressed signal is emitted when key event is received.<br>
351 public event EventHandlerWithReturnType<object, KeyEventArgs, bool> KeyEvent
355 if (_keyEventHandler == null)
357 _keyCallback = OnKeyEvent;
358 this.KeyEventSignal().Connect(_keyCallback);
361 _keyEventHandler += value;
366 _keyEventHandler -= value;
368 if (_keyEventHandler == null && KeyEventSignal().Empty() == false)
370 this.KeyEventSignal().Disconnect(_keyCallback);
375 private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
377 KeyEventArgs e = new KeyEventArgs();
379 e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
381 if (_keyEventHandler != null)
383 return _keyEventHandler(this, e);
389 private EventHandler _onRelayoutEventHandler;
390 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
391 private delegate void OnRelayoutEventCallbackType(IntPtr control);
392 private OnRelayoutEventCallbackType _onRelayoutEventCallback;
395 /// Event for OnRelayout signal which can be used to subscribe/unsubscribe the event handler.<br>
396 /// OnRelayout signal is emitted after the size has been set on the view during relayout.<br>
398 public event EventHandler Relayout
402 if (_onRelayoutEventHandler == null)
404 _onRelayoutEventCallback = OnRelayout;
405 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
408 _onRelayoutEventHandler += value;
413 _onRelayoutEventHandler -= value;
415 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
417 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
423 // Callback for View OnRelayout signal
424 private void OnRelayout(IntPtr data)
426 if (_onRelayoutEventHandler != null)
428 _onRelayoutEventHandler(this, null);
433 /// Event arguments that passed via Touch signal.
435 public class TouchEventArgs : EventArgs
437 private Touch _touch;
440 /// Touch - contains the information of touch points
455 private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
456 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
457 private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
458 private TouchDataCallbackType _touchDataCallback;
461 /// Event for Touched signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
462 /// Touched signal is emitted when touch input is received.<br>
464 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
468 if (_touchDataEventHandler == null)
470 _touchDataCallback = OnTouch;
471 this.TouchSignal().Connect(_touchDataCallback);
474 _touchDataEventHandler += value;
479 _touchDataEventHandler -= value;
481 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
483 this.TouchSignal().Disconnect(_touchDataCallback);
489 // Callback for View TouchSignal
490 private bool OnTouch(IntPtr view, IntPtr touchData)
492 TouchEventArgs e = new TouchEventArgs();
494 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
496 if (_touchDataEventHandler != null)
498 return _touchDataEventHandler(this, e);
505 /// Event arguments that passed via Hover signal.
507 public class HoverEventArgs : EventArgs
509 private Hover _hover;
512 /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
527 private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
528 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
529 private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
530 private HoverEventCallbackType _hoverEventCallback;
533 /// Event for Hovered signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
534 /// Hovered signal is emitted when hover input is received.<br>
536 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
540 if (_hoverEventHandler == null)
542 _hoverEventCallback = OnHoverEvent;
543 this.HoveredSignal().Connect(_hoverEventCallback);
546 _hoverEventHandler += value;
551 _hoverEventHandler -= value;
553 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
555 this.HoveredSignal().Disconnect(_hoverEventCallback);
561 // Callback for View Hover signal
562 private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
564 HoverEventArgs e = new HoverEventArgs();
566 e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
568 if (_hoverEventHandler != null)
570 return _hoverEventHandler(this, e);
577 /// Event arguments that passed via Wheel signal.
579 public class WheelEventArgs : EventArgs
581 private Wheel _wheel;
584 /// WheelEvent - store a wheel rolling type : MOUSE_WHEEL or CUSTOM_WHEEL
599 private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
600 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
601 private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
602 private WheelEventCallbackType _wheelEventCallback;
605 /// Event for WheelMoved signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
606 /// WheelMoved signal is emitted when wheel event is received.<br>
608 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
612 if (_wheelEventHandler == null)
614 _wheelEventCallback = OnWheelEvent;
615 this.WheelEventSignal().Connect(_wheelEventCallback);
618 _wheelEventHandler += value;
623 _wheelEventHandler -= value;
625 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
627 this.WheelEventSignal().Disconnect(_wheelEventCallback);
633 // Callback for View Wheel signal
634 private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
636 WheelEventArgs e = new WheelEventArgs();
638 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
640 if (_wheelEventHandler != null)
642 return _wheelEventHandler(this, e);
648 private EventHandler _onWindowEventHandler;
649 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
650 private delegate void OnWindowEventCallbackType(IntPtr control);
651 private OnWindowEventCallbackType _onWindowEventCallback;
654 /// Event for OnWindow signal which can be used to subscribe/unsubscribe the event handler.<br>
655 /// OnWindow signal is emitted after the view has been connected to the Window.<br>
657 public event EventHandler AddedToWindow
661 if (_onWindowEventHandler == null)
663 _onWindowEventCallback = OnWindow;
664 this.OnWindowSignal().Connect(_onWindowEventCallback);
667 _onWindowEventHandler += value;
672 _onWindowEventHandler -= value;
674 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
676 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
681 // Callback for View OnWindow signal
682 private void OnWindow(IntPtr data)
684 if (_onWindowEventHandler != null)
686 _onWindowEventHandler(this, null);
691 private EventHandler _offWindowEventHandler;
692 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
693 private delegate void OffWindowEventCallbackType(IntPtr control);
694 private OffWindowEventCallbackType _offWindowEventCallback;
697 /// Event for OffWindow signal which can be used to subscribe/unsubscribe the event handler.<br>
698 /// OffWindow signal is emitted after the view has been disconnected from the Window.<br>
700 public event EventHandler RemovedFromWindow
704 if (_offWindowEventHandler == null)
706 _offWindowEventCallback = OffWindow;
707 this.OffWindowSignal().Connect(_offWindowEventCallback);
710 _offWindowEventHandler += value;
715 _offWindowEventHandler -= value;
717 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
719 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
724 // Callback for View OffWindow signal
725 private void OffWindow(IntPtr data)
727 if (_offWindowEventHandler != null)
729 _offWindowEventHandler(this, null);
734 /// Event arguments of visibility changed.
736 public class VisibilityChangedEventArgs : EventArgs
739 private bool _visibility;
740 private VisibilityChangeType _type;
743 /// The view, or child of view, whose visibility has changed.
758 /// Whether the view is now visible or not.
760 public bool Visibility
773 /// Whether the view's visible property has changed or a parent's.
775 public VisibilityChangeType Type
788 private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
789 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
790 private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
791 private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
794 /// Event for visibility change which can be used to subscribe/unsubscribe the event handler.<br>
795 /// This signal is emitted when the visible property of this or a parent view is changed.<br>
797 public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
801 if (_visibilityChangedEventHandler == null)
803 _visibilityChangedEventCallback = OnVisibilityChanged;
804 VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
807 _visibilityChangedEventHandler += value;
812 _visibilityChangedEventHandler -= value;
814 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
816 VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
821 // Callback for View visibility change signal
822 private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
824 VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
827 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
829 e.Visibility = visibility;
832 if (_visibilityChangedEventHandler != null)
834 _visibilityChangedEventHandler(this, e);
838 // Resource Ready Signal
840 private EventHandler _resourcesLoadedEventHandler;
841 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
842 private delegate void ResourcesLoadedCallbackType(IntPtr control);
843 private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
846 /// Event for ResourcesLoadedSignal signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
847 /// This signal is emitted after all resources required by a View are loaded and ready.<br>
849 public event EventHandler ResourcesLoaded
853 if (_resourcesLoadedEventHandler == null)
855 _ResourcesLoadedCallback = OnResourcesLoaded;
856 this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
859 _resourcesLoadedEventHandler += value;
864 _resourcesLoadedEventHandler -= value;
866 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
868 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
873 private void OnResourcesLoaded(IntPtr view)
875 if (_resourcesLoadedEventHandler != null)
877 _resourcesLoadedEventHandler(this, null);
881 internal IntPtr GetPtrfromView()
883 return (IntPtr)swigCPtr;
886 internal class Property
888 internal static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get();
889 internal static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get();
890 internal static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get();
891 internal static readonly int LEFT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
892 internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
893 internal static readonly int UP_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
894 internal static readonly int DOWN_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
895 internal static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get();
896 internal static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get();
897 internal static readonly int SIBLING_ORDER = NDalicManualPINVOKE.Actor_Property_SIBLING_ORDER_get();
898 internal static readonly int OPACITY = NDalicManualPINVOKE.Actor_Property_OPACITY_get();
899 internal static readonly int SCREEN_POSITION = NDalicManualPINVOKE.Actor_Property_SCREEN_POSITION_get();
900 internal static readonly int POSITION_USES_ANCHOR_POINT = NDalicManualPINVOKE.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
901 internal static readonly int PARENT_ORIGIN = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_get();
902 internal static readonly int PARENT_ORIGIN_X = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_X_get();
903 internal static readonly int PARENT_ORIGIN_Y = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Y_get();
904 internal static readonly int PARENT_ORIGIN_Z = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Z_get();
905 internal static readonly int ANCHOR_POINT = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_get();
906 internal static readonly int ANCHOR_POINT_X = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_X_get();
907 internal static readonly int ANCHOR_POINT_Y = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Y_get();
908 internal static readonly int ANCHOR_POINT_Z = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Z_get();
909 internal static readonly int SIZE = NDalicPINVOKE.Actor_Property_SIZE_get();
910 internal static readonly int SIZE_WIDTH = NDalicPINVOKE.Actor_Property_SIZE_WIDTH_get();
911 internal static readonly int SIZE_HEIGHT = NDalicPINVOKE.Actor_Property_SIZE_HEIGHT_get();
912 internal static readonly int SIZE_DEPTH = NDalicPINVOKE.Actor_Property_SIZE_DEPTH_get();
913 internal static readonly int POSITION = NDalicPINVOKE.Actor_Property_POSITION_get();
914 internal static readonly int POSITION_X = NDalicPINVOKE.Actor_Property_POSITION_X_get();
915 internal static readonly int POSITION_Y = NDalicPINVOKE.Actor_Property_POSITION_Y_get();
916 internal static readonly int POSITION_Z = NDalicPINVOKE.Actor_Property_POSITION_Z_get();
917 internal static readonly int WORLD_POSITION = NDalicPINVOKE.Actor_Property_WORLD_POSITION_get();
918 internal static readonly int WORLD_POSITION_X = NDalicPINVOKE.Actor_Property_WORLD_POSITION_X_get();
919 internal static readonly int WORLD_POSITION_Y = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Y_get();
920 internal static readonly int WORLD_POSITION_Z = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Z_get();
921 internal static readonly int ORIENTATION = NDalicPINVOKE.Actor_Property_ORIENTATION_get();
922 internal static readonly int WORLD_ORIENTATION = NDalicPINVOKE.Actor_Property_WORLD_ORIENTATION_get();
923 internal static readonly int SCALE = NDalicPINVOKE.Actor_Property_SCALE_get();
924 internal static readonly int SCALE_X = NDalicPINVOKE.Actor_Property_SCALE_X_get();
925 internal static readonly int SCALE_Y = NDalicPINVOKE.Actor_Property_SCALE_Y_get();
926 internal static readonly int SCALE_Z = NDalicPINVOKE.Actor_Property_SCALE_Z_get();
927 internal static readonly int WORLD_SCALE = NDalicPINVOKE.Actor_Property_WORLD_SCALE_get();
928 internal static readonly int VISIBLE = NDalicPINVOKE.Actor_Property_VISIBLE_get();
929 internal static readonly int WORLD_COLOR = NDalicPINVOKE.Actor_Property_WORLD_COLOR_get();
930 internal static readonly int WORLD_MATRIX = NDalicPINVOKE.Actor_Property_WORLD_MATRIX_get();
931 internal static readonly int NAME = NDalicPINVOKE.Actor_Property_NAME_get();
932 internal static readonly int SENSITIVE = NDalicPINVOKE.Actor_Property_SENSITIVE_get();
933 internal static readonly int LEAVE_REQUIRED = NDalicPINVOKE.Actor_Property_LEAVE_REQUIRED_get();
934 internal static readonly int INHERIT_ORIENTATION = NDalicPINVOKE.Actor_Property_INHERIT_ORIENTATION_get();
935 internal static readonly int INHERIT_SCALE = NDalicPINVOKE.Actor_Property_INHERIT_SCALE_get();
936 internal static readonly int DRAW_MODE = NDalicPINVOKE.Actor_Property_DRAW_MODE_get();
937 internal static readonly int SIZE_MODE_FACTOR = NDalicPINVOKE.Actor_Property_SIZE_MODE_FACTOR_get();
938 internal static readonly int WIDTH_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_WIDTH_RESIZE_POLICY_get();
939 internal static readonly int HEIGHT_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_HEIGHT_RESIZE_POLICY_get();
940 internal static readonly int SIZE_SCALE_POLICY = NDalicPINVOKE.Actor_Property_SIZE_SCALE_POLICY_get();
941 internal static readonly int WIDTH_FOR_HEIGHT = NDalicPINVOKE.Actor_Property_WIDTH_FOR_HEIGHT_get();
942 internal static readonly int HEIGHT_FOR_WIDTH = NDalicPINVOKE.Actor_Property_HEIGHT_FOR_WIDTH_get();
943 internal static readonly int PADDING = NDalicPINVOKE.Actor_Property_PADDING_get();
944 internal static readonly int MINIMUM_SIZE = NDalicPINVOKE.Actor_Property_MINIMUM_SIZE_get();
945 internal static readonly int MAXIMUM_SIZE = NDalicPINVOKE.Actor_Property_MAXIMUM_SIZE_get();
946 internal static readonly int INHERIT_POSITION = NDalicPINVOKE.Actor_Property_INHERIT_POSITION_get();
947 internal static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
951 /// Describes the direction to move the focus towards.
953 public enum FocusDirection
964 /// Creates a new instance of a View.
966 public View() : this(NDalicPINVOKE.View_New(), true)
968 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
971 internal View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true)
973 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
977 /// Downcasts a handle to View handle.<br>
978 /// If handle points to a View, the downcast produces valid handle.<br>
979 /// If not, the returned handle is left uninitialized.<br>
981 /// <param name="handle">Handle to an object</param>
982 /// <returns>A handle to a View or an uninitialized handle</returns>
983 [Obsolete("Please do not use! this will be deprecated, instead please us as keyword.")]
984 public new static View DownCast(BaseHandle handle)
986 View ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as View;
987 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
991 [Obsolete("Please do not use! this will be deprecated, instead please us as keyword.")]
992 public static T DownCast<T>(View view) where T : View
994 T ret = Registry.GetManagedBaseHandleFromNativePtr(view) as T;
1002 private View ConvertIdToView(uint id)
1008 View parentView = Parent as View;
1009 view = parentView.FindChildById(id);
1014 view = Window.Instance.GetRootLayer().FindChildById(id);
1020 internal void SetKeyInputFocus()
1022 NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
1023 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1027 /// Quries whether the view has focus.
1029 /// <returns>true if this view has focus</returns>
1030 public bool HasFocus()
1032 bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
1033 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1037 internal void ClearKeyInputFocus()
1039 NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
1040 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1043 internal PinchGestureDetector GetPinchGestureDetector()
1045 PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
1046 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1050 internal PanGestureDetector GetPanGestureDetector()
1052 PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
1053 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1057 internal TapGestureDetector GetTapGestureDetector()
1059 TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
1060 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1064 internal LongPressGestureDetector GetLongPressGestureDetector()
1066 LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
1067 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1072 /// Sets the name of the style to be applied to the view.
1074 /// <param name="styleName">A string matching a style described in a stylesheet</param>
1075 public void SetStyleName(string styleName)
1077 NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
1078 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1082 /// Retrieves the name of the style to be applied to the view (if any).
1084 /// <returns>A string matching a style, or an empty string</returns>
1085 public string GetStyleName()
1087 string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
1088 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1092 internal void SetBackgroundColor(Vector4 color)
1094 NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
1095 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1098 internal Vector4 GetBackgroundColor()
1100 Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
1101 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1105 internal void SetBackgroundImage(Image image)
1107 NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
1108 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1112 /// Clears the background.
1114 public void ClearBackground()
1116 NDalicPINVOKE.View_ClearBackground(swigCPtr);
1117 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1120 internal ControlKeySignal KeyEventSignal()
1122 ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
1123 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1127 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
1129 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
1130 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1134 internal KeyInputFocusSignal KeyInputFocusLostSignal()
1136 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
1137 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1141 internal View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
1143 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1146 internal enum PropertyRange
1148 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
1149 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
1150 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
1154 /// styleName, type string.
1156 public string StyleName
1161 GetProperty(View.Property.STYLE_NAME).Get(out temp);
1166 SetProperty(View.Property.STYLE_NAME, new Tizen.NUI.PropertyValue(value));
1171 /// mutually exclusive with BACKGROUND_IMAGE & BACKGROUND, type Vector4.
1173 public Color BackgroundColor
1177 Color backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1179 Tizen.NUI.PropertyMap background = Background;
1181 background.Find(Visual.Property.Type)?.Get(out visualType);
1182 if (visualType == (int)Visual.Type.Color)
1184 background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor);
1187 return backgroundColor;
1191 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1196 /// Create an Animation to animate the background color visual. If there is no
1197 /// background visual, creates one with transparent black as it's mixColor.
1199 public Animation AnimateBackgroundColor( object destinationValue,
1202 AlphaFunction.BuiltinFunctions? alphaFunction = null,
1203 object initialValue = null)
1205 Tizen.NUI.PropertyMap background = Background;
1207 if( background.Empty() )
1209 // If there is no background yet, ensure there is a transparent
1211 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1212 background = Background;
1214 return AnimateColor( "background", destinationValue, startTime, endTime, alphaFunction, initialValue );
1218 /// Create an Animation to animate the mixColor of the named visual.
1220 public Animation AnimateColor( string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null )
1222 Animation animation = null;
1224 PropertyMap _animator = new PropertyMap();
1225 if( alphaFunction != null )
1227 _animator.Add("alphaFunction", new PropertyValue( AlphaFunction.BuiltinToPropertyKey(alphaFunction) ) );
1230 PropertyMap _timePeriod = new PropertyMap();
1231 _timePeriod.Add( "duration", new PropertyValue((endTime-startTime)/1000.0f) );
1232 _timePeriod.Add( "delay", new PropertyValue( startTime/1000.0f ) );
1233 _animator.Add( "timePeriod", new PropertyValue( _timePeriod ) );
1235 PropertyMap _transition = new PropertyMap();
1236 _transition.Add( "animator", new PropertyValue( _animator ) );
1237 _transition.Add( "target", new PropertyValue( targetVisual ) );
1238 _transition.Add( "property", new PropertyValue( "mixColor" ) );
1240 if( initialColor != null )
1242 PropertyValue initValue = PropertyValue.CreateFromObject( initialColor );
1243 _transition.Add( "initialValue", initValue );
1246 PropertyValue destValue = PropertyValue.CreateFromObject( destinationColor );
1247 _transition.Add( "targetValue", destValue );
1248 TransitionData _transitionData = new TransitionData( _transition );
1250 animation = new Animation( NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true );
1251 if (NDalicPINVOKE.SWIGPendingException.Pending)
1252 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1258 /// mutually exclusive with BACKGROUND_COLOR & BACKGROUND, type Map.
1260 public string BackgroundImage
1264 string backgroundImage = "";
1266 Tizen.NUI.PropertyMap background = Background;
1268 background.Find(Visual.Property.Type)?.Get(out visualType);
1269 if (visualType == (int)Visual.Type.Image)
1271 background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
1274 return backgroundImage;
1278 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1282 public Tizen.NUI.PropertyMap Background
1286 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1287 GetProperty( View.Property.BACKGROUND ).Get(temp);
1292 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1298 /// The current state of the view.
1305 if (GetProperty(View.Property.STATE).Get(out temp) == false)
1307 NUILog.Error("State get error!");
1313 return States.Normal;
1317 return States.Focused;
1321 return States.Disabled;
1325 return States.Normal;
1331 SetProperty(View.Property.STATE, new Tizen.NUI.PropertyValue((int)value));
1336 /// The current sub state of the view.
1338 public States SubState
1343 if (GetProperty(View.Property.SUB_STATE).Get(out temp) == false)
1345 NUILog.Error("subState get error!");
1350 return States.Normal;
1352 return States.Focused;
1354 return States.Disabled;
1356 return States.Normal;
1361 string valueToString = "";
1366 valueToString = "NORMAL";
1369 case States.Focused:
1371 valueToString = "FOCUSED";
1374 case States.Disabled:
1376 valueToString = "DISABLED";
1381 valueToString = "NORMAL";
1385 SetProperty(View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
1390 /// Displays a tooltip
1392 public Tizen.NUI.PropertyMap Tooltip
1396 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1397 GetProperty(View.Property.TOOLTIP).Get(temp);
1402 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1407 /// Displays a tooltip as Text
1409 public string TooltipText
1413 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1417 private int LeftFocusableViewId
1422 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
1427 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1431 private int RightFocusableViewId
1436 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
1441 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1445 private int UpFocusableViewId
1450 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
1455 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1459 private int DownFocusableViewId
1464 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
1469 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1474 /// Child Property of FlexContainer.<br>
1475 /// The proportion of the free space in the container the flex item will receive.<br>
1476 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br>
1483 GetProperty(FlexContainer.ChildProperty.FLEX).Get(out temp);
1488 SetProperty(FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue(value));
1493 /// Child Property of FlexContainer.<br>
1494 /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br>
1496 public int AlignSelf
1501 GetProperty(FlexContainer.ChildProperty.ALIGN_SELF).Get(out temp);
1506 SetProperty(FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue(value));
1511 /// Child Property of FlexContainer.<br>
1512 /// The space around the flex item.<br>
1514 public Vector4 FlexMargin
1518 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1519 GetProperty(FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
1524 SetProperty(FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue(value));
1529 /// The top-left cell this child occupies, if not set, the first available cell is used
1531 public Vector2 CellIndex
1535 Vector2 temp = new Vector2(0.0f, 0.0f);
1536 GetProperty(TableView.ChildProperty.CELL_INDEX).Get(temp);
1541 SetProperty(TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue(value));
1546 /// The number of rows this child occupies, if not set, default value is 1
1548 public float RowSpan
1553 GetProperty(TableView.ChildProperty.ROW_SPAN).Get(out temp);
1558 SetProperty(TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue(value));
1563 /// The number of columns this child occupies, if not set, default value is 1
1565 public float ColumnSpan
1570 GetProperty(TableView.ChildProperty.COLUMN_SPAN).Get(out temp);
1575 SetProperty(TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue(value));
1580 /// The horizontal alignment of this child inside the cells, if not set, default value is 'left'
1582 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
1587 if (GetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
1589 NUILog.Error("CellHorizontalAlignment get error!");
1595 return Tizen.NUI.HorizontalAlignmentType.Left;
1597 return Tizen.NUI.HorizontalAlignmentType.Center;
1599 return Tizen.NUI.HorizontalAlignmentType.Right;
1601 return Tizen.NUI.HorizontalAlignmentType.Left;
1606 string valueToString = "";
1609 case Tizen.NUI.HorizontalAlignmentType.Left:
1611 valueToString = "left";
1614 case Tizen.NUI.HorizontalAlignmentType.Center:
1616 valueToString = "center";
1619 case Tizen.NUI.HorizontalAlignmentType.Right:
1621 valueToString = "right";
1626 valueToString = "left";
1630 SetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1635 /// The vertical alignment of this child inside the cells, if not set, default value is 'top'
1637 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
1642 GetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
1644 NUILog.Error("CellVerticalAlignment get error!");
1650 return Tizen.NUI.VerticalAlignmentType.Top;
1652 return Tizen.NUI.VerticalAlignmentType.Center;
1654 return Tizen.NUI.VerticalAlignmentType.Bottom;
1656 return Tizen.NUI.VerticalAlignmentType.Top;
1661 string valueToString = "";
1664 case Tizen.NUI.VerticalAlignmentType.Top:
1666 valueToString = "top";
1669 case Tizen.NUI.VerticalAlignmentType.Center:
1671 valueToString = "center";
1674 case Tizen.NUI.VerticalAlignmentType.Bottom:
1676 valueToString = "bottom";
1681 valueToString = "top";
1685 SetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1690 /// The left focusable view.<br>
1691 /// This will return NULL if not set.<br>
1692 /// This will also return NULL if the specified left focusable view is not on Window.<br>
1694 public View LeftFocusableView
1696 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1699 if (LeftFocusableViewId >= 0)
1701 return ConvertIdToView((uint)LeftFocusableViewId);
1707 LeftFocusableViewId = (int)value.GetId();
1712 /// The right focusable view.<br>
1713 /// This will return NULL if not set.<br>
1714 /// This will also return NULL if the specified right focusable view is not on Window.<br>
1716 public View RightFocusableView
1718 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1721 if (RightFocusableViewId >= 0)
1723 return ConvertIdToView((uint)RightFocusableViewId);
1729 RightFocusableViewId = (int)value.GetId();
1734 /// The up focusable view.<br>
1735 /// This will return NULL if not set.<br>
1736 /// This will also return NULL if the specified up focusable view is not on Window.<br>
1738 public View UpFocusableView
1740 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1743 if (UpFocusableViewId >= 0)
1745 return ConvertIdToView((uint)UpFocusableViewId);
1751 UpFocusableViewId = (int)value.GetId();
1756 /// The down focusable view.<br>
1757 /// This will return NULL if not set.<br>
1758 /// This will also return NULL if the specified down focusable view is not on Window.<br>
1760 public View DownFocusableView
1762 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1765 if (DownFocusableViewId >= 0)
1767 return ConvertIdToView((uint)DownFocusableViewId);
1773 DownFocusableViewId = (int)value.GetId();
1778 /// whether the view should be focusable by keyboard navigation.
1780 public bool Focusable
1784 SetKeyboardFocusable(value);
1788 return IsKeyboardFocusable();
1793 /// Enumeration for describing the states of view.
1812 /// Retrieves the position of the View.<br>
1813 /// The coordinates are relative to the View's parent.<br>
1815 public Position CurrentPosition
1819 return GetCurrentPosition();
1824 /// Sets the size of an view for width and height.<br>
1825 /// Geometry can be scaled to fit within this area.<br>
1826 /// This does not interfere with the views scale factor.<br>
1827 /// The views default depth is the minimum of width & height.<br>
1829 public Size2D Size2D
1833 Size temp = new Size(0.0f, 0.0f, 0.0f);
1834 GetProperty(View.Property.SIZE).Get(temp);
1835 Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
1840 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(new Size(value)));
1845 /// Retrieves the size of the View.<br>
1846 /// The coordinates are relative to the View's parent.<br>
1848 public Size2D CurrentSize
1852 return GetCurrentSize();
1856 public bool Visibility
1865 /// Retrieves and sets the view's opacity.<br>
1867 public float Opacity
1872 GetProperty(View.Property.OPACITY).Get(out temp);
1877 SetProperty(View.Property.OPACITY, new Tizen.NUI.PropertyValue(value));
1882 /// Sets the position of the View for X and Y.<br>
1883 /// By default, sets the position vector between the parent origin and pivot point(default).<br>
1884 /// If Position inheritance if disabled, sets the world position.<br>
1886 public Position2D Position2D
1890 Position temp = new Position(0.0f, 0.0f, 0.0f);
1891 GetProperty(View.Property.POSITION).Get(temp);
1892 return new Position2D(temp);
1896 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(new Position(value)));
1901 /// Retrieves screen postion of view's.<br>
1903 public Vector2 ScreenPosition
1907 Vector2 temp = new Vector2(0.0f, 0.0f);
1908 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
1914 /// Determines whether the pivot point should be used to determine the position of the view.
1915 /// This is true by default.
1917 /// <remarks>If false, then the top-left of the view is used for the position.
1918 /// Setting this to false will allow scaling or rotation around the anchor-point without affecting the view's position.
1920 public bool PositionUsesPivotPoint
1925 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
1930 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
1934 [Obsolete("Please do not use! this will be deprecated")]
1935 public bool PositionUsesAnchorPoint
1940 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
1945 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
1949 internal bool FocusState
1953 return IsKeyboardFocusable();
1957 SetKeyboardFocusable(value);
1962 /// Queries whether the view is connected to the Stage.<br>
1963 /// When an view is connected, it will be directly or indirectly parented to the root View.<br>
1965 public bool IsOnWindow
1974 /// Gets depth in the hierarchy for the view.
1976 public int HierarchyDepth
1980 return GetHierarchyDepth();
1985 /// Sets the sibling order of the view so depth position can be defined within the same parent.
1988 /// Note The initial value is 0.
1989 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove and LowerBelow will override the sibling order.
1990 /// The values set by this Property will likely change.
1992 public int SiblingOrder
1997 GetProperty(View.Property.SIBLING_ORDER).Get(out temp);
2002 SetProperty(View.Property.SIBLING_ORDER, new Tizen.NUI.PropertyValue(value));
2006 [Obsolete("Please do not use! this will be internal property")]
2007 public Vector3 NaturalSize
2011 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2012 if (NDalicPINVOKE.SWIGPendingException.Pending)
2013 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2022 /// This is an asynchronous method.
2033 /// This is an asynchronous method.
2034 /// If an view is hidden, then the view and its children will not be rendered.
2035 /// 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.
2042 internal void Raise()
2044 NDalicPINVOKE.Raise(swigCPtr);
2045 if (NDalicPINVOKE.SWIGPendingException.Pending)
2046 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2049 internal void Lower()
2051 NDalicPINVOKE.Lower(swigCPtr);
2052 if (NDalicPINVOKE.SWIGPendingException.Pending)
2053 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2057 /// Raise view above all other views.
2060 /// Sibling order of views within the parent will be updated automatically.
2061 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2063 public void RaiseToTop()
2065 NDalicPINVOKE.RaiseToTop(swigCPtr);
2066 if (NDalicPINVOKE.SWIGPendingException.Pending)
2067 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2071 /// Lower view to the bottom of all views.
2074 /// Sibling order of views within the parent will be updated automatically.
2075 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2077 public void LowerToBottom()
2079 NDalicPINVOKE.LowerToBottom(swigCPtr);
2080 if (NDalicPINVOKE.SWIGPendingException.Pending)
2081 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2085 /// Query if all resources required by a View are loaded and ready.
2087 /// <remarks>Most resources are only loaded when the control is placed on stage
2089 public bool IsResourceReady()
2091 bool ret = NDalicPINVOKE.IsResourceReady(swigCPtr);
2092 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2097 /// Raise the view to above the target view.
2099 /// <remarks>Sibling order of views within the parent will be updated automatically.
2100 /// Views on the level above the target view will still be shown above this view.
2101 /// Raising this view above views with the same sibling order as each other will raise this view above them.
2102 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2104 /// <param name="target">Will be raised above this view</param>
2105 internal void RaiseAbove(View target)
2107 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
2108 if (NDalicPINVOKE.SWIGPendingException.Pending)
2109 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2113 /// Lower the view to below the target view.
2115 /// <remarks>Sibling order of views within the parent will be updated automatically.
2116 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
2117 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
2119 /// <param name="target">Will be lowered below this view</param>
2120 internal void LowerBelow(View target)
2122 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
2123 if (NDalicPINVOKE.SWIGPendingException.Pending)
2124 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2127 internal string GetName()
2129 string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);
2130 if (NDalicPINVOKE.SWIGPendingException.Pending)
2131 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2135 internal void SetName(string name)
2137 NDalicPINVOKE.Actor_SetName(swigCPtr, name);
2138 if (NDalicPINVOKE.SWIGPendingException.Pending)
2139 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2142 internal uint GetId()
2144 uint ret = NDalicPINVOKE.Actor_GetId(swigCPtr);
2145 if (NDalicPINVOKE.SWIGPendingException.Pending)
2146 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2150 internal bool IsRoot()
2152 bool ret = NDalicPINVOKE.Actor_IsRoot(swigCPtr);
2153 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2157 internal bool OnWindow()
2159 bool ret = NDalicPINVOKE.Actor_OnStage(swigCPtr);
2160 if (NDalicPINVOKE.SWIGPendingException.Pending)
2161 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2165 internal Layer GetLayer()
2167 IntPtr cPtr = NDalicPINVOKE.Actor_GetLayer(swigCPtr);
2168 Layer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Layer;
2170 if (NDalicPINVOKE.SWIGPendingException.Pending)
2171 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2176 /// Removes a View from its Parent View / Layer. If the View has no parent, this method does nothing.
2178 /// <pre>The (child) View has been initialized. </pre>
2179 public void Unparent()
2181 NDalicPINVOKE.Actor_Unparent(swigCPtr);
2182 if (NDalicPINVOKE.SWIGPendingException.Pending)
2183 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2187 /// Search through this view's hierarchy for an view with the given name.
2188 /// The view itself is also considered in the search.
2190 /// <pre>The View has been initialized.</pre>
2191 /// <param name="viewName">The name of the view to find</param>
2192 /// <returns>A handle to the view if found, or an empty handle if not</returns>
2193 public View FindChildByName(string viewName)
2195 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
2197 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2199 if (NDalicPINVOKE.SWIGPendingException.Pending)
2200 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2204 internal View FindChildById(uint id)
2206 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
2208 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2210 if (NDalicPINVOKE.SWIGPendingException.Pending)
2211 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2215 internal void SetParentOrigin(Vector3 origin)
2217 NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
2218 if (NDalicPINVOKE.SWIGPendingException.Pending)
2219 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2222 internal Vector3 GetCurrentParentOrigin()
2224 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentParentOrigin(swigCPtr), true);
2225 if (NDalicPINVOKE.SWIGPendingException.Pending)
2226 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2230 internal void SetAnchorPoint(Vector3 anchorPoint)
2232 NDalicPINVOKE.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
2233 if (NDalicPINVOKE.SWIGPendingException.Pending)
2234 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2237 internal Vector3 GetCurrentAnchorPoint()
2239 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentAnchorPoint(swigCPtr), true);
2240 if (NDalicPINVOKE.SWIGPendingException.Pending)
2241 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2245 internal void SetSize(float width, float height)
2247 NDalicPINVOKE.Actor_SetSize__SWIG_0(swigCPtr, width, height);
2248 if (NDalicPINVOKE.SWIGPendingException.Pending)
2249 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2252 internal void SetSize(float width, float height, float depth)
2254 NDalicPINVOKE.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
2255 if (NDalicPINVOKE.SWIGPendingException.Pending)
2256 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2259 internal void SetSize(Vector2 size)
2261 NDalicPINVOKE.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
2262 if (NDalicPINVOKE.SWIGPendingException.Pending)
2263 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2266 internal void SetSize(Vector3 size)
2268 NDalicPINVOKE.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
2269 if (NDalicPINVOKE.SWIGPendingException.Pending)
2270 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2273 internal Vector3 GetTargetSize()
2275 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetTargetSize(swigCPtr), true);
2276 if (NDalicPINVOKE.SWIGPendingException.Pending)
2277 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2281 internal Size2D GetCurrentSize()
2283 Size ret = new Size(NDalicPINVOKE.Actor_GetCurrentSize(swigCPtr), true);
2284 if (NDalicPINVOKE.SWIGPendingException.Pending)
2285 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2286 Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
2290 internal Vector3 GetNaturalSize()
2292 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2293 if (NDalicPINVOKE.SWIGPendingException.Pending)
2294 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2298 internal void SetPosition(float x, float y)
2300 NDalicPINVOKE.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
2301 if (NDalicPINVOKE.SWIGPendingException.Pending)
2302 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2305 internal void SetPosition(float x, float y, float z)
2307 NDalicPINVOKE.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
2308 if (NDalicPINVOKE.SWIGPendingException.Pending)
2309 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2312 internal void SetPosition(Vector3 position)
2314 NDalicPINVOKE.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
2315 if (NDalicPINVOKE.SWIGPendingException.Pending)
2316 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2319 internal void SetX(float x)
2321 NDalicPINVOKE.Actor_SetX(swigCPtr, x);
2322 if (NDalicPINVOKE.SWIGPendingException.Pending)
2323 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2326 internal void SetY(float y)
2328 NDalicPINVOKE.Actor_SetY(swigCPtr, y);
2329 if (NDalicPINVOKE.SWIGPendingException.Pending)
2330 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2333 internal void SetZ(float z)
2335 NDalicPINVOKE.Actor_SetZ(swigCPtr, z);
2336 if (NDalicPINVOKE.SWIGPendingException.Pending)
2337 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2340 internal void TranslateBy(Vector3 distance)
2342 NDalicPINVOKE.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
2343 if (NDalicPINVOKE.SWIGPendingException.Pending)
2344 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2347 internal Position GetCurrentPosition()
2349 Position ret = new Position(NDalicPINVOKE.Actor_GetCurrentPosition(swigCPtr), true);
2350 if (NDalicPINVOKE.SWIGPendingException.Pending)
2351 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2355 internal Vector3 GetCurrentWorldPosition()
2357 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldPosition(swigCPtr), true);
2358 if (NDalicPINVOKE.SWIGPendingException.Pending)
2359 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2363 internal void SetInheritPosition(bool inherit)
2365 NDalicPINVOKE.Actor_SetInheritPosition(swigCPtr, inherit);
2366 if (NDalicPINVOKE.SWIGPendingException.Pending)
2367 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2370 internal bool IsPositionInherited()
2372 bool ret = NDalicPINVOKE.Actor_IsPositionInherited(swigCPtr);
2373 if (NDalicPINVOKE.SWIGPendingException.Pending)
2374 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2378 internal void SetOrientation(Degree angle, Vector3 axis)
2380 NDalicPINVOKE.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2381 if (NDalicPINVOKE.SWIGPendingException.Pending)
2382 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2385 internal void SetOrientation(Radian angle, Vector3 axis)
2387 NDalicPINVOKE.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2388 if (NDalicPINVOKE.SWIGPendingException.Pending)
2389 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2392 internal void SetOrientation(Rotation orientation)
2394 NDalicPINVOKE.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
2395 if (NDalicPINVOKE.SWIGPendingException.Pending)
2396 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2399 internal void RotateBy(Degree angle, Vector3 axis)
2401 NDalicPINVOKE.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2402 if (NDalicPINVOKE.SWIGPendingException.Pending)
2403 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2406 internal void RotateBy(Radian angle, Vector3 axis)
2408 NDalicPINVOKE.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2409 if (NDalicPINVOKE.SWIGPendingException.Pending)
2410 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2413 internal void RotateBy(Rotation relativeRotation)
2415 NDalicPINVOKE.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
2416 if (NDalicPINVOKE.SWIGPendingException.Pending)
2417 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2420 internal Rotation GetCurrentOrientation()
2422 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentOrientation(swigCPtr), true);
2423 if (NDalicPINVOKE.SWIGPendingException.Pending)
2424 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2428 internal void SetInheritOrientation(bool inherit)
2430 NDalicPINVOKE.Actor_SetInheritOrientation(swigCPtr, inherit);
2431 if (NDalicPINVOKE.SWIGPendingException.Pending)
2432 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2435 internal bool IsOrientationInherited()
2437 bool ret = NDalicPINVOKE.Actor_IsOrientationInherited(swigCPtr);
2438 if (NDalicPINVOKE.SWIGPendingException.Pending)
2439 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2443 internal Rotation GetCurrentWorldOrientation()
2445 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentWorldOrientation(swigCPtr), true);
2446 if (NDalicPINVOKE.SWIGPendingException.Pending)
2447 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2451 internal void SetScale(float scale)
2453 NDalicPINVOKE.Actor_SetScale__SWIG_0(swigCPtr, scale);
2454 if (NDalicPINVOKE.SWIGPendingException.Pending)
2455 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2458 internal void SetScale(float scaleX, float scaleY, float scaleZ)
2460 NDalicPINVOKE.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
2461 if (NDalicPINVOKE.SWIGPendingException.Pending)
2462 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2465 internal void SetScale(Vector3 scale)
2467 NDalicPINVOKE.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
2468 if (NDalicPINVOKE.SWIGPendingException.Pending)
2469 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2472 internal void ScaleBy(Vector3 relativeScale)
2474 NDalicPINVOKE.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
2475 if (NDalicPINVOKE.SWIGPendingException.Pending)
2476 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2479 internal Vector3 GetCurrentScale()
2481 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentScale(swigCPtr), true);
2482 if (NDalicPINVOKE.SWIGPendingException.Pending)
2483 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2487 internal Vector3 GetCurrentWorldScale()
2489 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldScale(swigCPtr), true);
2490 if (NDalicPINVOKE.SWIGPendingException.Pending)
2491 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2495 internal void SetInheritScale(bool inherit)
2497 NDalicPINVOKE.Actor_SetInheritScale(swigCPtr, inherit);
2498 if (NDalicPINVOKE.SWIGPendingException.Pending)
2499 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2502 internal bool IsScaleInherited()
2504 bool ret = NDalicPINVOKE.Actor_IsScaleInherited(swigCPtr);
2505 if (NDalicPINVOKE.SWIGPendingException.Pending)
2506 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2510 internal Matrix GetCurrentWorldMatrix()
2512 Matrix ret = new Matrix(NDalicPINVOKE.Actor_GetCurrentWorldMatrix(swigCPtr), true);
2513 if (NDalicPINVOKE.SWIGPendingException.Pending)
2514 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2518 internal void SetVisible(bool visible)
2520 NDalicPINVOKE.Actor_SetVisible(swigCPtr, visible);
2521 if (NDalicPINVOKE.SWIGPendingException.Pending)
2522 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2525 internal bool IsVisible()
2527 bool ret = NDalicPINVOKE.Actor_IsVisible(swigCPtr);
2528 if (NDalicPINVOKE.SWIGPendingException.Pending)
2529 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2533 internal void SetOpacity(float opacity)
2535 NDalicPINVOKE.Actor_SetOpacity(swigCPtr, opacity);
2536 if (NDalicPINVOKE.SWIGPendingException.Pending)
2537 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2540 internal float GetCurrentOpacity()
2542 float ret = NDalicPINVOKE.Actor_GetCurrentOpacity(swigCPtr);
2543 if (NDalicPINVOKE.SWIGPendingException.Pending)
2544 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2548 internal void SetColor(Vector4 color)
2550 NDalicPINVOKE.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
2551 if (NDalicPINVOKE.SWIGPendingException.Pending)
2552 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2555 internal Vector4 GetCurrentColor()
2557 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentColor(swigCPtr), true);
2558 if (NDalicPINVOKE.SWIGPendingException.Pending)
2559 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2563 internal void SetColorMode(ColorMode colorMode)
2565 NDalicPINVOKE.Actor_SetColorMode(swigCPtr, (int)colorMode);
2566 if (NDalicPINVOKE.SWIGPendingException.Pending)
2567 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2570 internal ColorMode GetColorMode()
2572 ColorMode ret = (ColorMode)NDalicPINVOKE.Actor_GetColorMode(swigCPtr);
2573 if (NDalicPINVOKE.SWIGPendingException.Pending)
2574 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2578 internal Vector4 GetCurrentWorldColor()
2580 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentWorldColor(swigCPtr), true);
2581 if (NDalicPINVOKE.SWIGPendingException.Pending)
2582 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2586 internal void SetDrawMode(DrawModeType drawMode)
2588 NDalicPINVOKE.Actor_SetDrawMode(swigCPtr, (int)drawMode);
2589 if (NDalicPINVOKE.SWIGPendingException.Pending)
2590 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2593 internal DrawModeType GetDrawMode()
2595 DrawModeType ret = (DrawModeType)NDalicPINVOKE.Actor_GetDrawMode(swigCPtr);
2596 if (NDalicPINVOKE.SWIGPendingException.Pending)
2597 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2602 /// Converts screen coordinates into the view's coordinate system using the default camera.
2604 /// <pre>The View has been initialized.</pre>
2605 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5)</remarks>
2606 /// <param name="localX">On return, the X-coordinate relative to the view</param>
2607 /// <param name="localY">On return, the Y-coordinate relative to the view</param>
2608 /// <param name="screenX">The screen X-coordinate</param>
2609 /// <param name="screenY">The screen Y-coordinate</param>
2610 /// <returns>True if the conversion succeeded</returns>
2611 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
2613 bool ret = NDalicPINVOKE.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
2614 if (NDalicPINVOKE.SWIGPendingException.Pending)
2615 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2619 internal void SetKeyboardFocusable(bool focusable)
2621 NDalicPINVOKE.Actor_SetKeyboardFocusable(swigCPtr, focusable);
2622 if (NDalicPINVOKE.SWIGPendingException.Pending)
2623 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2626 internal bool IsKeyboardFocusable()
2628 bool ret = NDalicPINVOKE.Actor_IsKeyboardFocusable(swigCPtr);
2629 if (NDalicPINVOKE.SWIGPendingException.Pending)
2630 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2634 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
2636 NDalicPINVOKE.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
2637 if (NDalicPINVOKE.SWIGPendingException.Pending)
2638 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2641 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
2643 ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.Actor_GetResizePolicy(swigCPtr, (int)dimension);
2644 if (NDalicPINVOKE.SWIGPendingException.Pending)
2645 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2650 /// Sets the relative to parent size factor of the view.<br>
2651 /// This factor is only used when ResizePolicy is set to either:
2652 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br>
2653 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br>
2655 /// <pre>The View has been initialized.</pre>
2656 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis</param>
2657 public void SetSizeModeFactor(Vector3 factor)
2659 NDalicPINVOKE.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
2660 if (NDalicPINVOKE.SWIGPendingException.Pending)
2661 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2664 internal Vector3 GetSizeModeFactor()
2666 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetSizeModeFactor(swigCPtr), true);
2667 if (NDalicPINVOKE.SWIGPendingException.Pending)
2668 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2673 /// Calculates the height of the view given a width.<br>
2674 /// The natural size is used for default calculation. <br>
2675 /// size 0 is treated as aspect ratio 1:1.<br>
2677 /// <param name="width">Width to use</param>
2678 /// <returns>The height based on the width</returns>
2679 public float GetHeightForWidth(float width)
2681 float ret = NDalicPINVOKE.Actor_GetHeightForWidth(swigCPtr, width);
2682 if (NDalicPINVOKE.SWIGPendingException.Pending)
2683 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2688 /// Calculates the width of the view given a height.<br>
2689 /// The natural size is used for default calculation.<br>
2690 /// size 0 is treated as aspect ratio 1:1.<br>
2692 /// <param name="height">Height to use</param>
2693 /// <returns>The width based on the height</returns>
2694 public float GetWidthForHeight(float height)
2696 float ret = NDalicPINVOKE.Actor_GetWidthForHeight(swigCPtr, height);
2697 if (NDalicPINVOKE.SWIGPendingException.Pending)
2698 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2702 public float GetRelayoutSize(DimensionType dimension)
2704 float ret = NDalicPINVOKE.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
2705 if (NDalicPINVOKE.SWIGPendingException.Pending)
2706 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2710 public void SetPadding(PaddingType padding)
2712 NDalicPINVOKE.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
2713 if (NDalicPINVOKE.SWIGPendingException.Pending)
2714 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2717 public void GetPadding(PaddingType paddingOut)
2719 NDalicPINVOKE.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
2720 if (NDalicPINVOKE.SWIGPendingException.Pending)
2721 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2724 internal void SetMinimumSize(Vector2 size)
2726 NDalicPINVOKE.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
2727 if (NDalicPINVOKE.SWIGPendingException.Pending)
2728 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2731 internal Vector2 GetMinimumSize()
2733 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMinimumSize(swigCPtr), true);
2734 if (NDalicPINVOKE.SWIGPendingException.Pending)
2735 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2739 internal void SetMaximumSize(Vector2 size)
2741 NDalicPINVOKE.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
2742 if (NDalicPINVOKE.SWIGPendingException.Pending)
2743 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2746 internal Vector2 GetMaximumSize()
2748 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMaximumSize(swigCPtr), true);
2749 if (NDalicPINVOKE.SWIGPendingException.Pending)
2750 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2754 internal int GetHierarchyDepth()
2756 int ret = NDalicPINVOKE.Actor_GetHierarchyDepth(swigCPtr);
2757 if (NDalicPINVOKE.SWIGPendingException.Pending)
2758 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2762 public uint AddRenderer(Renderer renderer)
2764 uint ret = NDalicPINVOKE.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
2765 if (NDalicPINVOKE.SWIGPendingException.Pending)
2766 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2770 internal uint GetRendererCount()
2772 uint ret = NDalicPINVOKE.Actor_GetRendererCount(swigCPtr);
2773 if (NDalicPINVOKE.SWIGPendingException.Pending)
2774 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2778 public Renderer GetRendererAt(uint index)
2780 IntPtr cPtr = NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index);
2781 Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Renderer;
2783 if (NDalicPINVOKE.SWIGPendingException.Pending)
2784 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2788 public void RemoveRenderer(Renderer renderer)
2790 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
2791 if (NDalicPINVOKE.SWIGPendingException.Pending)
2792 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2795 public void RemoveRenderer(uint index)
2797 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
2798 if (NDalicPINVOKE.SWIGPendingException.Pending)
2799 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2802 internal TouchDataSignal TouchSignal()
2804 TouchDataSignal ret = new TouchDataSignal(NDalicPINVOKE.Actor_TouchSignal(swigCPtr), false);
2805 if (NDalicPINVOKE.SWIGPendingException.Pending)
2806 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2810 internal HoverSignal HoveredSignal()
2812 HoverSignal ret = new HoverSignal(NDalicPINVOKE.Actor_HoveredSignal(swigCPtr), false);
2813 if (NDalicPINVOKE.SWIGPendingException.Pending)
2814 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2818 internal WheelSignal WheelEventSignal()
2820 WheelSignal ret = new WheelSignal(NDalicPINVOKE.Actor_WheelEventSignal(swigCPtr), false);
2821 if (NDalicPINVOKE.SWIGPendingException.Pending)
2822 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2826 internal ViewSignal OnWindowSignal()
2828 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnStageSignal(swigCPtr), false);
2829 if (NDalicPINVOKE.SWIGPendingException.Pending)
2830 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2834 internal ViewSignal OffWindowSignal()
2836 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OffStageSignal(swigCPtr), false);
2837 if (NDalicPINVOKE.SWIGPendingException.Pending)
2838 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2842 internal ViewSignal OnRelayoutSignal()
2844 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnRelayoutSignal(swigCPtr), false);
2845 if (NDalicPINVOKE.SWIGPendingException.Pending)
2846 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2850 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view) {
2851 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
2852 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2856 internal ViewSignal ResourcesLoadedSignal()
2858 ViewSignal ret = new ViewSignal(NDalicPINVOKE.ResourceReadySignal(swigCPtr), false);
2859 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2864 /// Gets/Sets the origin of an view, within its parent's area.<br>
2865 /// 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>
2866 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br>
2867 /// An view's position is the distance between this origin, and the view's anchor-point.<br>
2869 /// <pre>The View has been initialized.</pre>
2870 public Position ParentOrigin
2874 Position temp = new Position(0.0f, 0.0f, 0.0f);
2875 GetProperty(View.Property.PARENT_ORIGIN).Get(temp);
2880 SetProperty(View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue(value));
2884 internal float ParentOriginX
2889 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
2894 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
2898 internal float ParentOriginY
2903 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
2908 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
2912 internal float ParentOriginZ
2917 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
2922 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
2927 /// Gets/Sets the anchor-point of an view.<br>
2928 /// 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>
2929 /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br>
2930 /// An view position is the distance between its parent-origin and this anchor-point.<br>
2931 /// An view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br>
2932 /// <pre>The View has been initialized.</pre>
2934 public Position PivotPoint
2938 Position temp = new Position(0.0f, 0.0f, 0.0f);
2939 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
2944 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
2948 internal float PivotPointX
2953 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
2958 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
2962 internal float PivotPointY
2967 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
2972 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
2976 internal float PivotPointZ
2981 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
2986 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
2991 /// Gets/Sets the size width of an view.
2993 public float SizeWidth
2998 GetProperty(View.Property.SIZE_WIDTH).Get(out temp);
3003 SetProperty(View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue(value));
3008 /// Gets/Sets the size height of an view.
3010 public float SizeHeight
3015 GetProperty(View.Property.SIZE_HEIGHT).Get(out temp);
3020 SetProperty(View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue(value));
3025 /// Gets/Sets the position of the View.<br>
3026 /// By default, sets the position vector between the parent origin and pivot point(default).<br>
3027 /// If Position inheritance if disabled, sets the world position.<br>
3029 public Position Position
3033 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3034 GetProperty(View.Property.POSITION).Get(temp);
3039 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(value));
3044 /// Gets/Sets the position x of the View.
3046 public float PositionX
3051 GetProperty(View.Property.POSITION_X).Get(out temp);
3056 SetProperty(View.Property.POSITION_X, new Tizen.NUI.PropertyValue(value));
3061 /// Gets/Sets the position y of the View.
3063 public float PositionY
3068 GetProperty(View.Property.POSITION_Y).Get(out temp);
3073 SetProperty(View.Property.POSITION_Y, new Tizen.NUI.PropertyValue(value));
3078 /// Gets/Sets the position z of the View.
3080 public float PositionZ
3085 GetProperty(View.Property.POSITION_Z).Get(out temp);
3090 SetProperty(View.Property.POSITION_Z, new Tizen.NUI.PropertyValue(value));
3095 /// Gets/Sets the world position of the View.
3097 public Vector3 WorldPosition
3101 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3102 GetProperty(View.Property.WORLD_POSITION).Get(temp);
3107 internal float WorldPositionX
3112 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
3117 internal float WorldPositionY
3122 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
3127 internal float WorldPositionZ
3132 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
3138 /// Gets/Sets the orientation of the View.<br>
3139 /// An view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br>
3141 /// <remarks>This is an asynchronous method.</remarks>
3142 public Rotation Orientation
3146 Rotation temp = new Rotation();
3147 GetProperty(View.Property.ORIENTATION).Get(temp);
3152 SetProperty(View.Property.ORIENTATION, new Tizen.NUI.PropertyValue(value));
3157 /// Gets/Sets the world orientation of the View.<br>
3159 public Rotation WorldOrientation
3163 Rotation temp = new Rotation();
3164 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
3170 /// Gets/Sets the scale factor applied to an view.<br>
3172 public Vector3 Scale
3176 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3177 GetProperty(View.Property.SCALE).Get(temp);
3182 SetProperty(View.Property.SCALE, new Tizen.NUI.PropertyValue(value));
3187 /// Gets/Sets the scale x factor applied to an view.
3194 GetProperty(View.Property.SCALE_X).Get(out temp);
3199 SetProperty(View.Property.SCALE_X, new Tizen.NUI.PropertyValue(value));
3204 /// Gets/Sets the scale y factor applied to an view.
3211 GetProperty(View.Property.SCALE_Y).Get(out temp);
3216 SetProperty(View.Property.SCALE_Y, new Tizen.NUI.PropertyValue(value));
3221 /// Gets/Sets the scale z factor applied to an view.
3228 GetProperty(View.Property.SCALE_Z).Get(out temp);
3233 SetProperty(View.Property.SCALE_Z, new Tizen.NUI.PropertyValue(value));
3238 /// Gets the world scale of View.
3240 public Vector3 WorldScale
3244 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3245 GetProperty(View.Property.WORLD_SCALE).Get(temp);
3251 /// Retrieves the visibility flag of an view.
3254 /// If an view is not visible, then the view and its children will not be rendered.
3255 /// 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.
3262 GetProperty(View.Property.VISIBLE).Get(out temp);
3264 }/* only get is required : removed
3267 SetProperty(View.Property.VISIBLE, new Tizen.NUI.PropertyValue(value));
3272 /// Gets the view's world color.
3274 public Vector4 WorldColor
3278 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3279 GetProperty(View.Property.WORLD_COLOR).Get(temp);
3284 internal Matrix WorldMatrix
3288 Matrix temp = new Matrix();
3289 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
3295 /// Gets/Sets the View's name.
3302 GetProperty(View.Property.NAME).Get(out temp);
3307 SetProperty(View.Property.NAME, new Tizen.NUI.PropertyValue(value));
3312 /// Gets the View's ID.
3324 /// Gets/Sets the status of whether an view should emit touch or hover signals.
3326 public bool Sensitive
3331 GetProperty(View.Property.SENSITIVE).Get(out temp);
3336 SetProperty(View.Property.SENSITIVE, new Tizen.NUI.PropertyValue(value));
3341 /// Gets/Sets the status of whether the view should receive a notification when touch or hover motion events leave the boundary of the view.
3343 public bool LeaveRequired
3348 GetProperty(View.Property.LEAVE_REQUIRED).Get(out temp);
3353 SetProperty(View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue(value));
3358 /// Gets/Sets the status of whether a child view inherits it's parent's orientation.
3360 public bool InheritOrientation
3365 GetProperty(View.Property.INHERIT_ORIENTATION).Get(out temp);
3370 SetProperty(View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue(value));
3375 /// Gets/Sets the status of whether a child view inherits it's parent's scale.
3377 public bool InheritScale
3382 GetProperty(View.Property.INHERIT_SCALE).Get(out temp);
3387 SetProperty(View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue(value));
3392 /// Gets/Sets the status of how the view and its children should be drawn.<br>
3393 /// Not all views are renderable, but DrawMode can be inherited from any view.<br>
3394 /// 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>
3395 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br>
3396 /// Overlay views are drawn in a separate pass, after all non-overlay views within the Layer.<br>
3397 /// For overlay views, the drawing order is with respect to tree levels of Views, and depth-testing will not be used.<br>
3399 public DrawModeType DrawMode
3404 if (GetProperty(View.Property.DRAW_MODE).Get(out temp) == false)
3406 NUILog.Error("DrawMode get error!");
3411 return DrawModeType.Normal;
3413 return DrawModeType.Overlay2D;
3415 return DrawModeType.Stencil;
3417 return DrawModeType.Normal;
3422 SetProperty(View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)value));
3427 /// Gets/Sets the relative to parent size factor of the view.<br>
3428 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br>
3429 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br>
3431 public Vector3 SizeModeFactor
3435 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3436 GetProperty(View.Property.SIZE_MODE_FACTOR).Get(temp);
3441 SetProperty(View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue(value));
3446 /// Gets/Sets the width resize policy to be used.
3448 public ResizePolicyType WidthResizePolicy
3453 if (GetProperty(View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
3455 NUILog.Error("WidthResizePolicy get error!");
3460 return ResizePolicyType.Fixed;
3461 case "USE_NATURAL_SIZE":
3462 return ResizePolicyType.UseNaturalSize;
3463 case "FILL_TO_PARENT":
3464 return ResizePolicyType.FillToParent;
3465 case "SIZE_RELATIVE_TO_PARENT":
3466 return ResizePolicyType.SizeRelativeToParent;
3467 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3468 return ResizePolicyType.SizeFixedOffsetFromParent;
3469 case "FIT_TO_CHILDREN":
3470 return ResizePolicyType.FitToChildren;
3471 case "DIMENSION_DEPENDENCY":
3472 return ResizePolicyType.DimensionDependency;
3473 case "USE_ASSIGNED_SIZE":
3474 return ResizePolicyType.UseAssignedSize;
3476 return ResizePolicyType.Fixed;
3481 SetProperty(View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3486 /// Gets/Sets the height resize policy to be used.
3488 public ResizePolicyType HeightResizePolicy
3493 if (GetProperty(View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
3495 NUILog.Error("HeightResizePolicy get error!");
3500 return ResizePolicyType.Fixed;
3501 case "USE_NATURAL_SIZE":
3502 return ResizePolicyType.UseNaturalSize;
3503 case "FILL_TO_PARENT":
3504 return ResizePolicyType.FillToParent;
3505 case "SIZE_RELATIVE_TO_PARENT":
3506 return ResizePolicyType.SizeRelativeToParent;
3507 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3508 return ResizePolicyType.SizeFixedOffsetFromParent;
3509 case "FIT_TO_CHILDREN":
3510 return ResizePolicyType.FitToChildren;
3511 case "DIMENSION_DEPENDENCY":
3512 return ResizePolicyType.DimensionDependency;
3513 case "USE_ASSIGNED_SIZE":
3514 return ResizePolicyType.UseAssignedSize;
3516 return ResizePolicyType.Fixed;
3521 SetProperty(View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3526 /// Gets/Sets the policy to use when setting size with size negotiation.<br>
3527 /// Defaults to SizeScalePolicyType.UseSizeSet.<br>
3529 public SizeScalePolicyType SizeScalePolicy
3534 if (GetProperty(View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
3536 NUILog.Error("SizeScalePolicy get error!");
3540 case "USE_SIZE_SET":
3541 return SizeScalePolicyType.UseSizeSet;
3542 case "FIT_WITH_ASPECT_RATIO":
3543 return SizeScalePolicyType.FitWithAspectRatio;
3544 case "FILL_WITH_ASPECT_RATIO":
3545 return SizeScalePolicyType.FillWithAspectRatio;
3547 return SizeScalePolicyType.UseSizeSet;
3552 string valueToString = "";
3555 case SizeScalePolicyType.UseSizeSet:
3557 valueToString = "USE_SIZE_SET";
3560 case SizeScalePolicyType.FitWithAspectRatio:
3562 valueToString = "FIT_WITH_ASPECT_RATIO";
3565 case SizeScalePolicyType.FillWithAspectRatio:
3567 valueToString = "FILL_WITH_ASPECT_RATIO";
3572 valueToString = "USE_SIZE_SET";
3576 SetProperty(View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
3581 /// Gets/Sets the status of whether the width size is dependent on height size.
3583 public bool WidthForHeight
3588 GetProperty(View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
3593 SetProperty(View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue(value));
3598 /// Gets/Sets the status of whether the height size is dependent on width size.
3600 public bool HeightForWidth
3605 GetProperty(View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
3610 SetProperty(View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue(value));
3615 /// Gets/Sets the padding for use in layout.
3617 public Vector4 Padding
3621 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3622 GetProperty(View.Property.PADDING).Get(temp);
3627 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
3632 /// Gets/Sets the minimum size an view can be assigned in size negotiation.
3634 public Size2D MinimumSize
3638 Size2D temp = new Size2D(0, 0);
3639 GetProperty(View.Property.MINIMUM_SIZE).Get(temp);
3644 SetProperty(View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3649 /// Gets/Sets the maximum size an view can be assigned in size negotiation.
3651 public Size2D MaximumSize
3655 Size2D temp = new Size2D(0, 0);
3656 GetProperty(View.Property.MAXIMUM_SIZE).Get(temp);
3661 SetProperty(View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3666 /// Gets/Sets whether a child view inherits it's parent's position.<br>
3667 /// Default is to inherit.<br>
3668 /// 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>
3670 public bool InheritPosition
3675 GetProperty(View.Property.INHERIT_POSITION).Get(out temp);
3680 SetProperty(View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue(value));
3685 /// Gets/Sets clipping behavior(mode) of it's children.
3687 public ClippingModeType ClippingMode
3692 if (GetProperty(View.Property.CLIPPING_MODE).Get(out temp) == false)
3694 NUILog.Error("ClippingMode get error!");
3699 return ClippingModeType.Disabled;
3700 case "CLIP_CHILDREN":
3701 return ClippingModeType.ClipChildren;
3703 return ClippingModeType.Disabled;
3708 SetProperty(View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)value));
3713 /// Get the number of renderers held by the view.
3715 public uint RendererCount
3719 return GetRendererCount();
3726 [Obsolete("Please do not use! this will be deprecated")]
3727 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> Touched
3731 if (_touchDataEventHandler == null)
3733 _touchDataCallback = OnTouch;
3734 this.TouchSignal().Connect(_touchDataCallback);
3737 _touchDataEventHandler += value;
3742 _touchDataEventHandler -= value;
3744 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
3746 this.TouchSignal().Disconnect(_touchDataCallback);
3752 [Obsolete("Please do not use! this will be deprecated")]
3753 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> Hovered
3757 if (_hoverEventHandler == null)
3759 _hoverEventCallback = OnHoverEvent;
3760 this.HoveredSignal().Connect(_hoverEventCallback);
3763 _hoverEventHandler += value;
3768 _hoverEventHandler -= value;
3770 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
3772 this.HoveredSignal().Disconnect(_hoverEventCallback);
3778 [Obsolete("Please do not use! this will be deprecated")]
3779 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelMoved
3783 if (_wheelEventHandler == null)
3785 _wheelEventCallback = OnWheelEvent;
3786 this.WheelEventSignal().Connect(_wheelEventCallback);
3789 _wheelEventHandler += value;
3794 _wheelEventHandler -= value;
3796 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
3798 this.WheelEventSignal().Disconnect(_wheelEventCallback);
3804 [Obsolete("Please do not use! this will be deprecated")]
3805 public Position AnchorPoint
3809 Position temp = new Position(0.0f, 0.0f, 0.0f);
3810 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
3815 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3819 [Obsolete("Please do not use! this will be deprecated")]
3824 Size temp = new Size(0.0f, 0.0f, 0.0f);
3825 GetProperty(View.Property.SIZE).Get(temp);
3830 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(value));
3834 [Obsolete("Please do not use! this will be deprecated")]
3835 public event EventHandler OnWindowEvent
3839 if (_onWindowEventHandler == null)
3841 _onWindowEventCallback = OnWindow;
3842 this.OnWindowSignal().Connect(_onWindowEventCallback);
3845 _onWindowEventHandler += value;
3850 _onWindowEventHandler -= value;
3852 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
3854 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
3859 [Obsolete("Please do not use! this will be deprecated")]
3860 public event EventHandler OffWindowEvent
3864 if (_offWindowEventHandler == null)
3866 _offWindowEventCallback = OffWindow;
3867 this.OffWindowSignal().Connect(_offWindowEventCallback);
3870 _offWindowEventHandler += value;
3875 _offWindowEventHandler -= value;
3877 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
3879 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
3884 [Obsolete("Please do not use! this will be deprecated")]
3885 public event EventHandler OnRelayoutEvent
3889 if (_onRelayoutEventHandler == null)
3891 _onRelayoutEventCallback = OnRelayout;
3892 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
3895 _onRelayoutEventHandler += value;
3900 _onRelayoutEventHandler -= value;
3902 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
3904 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);