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);
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 // you can override it to clean-up your own resources.
42 protected override void Dispose(DisposeTypes type)
49 if(type == DisposeTypes.Explicit)
52 //Release your own managed resources here.
53 //You should release all of your own disposable objects here.
56 //Release your own unmanaged resources here.
57 //You should not access any managed member here except static instance.
58 //because the execution order of Finalizes is non-deterministic.
60 if (swigCPtr.Handle != global::System.IntPtr.Zero)
65 NDalicPINVOKE.delete_View(swigCPtr);
67 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
73 private EventHandler _keyInputFocusGainedEventHandler;
74 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
75 private delegate void KeyInputFocusGainedCallbackType(IntPtr control);
76 private KeyInputFocusGainedCallbackType _keyInputFocusGainedCallback;
79 /// Event for KeyInputFocusGained signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
80 /// KeyInputFocusGained signal is emitted when the control gets Key Input Focus.<br>
82 public event EventHandler FocusGained
86 if (_keyInputFocusGainedEventHandler == null)
88 _keyInputFocusGainedCallback = OnKeyInputFocusGained;
89 this.KeyInputFocusGainedSignal().Connect(_keyInputFocusGainedCallback);
92 _keyInputFocusGainedEventHandler += value;
97 _keyInputFocusGainedEventHandler -= value;
99 if (_keyInputFocusGainedEventHandler == null && KeyInputFocusGainedSignal().Empty() == false)
101 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
106 private void OnKeyInputFocusGained(IntPtr view)
108 if (_keyInputFocusGainedEventHandler != null)
110 _keyInputFocusGainedEventHandler(this, null);
115 private EventHandler _keyInputFocusLostEventHandler;
116 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
117 private delegate void KeyInputFocusLostCallbackType(IntPtr control);
118 private KeyInputFocusLostCallbackType _keyInputFocusLostCallback;
121 /// Event for KeyInputFocusLost signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
122 /// KeyInputFocusLost signal is emitted when the control loses Key Input Focus.<br>
124 public event EventHandler FocusLost
128 if (_keyInputFocusLostEventHandler == null)
130 _keyInputFocusLostCallback = OnKeyInputFocusLost;
131 this.KeyInputFocusLostSignal().Connect(_keyInputFocusLostCallback);
134 _keyInputFocusLostEventHandler += value;
139 _keyInputFocusLostEventHandler -= value;
141 if (_keyInputFocusLostEventHandler == null && KeyInputFocusLostSignal().Empty() == false)
143 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
148 private void OnKeyInputFocusLost(IntPtr view)
150 if (_keyInputFocusLostEventHandler != null)
152 _keyInputFocusLostEventHandler(this, null);
157 /// Event arguments that passed via KeyEvent signal.
159 public class KeyEventArgs : EventArgs
164 /// Key - is the key sent to the View.
179 private EventHandlerWithReturnType<object, KeyEventArgs, bool> _keyEventHandler;
180 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
181 private delegate bool KeyCallbackType(IntPtr control, IntPtr keyEvent);
182 private KeyCallbackType _keyCallback;
185 /// Event for KeyPressed signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
186 /// KeyPressed signal is emitted when key event is received.<br>
188 public event EventHandlerWithReturnType<object, KeyEventArgs, bool> Key
192 if (_keyEventHandler == null)
194 _keyCallback = OnKeyEvent;
195 this.KeyEventSignal().Connect(_keyCallback);
198 _keyEventHandler += value;
203 _keyEventHandler -= value;
205 if (_keyEventHandler == null && KeyEventSignal().Empty() == false)
207 this.KeyEventSignal().Disconnect(_keyCallback);
212 private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
214 KeyEventArgs e = new KeyEventArgs();
216 e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
218 if (_keyEventHandler != null)
220 return _keyEventHandler(this, e);
226 private EventHandler _onRelayoutEventHandler;
227 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
228 private delegate void OnRelayoutEventCallbackType(IntPtr control);
229 private OnRelayoutEventCallbackType _onRelayoutEventCallback;
232 /// Event for OnRelayout signal which can be used to subscribe/unsubscribe the event handler.<br>
233 /// OnRelayout signal is emitted after the size has been set on the view during relayout.<br>
235 public event EventHandler Relayout
239 if (_onRelayoutEventHandler == null)
241 _onRelayoutEventCallback = OnRelayout;
242 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
245 _onRelayoutEventHandler += value;
250 _onRelayoutEventHandler -= value;
252 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
254 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
260 // Callback for View OnRelayout signal
261 private void OnRelayout(IntPtr data)
263 if (_onRelayoutEventHandler != null)
265 _onRelayoutEventHandler(this, null);
270 /// Event arguments that passed via Touch signal.
272 public class TouchedEventArgs : EventArgs
274 private Touch _touch;
277 /// Touch - contains the information of touch points
292 private EventHandlerWithReturnType<object, TouchedEventArgs, bool> _touchDataEventHandler;
293 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
294 private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
295 private TouchDataCallbackType _touchDataCallback;
298 /// Event for Touched signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
299 /// Touched signal is emitted when touch input is received.<br>
301 public event EventHandlerWithReturnType<object, TouchedEventArgs, bool> Touched
305 if (_touchDataEventHandler == null)
307 _touchDataCallback = OnTouch;
308 this.TouchSignal().Connect(_touchDataCallback);
311 _touchDataEventHandler += value;
316 _touchDataEventHandler -= value;
318 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
320 this.TouchSignal().Disconnect(_touchDataCallback);
326 // Callback for View TouchSignal
327 private bool OnTouch(IntPtr view, IntPtr touchData)
329 TouchedEventArgs e = new TouchedEventArgs();
331 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
333 if (_touchDataEventHandler != null)
335 return _touchDataEventHandler(this, e);
342 /// Event arguments that passed via Hover signal.
344 public class HoveredEventArgs : EventArgs
346 private Hover _hover;
349 /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
364 private EventHandlerWithReturnType<object, HoveredEventArgs, bool> _hoverEventHandler;
365 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
366 private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
367 private HoverEventCallbackType _hoverEventCallback;
370 /// Event for Hovered signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
371 /// Hovered signal is emitted when hover input is received.<br>
373 public event EventHandlerWithReturnType<object, HoveredEventArgs, bool> Hovered
377 if (_hoverEventHandler == null)
379 _hoverEventCallback = OnHoverEvent;
380 this.HoveredSignal().Connect(_hoverEventCallback);
383 _hoverEventHandler += value;
388 _hoverEventHandler -= value;
390 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
392 this.HoveredSignal().Disconnect(_hoverEventCallback);
398 // Callback for View Hover signal
399 private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
401 HoveredEventArgs e = new HoveredEventArgs();
403 e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
405 if (_hoverEventHandler != null)
407 return _hoverEventHandler(this, e);
414 /// Event arguments that passed via Wheel signal.
416 public class WheelRolledEventArgs : EventArgs
418 private Wheel _wheel;
421 /// WheelEvent - store a wheel rolling type : MOUSE_WHEEL or CUSTOM_WHEEL
436 private EventHandlerWithReturnType<object, WheelRolledEventArgs, bool> _wheelEventHandler;
437 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
438 private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
439 private WheelEventCallbackType _wheelEventCallback;
442 /// Event for WheelMoved signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
443 /// WheelMoved signal is emitted when wheel event is received.<br>
445 public event EventHandlerWithReturnType<object, WheelRolledEventArgs, bool> WheelRolled
449 if (_wheelEventHandler == null)
451 _wheelEventCallback = OnWheelEvent;
452 this.WheelEventSignal().Connect(_wheelEventCallback);
455 _wheelEventHandler += value;
460 _wheelEventHandler -= value;
462 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
464 this.WheelEventSignal().Disconnect(_wheelEventCallback);
470 // Callback for View Wheel signal
471 private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
473 WheelRolledEventArgs e = new WheelRolledEventArgs();
475 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
477 if (_wheelEventHandler != null)
479 return _wheelEventHandler(this, e);
485 private EventHandler _onWindowEventHandler;
486 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
487 private delegate void OnWindowEventCallbackType(IntPtr control);
488 private OnWindowEventCallbackType _onWindowEventCallback;
491 /// Event for OnWindow signal which can be used to subscribe/unsubscribe the event handler.<br>
492 /// OnWindow signal is emitted after the view has been connected to the Window.<br>
494 public event EventHandler AddedToWindow
498 if (_onWindowEventHandler == null)
500 _onWindowEventCallback = OnWindow;
501 this.OnWindowSignal().Connect(_onWindowEventCallback);
504 _onWindowEventHandler += value;
509 _onWindowEventHandler -= value;
511 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
513 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
518 // Callback for View OnWindow signal
519 private void OnWindow(IntPtr data)
521 if (_onWindowEventHandler != null)
523 _onWindowEventHandler(this, null);
528 private EventHandler _offWindowEventHandler;
529 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
530 private delegate void OffWindowEventCallbackType(IntPtr control);
531 private OffWindowEventCallbackType _offWindowEventCallback;
534 /// Event for OffWindow signal which can be used to subscribe/unsubscribe the event handler.<br>
535 /// OffWindow signal is emitted after the view has been disconnected from the Window.<br>
537 public event EventHandler RemovedFromWindow
541 if (_offWindowEventHandler == null)
543 _offWindowEventCallback = OffWindow;
544 this.OffWindowSignal().Connect(_offWindowEventCallback);
547 _offWindowEventHandler += value;
552 _offWindowEventHandler -= value;
554 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
556 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
561 // Callback for View OffWindow signal
562 private void OffWindow(IntPtr data)
564 if (_offWindowEventHandler != null)
566 _offWindowEventHandler(this, null);
571 /// Event arguments of visibility changed.
573 public class VisibilityChangedEventArgs : EventArgs
576 private bool _visibility;
577 private VisibilityChangeType _type;
580 /// The view, or child of view, whose visibility has changed.
595 /// Whether the view is now visible or not.
597 public bool Visibility
610 /// Whether the view's visible property has changed or a parent's.
612 public VisibilityChangeType Type
625 private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
626 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
627 private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
628 private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
631 /// Event for visibility change which can be used to subscribe/unsubscribe the event handler.<br>
632 /// This signal is emitted when the visible property of this or a parent view is changed.<br>
634 public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
638 if (_visibilityChangedEventHandler == null)
640 _visibilityChangedEventCallback = OnVisibilityChanged;
641 VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
644 _visibilityChangedEventHandler += value;
649 _visibilityChangedEventHandler -= value;
651 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
653 VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
658 // Callback for View visibility change signal
659 private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
661 VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
664 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
666 e.Visibility = visibility;
669 if (_visibilityChangedEventHandler != null)
671 _visibilityChangedEventHandler(this, e);
675 // Resource Ready Signal
677 private EventHandler _resourcesLoadedEventHandler;
678 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
679 private delegate void ResourcesLoadedCallbackType(IntPtr control);
680 private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
683 /// Event for ResourcesLoadedSignal signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
684 /// This signal is emitted after all resources required by a View are loaded and ready.<br>
686 public event EventHandler ResourcesLoaded
690 if (_resourcesLoadedEventHandler == null)
692 _ResourcesLoadedCallback = OnResourcesLoaded;
693 this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
696 _resourcesLoadedEventHandler += value;
701 _resourcesLoadedEventHandler -= value;
703 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
705 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
710 private void OnResourcesLoaded(IntPtr view)
712 if (_resourcesLoadedEventHandler != null)
714 _resourcesLoadedEventHandler(this, null);
718 internal IntPtr GetPtrfromView()
720 return (IntPtr)swigCPtr;
723 internal class Property
725 internal static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get();
726 internal static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get();
727 internal static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get();
728 internal static readonly int LEFT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
729 internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
730 internal static readonly int UP_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
731 internal static readonly int DOWN_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
732 internal static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get();
733 internal static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get();
734 internal static readonly int SIBLING_ORDER = NDalicManualPINVOKE.Actor_Property_SIBLING_ORDER_get();
735 internal static readonly int OPACITY = NDalicManualPINVOKE.Actor_Property_OPACITY_get();
736 internal static readonly int SCREEN_POSITION = NDalicManualPINVOKE.Actor_Property_SCREEN_POSITION_get();
737 internal static readonly int POSITION_USES_ANCHOR_POINT = NDalicManualPINVOKE.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
738 internal static readonly int PARENT_ORIGIN = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_get();
739 internal static readonly int PARENT_ORIGIN_X = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_X_get();
740 internal static readonly int PARENT_ORIGIN_Y = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Y_get();
741 internal static readonly int PARENT_ORIGIN_Z = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Z_get();
742 internal static readonly int ANCHOR_POINT = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_get();
743 internal static readonly int ANCHOR_POINT_X = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_X_get();
744 internal static readonly int ANCHOR_POINT_Y = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Y_get();
745 internal static readonly int ANCHOR_POINT_Z = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Z_get();
746 internal static readonly int SIZE = NDalicPINVOKE.Actor_Property_SIZE_get();
747 internal static readonly int SIZE_WIDTH = NDalicPINVOKE.Actor_Property_SIZE_WIDTH_get();
748 internal static readonly int SIZE_HEIGHT = NDalicPINVOKE.Actor_Property_SIZE_HEIGHT_get();
749 internal static readonly int SIZE_DEPTH = NDalicPINVOKE.Actor_Property_SIZE_DEPTH_get();
750 internal static readonly int POSITION = NDalicPINVOKE.Actor_Property_POSITION_get();
751 internal static readonly int POSITION_X = NDalicPINVOKE.Actor_Property_POSITION_X_get();
752 internal static readonly int POSITION_Y = NDalicPINVOKE.Actor_Property_POSITION_Y_get();
753 internal static readonly int POSITION_Z = NDalicPINVOKE.Actor_Property_POSITION_Z_get();
754 internal static readonly int WORLD_POSITION = NDalicPINVOKE.Actor_Property_WORLD_POSITION_get();
755 internal static readonly int WORLD_POSITION_X = NDalicPINVOKE.Actor_Property_WORLD_POSITION_X_get();
756 internal static readonly int WORLD_POSITION_Y = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Y_get();
757 internal static readonly int WORLD_POSITION_Z = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Z_get();
758 internal static readonly int ORIENTATION = NDalicPINVOKE.Actor_Property_ORIENTATION_get();
759 internal static readonly int WORLD_ORIENTATION = NDalicPINVOKE.Actor_Property_WORLD_ORIENTATION_get();
760 internal static readonly int SCALE = NDalicPINVOKE.Actor_Property_SCALE_get();
761 internal static readonly int SCALE_X = NDalicPINVOKE.Actor_Property_SCALE_X_get();
762 internal static readonly int SCALE_Y = NDalicPINVOKE.Actor_Property_SCALE_Y_get();
763 internal static readonly int SCALE_Z = NDalicPINVOKE.Actor_Property_SCALE_Z_get();
764 internal static readonly int WORLD_SCALE = NDalicPINVOKE.Actor_Property_WORLD_SCALE_get();
765 internal static readonly int VISIBLE = NDalicPINVOKE.Actor_Property_VISIBLE_get();
766 internal static readonly int WORLD_COLOR = NDalicPINVOKE.Actor_Property_WORLD_COLOR_get();
767 internal static readonly int WORLD_MATRIX = NDalicPINVOKE.Actor_Property_WORLD_MATRIX_get();
768 internal static readonly int NAME = NDalicPINVOKE.Actor_Property_NAME_get();
769 internal static readonly int SENSITIVE = NDalicPINVOKE.Actor_Property_SENSITIVE_get();
770 internal static readonly int LEAVE_REQUIRED = NDalicPINVOKE.Actor_Property_LEAVE_REQUIRED_get();
771 internal static readonly int INHERIT_ORIENTATION = NDalicPINVOKE.Actor_Property_INHERIT_ORIENTATION_get();
772 internal static readonly int INHERIT_SCALE = NDalicPINVOKE.Actor_Property_INHERIT_SCALE_get();
773 internal static readonly int DRAW_MODE = NDalicPINVOKE.Actor_Property_DRAW_MODE_get();
774 internal static readonly int SIZE_MODE_FACTOR = NDalicPINVOKE.Actor_Property_SIZE_MODE_FACTOR_get();
775 internal static readonly int WIDTH_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_WIDTH_RESIZE_POLICY_get();
776 internal static readonly int HEIGHT_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_HEIGHT_RESIZE_POLICY_get();
777 internal static readonly int SIZE_SCALE_POLICY = NDalicPINVOKE.Actor_Property_SIZE_SCALE_POLICY_get();
778 internal static readonly int WIDTH_FOR_HEIGHT = NDalicPINVOKE.Actor_Property_WIDTH_FOR_HEIGHT_get();
779 internal static readonly int HEIGHT_FOR_WIDTH = NDalicPINVOKE.Actor_Property_HEIGHT_FOR_WIDTH_get();
780 internal static readonly int PADDING = NDalicPINVOKE.Actor_Property_PADDING_get();
781 internal static readonly int MINIMUM_SIZE = NDalicPINVOKE.Actor_Property_MINIMUM_SIZE_get();
782 internal static readonly int MAXIMUM_SIZE = NDalicPINVOKE.Actor_Property_MAXIMUM_SIZE_get();
783 internal static readonly int INHERIT_POSITION = NDalicPINVOKE.Actor_Property_INHERIT_POSITION_get();
784 internal static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
788 /// Describes the direction to move the focus towards.
790 public enum FocusDirection
801 /// Creates a new instance of a View.
803 public View() : this(NDalicPINVOKE.View_New(), true)
805 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
808 internal View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true)
810 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
814 /// Downcasts a handle to View handle.<br>
815 /// If handle points to a View, the downcast produces valid handle.<br>
816 /// If not, the returned handle is left uninitialized.<br>
818 /// <param name="handle">Handle to an object</param>
819 /// <returns>A handle to a View or an uninitialized handle</returns>
820 public new static View DownCast(BaseHandle handle)
822 View ret = new View(NDalicPINVOKE.View_DownCast(BaseHandle.getCPtr(handle)), true);
823 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
827 private View ConvertIdToView(uint id)
833 view = Parent.FindChildById(id);
838 view = Window.Instance.GetRootLayer().FindChildById(id);
844 internal void SetKeyInputFocus()
846 NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
847 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
851 /// Quries whether the view has focus.
853 /// <returns>true if this view has focus</returns>
854 public bool HasFocus()
856 bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
857 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
861 internal void ClearKeyInputFocus()
863 NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
864 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
867 internal PinchGestureDetector GetPinchGestureDetector()
869 PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
870 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
874 internal PanGestureDetector GetPanGestureDetector()
876 PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
877 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
881 internal TapGestureDetector GetTapGestureDetector()
883 TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
884 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
888 internal LongPressGestureDetector GetLongPressGestureDetector()
890 LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
891 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
896 /// Sets the name of the style to be applied to the view.
898 /// <param name="styleName">A string matching a style described in a stylesheet</param>
899 public void SetStyleName(string styleName)
901 NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
902 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
906 /// Retrieves the name of the style to be applied to the view (if any).
908 /// <returns>A string matching a style, or an empty string</returns>
909 public string GetStyleName()
911 string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
912 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
916 internal void SetBackgroundColor(Vector4 color)
918 NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
919 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
922 internal Vector4 GetBackgroundColor()
924 Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
925 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
929 internal void SetBackgroundImage(Image image)
931 NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
932 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
936 /// Clears the background.
938 public void ClearBackground()
940 NDalicPINVOKE.View_ClearBackground(swigCPtr);
941 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
944 internal ControlKeySignal KeyEventSignal()
946 ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
947 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
951 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
953 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
954 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
958 internal KeyInputFocusSignal KeyInputFocusLostSignal()
960 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
961 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
965 internal View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
967 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
970 internal enum PropertyRange
972 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
973 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
974 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
978 /// styleName, type string.
980 public string StyleName
985 GetProperty(View.Property.STYLE_NAME).Get(out temp);
990 SetProperty(View.Property.STYLE_NAME, new Tizen.NUI.PropertyValue(value));
995 /// mutually exclusive with BACKGROUND_IMAGE & BACKGROUND, type Vector4.
997 public Color BackgroundColor
1001 Color backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1003 Tizen.NUI.PropertyMap background = Background;
1005 background.Find(Visual.Property.Type)?.Get(out visualType);
1006 if (visualType == (int)Visual.Type.Color)
1008 background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor);
1011 return backgroundColor;
1015 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
1020 /// Create an Animation to animate the background color visual. If there is no
1021 /// background visual, creates one with transparent black as it's mixColor.
1023 public Animation AnimateBackgroundColor( object destinationValue,
1026 AlphaFunction.BuiltinFunctions? alphaFunction = null,
1027 object initialValue = null)
1029 Tizen.NUI.PropertyMap background = Background;
1031 if( background.Empty() )
1033 // If there is no background yet, ensure there is a transparent
1035 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1036 background = Background;
1038 return AnimateColor( "background", destinationValue, startTime, endTime, alphaFunction, initialValue );
1042 /// Create an Animation to animate the mixColor of the named visual.
1044 public Animation AnimateColor( string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null )
1046 Animation animation = null;
1048 PropertyMap _animator = new PropertyMap();
1049 if( alphaFunction != null )
1051 _animator.Add("alphaFunction", new PropertyValue( AlphaFunction.BuiltinToPropertyKey(alphaFunction) ) );
1054 PropertyMap _timePeriod = new PropertyMap();
1055 _timePeriod.Add( "duration", new PropertyValue((endTime-startTime)/1000.0f) );
1056 _timePeriod.Add( "delay", new PropertyValue( startTime/1000.0f ) );
1057 _animator.Add( "timePeriod", new PropertyValue( _timePeriod ) );
1059 PropertyMap _transition = new PropertyMap();
1060 _transition.Add( "animator", new PropertyValue( _animator ) );
1061 _transition.Add( "target", new PropertyValue( targetVisual ) );
1062 _transition.Add( "property", new PropertyValue( "mixColor" ) );
1064 if( initialColor != null )
1066 PropertyValue initValue = PropertyValue.CreateFromObject( initialColor );
1067 _transition.Add( "initialValue", initValue );
1070 PropertyValue destValue = PropertyValue.CreateFromObject( destinationColor );
1071 _transition.Add( "targetValue", destValue );
1072 TransitionData _transitionData = new TransitionData( _transition );
1074 animation = new Animation( NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true );
1075 if (NDalicPINVOKE.SWIGPendingException.Pending)
1076 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1082 /// mutually exclusive with BACKGROUND_COLOR & BACKGROUND, type Map.
1084 public string BackgroundImage
1088 string backgroundImage = "";
1090 Tizen.NUI.PropertyMap background = Background;
1092 background.Find(Visual.Property.Type)?.Get(out visualType);
1093 if (visualType == (int)Visual.Type.Image)
1095 background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
1098 return backgroundImage;
1102 SetProperty(View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(value));
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));
1122 /// The current state of the view.
1129 if (GetProperty(View.Property.STATE).Get(out temp) == false)
1132 Tizen.Log.Error("NUI", "State get error!");
1139 return States.Normal;
1143 return States.Focused;
1147 return States.Disabled;
1151 return States.Normal;
1157 SetProperty(View.Property.STATE, new Tizen.NUI.PropertyValue((int)value));
1162 /// The current sub state of the view.
1164 public States SubState
1169 if (GetProperty(View.Property.SUB_STATE).Get(out temp) == false)
1172 Tizen.Log.Error("NUI", "subState get error!");
1178 return States.Normal;
1180 return States.Focused;
1182 return States.Disabled;
1184 return States.Normal;
1189 string valueToString = "";
1194 valueToString = "NORMAL";
1197 case States.Focused:
1199 valueToString = "FOCUSED";
1202 case States.Disabled:
1204 valueToString = "DISABLED";
1209 valueToString = "NORMAL";
1213 SetProperty(View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
1218 /// Displays a tooltip
1220 public Tizen.NUI.PropertyMap Tooltip
1224 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1225 GetProperty(View.Property.TOOLTIP).Get(temp);
1230 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1235 /// Displays a tooltip as Text
1237 public string TooltipText
1241 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1245 private int LeftFocusableViewId
1250 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
1255 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1259 private int RightFocusableViewId
1264 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
1269 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1273 private int UpFocusableViewId
1278 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
1283 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1287 private int DownFocusableViewId
1292 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
1297 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
1302 /// Child Property of FlexContainer.<br>
1303 /// The proportion of the free space in the container the flex item will receive.<br>
1304 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br>
1311 GetProperty(FlexContainer.ChildProperty.FLEX).Get(out temp);
1316 SetProperty(FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue(value));
1321 /// Child Property of FlexContainer.<br>
1322 /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br>
1324 public int AlignSelf
1329 GetProperty(FlexContainer.ChildProperty.ALIGN_SELF).Get(out temp);
1334 SetProperty(FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue(value));
1339 /// Child Property of FlexContainer.<br>
1340 /// The space around the flex item.<br>
1342 public Vector4 FlexMargin
1346 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1347 GetProperty(FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
1352 SetProperty(FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue(value));
1357 /// The top-left cell this child occupies, if not set, the first available cell is used
1359 public Vector2 CellIndex
1363 Vector2 temp = new Vector2(0.0f, 0.0f);
1364 GetProperty(TableView.ChildProperty.CELL_INDEX).Get(temp);
1369 SetProperty(TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue(value));
1374 /// The number of rows this child occupies, if not set, default value is 1
1376 public float RowSpan
1381 GetProperty(TableView.ChildProperty.ROW_SPAN).Get(out temp);
1386 SetProperty(TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue(value));
1391 /// The number of columns this child occupies, if not set, default value is 1
1393 public float ColumnSpan
1398 GetProperty(TableView.ChildProperty.COLUMN_SPAN).Get(out temp);
1403 SetProperty(TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue(value));
1408 /// The horizontal alignment of this child inside the cells, if not set, default value is 'left'
1410 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
1415 if (GetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
1418 Tizen.Log.Error("NUI", "CellHorizontalAlignment get error!");
1425 return Tizen.NUI.HorizontalAlignmentType.Left;
1427 return Tizen.NUI.HorizontalAlignmentType.Center;
1429 return Tizen.NUI.HorizontalAlignmentType.Right;
1431 return Tizen.NUI.HorizontalAlignmentType.Left;
1436 string valueToString = "";
1439 case Tizen.NUI.HorizontalAlignmentType.Left:
1441 valueToString = "left";
1444 case Tizen.NUI.HorizontalAlignmentType.Center:
1446 valueToString = "center";
1449 case Tizen.NUI.HorizontalAlignmentType.Right:
1451 valueToString = "right";
1456 valueToString = "left";
1460 SetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1465 /// The vertical alignment of this child inside the cells, if not set, default value is 'top'
1467 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
1472 GetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
1475 Tizen.Log.Error("NUI", "CellVerticalAlignment get error!");
1482 return Tizen.NUI.VerticalAlignmentType.Top;
1484 return Tizen.NUI.VerticalAlignmentType.Center;
1486 return Tizen.NUI.VerticalAlignmentType.Bottom;
1488 return Tizen.NUI.VerticalAlignmentType.Top;
1493 string valueToString = "";
1496 case Tizen.NUI.VerticalAlignmentType.Top:
1498 valueToString = "top";
1501 case Tizen.NUI.VerticalAlignmentType.Center:
1503 valueToString = "center";
1506 case Tizen.NUI.VerticalAlignmentType.Bottom:
1508 valueToString = "bottom";
1513 valueToString = "top";
1517 SetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
1522 /// The left focusable view.<br>
1523 /// This will return NULL if not set.<br>
1524 /// This will also return NULL if the specified left focusable view is not on Window.<br>
1526 public View LeftFocusableView
1528 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1531 if (LeftFocusableViewId >= 0)
1533 return ConvertIdToView((uint)LeftFocusableViewId);
1539 LeftFocusableViewId = (int)value.GetId();
1544 /// The right focusable view.<br>
1545 /// This will return NULL if not set.<br>
1546 /// This will also return NULL if the specified right focusable view is not on Window.<br>
1548 public View RightFocusableView
1550 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1553 if (RightFocusableViewId >= 0)
1555 return ConvertIdToView((uint)RightFocusableViewId);
1561 RightFocusableViewId = (int)value.GetId();
1566 /// The up focusable view.<br>
1567 /// This will return NULL if not set.<br>
1568 /// This will also return NULL if the specified up focusable view is not on Window.<br>
1570 public View UpFocusableView
1572 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1575 if (UpFocusableViewId >= 0)
1577 return ConvertIdToView((uint)UpFocusableViewId);
1583 UpFocusableViewId = (int)value.GetId();
1588 /// The down focusable view.<br>
1589 /// This will return NULL if not set.<br>
1590 /// This will also return NULL if the specified down focusable view is not on Window.<br>
1592 public View DownFocusableView
1594 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1597 if (DownFocusableViewId >= 0)
1599 return ConvertIdToView((uint)DownFocusableViewId);
1605 DownFocusableViewId = (int)value.GetId();
1610 /// whether the view should be focusable by keyboard navigation.
1612 public bool Focusable
1616 SetKeyboardFocusable(value);
1620 return IsKeyboardFocusable();
1625 /// Enumeration for describing the states of view.
1644 /// Retrieves the position of the View.<br>
1645 /// The coordinates are relative to the View's parent.<br>
1647 public Position CurrentPosition
1651 return GetCurrentPosition();
1656 /// Sets the size of an view for width and height.<br>
1657 /// Geometry can be scaled to fit within this area.<br>
1658 /// This does not interfere with the views scale factor.<br>
1659 /// The views default depth is the minimum of width & height.<br>
1661 public Size2D Size2D
1665 Size temp = new Size(0.0f, 0.0f, 0.0f);
1666 GetProperty(View.Property.SIZE).Get(temp);
1667 Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
1672 SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(new Size(value)));
1677 /// Retrieves the size of the View.<br>
1678 /// The coordinates are relative to the View's parent.<br>
1680 public Size2D CurrentSize
1684 return GetCurrentSize();
1689 /// Retrieves the view's parent.<br>
1699 public bool Visibility
1708 /// Retrieves and sets the view's opacity.<br>
1710 public float Opacity
1715 GetProperty(View.Property.OPACITY).Get(out temp);
1720 SetProperty(View.Property.OPACITY, new Tizen.NUI.PropertyValue(value));
1725 /// Sets the position of the View for X and Y.<br>
1726 /// By default, sets the position vector between the parent origin and pivot point(default).<br>
1727 /// If Position inheritance if disabled, sets the world position.<br>
1729 public Position2D Position2D
1733 Position temp = new Position(0.0f, 0.0f, 0.0f);
1734 GetProperty(View.Property.POSITION).Get(temp);
1735 return new Position2D(temp);
1739 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(new Position(value)));
1744 /// Retrieves screen postion of view's.<br>
1746 public Vector2 ScreenPosition
1750 Vector2 temp = new Vector2(0.0f, 0.0f);
1751 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
1757 /// Determines whether the pivot point should be used to determine the position of the view.
1758 /// This is true by default.
1760 /// <remarks>If false, then the top-left of the view is used for the position.
1761 /// Setting this to false will allow scaling or rotation around the anchor-point without affecting the view's position.
1763 public bool PositionUsesPivotPoint
1768 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
1773 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
1777 internal bool FocusState
1781 return IsKeyboardFocusable();
1785 SetKeyboardFocusable(value);
1790 /// Queries whether the view is connected to the Stage.<br>
1791 /// When an view is connected, it will be directly or indirectly parented to the root View.<br>
1793 public bool IsOnWindow
1802 /// Gets depth in the hierarchy for the view.
1804 public int HierarchyDepth
1808 return GetHierarchyDepth();
1813 /// Sets the sibling order of the view so depth position can be defined within the same parent.
1816 /// Note The initial value is 0.
1817 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove and LowerBelow will override the sibling order.
1818 /// The values set by this Property will likely change.
1820 public int SiblingOrder
1825 GetProperty(View.Property.SIBLING_ORDER).Get(out temp);
1830 SetProperty(View.Property.SIBLING_ORDER, new Tizen.NUI.PropertyValue(value));
1835 /// Gets the natural size of the view.<br>
1840 internal Vector3 NaturalSize
1844 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
1845 if (NDalicPINVOKE.SWIGPendingException.Pending)
1846 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1855 /// This is an asynchronous method.
1866 /// This is an asynchronous method.
1867 /// If an view is hidden, then the view and its children will not be rendered.
1868 /// 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.
1875 internal void Raise()
1877 NDalicPINVOKE.Raise(swigCPtr);
1878 if (NDalicPINVOKE.SWIGPendingException.Pending)
1879 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1882 internal void Lower()
1884 NDalicPINVOKE.Lower(swigCPtr);
1885 if (NDalicPINVOKE.SWIGPendingException.Pending)
1886 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1890 /// Raise view above all other views.
1893 /// Sibling order of views within the parent will be updated automatically.
1894 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
1896 public void RaiseToTop()
1898 NDalicPINVOKE.RaiseToTop(swigCPtr);
1899 if (NDalicPINVOKE.SWIGPendingException.Pending)
1900 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1904 /// Lower view to the bottom of all views.
1907 /// Sibling order of views within the parent will be updated automatically.
1908 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
1910 public void LowerToBottom()
1912 NDalicPINVOKE.LowerToBottom(swigCPtr);
1913 if (NDalicPINVOKE.SWIGPendingException.Pending)
1914 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1918 /// Query if all resources required by a View are loaded and ready.
1920 /// <remarks>Most resources are only loaded when the control is placed on stage
1922 public bool IsResourceReady()
1924 bool ret = NDalicPINVOKE.IsResourceReady(swigCPtr);
1925 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1930 /// Raise the view to above the target view.
1932 /// <remarks>Sibling order of views within the parent will be updated automatically.
1933 /// Views on the level above the target view will still be shown above this view.
1934 /// Raising this view above views with the same sibling order as each other will raise this view above them.
1935 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
1937 /// <param name="target">Will be raised above this view</param>
1938 internal void RaiseAbove(View target)
1940 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
1941 if (NDalicPINVOKE.SWIGPendingException.Pending)
1942 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1946 /// Lower the view to below the target view.
1948 /// <remarks>Sibling order of views within the parent will be updated automatically.
1949 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
1950 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
1952 /// <param name="target">Will be lowered below this view</param>
1953 internal void LowerBelow(View target)
1955 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
1956 if (NDalicPINVOKE.SWIGPendingException.Pending)
1957 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1960 internal string GetName()
1962 string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);
1963 if (NDalicPINVOKE.SWIGPendingException.Pending)
1964 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1968 internal void SetName(string name)
1970 NDalicPINVOKE.Actor_SetName(swigCPtr, name);
1971 if (NDalicPINVOKE.SWIGPendingException.Pending)
1972 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1975 internal uint GetId()
1977 uint ret = NDalicPINVOKE.Actor_GetId(swigCPtr);
1978 if (NDalicPINVOKE.SWIGPendingException.Pending)
1979 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1983 internal bool IsRoot()
1985 bool ret = NDalicPINVOKE.Actor_IsRoot(swigCPtr);
1986 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1990 internal bool OnWindow()
1992 bool ret = NDalicPINVOKE.Actor_OnStage(swigCPtr);
1993 if (NDalicPINVOKE.SWIGPendingException.Pending)
1994 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1998 internal Layer GetLayer()
2000 Layer ret = new Layer(NDalicPINVOKE.Actor_GetLayer(swigCPtr), true);
2001 if (NDalicPINVOKE.SWIGPendingException.Pending)
2002 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2007 /// Adds a child view to this View.
2009 /// <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>
2010 /// <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>
2011 /// <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>
2012 /// <param name="child">The child</param>
2013 public void Add(View child)
2015 NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
2016 if (NDalicPINVOKE.SWIGPendingException.Pending)
2017 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2021 /// Removes a child View from this View. If the view was not a child of this view, this is a no-op.
2023 /// <pre>This View(the parent) has been initialized. The child view is not the same as the parent view.</pre>
2024 /// <param name="child">The child</param>
2025 public void Remove(View child)
2027 NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
2028 if (NDalicPINVOKE.SWIGPendingException.Pending)
2029 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2032 internal void Unparent()
2034 NDalicPINVOKE.Actor_Unparent(swigCPtr);
2035 if (NDalicPINVOKE.SWIGPendingException.Pending)
2036 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2040 /// Retrieves the number of children held by the view.
2042 /// <pre>The View has been initialized.</pre>
2043 /// <returns>The number of children</returns>
2044 internal uint GetChildCount()
2046 uint ret = NDalicPINVOKE.Actor_GetChildCount(swigCPtr);
2047 if (NDalicPINVOKE.SWIGPendingException.Pending)
2048 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2053 /// Retrieves child view by index.
2055 /// <pre>The View has been initialized.</pre>
2056 /// <param name="index">The index of the child to retrieve</param>
2057 /// <returns>The view for the given index or empty handle if children not initialized</returns>
2058 public View GetChildAt(uint index)
2060 IntPtr cPtr = NDalicPINVOKE.Actor_GetChildAt(swigCPtr, index);
2062 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2064 if (NDalicPINVOKE.SWIGPendingException.Pending)
2065 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2070 /// Search through this view's hierarchy for an view with the given name.
2071 /// The view itself is also considered in the search.
2073 /// <pre>The View has been initialized.</pre>
2074 /// <param name="viewName">The name of the view to find</param>
2075 /// <returns>A handle to the view if found, or an empty handle if not</returns>
2076 public View FindChildByName(string viewName)
2078 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
2080 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2082 if (NDalicPINVOKE.SWIGPendingException.Pending)
2083 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2087 internal View FindChildById(uint id)
2089 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
2091 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2093 if (NDalicPINVOKE.SWIGPendingException.Pending)
2094 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2098 internal View GetParent()
2100 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
2102 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
2104 if (NDalicPINVOKE.SWIGPendingException.Pending)
2105 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2109 internal void SetParentOrigin(Vector3 origin)
2111 NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
2112 if (NDalicPINVOKE.SWIGPendingException.Pending)
2113 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2116 internal Vector3 GetCurrentParentOrigin()
2118 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentParentOrigin(swigCPtr), true);
2119 if (NDalicPINVOKE.SWIGPendingException.Pending)
2120 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2124 internal void SetAnchorPoint(Vector3 anchorPoint)
2126 NDalicPINVOKE.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
2127 if (NDalicPINVOKE.SWIGPendingException.Pending)
2128 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2131 internal Vector3 GetCurrentAnchorPoint()
2133 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentAnchorPoint(swigCPtr), true);
2134 if (NDalicPINVOKE.SWIGPendingException.Pending)
2135 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2139 internal void SetSize(float width, float height)
2141 NDalicPINVOKE.Actor_SetSize__SWIG_0(swigCPtr, width, height);
2142 if (NDalicPINVOKE.SWIGPendingException.Pending)
2143 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2146 internal void SetSize(float width, float height, float depth)
2148 NDalicPINVOKE.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
2149 if (NDalicPINVOKE.SWIGPendingException.Pending)
2150 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2153 internal void SetSize(Vector2 size)
2155 NDalicPINVOKE.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
2156 if (NDalicPINVOKE.SWIGPendingException.Pending)
2157 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2160 internal void SetSize(Vector3 size)
2162 NDalicPINVOKE.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
2163 if (NDalicPINVOKE.SWIGPendingException.Pending)
2164 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2167 internal Vector3 GetTargetSize()
2169 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetTargetSize(swigCPtr), true);
2170 if (NDalicPINVOKE.SWIGPendingException.Pending)
2171 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2175 internal Size2D GetCurrentSize()
2177 Size ret = new Size(NDalicPINVOKE.Actor_GetCurrentSize(swigCPtr), true);
2178 if (NDalicPINVOKE.SWIGPendingException.Pending)
2179 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2180 Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
2184 internal Vector3 GetNaturalSize()
2186 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2187 if (NDalicPINVOKE.SWIGPendingException.Pending)
2188 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2192 internal void SetPosition(float x, float y)
2194 NDalicPINVOKE.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
2195 if (NDalicPINVOKE.SWIGPendingException.Pending)
2196 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2199 internal void SetPosition(float x, float y, float z)
2201 NDalicPINVOKE.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
2202 if (NDalicPINVOKE.SWIGPendingException.Pending)
2203 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2206 internal void SetPosition(Vector3 position)
2208 NDalicPINVOKE.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
2209 if (NDalicPINVOKE.SWIGPendingException.Pending)
2210 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2213 internal void SetX(float x)
2215 NDalicPINVOKE.Actor_SetX(swigCPtr, x);
2216 if (NDalicPINVOKE.SWIGPendingException.Pending)
2217 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2220 internal void SetY(float y)
2222 NDalicPINVOKE.Actor_SetY(swigCPtr, y);
2223 if (NDalicPINVOKE.SWIGPendingException.Pending)
2224 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2227 internal void SetZ(float z)
2229 NDalicPINVOKE.Actor_SetZ(swigCPtr, z);
2230 if (NDalicPINVOKE.SWIGPendingException.Pending)
2231 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2234 internal void TranslateBy(Vector3 distance)
2236 NDalicPINVOKE.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
2237 if (NDalicPINVOKE.SWIGPendingException.Pending)
2238 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2241 internal Position GetCurrentPosition()
2243 Position ret = new Position(NDalicPINVOKE.Actor_GetCurrentPosition(swigCPtr), true);
2244 if (NDalicPINVOKE.SWIGPendingException.Pending)
2245 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2249 internal Vector3 GetCurrentWorldPosition()
2251 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldPosition(swigCPtr), true);
2252 if (NDalicPINVOKE.SWIGPendingException.Pending)
2253 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2257 internal void SetInheritPosition(bool inherit)
2259 NDalicPINVOKE.Actor_SetInheritPosition(swigCPtr, inherit);
2260 if (NDalicPINVOKE.SWIGPendingException.Pending)
2261 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2264 internal bool IsPositionInherited()
2266 bool ret = NDalicPINVOKE.Actor_IsPositionInherited(swigCPtr);
2267 if (NDalicPINVOKE.SWIGPendingException.Pending)
2268 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2272 internal void SetOrientation(Degree angle, Vector3 axis)
2274 NDalicPINVOKE.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2275 if (NDalicPINVOKE.SWIGPendingException.Pending)
2276 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2279 internal void SetOrientation(Radian angle, Vector3 axis)
2281 NDalicPINVOKE.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2282 if (NDalicPINVOKE.SWIGPendingException.Pending)
2283 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2286 internal void SetOrientation(Rotation orientation)
2288 NDalicPINVOKE.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
2289 if (NDalicPINVOKE.SWIGPendingException.Pending)
2290 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2293 internal void RotateBy(Degree angle, Vector3 axis)
2295 NDalicPINVOKE.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
2296 if (NDalicPINVOKE.SWIGPendingException.Pending)
2297 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2300 internal void RotateBy(Radian angle, Vector3 axis)
2302 NDalicPINVOKE.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
2303 if (NDalicPINVOKE.SWIGPendingException.Pending)
2304 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2307 internal void RotateBy(Rotation relativeRotation)
2309 NDalicPINVOKE.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
2310 if (NDalicPINVOKE.SWIGPendingException.Pending)
2311 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2314 internal Rotation GetCurrentOrientation()
2316 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentOrientation(swigCPtr), true);
2317 if (NDalicPINVOKE.SWIGPendingException.Pending)
2318 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2322 internal void SetInheritOrientation(bool inherit)
2324 NDalicPINVOKE.Actor_SetInheritOrientation(swigCPtr, inherit);
2325 if (NDalicPINVOKE.SWIGPendingException.Pending)
2326 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2329 internal bool IsOrientationInherited()
2331 bool ret = NDalicPINVOKE.Actor_IsOrientationInherited(swigCPtr);
2332 if (NDalicPINVOKE.SWIGPendingException.Pending)
2333 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2337 internal Rotation GetCurrentWorldOrientation()
2339 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentWorldOrientation(swigCPtr), true);
2340 if (NDalicPINVOKE.SWIGPendingException.Pending)
2341 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2345 internal void SetScale(float scale)
2347 NDalicPINVOKE.Actor_SetScale__SWIG_0(swigCPtr, scale);
2348 if (NDalicPINVOKE.SWIGPendingException.Pending)
2349 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2352 internal void SetScale(float scaleX, float scaleY, float scaleZ)
2354 NDalicPINVOKE.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
2355 if (NDalicPINVOKE.SWIGPendingException.Pending)
2356 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2359 internal void SetScale(Vector3 scale)
2361 NDalicPINVOKE.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
2362 if (NDalicPINVOKE.SWIGPendingException.Pending)
2363 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2366 internal void ScaleBy(Vector3 relativeScale)
2368 NDalicPINVOKE.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
2369 if (NDalicPINVOKE.SWIGPendingException.Pending)
2370 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2373 internal Vector3 GetCurrentScale()
2375 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentScale(swigCPtr), true);
2376 if (NDalicPINVOKE.SWIGPendingException.Pending)
2377 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2381 internal Vector3 GetCurrentWorldScale()
2383 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldScale(swigCPtr), true);
2384 if (NDalicPINVOKE.SWIGPendingException.Pending)
2385 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2389 internal void SetInheritScale(bool inherit)
2391 NDalicPINVOKE.Actor_SetInheritScale(swigCPtr, inherit);
2392 if (NDalicPINVOKE.SWIGPendingException.Pending)
2393 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2396 internal bool IsScaleInherited()
2398 bool ret = NDalicPINVOKE.Actor_IsScaleInherited(swigCPtr);
2399 if (NDalicPINVOKE.SWIGPendingException.Pending)
2400 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2404 internal Matrix GetCurrentWorldMatrix()
2406 Matrix ret = new Matrix(NDalicPINVOKE.Actor_GetCurrentWorldMatrix(swigCPtr), true);
2407 if (NDalicPINVOKE.SWIGPendingException.Pending)
2408 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2412 internal void SetVisible(bool visible)
2414 NDalicPINVOKE.Actor_SetVisible(swigCPtr, visible);
2415 if (NDalicPINVOKE.SWIGPendingException.Pending)
2416 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2419 internal bool IsVisible()
2421 bool ret = NDalicPINVOKE.Actor_IsVisible(swigCPtr);
2422 if (NDalicPINVOKE.SWIGPendingException.Pending)
2423 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2427 internal void SetOpacity(float opacity)
2429 NDalicPINVOKE.Actor_SetOpacity(swigCPtr, opacity);
2430 if (NDalicPINVOKE.SWIGPendingException.Pending)
2431 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2434 internal float GetCurrentOpacity()
2436 float ret = NDalicPINVOKE.Actor_GetCurrentOpacity(swigCPtr);
2437 if (NDalicPINVOKE.SWIGPendingException.Pending)
2438 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2442 internal void SetColor(Vector4 color)
2444 NDalicPINVOKE.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
2445 if (NDalicPINVOKE.SWIGPendingException.Pending)
2446 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2449 internal Vector4 GetCurrentColor()
2451 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentColor(swigCPtr), true);
2452 if (NDalicPINVOKE.SWIGPendingException.Pending)
2453 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2457 internal void SetColorMode(ColorMode colorMode)
2459 NDalicPINVOKE.Actor_SetColorMode(swigCPtr, (int)colorMode);
2460 if (NDalicPINVOKE.SWIGPendingException.Pending)
2461 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2464 internal ColorMode GetColorMode()
2466 ColorMode ret = (ColorMode)NDalicPINVOKE.Actor_GetColorMode(swigCPtr);
2467 if (NDalicPINVOKE.SWIGPendingException.Pending)
2468 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2472 internal Vector4 GetCurrentWorldColor()
2474 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentWorldColor(swigCPtr), true);
2475 if (NDalicPINVOKE.SWIGPendingException.Pending)
2476 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2480 internal void SetDrawMode(DrawModeType drawMode)
2482 NDalicPINVOKE.Actor_SetDrawMode(swigCPtr, (int)drawMode);
2483 if (NDalicPINVOKE.SWIGPendingException.Pending)
2484 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2487 internal DrawModeType GetDrawMode()
2489 DrawModeType ret = (DrawModeType)NDalicPINVOKE.Actor_GetDrawMode(swigCPtr);
2490 if (NDalicPINVOKE.SWIGPendingException.Pending)
2491 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2496 /// Converts screen coordinates into the view's coordinate system using the default camera.
2498 /// <pre>The View has been initialized.</pre>
2499 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5)</remarks>
2500 /// <param name="localX">On return, the X-coordinate relative to the view</param>
2501 /// <param name="localY">On return, the Y-coordinate relative to the view</param>
2502 /// <param name="screenX">The screen X-coordinate</param>
2503 /// <param name="screenY">The screen Y-coordinate</param>
2504 /// <returns>True if the conversion succeeded</returns>
2505 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
2507 bool ret = NDalicPINVOKE.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
2508 if (NDalicPINVOKE.SWIGPendingException.Pending)
2509 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2513 internal void SetKeyboardFocusable(bool focusable)
2515 NDalicPINVOKE.Actor_SetKeyboardFocusable(swigCPtr, focusable);
2516 if (NDalicPINVOKE.SWIGPendingException.Pending)
2517 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2520 internal bool IsKeyboardFocusable()
2522 bool ret = NDalicPINVOKE.Actor_IsKeyboardFocusable(swigCPtr);
2523 if (NDalicPINVOKE.SWIGPendingException.Pending)
2524 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2528 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
2530 NDalicPINVOKE.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
2531 if (NDalicPINVOKE.SWIGPendingException.Pending)
2532 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2535 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
2537 ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.Actor_GetResizePolicy(swigCPtr, (int)dimension);
2538 if (NDalicPINVOKE.SWIGPendingException.Pending)
2539 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2544 /// Sets the relative to parent size factor of the view.<br>
2545 /// This factor is only used when ResizePolicy is set to either:
2546 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br>
2547 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br>
2549 /// <pre>The View has been initialized.</pre>
2550 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis</param>
2551 public void SetSizeModeFactor(Vector3 factor)
2553 NDalicPINVOKE.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
2554 if (NDalicPINVOKE.SWIGPendingException.Pending)
2555 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2558 internal Vector3 GetSizeModeFactor()
2560 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetSizeModeFactor(swigCPtr), true);
2561 if (NDalicPINVOKE.SWIGPendingException.Pending)
2562 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2567 /// Calculates the height of the view given a width.<br>
2568 /// The natural size is used for default calculation. <br>
2569 /// size 0 is treated as aspect ratio 1:1.<br>
2571 /// <param name="width">Width to use</param>
2572 /// <returns>The height based on the width</returns>
2573 public float GetHeightForWidth(float width)
2575 float ret = NDalicPINVOKE.Actor_GetHeightForWidth(swigCPtr, width);
2576 if (NDalicPINVOKE.SWIGPendingException.Pending)
2577 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2582 /// Calculates the width of the view given a height.<br>
2583 /// The natural size is used for default calculation.<br>
2584 /// size 0 is treated as aspect ratio 1:1.<br>
2586 /// <param name="height">Height to use</param>
2587 /// <returns>The width based on the height</returns>
2588 public float GetWidthForHeight(float height)
2590 float ret = NDalicPINVOKE.Actor_GetWidthForHeight(swigCPtr, height);
2591 if (NDalicPINVOKE.SWIGPendingException.Pending)
2592 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2596 public float GetRelayoutSize(DimensionType dimension)
2598 float ret = NDalicPINVOKE.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
2599 if (NDalicPINVOKE.SWIGPendingException.Pending)
2600 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2604 public void SetPadding(PaddingType padding)
2606 NDalicPINVOKE.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
2607 if (NDalicPINVOKE.SWIGPendingException.Pending)
2608 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2611 public void GetPadding(PaddingType paddingOut)
2613 NDalicPINVOKE.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
2614 if (NDalicPINVOKE.SWIGPendingException.Pending)
2615 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2618 internal void SetMinimumSize(Vector2 size)
2620 NDalicPINVOKE.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
2621 if (NDalicPINVOKE.SWIGPendingException.Pending)
2622 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2625 internal Vector2 GetMinimumSize()
2627 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMinimumSize(swigCPtr), true);
2628 if (NDalicPINVOKE.SWIGPendingException.Pending)
2629 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2633 internal void SetMaximumSize(Vector2 size)
2635 NDalicPINVOKE.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
2636 if (NDalicPINVOKE.SWIGPendingException.Pending)
2637 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2640 internal Vector2 GetMaximumSize()
2642 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMaximumSize(swigCPtr), true);
2643 if (NDalicPINVOKE.SWIGPendingException.Pending)
2644 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2648 internal int GetHierarchyDepth()
2650 int ret = NDalicPINVOKE.Actor_GetHierarchyDepth(swigCPtr);
2651 if (NDalicPINVOKE.SWIGPendingException.Pending)
2652 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2656 public uint AddRenderer(Renderer renderer)
2658 uint ret = NDalicPINVOKE.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
2659 if (NDalicPINVOKE.SWIGPendingException.Pending)
2660 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2664 internal uint GetRendererCount()
2666 uint ret = NDalicPINVOKE.Actor_GetRendererCount(swigCPtr);
2667 if (NDalicPINVOKE.SWIGPendingException.Pending)
2668 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2672 public Renderer GetRendererAt(uint index)
2674 Renderer ret = new Renderer(NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index), true);
2675 if (NDalicPINVOKE.SWIGPendingException.Pending)
2676 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2680 public void RemoveRenderer(Renderer renderer)
2682 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
2683 if (NDalicPINVOKE.SWIGPendingException.Pending)
2684 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2687 public void RemoveRenderer(uint index)
2689 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
2690 if (NDalicPINVOKE.SWIGPendingException.Pending)
2691 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2694 internal TouchDataSignal TouchSignal()
2696 TouchDataSignal ret = new TouchDataSignal(NDalicPINVOKE.Actor_TouchSignal(swigCPtr), false);
2697 if (NDalicPINVOKE.SWIGPendingException.Pending)
2698 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2702 internal HoverSignal HoveredSignal()
2704 HoverSignal ret = new HoverSignal(NDalicPINVOKE.Actor_HoveredSignal(swigCPtr), false);
2705 if (NDalicPINVOKE.SWIGPendingException.Pending)
2706 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2710 internal WheelSignal WheelEventSignal()
2712 WheelSignal ret = new WheelSignal(NDalicPINVOKE.Actor_WheelEventSignal(swigCPtr), false);
2713 if (NDalicPINVOKE.SWIGPendingException.Pending)
2714 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2718 internal ViewSignal OnWindowSignal()
2720 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnStageSignal(swigCPtr), false);
2721 if (NDalicPINVOKE.SWIGPendingException.Pending)
2722 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2726 internal ViewSignal OffWindowSignal()
2728 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OffStageSignal(swigCPtr), false);
2729 if (NDalicPINVOKE.SWIGPendingException.Pending)
2730 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2734 internal ViewSignal OnRelayoutSignal()
2736 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnRelayoutSignal(swigCPtr), false);
2737 if (NDalicPINVOKE.SWIGPendingException.Pending)
2738 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2742 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view) {
2743 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
2744 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2748 internal ViewSignal ResourcesLoadedSignal()
2750 ViewSignal ret = new ViewSignal(NDalicPINVOKE.ResourceReadySignal(swigCPtr), false);
2751 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2756 /// Gets/Sets the origin of an view, within its parent's area.<br>
2757 /// 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>
2758 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br>
2759 /// An view's position is the distance between this origin, and the view's anchor-point.<br>
2761 /// <pre>The View has been initialized.</pre>
2762 public Position ParentOrigin
2766 Position temp = new Position(0.0f, 0.0f, 0.0f);
2767 GetProperty(View.Property.PARENT_ORIGIN).Get(temp);
2772 SetProperty(View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue(value));
2776 internal float ParentOriginX
2781 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
2786 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
2790 internal float ParentOriginY
2795 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
2800 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
2804 internal float ParentOriginZ
2809 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
2814 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
2819 /// Gets/Sets the anchor-point of an view.<br>
2820 /// 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>
2821 /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br>
2822 /// An view position is the distance between its parent-origin and this anchor-point.<br>
2823 /// An view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br>
2824 /// <pre>The View has been initialized.</pre>
2826 public Position PivotPoint
2830 Position temp = new Position(0.0f, 0.0f, 0.0f);
2831 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
2836 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
2840 internal float PivotPointX
2845 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
2850 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
2854 internal float PivotPointY
2859 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
2864 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
2868 internal float PivotPointZ
2873 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
2878 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
2883 /// Gets/Sets the size width of an view.
2885 public float SizeWidth
2890 GetProperty(View.Property.SIZE_WIDTH).Get(out temp);
2895 SetProperty(View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue(value));
2900 /// Gets/Sets the size height of an view.
2902 public float SizeHeight
2907 GetProperty(View.Property.SIZE_HEIGHT).Get(out temp);
2912 SetProperty(View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue(value));
2917 /// Gets/Sets the position of the View.<br>
2918 /// By default, sets the position vector between the parent origin and pivot point(default).<br>
2919 /// If Position inheritance if disabled, sets the world position.<br>
2921 public Position Position
2925 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
2926 GetProperty(View.Property.POSITION).Get(temp);
2931 SetProperty(View.Property.POSITION, new Tizen.NUI.PropertyValue(value));
2936 /// Gets/Sets the position x of the View.
2938 public float PositionX
2943 GetProperty(View.Property.POSITION_X).Get(out temp);
2948 SetProperty(View.Property.POSITION_X, new Tizen.NUI.PropertyValue(value));
2953 /// Gets/Sets the position y of the View.
2955 public float PositionY
2960 GetProperty(View.Property.POSITION_Y).Get(out temp);
2965 SetProperty(View.Property.POSITION_Y, new Tizen.NUI.PropertyValue(value));
2970 /// Gets/Sets the position z of the View.
2972 public float PositionZ
2977 GetProperty(View.Property.POSITION_Z).Get(out temp);
2982 SetProperty(View.Property.POSITION_Z, new Tizen.NUI.PropertyValue(value));
2987 /// Gets/Sets the world position of the View.
2989 public Vector3 WorldPosition
2993 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
2994 GetProperty(View.Property.WORLD_POSITION).Get(temp);
2999 internal float WorldPositionX
3004 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
3009 internal float WorldPositionY
3014 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
3019 internal float WorldPositionZ
3024 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
3030 /// Gets/Sets the orientation of the View.<br>
3031 /// An view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br>
3033 /// <remarks>This is an asynchronous method.</remarks>
3034 public Rotation Orientation
3038 Rotation temp = new Rotation();
3039 GetProperty(View.Property.ORIENTATION).Get(temp);
3044 SetProperty(View.Property.ORIENTATION, new Tizen.NUI.PropertyValue(value));
3049 /// Gets/Sets the world orientation of the View.<br>
3051 public Rotation WorldOrientation
3055 Rotation temp = new Rotation();
3056 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
3062 /// Gets/Sets the scale factor applied to an view.<br>
3064 public Vector3 Scale
3068 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3069 GetProperty(View.Property.SCALE).Get(temp);
3074 SetProperty(View.Property.SCALE, new Tizen.NUI.PropertyValue(value));
3079 /// Gets/Sets the scale x factor applied to an view.
3086 GetProperty(View.Property.SCALE_X).Get(out temp);
3091 SetProperty(View.Property.SCALE_X, new Tizen.NUI.PropertyValue(value));
3096 /// Gets/Sets the scale y factor applied to an view.
3103 GetProperty(View.Property.SCALE_Y).Get(out temp);
3108 SetProperty(View.Property.SCALE_Y, new Tizen.NUI.PropertyValue(value));
3113 /// Gets/Sets the scale z factor applied to an view.
3120 GetProperty(View.Property.SCALE_Z).Get(out temp);
3125 SetProperty(View.Property.SCALE_Z, new Tizen.NUI.PropertyValue(value));
3130 /// Gets the world scale of View.
3132 public Vector3 WorldScale
3136 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3137 GetProperty(View.Property.WORLD_SCALE).Get(temp);
3143 /// Retrieves the visibility flag of an view.
3146 /// If an view is not visible, then the view and its children will not be rendered.
3147 /// 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.
3154 GetProperty(View.Property.VISIBLE).Get(out temp);
3156 }/* only get is required : removed
3159 SetProperty(View.Property.VISIBLE, new Tizen.NUI.PropertyValue(value));
3164 /// Gets the view's world color.
3166 public Vector4 WorldColor
3170 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3171 GetProperty(View.Property.WORLD_COLOR).Get(temp);
3176 internal Matrix WorldMatrix
3180 Matrix temp = new Matrix();
3181 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
3187 /// Gets/Sets the View's name.
3194 GetProperty(View.Property.NAME).Get(out temp);
3199 SetProperty(View.Property.NAME, new Tizen.NUI.PropertyValue(value));
3204 /// Get the number of children held by the view.
3206 public uint ChildCount
3210 return GetChildCount();
3215 /// Gets the View's ID.
3227 /// Gets/Sets the status of whether an view should emit touch or hover signals.
3229 public bool Sensitive
3234 GetProperty(View.Property.SENSITIVE).Get(out temp);
3239 SetProperty(View.Property.SENSITIVE, new Tizen.NUI.PropertyValue(value));
3244 /// Gets/Sets the status of whether the view should receive a notification when touch or hover motion events leave the boundary of the view.
3246 public bool LeaveRequired
3251 GetProperty(View.Property.LEAVE_REQUIRED).Get(out temp);
3256 SetProperty(View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue(value));
3261 /// Gets/Sets the status of whether a child view inherits it's parent's orientation.
3263 public bool InheritOrientation
3268 GetProperty(View.Property.INHERIT_ORIENTATION).Get(out temp);
3273 SetProperty(View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue(value));
3278 /// Gets/Sets the status of whether a child view inherits it's parent's scale.
3280 public bool InheritScale
3285 GetProperty(View.Property.INHERIT_SCALE).Get(out temp);
3290 SetProperty(View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue(value));
3295 /// Gets/Sets the status of how the view and its children should be drawn.<br>
3296 /// Not all views are renderable, but DrawMode can be inherited from any view.<br>
3297 /// 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>
3298 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br>
3299 /// Overlay views are drawn in a separate pass, after all non-overlay views within the Layer.<br>
3300 /// For overlay views, the drawing order is with respect to tree levels of Views, and depth-testing will not be used.<br>
3302 public DrawModeType DrawMode
3307 if (GetProperty(View.Property.DRAW_MODE).Get(out temp) == false)
3310 Tizen.Log.Error("NUI", "DrawMode get error!");
3316 return DrawModeType.Normal;
3318 return DrawModeType.Overlay2D;
3320 return DrawModeType.Stencil;
3322 return DrawModeType.Normal;
3327 SetProperty(View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)value));
3332 /// Gets/Sets the relative to parent size factor of the view.<br>
3333 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br>
3334 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br>
3336 public Vector3 SizeModeFactor
3340 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
3341 GetProperty(View.Property.SIZE_MODE_FACTOR).Get(temp);
3346 SetProperty(View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue(value));
3351 /// Gets/Sets the width resize policy to be used.
3353 public ResizePolicyType WidthResizePolicy
3358 if (GetProperty(View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
3361 Tizen.Log.Error("NUI", "WidthResizePolicy get error!");
3367 return ResizePolicyType.Fixed;
3368 case "USE_NATURAL_SIZE":
3369 return ResizePolicyType.UseNaturalSize;
3370 case "FILL_TO_PARENT":
3371 return ResizePolicyType.FillToParent;
3372 case "SIZE_RELATIVE_TO_PARENT":
3373 return ResizePolicyType.SizeRelativeToParent;
3374 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3375 return ResizePolicyType.SizeFixedOffsetFromParent;
3376 case "FIT_TO_CHILDREN":
3377 return ResizePolicyType.FitToChildren;
3378 case "DIMENSION_DEPENDENCY":
3379 return ResizePolicyType.DimensionDependency;
3380 case "USE_ASSIGNED_SIZE":
3381 return ResizePolicyType.UseAssignedSize;
3383 return ResizePolicyType.Fixed;
3388 SetProperty(View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3393 /// Gets/Sets the height resize policy to be used.
3395 public ResizePolicyType HeightResizePolicy
3400 if (GetProperty(View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
3403 Tizen.Log.Error("NUI", "HeightResizePolicy get error!");
3409 return ResizePolicyType.Fixed;
3410 case "USE_NATURAL_SIZE":
3411 return ResizePolicyType.UseNaturalSize;
3412 case "FILL_TO_PARENT":
3413 return ResizePolicyType.FillToParent;
3414 case "SIZE_RELATIVE_TO_PARENT":
3415 return ResizePolicyType.SizeRelativeToParent;
3416 case "SIZE_FIXED_OFFSET_FROM_PARENT":
3417 return ResizePolicyType.SizeFixedOffsetFromParent;
3418 case "FIT_TO_CHILDREN":
3419 return ResizePolicyType.FitToChildren;
3420 case "DIMENSION_DEPENDENCY":
3421 return ResizePolicyType.DimensionDependency;
3422 case "USE_ASSIGNED_SIZE":
3423 return ResizePolicyType.UseAssignedSize;
3425 return ResizePolicyType.Fixed;
3430 SetProperty(View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)value));
3435 /// Gets/Sets the policy to use when setting size with size negotiation.<br>
3436 /// Defaults to SizeScalePolicyType.UseSizeSet.<br>
3438 public SizeScalePolicyType SizeScalePolicy
3443 if (GetProperty(View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
3446 Tizen.Log.Error("NUI", "SizeScalePolicy get error!");
3451 case "USE_SIZE_SET":
3452 return SizeScalePolicyType.UseSizeSet;
3453 case "FIT_WITH_ASPECT_RATIO":
3454 return SizeScalePolicyType.FitWithAspectRatio;
3455 case "FILL_WITH_ASPECT_RATIO":
3456 return SizeScalePolicyType.FillWithAspectRatio;
3458 return SizeScalePolicyType.UseSizeSet;
3463 string valueToString = "";
3466 case SizeScalePolicyType.UseSizeSet:
3468 valueToString = "USE_SIZE_SET";
3471 case SizeScalePolicyType.FitWithAspectRatio:
3473 valueToString = "FIT_WITH_ASPECT_RATIO";
3476 case SizeScalePolicyType.FillWithAspectRatio:
3478 valueToString = "FILL_WITH_ASPECT_RATIO";
3483 valueToString = "USE_SIZE_SET";
3487 SetProperty(View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
3492 /// Gets/Sets the status of whether the width size is dependent on height size.
3494 public bool WidthForHeight
3499 GetProperty(View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
3504 SetProperty(View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue(value));
3509 /// Gets/Sets the status of whether the height size is dependent on width size.
3511 public bool HeightForWidth
3516 GetProperty(View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
3521 SetProperty(View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue(value));
3526 /// Gets/Sets the padding for use in layout.
3528 public Vector4 Padding
3532 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
3533 GetProperty(View.Property.PADDING).Get(temp);
3538 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
3543 /// Gets/Sets the minimum size an view can be assigned in size negotiation.
3545 public Size2D MinimumSize
3549 Size2D temp = new Size2D(0, 0);
3550 GetProperty(View.Property.MINIMUM_SIZE).Get(temp);
3555 SetProperty(View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3560 /// Gets/Sets the maximum size an view can be assigned in size negotiation.
3562 public Size2D MaximumSize
3566 Size2D temp = new Size2D(0, 0);
3567 GetProperty(View.Property.MAXIMUM_SIZE).Get(temp);
3572 SetProperty(View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue(value));
3577 /// Gets/Sets whether a child view inherits it's parent's position.<br>
3578 /// Default is to inherit.<br>
3579 /// 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>
3581 public bool InheritPosition
3586 GetProperty(View.Property.INHERIT_POSITION).Get(out temp);
3591 SetProperty(View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue(value));
3596 /// Gets/Sets clipping behavior(mode) of it's children.
3598 public ClippingModeType ClippingMode
3603 if (GetProperty(View.Property.CLIPPING_MODE).Get(out temp) == false)
3606 Tizen.Log.Error("NUI", "ClippingMode get error!");
3612 return ClippingModeType.Disabled;
3613 case "CLIP_CHILDREN":
3614 return ClippingModeType.ClipChildren;
3616 return ClippingModeType.Disabled;
3621 SetProperty(View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)value));
3626 /// Get the number of renderers held by the view.
3628 public uint RendererCount
3632 return GetRendererCount();