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 : Animatable //CustomActor => Animatable
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);
34 // Register this instance of view in the view registry.
35 ViewRegistry.RegisterView(this);
38 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
40 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
45 DisposeQueue.Instance.Add(this);
47 // Unregister this instance of view from the view registry.
48 ViewRegistry.UnregisterView(this);
51 public virtual void Dispose()
53 if (!Window.IsInstalled())//Stage=>Window
55 DisposeQueue.Instance.Add(this);
61 if (swigCPtr.Handle != global::System.IntPtr.Zero)
66 NDalicPINVOKE.delete_View(swigCPtr);
68 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
70 global::System.GC.SuppressFinalize(this);
77 private EventHandler _keyInputFocusGainedEventHandler;
78 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
79 private delegate void KeyInputFocusGainedCallbackType(IntPtr control);
80 private KeyInputFocusGainedCallbackType _keyInputFocusGainedCallback;
83 /// Event for KeyInputFocusGained signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
84 /// KeyInputFocusGained signal is emitted when the control gets Key Input Focus.<br>
86 public event EventHandler FocusGained
90 if (_keyInputFocusGainedEventHandler == null)
92 _keyInputFocusGainedCallback = OnKeyInputFocusGained;
93 this.KeyInputFocusGainedSignal().Connect(_keyInputFocusGainedCallback);
96 _keyInputFocusGainedEventHandler += value;
101 _keyInputFocusGainedEventHandler -= value;
103 if (_keyInputFocusGainedEventHandler == null && KeyInputFocusGainedSignal().Empty() == false)
105 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
110 private void OnKeyInputFocusGained(IntPtr view)
112 if (_keyInputFocusGainedEventHandler != null)
114 _keyInputFocusGainedEventHandler(this, null);
119 private EventHandler _keyInputFocusLostEventHandler;
120 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
121 private delegate void KeyInputFocusLostCallbackType(IntPtr control);
122 private KeyInputFocusLostCallbackType _keyInputFocusLostCallback;
125 /// Event for KeyInputFocusLost signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
126 /// KeyInputFocusLost signal is emitted when the control loses Key Input Focus.<br>
128 public event EventHandler FocusLost
132 if (_keyInputFocusLostEventHandler == null)
134 _keyInputFocusLostCallback = OnKeyInputFocusLost;
135 this.KeyInputFocusLostSignal().Connect(_keyInputFocusLostCallback);
138 _keyInputFocusLostEventHandler += value;
143 _keyInputFocusLostEventHandler -= value;
145 if (_keyInputFocusLostEventHandler == null && KeyInputFocusLostSignal().Empty() == false)
147 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
152 private void OnKeyInputFocusLost(IntPtr view)
154 if (_keyInputFocusLostEventHandler != null)
156 _keyInputFocusLostEventHandler(this, null);
161 /// Event arguments that passed via KeyEvent signal.
163 public class KeyEventArgs : EventArgs
168 /// Key - is the key sent to the View.
183 private EventHandlerWithReturnType<object, KeyEventArgs, bool> _keyEventHandler;
184 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
185 private delegate bool KeyCallbackType(IntPtr control, IntPtr keyEvent);
186 private KeyCallbackType _keyCallback;
189 /// Event for KeyPressed signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
190 /// KeyPressed signal is emitted when key event is received.<br>
192 public event EventHandlerWithReturnType<object, KeyEventArgs, bool> KeyEvent
196 if (_keyEventHandler == null)
198 _keyCallback = OnKeyEvent;
199 this.KeyEventSignal().Connect(_keyCallback);
202 _keyEventHandler += value;
207 _keyEventHandler -= value;
209 if (_keyEventHandler == null && KeyEventSignal().Empty() == false)
211 this.KeyEventSignal().Disconnect(_keyCallback);
216 private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
218 KeyEventArgs e = new KeyEventArgs();
220 e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
222 if (_keyEventHandler != null)
224 return _keyEventHandler(this, e);
230 private EventHandler _onRelayoutEventHandler;
231 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
232 private delegate void OnRelayoutEventCallbackType(IntPtr control);
233 private OnRelayoutEventCallbackType _onRelayoutEventCallback;
236 /// Event for OnRelayout signal which can be used to subscribe/unsubscribe the event handler.<br>
237 /// OnRelayout signal is emitted after the size has been set on the view during relayout.<br>
239 public event EventHandler OnRelayoutEvent
243 if (_onRelayoutEventHandler == null)
245 _onRelayoutEventCallback = OnRelayout;
246 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
249 _onRelayoutEventHandler += value;
254 _onRelayoutEventHandler -= value;
256 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
258 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
264 // Callback for View OnRelayout signal
265 private void OnRelayout(IntPtr data)
267 if (_onRelayoutEventHandler != null)
269 _onRelayoutEventHandler(this, null);
274 /// Event arguments that passed via Touch signal.
276 public class TouchEventArgs : EventArgs
278 private Touch _touch;
281 /// Touch - contains the information of touch points
296 private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
297 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
298 private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
299 private TouchDataCallbackType _touchDataCallback;
302 /// Event for Touched signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
303 /// Touched signal is emitted when touch input is received.<br>
305 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> Touched
309 if (_touchDataEventHandler == null)
311 _touchDataCallback = OnTouch;
312 this.TouchSignal().Connect(_touchDataCallback);
315 _touchDataEventHandler += value;
320 _touchDataEventHandler -= value;
322 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
324 this.TouchSignal().Disconnect(_touchDataCallback);
330 // Callback for View TouchSignal
331 private bool OnTouch(IntPtr view, IntPtr touchData)
333 TouchEventArgs e = new TouchEventArgs();
335 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
337 if (_touchDataEventHandler != null)
339 return _touchDataEventHandler(this, e);
346 /// Event arguments that passed via Hover signal.
348 public class HoverEventArgs : EventArgs
350 private Hover _hover;
353 /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
368 private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
369 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
370 private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
371 private HoverEventCallbackType _hoverEventCallback;
374 /// Event for Hovered signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
375 /// Hovered signal is emitted when hover input is received.<br>
377 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> Hovered
381 if (_hoverEventHandler == null)
383 _hoverEventCallback = OnHoverEvent;
384 this.HoveredSignal().Connect(_hoverEventCallback);
387 _hoverEventHandler += value;
392 _hoverEventHandler -= value;
394 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
396 this.HoveredSignal().Disconnect(_hoverEventCallback);
402 // Callback for View Hover signal
403 private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
405 HoverEventArgs e = new HoverEventArgs();
407 e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
409 if (_hoverEventHandler != null)
411 return _hoverEventHandler(this, e);
418 /// Event arguments that passed via Wheel signal.
420 public class WheelEventArgs : EventArgs
422 private Wheel _wheel;
425 /// WheelEvent - store a wheel rolling type : MOUSE_WHEEL or CUSTOM_WHEEL
440 private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
441 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
442 private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
443 private WheelEventCallbackType _wheelEventCallback;
446 /// Event for WheelMoved signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
447 /// WheelMoved signal is emitted when wheel event is received.<br>
449 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelMoved
453 if (_wheelEventHandler == null)
455 _wheelEventCallback = OnWheelEvent;
456 this.WheelEventSignal().Connect(_wheelEventCallback);
459 _wheelEventHandler += value;
464 _wheelEventHandler -= value;
466 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
468 this.WheelEventSignal().Disconnect(_wheelEventCallback);
474 // Callback for View Wheel signal
475 private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
477 WheelEventArgs e = new WheelEventArgs();
479 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
481 if (_wheelEventHandler != null)
483 return _wheelEventHandler(this, e);
489 private EventHandler _onWindowEventHandler;
490 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
491 private delegate void OnWindowEventCallbackType(IntPtr control);
492 private OnWindowEventCallbackType _onWindowEventCallback;
495 /// Event for OnWindow signal which can be used to subscribe/unsubscribe the event handler.<br>
496 /// OnWindow signal is emitted after the view has been connected to the Window.<br>
498 public event EventHandler OnWindowEvent
502 if (_onWindowEventHandler == null)
504 _onWindowEventCallback = OnWindow;
505 this.OnWindowSignal().Connect(_onWindowEventCallback);
508 _onWindowEventHandler += value;
513 _onWindowEventHandler -= value;
515 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
517 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
522 // Callback for View OnWindow signal
523 private void OnWindow(IntPtr data)
525 if (_onWindowEventHandler != null)
527 _onWindowEventHandler(this, null);
532 private EventHandler _offWindowEventHandler;
533 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
534 private delegate void OffWindowEventCallbackType(IntPtr control);
535 private OffWindowEventCallbackType _offWindowEventCallback;
538 /// Event for OffWindow signal which can be used to subscribe/unsubscribe the event handler.<br>
539 /// OffWindow signal is emitted after the view has been disconnected from the Window.<br>
541 public event EventHandler OffWindowEvent
545 if (_offWindowEventHandler == null)
547 _offWindowEventCallback = OffWindow;
548 this.OffWindowSignal().Connect(_offWindowEventCallback);
551 _offWindowEventHandler += value;
556 _offWindowEventHandler -= value;
558 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
560 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
565 // Callback for View OffWindow signal
566 private void OffWindow(IntPtr data)
568 if (_offWindowEventHandler != null)
570 _offWindowEventHandler(this, null);
575 /// Event arguments of visibility changed.
577 public class VisibilityChangedEventArgs : EventArgs
580 private bool _visibility;
581 private VisibilityChangeType _type;
584 /// The view, or child of view, whose visibility has changed.
599 /// Whether the view is now visible or not.
601 public bool Visibility
614 /// Whether the view's visible property has changed or a parent's.
616 public VisibilityChangeType Type
629 private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
630 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
631 private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
632 private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
635 /// Event for visibility change which can be used to subscribe/unsubscribe the event handler.<br>
636 /// This signal is emitted when the visible property of this or a parent view is changed.<br>
638 public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
642 if (_visibilityChangedEventHandler == null)
644 _visibilityChangedEventCallback = OnVisibilityChanged;
645 VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
648 _visibilityChangedEventHandler += value;
653 _visibilityChangedEventHandler -= value;
655 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
657 VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
662 // Callback for View visibility change signal
663 private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
665 VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
668 e.View = View.GetViewFromPtr(data);
670 e.Visibility = visibility;
673 if (_visibilityChangedEventHandler != null)
675 _visibilityChangedEventHandler(this, e);
679 internal static View GetViewFromPtr(global::System.IntPtr cPtr)
681 View ret = new View(cPtr, false);
682 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
686 internal IntPtr GetPtrfromView()
688 return (IntPtr)swigCPtr;
691 internal class Property : global::System.IDisposable
693 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
694 protected bool swigCMemOwn;
696 internal Property(global::System.IntPtr cPtr, bool cMemoryOwn)
698 swigCMemOwn = cMemoryOwn;
699 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
702 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj)
704 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
709 DisposeQueue.Instance.Add(this);
712 public virtual void Dispose()
714 if (!Window.IsInstalled()) {
715 DisposeQueue.Instance.Add(this);
721 if (swigCPtr.Handle != global::System.IntPtr.Zero)
726 NDalicPINVOKE.delete_View_Property(swigCPtr);
728 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
730 global::System.GC.SuppressFinalize(this);
734 internal static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get();
735 internal static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get();
736 internal static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get();
737 internal static readonly int LEFT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
738 internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
739 internal static readonly int UP_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
740 internal static readonly int DOWN_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
742 internal Property() : this(NDalicPINVOKE.new_View_Property(), true)
744 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
747 internal static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get();
748 internal static readonly int BACKGROUND_COLOR = NDalicPINVOKE.View_Property_BACKGROUND_COLOR_get();
749 internal static readonly int BACKGROUND_IMAGE = NDalicPINVOKE.View_Property_BACKGROUND_IMAGE_get();
750 internal static readonly int KEY_INPUT_FOCUS = NDalicPINVOKE.View_Property_KEY_INPUT_FOCUS_get();
751 internal static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get();
752 internal static readonly int SIBLING_ORDER = NDalicManualPINVOKE.Actor_Property_SIBLING_ORDER_get();
753 internal static readonly int OPACITY = NDalicManualPINVOKE.Actor_Property_OPACITY_get();
754 internal static readonly int SCREEN_POSITION = NDalicManualPINVOKE.Actor_Property_SCREEN_POSITION_get();
755 internal static readonly int POSITION_USES_ANCHOR_POINT = NDalicManualPINVOKE.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
756 internal static readonly int PARENT_ORIGIN = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_get();
757 internal static readonly int PARENT_ORIGIN_X = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_X_get();
758 internal static readonly int PARENT_ORIGIN_Y = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Y_get();
759 internal static readonly int PARENT_ORIGIN_Z = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Z_get();
760 internal static readonly int ANCHOR_POINT = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_get();
761 internal static readonly int ANCHOR_POINT_X = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_X_get();
762 internal static readonly int ANCHOR_POINT_Y = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Y_get();
763 internal static readonly int ANCHOR_POINT_Z = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Z_get();
764 internal static readonly int SIZE = NDalicPINVOKE.Actor_Property_SIZE_get();
765 internal static readonly int SIZE_WIDTH = NDalicPINVOKE.Actor_Property_SIZE_WIDTH_get();
766 internal static readonly int SIZE_HEIGHT = NDalicPINVOKE.Actor_Property_SIZE_HEIGHT_get();
767 internal static readonly int SIZE_DEPTH = NDalicPINVOKE.Actor_Property_SIZE_DEPTH_get();
768 internal static readonly int POSITION = NDalicPINVOKE.Actor_Property_POSITION_get();
769 internal static readonly int POSITION_X = NDalicPINVOKE.Actor_Property_POSITION_X_get();
770 internal static readonly int POSITION_Y = NDalicPINVOKE.Actor_Property_POSITION_Y_get();
771 internal static readonly int POSITION_Z = NDalicPINVOKE.Actor_Property_POSITION_Z_get();
772 internal static readonly int WORLD_POSITION = NDalicPINVOKE.Actor_Property_WORLD_POSITION_get();
773 internal static readonly int WORLD_POSITION_X = NDalicPINVOKE.Actor_Property_WORLD_POSITION_X_get();
774 internal static readonly int WORLD_POSITION_Y = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Y_get();
775 internal static readonly int WORLD_POSITION_Z = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Z_get();
776 internal static readonly int ORIENTATION = NDalicPINVOKE.Actor_Property_ORIENTATION_get();
777 internal static readonly int WORLD_ORIENTATION = NDalicPINVOKE.Actor_Property_WORLD_ORIENTATION_get();
778 internal static readonly int SCALE = NDalicPINVOKE.Actor_Property_SCALE_get();
779 internal static readonly int SCALE_X = NDalicPINVOKE.Actor_Property_SCALE_X_get();
780 internal static readonly int SCALE_Y = NDalicPINVOKE.Actor_Property_SCALE_Y_get();
781 internal static readonly int SCALE_Z = NDalicPINVOKE.Actor_Property_SCALE_Z_get();
782 internal static readonly int WORLD_SCALE = NDalicPINVOKE.Actor_Property_WORLD_SCALE_get();
783 internal static readonly int VISIBLE = NDalicPINVOKE.Actor_Property_VISIBLE_get();
784 internal static readonly int COLOR = NDalicPINVOKE.Actor_Property_COLOR_get();
785 internal static readonly int COLOR_RED = NDalicPINVOKE.Actor_Property_COLOR_RED_get();
786 internal static readonly int COLOR_GREEN = NDalicPINVOKE.Actor_Property_COLOR_GREEN_get();
787 internal static readonly int COLOR_BLUE = NDalicPINVOKE.Actor_Property_COLOR_BLUE_get();
788 internal static readonly int COLOR_ALPHA = NDalicPINVOKE.Actor_Property_COLOR_ALPHA_get();
789 internal static readonly int WORLD_COLOR = NDalicPINVOKE.Actor_Property_WORLD_COLOR_get();
790 internal static readonly int WORLD_MATRIX = NDalicPINVOKE.Actor_Property_WORLD_MATRIX_get();
791 internal static readonly int NAME = NDalicPINVOKE.Actor_Property_NAME_get();
792 internal static readonly int SENSITIVE = NDalicPINVOKE.Actor_Property_SENSITIVE_get();
793 internal static readonly int LEAVE_REQUIRED = NDalicPINVOKE.Actor_Property_LEAVE_REQUIRED_get();
794 internal static readonly int INHERIT_ORIENTATION = NDalicPINVOKE.Actor_Property_INHERIT_ORIENTATION_get();
795 internal static readonly int INHERIT_SCALE = NDalicPINVOKE.Actor_Property_INHERIT_SCALE_get();
796 internal static readonly int COLOR_MODE = NDalicPINVOKE.Actor_Property_COLOR_MODE_get();
797 internal static readonly int POSITION_INHERITANCE = NDalicPINVOKE.Actor_Property_POSITION_INHERITANCE_get();
798 internal static readonly int DRAW_MODE = NDalicPINVOKE.Actor_Property_DRAW_MODE_get();
799 internal static readonly int SIZE_MODE_FACTOR = NDalicPINVOKE.Actor_Property_SIZE_MODE_FACTOR_get();
800 internal static readonly int WIDTH_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_WIDTH_RESIZE_POLICY_get();
801 internal static readonly int HEIGHT_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_HEIGHT_RESIZE_POLICY_get();
802 internal static readonly int SIZE_SCALE_POLICY = NDalicPINVOKE.Actor_Property_SIZE_SCALE_POLICY_get();
803 internal static readonly int WIDTH_FOR_HEIGHT = NDalicPINVOKE.Actor_Property_WIDTH_FOR_HEIGHT_get();
804 internal static readonly int HEIGHT_FOR_WIDTH = NDalicPINVOKE.Actor_Property_HEIGHT_FOR_WIDTH_get();
805 internal static readonly int PADDING = NDalicPINVOKE.Actor_Property_PADDING_get();
806 internal static readonly int MINIMUM_SIZE = NDalicPINVOKE.Actor_Property_MINIMUM_SIZE_get();
807 internal static readonly int MAXIMUM_SIZE = NDalicPINVOKE.Actor_Property_MAXIMUM_SIZE_get();
808 internal static readonly int INHERIT_POSITION = NDalicPINVOKE.Actor_Property_INHERIT_POSITION_get();
809 internal static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
814 /// Describes the direction to move the focus towards.
816 public enum FocusDirection
827 /// Creates a new instance of a View.
829 public View() : this(NDalicPINVOKE.View_New(), true)
831 PositionUsesAnchorPoint = false;
832 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
835 internal View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true)
837 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
840 internal View Assign(View handle)
842 View ret = new View(NDalicPINVOKE.View_Assign(swigCPtr, View.getCPtr(handle)), false);
843 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
848 /// Downcasts a handle to View handle.<br>
849 /// If handle points to a View, the downcast produces valid handle.<br>
850 /// If not, the returned handle is left uninitialized.<br>
852 /// <param name="handle">Handle to an object</param>
853 /// <returns>A handle to a View or an uninitialized handle</returns>
854 public new static View DownCast(BaseHandle handle)
856 View ret = new View(NDalicPINVOKE.View_DownCast(BaseHandle.getCPtr(handle)), true);
857 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
862 /// Downcasts a handle to class which inherit View handle.
864 /// <typeparam name="T">Class which inherit View</typeparam>
865 /// <param name="view">View to an object</param>
866 /// <returns>A object which inherit View</returns>
867 public static T DownCast<T>(View view) where T : View
869 return (T)(ViewRegistry.GetViewFromActor(view));
872 private View ConvertIdToView(uint id)
878 view = Parent.FindChildById(id);
883 view = Window.Instance.GetRootLayer().FindChildById(id);
889 internal void SetKeyInputFocus()
891 NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
892 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
896 /// Quries whether the view has focus.
898 /// <returns>true if this view has focus</returns>
899 public bool HasFocus()
901 bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
902 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
906 internal void ClearKeyInputFocus()
908 NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
909 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
912 internal PinchGestureDetector GetPinchGestureDetector()
914 PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
915 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
919 internal PanGestureDetector GetPanGestureDetector()
921 PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
922 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
926 internal TapGestureDetector GetTapGestureDetector()
928 TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
929 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
933 internal LongPressGestureDetector GetLongPressGestureDetector()
935 LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
936 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
941 /// Sets the name of the style to be applied to the view.
943 /// <param name="styleName">A string matching a style described in a stylesheet</param>
944 public void SetStyleName(string styleName)
946 NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
947 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
951 /// Retrieves the name of the style to be applied to the view (if any).
953 /// <returns>A string matching a style, or an empty string</returns>
954 public string GetStyleName()
956 string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
957 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
961 internal void SetBackgroundColor(Vector4 color)
963 NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
964 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
967 internal Vector4 GetBackgroundColor()
969 Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
970 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
974 internal void SetBackgroundImage(Image image)
976 NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
977 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
981 /// Clears the background.
983 public void ClearBackground()
985 NDalicPINVOKE.View_ClearBackground(swigCPtr);
986 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
989 internal ControlKeySignal KeyEventSignal()
991 ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
992 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
996 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
998 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
999 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1003 internal KeyInputFocusSignal KeyInputFocusLostSignal()
1005 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
1006 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1010 internal View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
1012 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1015 internal enum PropertyRange
1017 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
1018 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
1019 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
1023 /// styleName, type string.
1025 public string StyleName
1030 GetProperty(View.Property.STYLE_NAME).Get(out temp);
1035 SetProperty(View.Property.STYLE_NAME, new Tizen.NUI.PropertyValue(value));
1040 /// mutually exclusive with BACKGROUND_IMAGE & BACKGROUND, type Vector4.
1042 public Color BackgroundColor
1046 Color backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1048 Tizen.NUI.PropertyMap background = Background;
1050 background.Find(Visual.Property.Type).Get(ref visualType);
1051 if (visualType == (int)Visual.Type.Color)
1053 background.Find(ColorVisualProperty.MixColor).Get(backgroundColor);
1056 return backgroundColor;
1060 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1065 /// mutually exclusive with BACKGROUND_COLOR & BACKGROUND, type Map.
1067 public string BackgroundImage
1071 string backgroundImage = "";
1073 Tizen.NUI.PropertyMap background = Background;
1075 background.Find(Visual.Property.Type).Get(ref visualType);
1076 if (visualType == (int)Visual.Type.Image)
1078 background.Find(ImageVisualProperty.URL).Get(out backgroundImage);
1081 return backgroundImage;
1085 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1089 internal bool KeyInputFocus
1094 GetProperty(View.Property.KEY_INPUT_FOCUS).Get(ref temp);
1099 SetProperty(View.Property.KEY_INPUT_FOCUS, new Tizen.NUI.PropertyValue(value));
1104 /// mutually exclusive with BACKGROUND_COLOR & BACKGROUND_IMAGE, type Map or string for URL.
1106 public Tizen.NUI.PropertyMap Background
1110 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1111 GetProperty(View.Property.BACKGROUND).Get(temp);
1116 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1121 /// The current state of the view.
1128 if (GetProperty(View.Property.STATE).Get(ref temp) == false)
1131 Tizen.Log.Error("NUI", "State get error!");
1138 return States.Normal;
1142 return States.Focused;
1146 return States.Disabled;
1150 return States.Normal;
1156 SetProperty(View.Property.STATE, new Tizen.NUI.PropertyValue((int)value));
1161 /// The current sub state of the view.
1163 public States SubState
1168 if (GetProperty(View.Property.SUB_STATE).Get(out temp) == false)
1171 Tizen.Log.Error("NUI", "subState get error!");
1177 return States.Normal;
1179 return States.Focused;
1181 return States.Disabled;
1183 return States.Normal;
1188 string valueToString = "";
1193 valueToString = "NORMAL";
1196 case States.Focused:
1198 valueToString = "FOCUSED";
1201 case States.Disabled:
1203 valueToString = "DISABLED";
1208 valueToString = "NORMAL";
1212 SetProperty(View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
1217 /// Displays a tooltip
1219 public Tizen.NUI.PropertyMap Tooltip
1223 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1224 GetProperty(View.Property.TOOLTIP).Get(temp);
1229 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1234 /// Displays a tooltip as Text
1236 public string TooltipText
1240 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1244 private int LeftFocusableViewId
1249 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(ref temp);
1254 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1258 private int RightFocusableViewId
1263 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(ref temp);
1268 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1272 private int UpFocusableViewId
1277 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(ref temp);
1282 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1286 private int DownFocusableViewId
1291 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(ref temp);
1296 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1301 /// Child Property of FlexContainer.<br>
1302 /// The proportion of the free space in the container the flex item will receive.<br>
1303 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br>
1310 GetProperty(FlexContainer.ChildProperty.FLEX).Get(ref temp);
1315 SetProperty(FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue(value));
1320 /// Child Property of FlexContainer.<br>
1321 /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br>
1323 public int AlignSelf
1328 GetProperty(FlexContainer.ChildProperty.ALIGN_SELF).Get(ref temp);
1333 SetProperty(FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue(value));
1338 /// Child Property of FlexContainer.<br>
1339 /// The space around the flex item.<br>
1341 public Vector4 FlexMargin
1345 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1346 GetProperty(FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
1351 SetProperty(FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue(value));
1356 /// The top-left cell this child occupies, if not set, the first available cell is used
1358 public Vector2 CellIndex
1362 Vector2 temp = new Vector2(0.0f, 0.0f);
1363 GetProperty(TableView.ChildProperty.CELL_INDEX).Get(temp);
1368 SetProperty(TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue(value));
1373 /// The number of rows this child occupies, if not set, default value is 1
1375 public float RowSpan
1380 GetProperty(TableView.ChildProperty.ROW_SPAN).Get(ref temp);
1385 SetProperty(TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue(value));
1390 /// The number of columns this child occupies, if not set, default value is 1
1392 public float ColumnSpan
1397 GetProperty(TableView.ChildProperty.COLUMN_SPAN).Get(ref temp);
1402 SetProperty(TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue(value));
1407 /// The horizontal alignment of this child inside the cells, if not set, default value is 'left'
1409 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
1414 if (GetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
1417 Tizen.Log.Error("NUI", "CellHorizontalAlignment get error!");
1424 return Tizen.NUI.HorizontalAlignmentType.Left;
1426 return Tizen.NUI.HorizontalAlignmentType.Center;
1428 return Tizen.NUI.HorizontalAlignmentType.Right;
1430 return Tizen.NUI.HorizontalAlignmentType.Left;
1435 string valueToString = "";
1438 case Tizen.NUI.HorizontalAlignmentType.Left:
1440 valueToString = "left";
1443 case Tizen.NUI.HorizontalAlignmentType.Center:
1445 valueToString = "center";
1448 case Tizen.NUI.HorizontalAlignmentType.Right:
1450 valueToString = "right";
1455 valueToString = "left";
1459 SetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1464 /// The vertical alignment of this child inside the cells, if not set, default value is 'top'
1466 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
1471 GetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
1474 Tizen.Log.Error("NUI", "CellVerticalAlignment get error!");
1481 return Tizen.NUI.VerticalAlignmentType.Top;
1483 return Tizen.NUI.VerticalAlignmentType.Center;
1485 return Tizen.NUI.VerticalAlignmentType.Bottom;
1487 return Tizen.NUI.VerticalAlignmentType.Top;
1492 string valueToString = "";
1495 case Tizen.NUI.VerticalAlignmentType.Top:
1497 valueToString = "top";
1500 case Tizen.NUI.VerticalAlignmentType.Center:
1502 valueToString = "center";
1505 case Tizen.NUI.VerticalAlignmentType.Bottom:
1507 valueToString = "bottom";
1512 valueToString = "top";
1516 SetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1521 /// The left focusable view.<br>
1522 /// This will return NULL if not set.<br>
1523 /// This will also return NULL if the specified left focusable view is not on Window.<br>
1525 public View LeftFocusableView
1527 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1530 if (LeftFocusableViewId >= 0)
1532 return ConvertIdToView((uint)LeftFocusableViewId);
1538 LeftFocusableViewId = (int)value.GetId();
1543 /// The right focusable view.<br>
1544 /// This will return NULL if not set.<br>
1545 /// This will also return NULL if the specified right focusable view is not on Window.<br>
1547 public View RightFocusableView
1549 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1552 if (RightFocusableViewId >= 0)
1554 return ConvertIdToView((uint)RightFocusableViewId);
1560 RightFocusableViewId = (int)value.GetId();
1565 /// The up focusable view.<br>
1566 /// This will return NULL if not set.<br>
1567 /// This will also return NULL if the specified up focusable view is not on Window.<br>
1569 public View UpFocusableView
1571 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1574 if (UpFocusableViewId >= 0)
1576 return ConvertIdToView((uint)UpFocusableViewId);
1582 UpFocusableViewId = (int)value.GetId();
1587 /// The down focusable view.<br>
1588 /// This will return NULL if not set.<br>
1589 /// This will also return NULL if the specified down focusable view is not on Window.<br>
1591 public View DownFocusableView
1593 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1596 if (DownFocusableViewId >= 0)
1598 return ConvertIdToView((uint)DownFocusableViewId);
1604 DownFocusableViewId = (int)value.GetId();
1609 /// whether the view should be focusable by keyboard navigation.
1611 public bool Focusable
1615 SetKeyboardFocusable(value);
1619 return IsKeyboardFocusable();
1624 /// Enumeration for describing the states of view.
1643 /// Retrieves the position of the View.<br>
1644 /// The coordinates are relative to the View's parent.<br>
1646 public Position CurrentPosition
1650 return GetCurrentPosition();
1655 /// Sets the size of an view for width and height.<br>
1656 /// Geometry can be scaled to fit within this area.<br>
1657 /// This does not interfere with the views scale factor.<br>
1658 /// The views default depth is the minimum of width & height.<br>
1660 public Size2D Size2D
1664 Size temp = new Size(0.0f, 0.0f, 0.0f);
1665 GetProperty(View.Property.SIZE).Get(temp);
1666 return new Size2D(temp);
1670 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(new Size(value)));
1675 /// Retrieves the size of the View.<br>
1676 /// The coordinates are relative to the View's parent.<br>
1678 public Size CurrentSize
1682 return GetCurrentSize();
1687 /// Retrieves the view's parent.<br>
1697 public bool Visibility
1706 /// Retrieves and sets the view's opacity.<br>
1708 public float Opacity
1713 GetProperty(View.Property.OPACITY).Get(ref temp);
1718 SetProperty(View.Property.OPACITY, new Tizen.NUI.PropertyValue(value));
1723 /// Sets the position of the View for X and Y.<br>
1724 /// By default, sets the position vector between the parent origin and anchor point(default).<br>
1725 /// If Position inheritance if disabled, sets the world position.<br>
1727 public Position2D Position2D
1731 Position temp = new Position(0.0f, 0.0f, 0.0f);
1732 GetProperty(View.Property.POSITION).Get(temp);
1733 return new Position2D(temp);
1737 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(new Position(value)));
1742 /// Retrieves screen postion of view's.<br>
1744 public Vector2 ScreenPosition
1748 Vector2 temp = new Vector2(0.0f, 0.0f);
1749 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
1755 /// Determines whether the anchor point should be used to determine the position of the view.
1756 /// This is true by default.
1758 /// <remarks>If false, then the top-left of the view is used for the position.
1759 /// Setting this to false will allow scaling or rotation around the anchor-point without affecting the view's position.
1761 public bool PositionUsesAnchorPoint
1766 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(ref temp);
1771 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
1775 public bool StateFocusEnable
1779 return IsKeyboardFocusable();
1783 SetKeyboardFocusable(value);
1788 /// Queries whether the view is connected to the Stage.<br>
1789 /// When an view is connected, it will be directly or indirectly parented to the root View.<br>
1791 public bool IsOnWindow
1800 /// Gets depth in the hierarchy for the view.
1802 public int HierarchyDepth
1806 return GetHierarchyDepth();
1811 /// Sets the sibling order of the view so depth position can be defined within the same parent.
1814 /// Note The initial value is 0.
1815 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove and LowerBelow will override the sibling order.
1816 /// The values set by this Property will likely change.
1818 public int SiblingOrder
1823 GetProperty(View.Property.SIBLING_ORDER).Get(ref temp);
1828 SetProperty(View.Property.SIBLING_ORDER, new Tizen.NUI.PropertyValue(value));
1836 /// This is an asynchronous method.
1847 /// This is an asynchronous method.
1848 /// If an view is hidden, then the view and its children will not be rendered.
1849 /// 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.
1857 /// Raise view above the next highest level of view(s).
1860 /// Sibling order of views within the parent will be updated automatically.
1861 /// Initially views added to a parent will have the same sibling order and shown in relation to insertion order.
1862 /// Raising this view above views with the same sibling order as each other will raise this view above them.
1863 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
1867 NDalicPINVOKE.Raise(swigCPtr);
1868 if (NDalicPINVOKE.SWIGPendingException.Pending)
1869 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1873 /// Lower the view to underneath the level below view(s).
1876 /// Sibling order of views within the parent will be updated automatically.
1877 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
1878 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
1882 NDalicPINVOKE.Lower(swigCPtr);
1883 if (NDalicPINVOKE.SWIGPendingException.Pending)
1884 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1888 /// Raise view above all other views.
1891 /// Sibling order of views within the parent will be updated automatically.
1892 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
1894 public void RaiseToTop()
1896 NDalicPINVOKE.RaiseToTop(swigCPtr);
1897 if (NDalicPINVOKE.SWIGPendingException.Pending)
1898 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1902 /// Lower view to the bottom of all views.
1905 /// Sibling order of views within the parent will be updated automatically.
1906 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
1908 public void LowerToBottom()
1910 NDalicPINVOKE.LowerToBottom(swigCPtr);
1911 if (NDalicPINVOKE.SWIGPendingException.Pending)
1912 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1916 /// Raise the view to above the target view.
1918 /// <remarks>Sibling order of views within the parent will be updated automatically.
1919 /// Views on the level above the target view will still be shown above this view.
1920 /// Raising this view above views with the same sibling order as each other will raise this view above them.
1921 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
1923 /// <param name="target">Will be raised above this view</param>
1924 internal void RaiseAbove(View target)
1926 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
1927 if (NDalicPINVOKE.SWIGPendingException.Pending)
1928 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1932 /// Lower the view to below the target view.
1934 /// <remarks>Sibling order of views within the parent will be updated automatically.
1935 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
1936 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
1938 /// <param name="target">Will be lowered below this view</param>
1939 internal void LowerBelow(View target)
1941 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
1942 if (NDalicPINVOKE.SWIGPendingException.Pending)
1943 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1946 internal string GetName()
1948 string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);
1949 if (NDalicPINVOKE.SWIGPendingException.Pending)
1950 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1954 internal void SetName(string name)
1956 NDalicPINVOKE.Actor_SetName(swigCPtr, name);
1957 if (NDalicPINVOKE.SWIGPendingException.Pending)
1958 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1961 internal uint GetId()
1963 uint ret = NDalicPINVOKE.Actor_GetId(swigCPtr);
1964 if (NDalicPINVOKE.SWIGPendingException.Pending)
1965 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1969 internal bool IsRoot()
1971 bool ret = NDalicPINVOKE.Actor_IsRoot(swigCPtr);
1972 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1976 internal bool OnWindow()
1978 bool ret = NDalicPINVOKE.Actor_OnStage(swigCPtr);
1979 if (NDalicPINVOKE.SWIGPendingException.Pending)
1980 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1984 internal bool IsLayer()
1986 bool ret = NDalicPINVOKE.Actor_IsLayer(swigCPtr);
1987 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1991 internal Layer GetLayer()
1993 Layer ret = new Layer(NDalicPINVOKE.Actor_GetLayer(swigCPtr), true);
1994 if (NDalicPINVOKE.SWIGPendingException.Pending)
1995 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2000 /// Adds a child view to this View.
2002 /// <pre>This View(the parent) has been initialized. The child view has been initialized. The child view is not the same as the parent view.</pre>
2003 /// <post>The child will be referenced by its parent. This means that the child will be kept alive, even if the handle passed into this method is reset or destroyed.</post>
2004 /// <remarks>If the child already has a parent, it will be removed from old parent and reparented to this view. This may change child's position, color, scale etc as it now inherits them from this view.</remarks>
2005 /// <param name="child">The child</param>
2006 public void Add(View child)
2008 NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
2009 if (NDalicPINVOKE.SWIGPendingException.Pending)
2010 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2014 /// Removes a child View from this View. If the view was not a child of this view, this is a no-op.
2016 /// <pre>This View(the parent) has been initialized. The child view is not the same as the parent view.</pre>
2017 /// <param name="child">The child</param>
2018 public void Remove(View child)
2020 NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
2021 if (NDalicPINVOKE.SWIGPendingException.Pending)
2022 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2025 internal void Unparent()
2027 NDalicPINVOKE.Actor_Unparent(swigCPtr);
2028 if (NDalicPINVOKE.SWIGPendingException.Pending)
2029 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2033 /// Retrieves the number of children held by the view.
2035 /// <pre>The View has been initialized.</pre>
2036 /// <returns>The number of children</returns>
2037 public uint GetChildCount()
2039 uint ret = NDalicPINVOKE.Actor_GetChildCount(swigCPtr);
2040 if (NDalicPINVOKE.SWIGPendingException.Pending)
2041 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2046 /// Retrieves child view by index.
2048 /// <pre>The View has been initialized.</pre>
2049 /// <param name="index">The index of the child to retrieve</param>
2050 /// <returns>The view for the given index or empty handle if children not initialized</returns>
2051 public View GetChildAt(uint index)
2053 View ret = new View(NDalicPINVOKE.Actor_GetChildAt(swigCPtr, index), true);
2054 if (NDalicPINVOKE.SWIGPendingException.Pending)
2055 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2060 /// Search through this view's hierarchy for an view with the given name.
2061 /// The view itself is also considered in the search.
2063 /// <pre>The View has been initialized.</pre>
2064 /// <param name="viewName">The name of the view to find</param>
2065 /// <returns>A handle to the view if found, or an empty handle if not</returns>
2066 public View FindChildByName(string viewName)
2068 View ret = new View(NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName), true);
2069 if (NDalicPINVOKE.SWIGPendingException.Pending)
2070 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2074 internal View FindChildById(uint id)
2076 View ret = new View(NDalicPINVOKE.Actor_FindChildById(swigCPtr, id), true);
2077 if (NDalicPINVOKE.SWIGPendingException.Pending)
2078 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2082 internal View GetParent()
2084 View ret = new View(NDalicPINVOKE.Actor_GetParent(swigCPtr), true);
2085 if (NDalicPINVOKE.SWIGPendingException.Pending)
2086 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2090 internal void SetParentOrigin(Vector3 origin)
2092 NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
2093 if (NDalicPINVOKE.SWIGPendingException.Pending)
2094 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2097 internal Vector3 GetCurrentParentOrigin()
2099 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentParentOrigin(swigCPtr), true);
2100 if (NDalicPINVOKE.SWIGPendingException.Pending)
2101 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2105 internal void SetAnchorPoint(Vector3 anchorPoint)
2107 NDalicPINVOKE.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
2108 if (NDalicPINVOKE.SWIGPendingException.Pending)
2109 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2112 internal Vector3 GetCurrentAnchorPoint()
2114 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentAnchorPoint(swigCPtr), true);
2115 if (NDalicPINVOKE.SWIGPendingException.Pending)
2116 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2120 internal void SetSize(float width, float height)
2122 NDalicPINVOKE.Actor_SetSize__SWIG_0(swigCPtr, width, height);
2123 if (NDalicPINVOKE.SWIGPendingException.Pending)
2124 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2127 internal void SetSize(float width, float height, float depth)
2129 NDalicPINVOKE.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
2130 if (NDalicPINVOKE.SWIGPendingException.Pending)
2131 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2134 internal void SetSize(Vector2 size)
2136 NDalicPINVOKE.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
2137 if (NDalicPINVOKE.SWIGPendingException.Pending)
2138 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2141 internal void SetSize(Vector3 size)
2143 NDalicPINVOKE.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
2144 if (NDalicPINVOKE.SWIGPendingException.Pending)
2145 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2148 internal Vector3 GetTargetSize()
2150 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetTargetSize(swigCPtr), true);
2151 if (NDalicPINVOKE.SWIGPendingException.Pending)
2152 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2156 internal Size GetCurrentSize()
2158 Size ret = new Size(NDalicPINVOKE.Actor_GetCurrentSize(swigCPtr), true);
2159 if (NDalicPINVOKE.SWIGPendingException.Pending)
2160 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2165 /// Returns the natural size of the view.<br>
2166 /// Deriving classes stipulate the natural size and by default an view has a ZERO natural size.<br>
2168 /// <returns>The view's natural size</returns>
2169 public Vector3 GetNaturalSize()
2171 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2172 if (NDalicPINVOKE.SWIGPendingException.Pending)
2173 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2177 internal void SetPosition(float x, float y)
2179 NDalicPINVOKE.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
2180 if (NDalicPINVOKE.SWIGPendingException.Pending)
2181 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2184 internal void SetPosition(float x, float y, float z)
2186 NDalicPINVOKE.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
2187 if (NDalicPINVOKE.SWIGPendingException.Pending)
2188 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2191 internal void SetPosition(Vector3 position)
2193 NDalicPINVOKE.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
2194 if (NDalicPINVOKE.SWIGPendingException.Pending)
2195 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2198 internal void SetX(float x)
2200 NDalicPINVOKE.Actor_SetX(swigCPtr, x);
2201 if (NDalicPINVOKE.SWIGPendingException.Pending)
2202 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2205 internal void SetY(float y)
2207 NDalicPINVOKE.Actor_SetY(swigCPtr, y);
2208 if (NDalicPINVOKE.SWIGPendingException.Pending)
2209 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2212 internal void SetZ(float z)
2214 NDalicPINVOKE.Actor_SetZ(swigCPtr, z);
2215 if (NDalicPINVOKE.SWIGPendingException.Pending)
2216 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2219 internal void TranslateBy(Vector3 distance)
2221 NDalicPINVOKE.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
2222 if (NDalicPINVOKE.SWIGPendingException.Pending)
2223 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2226 internal Position GetCurrentPosition()
2228 Position ret = new Position(NDalicPINVOKE.Actor_GetCurrentPosition(swigCPtr), true);
2229 if (NDalicPINVOKE.SWIGPendingException.Pending)
2230 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2234 internal Vector3 GetCurrentWorldPosition()
2236 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldPosition(swigCPtr), true);
2237 if (NDalicPINVOKE.SWIGPendingException.Pending)
2238 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2242 internal void SetInheritPosition(bool inherit)
2244 NDalicPINVOKE.Actor_SetInheritPosition(swigCPtr, inherit);
2245 if (NDalicPINVOKE.SWIGPendingException.Pending)
2246 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2249 internal PositionInheritanceMode GetPositionInheritanceMode()
2251 PositionInheritanceMode ret = (PositionInheritanceMode)NDalicPINVOKE.Actor_GetPositionInheritanceMode(swigCPtr);
2252 if (NDalicPINVOKE.SWIGPendingException.Pending)
2253 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2257 internal bool IsPositionInherited()
2259 bool ret = NDalicPINVOKE.Actor_IsPositionInherited(swigCPtr);
2260 if (NDalicPINVOKE.SWIGPendingException.Pending)
2261 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2265 internal void SetOrientation(Degree angle, Vector3 axis)
2267 NDalicPINVOKE.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2268 if (NDalicPINVOKE.SWIGPendingException.Pending)
2269 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2272 internal void SetOrientation(Radian angle, Vector3 axis)
2274 NDalicPINVOKE.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2275 if (NDalicPINVOKE.SWIGPendingException.Pending)
2276 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2279 internal void SetOrientation(Rotation orientation)
2281 NDalicPINVOKE.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
2282 if (NDalicPINVOKE.SWIGPendingException.Pending)
2283 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2286 internal void RotateBy(Degree angle, Vector3 axis)
2288 NDalicPINVOKE.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2289 if (NDalicPINVOKE.SWIGPendingException.Pending)
2290 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2293 internal void RotateBy(Radian angle, Vector3 axis)
2295 NDalicPINVOKE.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2296 if (NDalicPINVOKE.SWIGPendingException.Pending)
2297 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2300 internal void RotateBy(Rotation relativeRotation)
2302 NDalicPINVOKE.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
2303 if (NDalicPINVOKE.SWIGPendingException.Pending)
2304 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2307 internal Rotation GetCurrentOrientation()
2309 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentOrientation(swigCPtr), true);
2310 if (NDalicPINVOKE.SWIGPendingException.Pending)
2311 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2315 internal void SetInheritOrientation(bool inherit)
2317 NDalicPINVOKE.Actor_SetInheritOrientation(swigCPtr, inherit);
2318 if (NDalicPINVOKE.SWIGPendingException.Pending)
2319 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2322 internal bool IsOrientationInherited()
2324 bool ret = NDalicPINVOKE.Actor_IsOrientationInherited(swigCPtr);
2325 if (NDalicPINVOKE.SWIGPendingException.Pending)
2326 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2330 internal Rotation GetCurrentWorldOrientation()
2332 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentWorldOrientation(swigCPtr), true);
2333 if (NDalicPINVOKE.SWIGPendingException.Pending)
2334 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2338 internal void SetScale(float scale)
2340 NDalicPINVOKE.Actor_SetScale__SWIG_0(swigCPtr, scale);
2341 if (NDalicPINVOKE.SWIGPendingException.Pending)
2342 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2345 internal void SetScale(float scaleX, float scaleY, float scaleZ)
2347 NDalicPINVOKE.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
2348 if (NDalicPINVOKE.SWIGPendingException.Pending)
2349 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2352 internal void SetScale(Vector3 scale)
2354 NDalicPINVOKE.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
2355 if (NDalicPINVOKE.SWIGPendingException.Pending)
2356 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2359 internal void ScaleBy(Vector3 relativeScale)
2361 NDalicPINVOKE.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
2362 if (NDalicPINVOKE.SWIGPendingException.Pending)
2363 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2366 internal Vector3 GetCurrentScale()
2368 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentScale(swigCPtr), true);
2369 if (NDalicPINVOKE.SWIGPendingException.Pending)
2370 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2374 internal Vector3 GetCurrentWorldScale()
2376 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldScale(swigCPtr), true);
2377 if (NDalicPINVOKE.SWIGPendingException.Pending)
2378 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2382 internal void SetInheritScale(bool inherit)
2384 NDalicPINVOKE.Actor_SetInheritScale(swigCPtr, inherit);
2385 if (NDalicPINVOKE.SWIGPendingException.Pending)
2386 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2389 internal bool IsScaleInherited()
2391 bool ret = NDalicPINVOKE.Actor_IsScaleInherited(swigCPtr);
2392 if (NDalicPINVOKE.SWIGPendingException.Pending)
2393 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2397 internal Matrix GetCurrentWorldMatrix()
2399 Matrix ret = new Matrix(NDalicPINVOKE.Actor_GetCurrentWorldMatrix(swigCPtr), true);
2400 if (NDalicPINVOKE.SWIGPendingException.Pending)
2401 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2405 internal void SetVisible(bool visible)
2407 NDalicPINVOKE.Actor_SetVisible(swigCPtr, visible);
2408 if (NDalicPINVOKE.SWIGPendingException.Pending)
2409 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2412 internal bool IsVisible()
2414 bool ret = NDalicPINVOKE.Actor_IsVisible(swigCPtr);
2415 if (NDalicPINVOKE.SWIGPendingException.Pending)
2416 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2420 internal void SetOpacity(float opacity)
2422 NDalicPINVOKE.Actor_SetOpacity(swigCPtr, opacity);
2423 if (NDalicPINVOKE.SWIGPendingException.Pending)
2424 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2427 internal float GetCurrentOpacity()
2429 float ret = NDalicPINVOKE.Actor_GetCurrentOpacity(swigCPtr);
2430 if (NDalicPINVOKE.SWIGPendingException.Pending)
2431 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2435 internal void SetColor(Vector4 color)
2437 NDalicPINVOKE.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
2438 if (NDalicPINVOKE.SWIGPendingException.Pending)
2439 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2442 internal Vector4 GetCurrentColor()
2444 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentColor(swigCPtr), true);
2445 if (NDalicPINVOKE.SWIGPendingException.Pending)
2446 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2450 internal void SetColorMode(ColorMode colorMode)
2452 NDalicPINVOKE.Actor_SetColorMode(swigCPtr, (int)colorMode);
2453 if (NDalicPINVOKE.SWIGPendingException.Pending)
2454 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2457 internal ColorMode GetColorMode()
2459 ColorMode ret = (ColorMode)NDalicPINVOKE.Actor_GetColorMode(swigCPtr);
2460 if (NDalicPINVOKE.SWIGPendingException.Pending)
2461 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2465 internal Vector4 GetCurrentWorldColor()
2467 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentWorldColor(swigCPtr), true);
2468 if (NDalicPINVOKE.SWIGPendingException.Pending)
2469 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2473 internal void SetDrawMode(DrawModeType drawMode)
2475 NDalicPINVOKE.Actor_SetDrawMode(swigCPtr, (int)drawMode);
2476 if (NDalicPINVOKE.SWIGPendingException.Pending)
2477 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2480 internal DrawModeType GetDrawMode()
2482 DrawModeType ret = (DrawModeType)NDalicPINVOKE.Actor_GetDrawMode(swigCPtr);
2483 if (NDalicPINVOKE.SWIGPendingException.Pending)
2484 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2488 internal void SetSensitive(bool sensitive)
2490 NDalicPINVOKE.Actor_SetSensitive(swigCPtr, sensitive);
2491 if (NDalicPINVOKE.SWIGPendingException.Pending)
2492 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2495 internal bool IsSensitive()
2497 bool ret = NDalicPINVOKE.Actor_IsSensitive(swigCPtr);
2498 if (NDalicPINVOKE.SWIGPendingException.Pending)
2499 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2504 /// Converts screen coordinates into the view's coordinate system using the default camera.
2506 /// <pre>The View has been initialized.</pre>
2507 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5)</remarks>
2508 /// <param name="localX">On return, the X-coordinate relative to the view</param>
2509 /// <param name="localY">On return, the Y-coordinate relative to the view</param>
2510 /// <param name="screenX">The screen X-coordinate</param>
2511 /// <param name="screenY">The screen Y-coordinate</param>
2512 /// <returns>True if the conversion succeeded</returns>
2513 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
2515 bool ret = NDalicPINVOKE.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
2516 if (NDalicPINVOKE.SWIGPendingException.Pending)
2517 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2521 internal void SetLeaveRequired(bool required)
2523 NDalicPINVOKE.Actor_SetLeaveRequired(swigCPtr, required);
2524 if (NDalicPINVOKE.SWIGPendingException.Pending)
2525 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2528 internal bool GetLeaveRequired()
2530 bool ret = NDalicPINVOKE.Actor_GetLeaveRequired(swigCPtr);
2531 if (NDalicPINVOKE.SWIGPendingException.Pending)
2532 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2536 internal void SetKeyboardFocusable(bool focusable)
2538 NDalicPINVOKE.Actor_SetKeyboardFocusable(swigCPtr, focusable);
2539 if (NDalicPINVOKE.SWIGPendingException.Pending)
2540 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2543 internal bool IsKeyboardFocusable()
2545 bool ret = NDalicPINVOKE.Actor_IsKeyboardFocusable(swigCPtr);
2546 if (NDalicPINVOKE.SWIGPendingException.Pending)
2547 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2551 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
2553 NDalicPINVOKE.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
2554 if (NDalicPINVOKE.SWIGPendingException.Pending)
2555 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2558 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
2560 ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.Actor_GetResizePolicy(swigCPtr, (int)dimension);
2561 if (NDalicPINVOKE.SWIGPendingException.Pending)
2562 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2566 internal void SetSizeScalePolicy(SizeScalePolicyType policy)
2568 NDalicPINVOKE.Actor_SetSizeScalePolicy(swigCPtr, (int)policy);
2569 if (NDalicPINVOKE.SWIGPendingException.Pending)
2570 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2573 internal SizeScalePolicyType GetSizeScalePolicy()
2575 SizeScalePolicyType ret = (SizeScalePolicyType)NDalicPINVOKE.Actor_GetSizeScalePolicy(swigCPtr);
2576 if (NDalicPINVOKE.SWIGPendingException.Pending)
2577 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2582 /// Sets the relative to parent size factor of the view.<br>
2583 /// This factor is only used when ResizePolicy is set to either:
2584 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br>
2585 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br>
2587 /// <pre>The View has been initialized.</pre>
2588 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis</param>
2589 public void SetSizeModeFactor(Vector3 factor)
2591 NDalicPINVOKE.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
2592 if (NDalicPINVOKE.SWIGPendingException.Pending)
2593 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2596 internal Vector3 GetSizeModeFactor()
2598 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetSizeModeFactor(swigCPtr), true);
2599 if (NDalicPINVOKE.SWIGPendingException.Pending)
2600 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2605 /// Calculates the height of the view given a width.<br>
2606 /// The natural size is used for default calculation. <br>
2607 /// size 0 is treated as aspect ratio 1:1.<br>
2609 /// <param name="width">Width to use</param>
2610 /// <returns>The height based on the width</returns>
2611 public float GetHeightForWidth(float width)
2613 float ret = NDalicPINVOKE.Actor_GetHeightForWidth(swigCPtr, width);
2614 if (NDalicPINVOKE.SWIGPendingException.Pending)
2615 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2620 /// Calculates the width of the view given a height.<br>
2621 /// The natural size is used for default calculation.<br>
2622 /// size 0 is treated as aspect ratio 1:1.<br>
2624 /// <param name="height">Height to use</param>
2625 /// <returns>The width based on the height</returns>
2626 public float GetWidthForHeight(float height)
2628 float ret = NDalicPINVOKE.Actor_GetWidthForHeight(swigCPtr, height);
2629 if (NDalicPINVOKE.SWIGPendingException.Pending)
2630 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2634 public float GetRelayoutSize(DimensionType dimension)
2636 float ret = NDalicPINVOKE.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
2637 if (NDalicPINVOKE.SWIGPendingException.Pending)
2638 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2642 public void SetPadding(PaddingType padding)
2644 NDalicPINVOKE.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
2645 if (NDalicPINVOKE.SWIGPendingException.Pending)
2646 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2649 public void GetPadding(PaddingType paddingOut)
2651 NDalicPINVOKE.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
2652 if (NDalicPINVOKE.SWIGPendingException.Pending)
2653 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2656 internal void SetMinimumSize(Vector2 size)
2658 NDalicPINVOKE.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
2659 if (NDalicPINVOKE.SWIGPendingException.Pending)
2660 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2663 internal Vector2 GetMinimumSize()
2665 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMinimumSize(swigCPtr), true);
2666 if (NDalicPINVOKE.SWIGPendingException.Pending)
2667 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2671 internal void SetMaximumSize(Vector2 size)
2673 NDalicPINVOKE.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
2674 if (NDalicPINVOKE.SWIGPendingException.Pending)
2675 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2678 internal Vector2 GetMaximumSize()
2680 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMaximumSize(swigCPtr), true);
2681 if (NDalicPINVOKE.SWIGPendingException.Pending)
2682 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2686 internal int GetHierarchyDepth()
2688 int ret = NDalicPINVOKE.Actor_GetHierarchyDepth(swigCPtr);
2689 if (NDalicPINVOKE.SWIGPendingException.Pending)
2690 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2694 internal uint AddRenderer(Renderer renderer)
2696 uint ret = NDalicPINVOKE.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
2697 if (NDalicPINVOKE.SWIGPendingException.Pending)
2698 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2702 internal uint GetRendererCount()
2704 uint ret = NDalicPINVOKE.Actor_GetRendererCount(swigCPtr);
2705 if (NDalicPINVOKE.SWIGPendingException.Pending)
2706 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2710 internal Renderer GetRendererAt(uint index)
2712 Renderer ret = new Renderer(NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index), true);
2713 if (NDalicPINVOKE.SWIGPendingException.Pending)
2714 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2718 internal void RemoveRenderer(Renderer renderer)
2720 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
2721 if (NDalicPINVOKE.SWIGPendingException.Pending)
2722 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2725 internal void RemoveRenderer(uint index)
2727 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
2728 if (NDalicPINVOKE.SWIGPendingException.Pending)
2729 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2732 internal TouchDataSignal TouchSignal()
2734 TouchDataSignal ret = new TouchDataSignal(NDalicPINVOKE.Actor_TouchSignal(swigCPtr), false);
2735 if (NDalicPINVOKE.SWIGPendingException.Pending)
2736 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2740 internal HoverSignal HoveredSignal()
2742 HoverSignal ret = new HoverSignal(NDalicPINVOKE.Actor_HoveredSignal(swigCPtr), false);
2743 if (NDalicPINVOKE.SWIGPendingException.Pending)
2744 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2748 internal WheelSignal WheelEventSignal()
2750 WheelSignal ret = new WheelSignal(NDalicPINVOKE.Actor_WheelEventSignal(swigCPtr), false);
2751 if (NDalicPINVOKE.SWIGPendingException.Pending)
2752 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2756 internal ViewSignal OnWindowSignal()
2758 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnStageSignal(swigCPtr), false);
2759 if (NDalicPINVOKE.SWIGPendingException.Pending)
2760 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2764 internal ViewSignal OffWindowSignal()
2766 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OffStageSignal(swigCPtr), false);
2767 if (NDalicPINVOKE.SWIGPendingException.Pending)
2768 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2772 internal ViewSignal OnRelayoutSignal()
2774 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnRelayoutSignal(swigCPtr), false);
2775 if (NDalicPINVOKE.SWIGPendingException.Pending)
2776 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2780 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view) {
2781 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
2782 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2787 /// Gets/Sets the origin of an view, within its parent's area.<br>
2788 /// 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>
2789 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br>
2790 /// An view's position is the distance between this origin, and the view's anchor-point.<br>
2792 /// <pre>The View has been initialized.</pre>
2793 public Position ParentOrigin
2797 Position temp = new Position(0.0f, 0.0f, 0.0f);
2798 GetProperty(View.Property.PARENT_ORIGIN).Get(temp);
2803 SetProperty(View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue(value));
2807 internal float ParentOriginX
2812 GetProperty(View.Property.PARENT_ORIGIN_X).Get(ref temp);
2817 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
2821 internal float ParentOriginY
2826 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(ref temp);
2831 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
2835 internal float ParentOriginZ
2840 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(ref temp);
2845 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
2850 /// Gets/Sets the anchor-point of an view.<br>
2851 /// 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>
2852 /// The default anchor point is AnchorPoint.Center (0.5, 0.5, 0.5).<br>
2853 /// An view position is the distance between its parent-origin and this anchor-point.<br>
2854 /// An view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br>
2855 /// <pre>The View has been initialized.</pre>
2857 public Position AnchorPoint
2861 Position temp = new Position(0.0f, 0.0f, 0.0f);
2862 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
2867 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
2871 internal float AnchorPointX
2876 GetProperty(View.Property.ANCHOR_POINT_X).Get(ref temp);
2881 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
2885 internal float AnchorPointY
2890 GetProperty(View.Property.ANCHOR_POINT_Y).Get(ref temp);
2895 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
2899 internal float AnchorPointZ
2904 GetProperty(View.Property.ANCHOR_POINT_Z).Get(ref temp);
2909 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
2914 /// Gets/Sets the size of an view.<br>
2915 /// Geometry can be scaled to fit within this area.<br>
2916 /// This does not interfere with the views scale factor.<br>
2922 Size temp = new Size(0.0f, 0.0f, 0.0f);
2923 GetProperty(View.Property.SIZE).Get(temp);
2928 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(value));
2933 /// Gets/Sets the size width of an view.
2935 public float SizeWidth
2940 GetProperty(View.Property.SIZE_WIDTH).Get(ref temp);
2945 SetProperty(View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue(value));
2950 /// Gets/Sets the size height of an view.
2952 public float SizeHeight
2957 GetProperty(View.Property.SIZE_HEIGHT).Get(ref temp);
2962 SetProperty(View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue(value));
2967 /// Gets/Sets the size depth of an view.
2969 public float SizeDepth
2974 GetProperty(View.Property.SIZE_DEPTH).Get(ref temp);
2979 SetProperty(View.Property.SIZE_DEPTH, new Tizen.NUI.PropertyValue(value));
2984 /// Gets/Sets the position of the View.<br>
2985 /// By default, sets the position vector between the parent origin and anchor point(default).<br>
2986 /// If Position inheritance if disabled, sets the world position.<br>
2988 public Position Position
2992 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
2993 GetProperty(View.Property.POSITION).Get(temp);
2998 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(value));
3003 /// Gets/Sets the position x of the View.
3005 public float PositionX
3010 GetProperty(View.Property.POSITION_X).Get(ref temp);
3015 SetProperty(View.Property.POSITION_X, new Tizen.NUI.PropertyValue(value));
3020 /// Gets/Sets the position y of the View.
3022 public float PositionY
3027 GetProperty(View.Property.POSITION_Y).Get(ref temp);
3032 SetProperty(View.Property.POSITION_Y, new Tizen.NUI.PropertyValue(value));
3037 /// Gets/Sets the position z of the View.
3039 public float PositionZ
3044 GetProperty(View.Property.POSITION_Z).Get(ref temp);
3049 SetProperty(View.Property.POSITION_Z, new Tizen.NUI.PropertyValue(value));
3054 /// Gets/Sets the world position of the View.
3056 public Vector3 WorldPosition
3060 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3061 GetProperty(View.Property.WORLD_POSITION).Get(temp);
3066 internal float WorldPositionX
3071 GetProperty(View.Property.WORLD_POSITION_X).Get(ref temp);
3076 internal float WorldPositionY
3081 GetProperty(View.Property.WORLD_POSITION_Y).Get(ref temp);
3086 internal float WorldPositionZ
3091 GetProperty(View.Property.WORLD_POSITION_Z).Get(ref temp);
3097 /// Gets/Sets the orientation of the View.<br>
3098 /// An view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br>
3100 /// <remarks>This is an asynchronous method.</remarks>
3101 public Rotation Orientation
3105 Rotation temp = new Rotation();
3106 GetProperty(View.Property.ORIENTATION).Get(temp);
3111 SetProperty(View.Property.ORIENTATION, new Tizen.NUI.PropertyValue(value));
3116 /// Gets/Sets the world orientation of the View.<br>
3118 public Rotation WorldOrientation
3122 Rotation temp = new Rotation();
3123 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
3129 /// Gets/Sets the scale factor applied to an view.<br>
3131 public Vector3 Scale
3135 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3136 GetProperty(View.Property.SCALE).Get(temp);
3141 SetProperty(View.Property.SCALE, new Tizen.NUI.PropertyValue(value));
3146 /// Gets/Sets the scale x factor applied to an view.
3153 GetProperty(View.Property.SCALE_X).Get(ref temp);
3158 SetProperty(View.Property.SCALE_X, new Tizen.NUI.PropertyValue(value));
3163 /// Gets/Sets the scale y factor applied to an view.
3170 GetProperty(View.Property.SCALE_Y).Get(ref temp);
3175 SetProperty(View.Property.SCALE_Y, new Tizen.NUI.PropertyValue(value));
3180 /// Gets/Sets the scale z factor applied to an view.
3187 GetProperty(View.Property.SCALE_Z).Get(ref temp);
3192 SetProperty(View.Property.SCALE_Z, new Tizen.NUI.PropertyValue(value));
3197 /// Gets the world scale of View.
3199 public Vector3 WorldScale
3203 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3204 GetProperty(View.Property.WORLD_SCALE).Get(temp);
3210 /// Retrieves the visibility flag of an view.
3213 /// If an view is not visible, then the view and its children will not be rendered.
3214 /// 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.
3221 GetProperty(View.Property.VISIBLE).Get(ref temp);
3223 }/* only get is required : removed
3226 SetProperty(View.Property.VISIBLE, new Tizen.NUI.PropertyValue(value));
3231 /// Gets/Sets the view's mix color red.
3233 public float ColorRed
3238 GetProperty(View.Property.COLOR_RED).Get(ref temp);
3243 SetProperty(View.Property.COLOR_RED, new Tizen.NUI.PropertyValue(value));
3248 /// Gets/Sets the view's mix color green.
3250 public float ColorGreen
3255 GetProperty(View.Property.COLOR_GREEN).Get(ref temp);
3260 SetProperty(View.Property.COLOR_GREEN, new Tizen.NUI.PropertyValue(value));
3265 /// Gets/Sets the view's mix color blue
3267 public float ColorBlue
3272 GetProperty(View.Property.COLOR_BLUE).Get(ref temp);
3277 SetProperty(View.Property.COLOR_BLUE, new Tizen.NUI.PropertyValue(value));
3282 /// Gets/Sets the view's mix color alpha.
3284 public float ColorAlpha
3289 GetProperty(View.Property.COLOR_ALPHA).Get(ref temp);
3294 SetProperty(View.Property.COLOR_ALPHA, new Tizen.NUI.PropertyValue(value));
3299 /// Gets the view's world color.
3301 public Vector4 WorldColor
3305 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3306 GetProperty(View.Property.WORLD_COLOR).Get(temp);
3311 internal Matrix WorldMatrix
3315 Matrix temp = new Matrix();
3316 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
3322 /// Gets/Sets the View's name.
3329 GetProperty(View.Property.NAME).Get(out temp);
3334 SetProperty(View.Property.NAME, new Tizen.NUI.PropertyValue(value));
3339 /// Gets/Sets the status of whether an view should emit touch or hover signals.
3341 public bool Sensitive
3346 GetProperty(View.Property.SENSITIVE).Get(ref temp);
3351 SetProperty(View.Property.SENSITIVE, new Tizen.NUI.PropertyValue(value));
3356 /// Gets/Sets the status of whether the view should receive a notification when touch or hover motion events leave the boundary of the view.
3358 public bool LeaveRequired
3363 GetProperty(View.Property.LEAVE_REQUIRED).Get(ref temp);
3368 SetProperty(View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue(value));
3373 /// Gets/Sets the status of whether a child view inherits it's parent's orientation.
3375 public bool InheritOrientation
3380 GetProperty(View.Property.INHERIT_ORIENTATION).Get(ref temp);
3385 SetProperty(View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue(value));
3390 /// Gets/Sets the status of whether a child view inherits it's parent's scale.
3392 public bool InheritScale
3397 GetProperty(View.Property.INHERIT_SCALE).Get(ref temp);
3402 SetProperty(View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue(value));
3407 /// Gets/Sets the view's color mode.<br>
3408 /// This specifies whether the View uses its own color, or inherits its parent color.<br>
3409 /// The default is UseOwnMultiplyParentAlpha.<br>
3411 public ColorMode ColorMode
3416 if (GetProperty(View.Property.COLOR_MODE).Get(out temp) == false)
3419 Tizen.Log.Error("NUI", "ColorMode get error!");
3424 case "USE_OWN_COLOR":
3425 return ColorMode.UseOwnColor;
3426 case "USE_PARENT_COLOR":
3427 return ColorMode.UseParentColor;
3428 case "USE_OWN_MULTIPLY_PARENT_COLOR":
3429 return ColorMode.UseOwnMultiplyParentColor;
3430 case "USE_OWN_MULTIPLY_PARENT_ALPHA":
3431 return ColorMode.UseOwnMultiplyParentAlpha;
3433 return ColorMode.UseOwnMultiplyParentAlpha;
3438 SetProperty(View.Property.COLOR_MODE, new Tizen.NUI.PropertyValue((int)value));
3442 public string PositionInheritance
3447 GetProperty(View.Property.POSITION_INHERITANCE).Get(out temp);
3452 SetProperty(View.Property.POSITION_INHERITANCE, new Tizen.NUI.PropertyValue(value));
3457 /// Gets/Sets the status of how the view and its children should be drawn.<br>
3458 /// Not all views are renderable, but DrawMode can be inherited from any view.<br>
3459 /// 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>
3460 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br>
3461 /// Overlay views are drawn in a separate pass, after all non-overlay views within the Layer.<br>
3462 /// For overlay views, the drawing order is with respect to tree levels of Views, and depth-testing will not be used.<br>
3464 public DrawModeType DrawMode
3469 if (GetProperty(View.Property.DRAW_MODE).Get(out temp) == false)
3472 Tizen.Log.Error("NUI", "DrawMode get error!");
3478 return DrawModeType.Normal;
3480 return DrawModeType.Overlay2D;
3482 return DrawModeType.Stencil;
3484 return DrawModeType.Normal;
3489 SetProperty(View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)value));
3494 /// Gets/Sets the relative to parent size factor of the view.<br>
3495 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br>
3496 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br>
3498 public Vector3 SizeModeFactor
3502 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3503 GetProperty(View.Property.SIZE_MODE_FACTOR).Get(temp);
3508 SetProperty(View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue(value));
3513 /// Gets/Sets the width resize policy to be used.
3515 public ResizePolicyType WidthResizePolicy
3520 if (GetProperty(View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
3523 Tizen.Log.Error("NUI", "WidthResizePolicy get error!");
3529 return ResizePolicyType.Fixed;
3530 case "USE_NATURAL_SIZE":
3531 return ResizePolicyType.UseNaturalSize;
3532 case "FILL_TO_PARENT":
3533 return ResizePolicyType.FillToParent;
3534 case "SIZE_RELATIVE_TO_PARENT":
3535 return ResizePolicyType.SizeRelativeToParent;
3536 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3537 return ResizePolicyType.SizeFixedOffsetFromParent;
3538 case "FIT_TO_CHILDREN":
3539 return ResizePolicyType.FitToChildren;
3540 case "DIMENSION_DEPENDENCY":
3541 return ResizePolicyType.DimensionDependency;
3542 case "USE_ASSIGNED_SIZE":
3543 return ResizePolicyType.UseAssignedSize;
3545 return ResizePolicyType.Fixed;
3550 SetProperty(View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3555 /// Gets/Sets the height resize policy to be used.
3557 public ResizePolicyType HeightResizePolicy
3562 if (GetProperty(View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
3565 Tizen.Log.Error("NUI", "HeightResizePolicy get error!");
3571 return ResizePolicyType.Fixed;
3572 case "USE_NATURAL_SIZE":
3573 return ResizePolicyType.UseNaturalSize;
3574 case "FILL_TO_PARENT":
3575 return ResizePolicyType.FillToParent;
3576 case "SIZE_RELATIVE_TO_PARENT":
3577 return ResizePolicyType.SizeRelativeToParent;
3578 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3579 return ResizePolicyType.SizeFixedOffsetFromParent;
3580 case "FIT_TO_CHILDREN":
3581 return ResizePolicyType.FitToChildren;
3582 case "DIMENSION_DEPENDENCY":
3583 return ResizePolicyType.DimensionDependency;
3584 case "USE_ASSIGNED_SIZE":
3585 return ResizePolicyType.UseAssignedSize;
3587 return ResizePolicyType.Fixed;
3592 SetProperty(View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3597 /// Gets/Sets the policy to use when setting size with size negotiation.<br>
3598 /// Defaults to SizeScalePolicyType.UseSizeSet.<br>
3600 public SizeScalePolicyType SizeScalePolicy
3605 if (GetProperty(View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
3608 Tizen.Log.Error("NUI", "SizeScalePolicy get error!");
3613 case "USE_SIZE_SET":
3614 return SizeScalePolicyType.UseSizeSet;
3615 case "FIT_WITH_ASPECT_RATIO":
3616 return SizeScalePolicyType.FitWithAspectRatio;
3617 case "FILL_WITH_ASPECT_RATIO":
3618 return SizeScalePolicyType.FillWithAspectRatio;
3620 return SizeScalePolicyType.UseSizeSet;
3625 string valueToString = "";
3628 case SizeScalePolicyType.UseSizeSet:
3630 valueToString = "USE_SIZE_SET";
3633 case SizeScalePolicyType.FitWithAspectRatio:
3635 valueToString = "FIT_WITH_ASPECT_RATIO";
3638 case SizeScalePolicyType.FillWithAspectRatio:
3640 valueToString = "FILL_WITH_ASPECT_RATIO";
3645 valueToString = "USE_SIZE_SET";
3649 SetProperty(View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
3654 /// Gets/Sets the status of whether the width size is dependent on height size.
3656 public bool WidthForHeight
3661 GetProperty(View.Property.WIDTH_FOR_HEIGHT).Get(ref temp);
3666 SetProperty(View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue(value));
3671 /// Gets/Sets the status of whether the height size is dependent on width size.
3673 public bool HeightForWidth
3678 GetProperty(View.Property.HEIGHT_FOR_WIDTH).Get(ref temp);
3683 SetProperty(View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue(value));
3688 /// Gets/Sets the padding for use in layout.
3690 public Vector4 Padding
3694 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3695 GetProperty(View.Property.PADDING).Get(temp);
3700 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
3705 /// Gets/Sets the minimum size an view can be assigned in size negotiation.
3707 public Size2D MinimumSize
3711 Size2D temp = new Size2D(0, 0);
3712 GetProperty(View.Property.MINIMUM_SIZE).Get(temp);
3717 SetProperty(View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3722 /// Gets/Sets the maximum size an view can be assigned in size negotiation.
3724 public Size2D MaximumSize
3728 Size2D temp = new Size2D(0, 0);
3729 GetProperty(View.Property.MAXIMUM_SIZE).Get(temp);
3734 SetProperty(View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3739 /// Gets/Sets whether a child view inherits it's parent's position.<br>
3740 /// Default is to inherit.<br>
3741 /// 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 anchor point of the view.<br>
3743 public bool InheritPosition
3748 GetProperty(View.Property.INHERIT_POSITION).Get(ref temp);
3753 SetProperty(View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue(value));
3758 /// Gets/Sets clipping behavior(mode) of it's children.
3760 public ClippingModeType ClippingMode
3765 if (GetProperty(View.Property.CLIPPING_MODE).Get(out temp) == false)
3768 Tizen.Log.Error("NUI", "ClippingMode get error!");
3774 return ClippingModeType.Disabled;
3775 case "CLIP_CHILDREN":
3776 return ClippingModeType.ClipChildren;
3778 return ClippingModeType.Disabled;
3783 SetProperty(View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)value));