/// <summary>
/// View is the base class for all views.
/// </summary>
- public class View : Animatable //CustomActor => Animatable
+ public class View : Container
{
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
internal View(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.View_SWIGUpcast(cPtr), cMemoryOwn)
{
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
-
- // Register this instance of view in the view registry.
- ViewRegistry.RegisterView(this);
+ PositionUsesPivotPoint = false;
}
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
}
+ // From Container Base class
+
+ /// <summary>
+ /// Adds a child view to this View.
+ /// </summary>
+ /// <seealso cref="Container::Add()">
+ /// </seealso>
+ public override void Add(View child)
+ {
+ NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Removes a child View from this View. If the view was not a child of this view, this is a no-op.
+ /// </summary>
+ /// <seealso cref="Container::Remove()">
+ /// </seealso>
+ public override void Remove(View child)
+ {
+ NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Retrieves child view by index.
+ /// </summary>
+ /// <seealso cref="Container::GetChildAt()">
+ /// </seealso>
+ public override View GetChildAt(uint index)
+ {
+ IntPtr cPtr = NDalicPINVOKE.Actor_GetChildAt(swigCPtr, index);
+
+ View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
+
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret ?? null;
+ }
+
+ /// <summary>
+ /// Retrieves the number of children held by the view.
+ /// </summary>
+ /// <seealso cref="Container::GetChildCount()">
+ /// </seealso>
+ protected override uint GetChildCount()
+ {
+ uint ret = NDalicPINVOKE.Actor_GetChildCount(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// Get the Views parent
+ /// </summary>
+ /// <seealso cref="Container::GetParent()">
+
+ protected override Container GetParent()
+ {
+ Container ret;
+ IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
+
+ BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(cPtr);
+
+ if(basehandle is Layer)
+ {
+ ret = basehandle as Layer;
+ }
+ else
+ {
+ ret = basehandle as View;
+ }
+
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ ///
+
// you can override it to clean-up your own resources.
protected override void Dispose(DisposeTypes type)
{
//You should not access any managed member here except static instance.
//because the execution order of Finalizes is non-deterministic.
- //Unreference this from if a static instance refer to this.
- ViewRegistry.UnregisterView(this);
+ if (_onRelayoutEventCallback != null)
+ {
+ this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
+ }
+
+ if (_offWindowEventCallback != null)
+ {
+ this.OffWindowSignal().Disconnect(_offWindowEventCallback);
+ }
+
+ if (_onWindowEventCallback != null)
+ {
+ this.OnWindowSignal().Disconnect(_onWindowEventCallback);
+ }
+
+ if (_wheelEventCallback != null)
+ {
+ this.WheelEventSignal().Disconnect(_wheelEventCallback);
+ }
+
+ if (_hoverEventCallback != null)
+ {
+ this.HoveredSignal().Disconnect(_hoverEventCallback);
+ }
+
+ if (_touchDataCallback != null)
+ {
+ this.TouchSignal().Disconnect(_touchDataCallback);
+ }
+
+ if (_ResourcesLoadedCallback != null)
+ {
+ this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
+ }
+
+ if (_offWindowEventCallback != null)
+ {
+ this.OffWindowSignal().Disconnect(_offWindowEventCallback);
+ }
+
+ if (_onWindowEventCallback != null)
+ {
+ this.OnWindowSignal().Disconnect(_onWindowEventCallback);
+ }
+
+ if (_wheelEventCallback != null)
+ {
+ this.WheelEventSignal().Disconnect(_wheelEventCallback);
+ }
+
+ if (_hoverEventCallback != null)
+ {
+ this.HoveredSignal().Disconnect(_hoverEventCallback);
+ }
+
+ if (_touchDataCallback != null)
+ {
+ this.TouchSignal().Disconnect(_touchDataCallback);
+ }
+
+ if (_onRelayoutEventCallback != null)
+ {
+ this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
+ }
+
+ if (_keyCallback != null)
+ {
+ this.KeyEventSignal().Disconnect(_keyCallback);
+ }
+
+ if (_keyInputFocusLostCallback != null)
+ {
+ this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
+ }
+
+ if (_keyInputFocusGainedCallback != null)
+ {
+ this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
+ }
if (swigCPtr.Handle != global::System.IntPtr.Zero)
{
/// Event for KeyPressed signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
/// KeyPressed signal is emitted when key event is received.<br>
/// </summary>
- public event EventHandlerWithReturnType<object, KeyEventArgs, bool> Key
+ public event EventHandlerWithReturnType<object, KeyEventArgs, bool> KeyEvent
{
add
{
{
KeyEventArgs e = new KeyEventArgs();
+ bool result = false;
+
e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
if (_keyEventHandler != null)
{
- return _keyEventHandler(this, e);
+ Delegate[] delegateList = _keyEventHandler.GetInvocationList();
+
+ // Oring the result of each callback.
+ foreach ( EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList )
+ {
+ result |= del( this, e );
+ }
}
- return false;
- }
+ return result;
+ }
private EventHandler _onRelayoutEventHandler;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
/// <summary>
/// Event arguments that passed via Touch signal.
/// </summary>
- public class TouchedEventArgs : EventArgs
+ public class TouchEventArgs : EventArgs
{
private Touch _touch;
}
}
- private EventHandlerWithReturnType<object, TouchedEventArgs, bool> _touchDataEventHandler;
+ private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
private TouchDataCallbackType _touchDataCallback;
/// Event for Touched signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
/// Touched signal is emitted when touch input is received.<br>
/// </summary>
- public event EventHandlerWithReturnType<object, TouchedEventArgs, bool> Touched
+ public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
{
add
{
// Callback for View TouchSignal
private bool OnTouch(IntPtr view, IntPtr touchData)
{
- TouchedEventArgs e = new TouchedEventArgs();
+ TouchEventArgs e = new TouchEventArgs();
e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
/// <summary>
/// Event arguments that passed via Hover signal.
/// </summary>
- public class HoveredEventArgs : EventArgs
+ public class HoverEventArgs : EventArgs
{
private Hover _hover;
}
}
- private EventHandlerWithReturnType<object, HoveredEventArgs, bool> _hoverEventHandler;
+ private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
private HoverEventCallbackType _hoverEventCallback;
/// Event for Hovered signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
/// Hovered signal is emitted when hover input is received.<br>
/// </summary>
- public event EventHandlerWithReturnType<object, HoveredEventArgs, bool> Hovered
+ public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
{
add
{
// Callback for View Hover signal
private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
{
- HoveredEventArgs e = new HoveredEventArgs();
+ HoverEventArgs e = new HoverEventArgs();
e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
/// <summary>
/// Event arguments that passed via Wheel signal.
/// </summary>
- public class WheelRolledEventArgs : EventArgs
+ public class WheelEventArgs : EventArgs
{
private Wheel _wheel;
}
}
- private EventHandlerWithReturnType<object, WheelRolledEventArgs, bool> _wheelEventHandler;
+ private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
private WheelEventCallbackType _wheelEventCallback;
/// Event for WheelMoved signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
/// WheelMoved signal is emitted when wheel event is received.<br>
/// </summary>
- public event EventHandlerWithReturnType<object, WheelRolledEventArgs, bool> WheelRolled
+ public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
{
add
{
// Callback for View Wheel signal
private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
{
- WheelRolledEventArgs e = new WheelRolledEventArgs();
+ WheelEventArgs e = new WheelEventArgs();
e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
if (data != null)
{
- e.View = View.GetViewFromPtr(data);
+ e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
}
e.Visibility = visibility;
e.Type = type;
}
}
-
- internal static View GetViewFromPtr(global::System.IntPtr cPtr)
- {
- View ret = new View(cPtr, false);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
-
internal IntPtr GetPtrfromView()
{
return (IntPtr)swigCPtr;
/// </summary>
public View() : this(NDalicPINVOKE.View_New(), true)
{
- PositionUsesAnchorPoint = false;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
/// </summary>
/// <param name="handle">Handle to an object</param>
/// <returns>A handle to a View or an uninitialized handle</returns>
+ [Obsolete("Please do not use! this will be deprecated, instead please use as keyword.")]
public new static View DownCast(BaseHandle handle)
{
- View ret = new View(NDalicPINVOKE.View_DownCast(BaseHandle.getCPtr(handle)), true);
+ View ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as View;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
- /// <summary>
- /// Downcasts a handle to class which inherit View handle.
- /// </summary>
- /// <typeparam name="T">Class which inherit View</typeparam>
- /// <param name="view">View to an object</param>
- /// <returns>A object which inherit View</returns>
+ [Obsolete("Please do not use! this will be deprecated, instead please use as keyword.")]
public static T DownCast<T>(View view) where T : View
{
- View ret = ViewRegistry.GetViewFromBaseHandle(view);
+ T ret = Registry.GetManagedBaseHandleFromNativePtr(view) as T;
if (ret != null)
{
- return (T)ret;
+ return ret;
}
return null;
}
{
View view = null;
- if (Parent)
+ if (Parent is View)
{
- view = Parent.FindChildById(id);
+ View parentView = Parent as View;
+ view = parentView.FindChildById(id);
}
if (!view)
int temp = 0;
if (GetProperty(View.Property.STATE).Get(out temp) == false)
{
-#if DEBUG_ON
- Tizen.Log.Error("NUI", "State get error!");
-#endif
+ NUILog.Error("State get error!");
}
switch (temp)
{
string temp;
if (GetProperty(View.Property.SUB_STATE).Get(out temp) == false)
{
-#if DEBUG_ON
- Tizen.Log.Error("NUI", "subState get error!");
-#endif
+ NUILog.Error("subState get error!");
}
switch (temp)
{
string temp;
if (GetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
{
-#if DEBUG_ON
- Tizen.Log.Error("NUI", "CellHorizontalAlignment get error!");
-#endif
+ NUILog.Error("CellHorizontalAlignment get error!");
}
switch (temp)
string temp;
GetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
{
-#if DEBUG_ON
- Tizen.Log.Error("NUI", "CellVerticalAlignment get error!");
-#endif
+ NUILog.Error("CellVerticalAlignment get error!");
}
switch (temp)
}
}
- public bool Visibility
+ [Obsolete("Please do not use! this will be deprecated. Please use Visibility instead.")]
+ public bool Visible
{
get
{
/// <summary>
/// Sets the position of the View for X and Y.<br>
- /// By default, sets the position vector between the parent origin and anchor point(default).<br>
+ /// By default, sets the position vector between the parent origin and pivot point(default).<br>
/// If Position inheritance if disabled, sets the world position.<br>
/// </summary>
public Position2D Position2D
}
/// <summary>
- /// Determines whether the anchor point should be used to determine the position of the view.
+ /// Determines whether the pivot point should be used to determine the position of the view.
/// This is true by default.
/// </summary>
/// <remarks>If false, then the top-left of the view is used for the position.
/// Setting this to false will allow scaling or rotation around the anchor-point without affecting the view's position.
/// </remarks>
+ public bool PositionUsesPivotPoint
+ {
+ get
+ {
+ bool temp = false;
+ GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
+ return temp;
+ }
+ set
+ {
+ SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
+ }
+ }
+
+ [Obsolete("Please do not use! this will be deprecated")]
public bool PositionUsesAnchorPoint
{
get
}
/// <summary>
- /// Gets the natural size of the view.<br>
+ /// Returns the natural size of the view.
/// </summary>
/// <remarks>
- /// Readonly.
+ /// Deriving classes stipulate the natural size and by default a view has a ZERO natural size.
/// </remarks>
- internal Vector3 NaturalSize
+ [Obsolete("Please do not use! this will be deprecated, please use NaturalSize2D instead")]
+ public Vector3 NaturalSize
{
get
{
}
/// <summary>
+ /// Returns the natural size (Size2D) of the view.
+ /// </summary>
+ /// <remarks>
+ /// Deriving classes stipulate the natural size and by default a view has a ZERO natural size.
+ /// </remarks>
+ public Size2D NaturalSize2D
+ {
+ get
+ {
+ Vector3 temp = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+
+ return new Size2D((int)temp.Width, (int)temp.Height);
+ }
+ }
+
+ /// <summary>
/// Shows the View.
/// </summary>
/// <remarks>
internal Layer GetLayer()
{
- Layer ret = new Layer(NDalicPINVOKE.Actor_GetLayer(swigCPtr), true);
- if (NDalicPINVOKE.SWIGPendingException.Pending)
- throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
+ IntPtr cPtr = NDalicPINVOKE.Actor_GetLayer(swigCPtr);
+ Layer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Layer;
- /// <summary>
- /// Adds a child view to this View.
- /// </summary>
- /// <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>
- /// <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>
- /// <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>
- /// <param name="child">The child</param>
- public void Add(View child)
- {
- NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
}
/// <summary>
- /// Removes a child View from this View. If the view was not a child of this view, this is a no-op.
+ /// Removes a View from its Parent View / Layer. If the View has no parent, this method does nothing.
/// </summary>
- /// <pre>This View(the parent) has been initialized. The child view is not the same as the parent view.</pre>
- /// <param name="child">The child</param>
- public void Remove(View child)
- {
- NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
- if (NDalicPINVOKE.SWIGPendingException.Pending)
- throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
- internal void Unparent()
+ /// <pre>The (child) View has been initialized. </pre>
+ public void Unparent()
{
NDalicPINVOKE.Actor_Unparent(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending)
}
/// <summary>
- /// Retrieves the number of children held by the view.
+ /// Search through this view's hierarchy for an view with the given name.
+ /// The view itself is also considered in the search.
/// </summary>
/// <pre>The View has been initialized.</pre>
- /// <returns>The number of children</returns>
- internal uint GetChildCount()
+ /// <param name="viewName">The name of the view to find</param>
+ /// <returns>A handle to the view if found, or an empty handle if not</returns>
+ public View FindChildByName(string viewName)
{
- uint ret = NDalicPINVOKE.Actor_GetChildCount(swigCPtr);
+ IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
+
+ View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
+
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
- /// <summary>
- /// Retrieves child view by index.
- /// </summary>
- /// <pre>The View has been initialized.</pre>
- /// <param name="index">The index of the child to retrieve</param>
- /// <returns>The view for the given index or empty handle if children not initialized</returns>
- public View GetChildAt(uint index)
+ internal View FindChildById(uint id)
{
- IntPtr cPtr = NDalicPINVOKE.Actor_GetChildAt(swigCPtr, index);
- cPtr = NDalicPINVOKE.View_SWIGUpcast(cPtr);
- cPtr = NDalicPINVOKE.Handle_SWIGUpcast(cPtr);
-
- BaseHandle ret = new BaseHandle(cPtr, false);
+ IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
- View temp = ViewRegistry.GetViewFromBaseHandle(ret);
+ View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-
- return temp ?? null;
- }
-
- /// <summary>
- /// Search through this view's hierarchy for an view with the given name.
- /// The view itself is also considered in the search.
- /// </summary>
- /// <pre>The View has been initialized.</pre>
- /// <param name="viewName">The name of the view to find</param>
- /// <returns>A handle to the view if found, or an empty handle if not</returns>
- public View FindChildByName(string viewName)
- {
- View ret = new View(NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName), true);
- if (NDalicPINVOKE.SWIGPendingException.Pending)
- throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
- internal View FindChildById(uint id)
+ /*internal View GetParent()
{
- View ret = new View(NDalicPINVOKE.Actor_FindChildById(swigCPtr, id), true);
+ View ret;
+ IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
+
+ BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(cPtr);
+
+ if(basehandle is Layer)
+ {
+ ret = new View(cPtr,false);
+ }
+ else
+ {
+ ret = basehandle as View;
+ }
+
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
- }
+ }*/
internal View GetParent()
{
- View ret = new View(NDalicPINVOKE.Actor_GetParent(swigCPtr), true);
+ View ret;
+ IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
+
+ BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(cPtr);
+
+ if(basehandle is Layer)
+ {
+ View ret2 = new View(cPtr,false);
+ return ret2;
+ }
+
+ ret = basehandle as View;
+
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
public Renderer GetRendererAt(uint index)
{
- Renderer ret = new Renderer(NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index), true);
+ IntPtr cPtr = NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index);
+ Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Renderer;
+
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
/// <summary>
/// Gets/Sets the anchor-point of an view.<br>
/// 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>
- /// The default anchor point is AnchorPoint.Center (0.5, 0.5, 0.5).<br>
+ /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br>
/// An view position is the distance between its parent-origin and this anchor-point.<br>
/// An view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br>
/// <pre>The View has been initialized.</pre>
/// <summary>
/// Gets/Sets the position of the View.<br>
- /// By default, sets the position vector between the parent origin and anchor point(default).<br>
+ /// By default, sets the position vector between the parent origin and pivot point(default).<br>
/// If Position inheritance if disabled, sets the world position.<br>
/// </summary>
public Position Position
/// If an view is not visible, then the view and its children will not be rendered.
/// 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.
/// </remarks>
- public bool Visible
+ public bool Visibility
{
get
{
bool temp = false;
GetProperty(View.Property.VISIBLE).Get(out temp);
return temp;
- }/* only get is required : removed
- set
- {
- SetProperty(View.Property.VISIBLE, new Tizen.NUI.PropertyValue(value));
- }*/
+ }
}
/// <summary>
}
/// <summary>
- /// Get the number of children held by the view.
- /// </summary>
- public uint ChildCount
- {
- get
- {
- return GetChildCount();
- }
- }
-
- /// <summary>
/// Gets the View's ID.
/// Readonly
/// </summary>
string temp;
if (GetProperty(View.Property.DRAW_MODE).Get(out temp) == false)
{
-#if DEBUG_ON
- Tizen.Log.Error("NUI", "DrawMode get error!");
-#endif
+ NUILog.Error("DrawMode get error!");
}
switch (temp)
{
string temp;
if (GetProperty(View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
{
-#if DEBUG_ON
- Tizen.Log.Error("NUI", "WidthResizePolicy get error!");
-#endif
+ NUILog.Error("WidthResizePolicy get error!");
}
switch (temp)
{
string temp;
if (GetProperty(View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
{
-#if DEBUG_ON
- Tizen.Log.Error("NUI", "HeightResizePolicy get error!");
-#endif
+ NUILog.Error("HeightResizePolicy get error!");
}
switch (temp)
{
string temp;
if (GetProperty(View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
{
-#if DEBUG_ON
- Tizen.Log.Error("NUI", "SizeScalePolicy get error!");
-#endif
+ NUILog.Error("SizeScalePolicy get error!");
}
switch (temp)
{
/// <summary>
/// Gets/Sets whether a child view inherits it's parent's position.<br>
/// Default is to inherit.<br>
- /// 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>
+ /// 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>
/// </summary>
public bool InheritPosition
{
string temp;
if (GetProperty(View.Property.CLIPPING_MODE).Get(out temp) == false)
{
-#if DEBUG_ON
- Tizen.Log.Error("NUI", "ClippingMode get error!");
-#endif
+ NUILog.Error("ClippingMode get error!");
}
switch (temp)
{
return GetRendererCount();
}
}
+
+
+
+
+ [Obsolete("Please do not use! this will be deprecated")]
+ public event EventHandlerWithReturnType<object, TouchEventArgs, bool> Touched
+ {
+ add
+ {
+ if (_touchDataEventHandler == null)
+ {
+ _touchDataCallback = OnTouch;
+ this.TouchSignal().Connect(_touchDataCallback);
+ }
+
+ _touchDataEventHandler += value;
+ }
+
+ remove
+ {
+ _touchDataEventHandler -= value;
+
+ if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
+ {
+ this.TouchSignal().Disconnect(_touchDataCallback);
+ }
+
+ }
+ }
+
+ [Obsolete("Please do not use! this will be deprecated")]
+ public event EventHandlerWithReturnType<object, HoverEventArgs, bool> Hovered
+ {
+ add
+ {
+ if (_hoverEventHandler == null)
+ {
+ _hoverEventCallback = OnHoverEvent;
+ this.HoveredSignal().Connect(_hoverEventCallback);
+ }
+
+ _hoverEventHandler += value;
+ }
+
+ remove
+ {
+ _hoverEventHandler -= value;
+
+ if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
+ {
+ this.HoveredSignal().Disconnect(_hoverEventCallback);
+ }
+
+ }
+ }
+
+ [Obsolete("Please do not use! this will be deprecated")]
+ public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelMoved
+ {
+ add
+ {
+ if (_wheelEventHandler == null)
+ {
+ _wheelEventCallback = OnWheelEvent;
+ this.WheelEventSignal().Connect(_wheelEventCallback);
+ }
+
+ _wheelEventHandler += value;
+ }
+
+ remove
+ {
+ _wheelEventHandler -= value;
+
+ if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
+ {
+ this.WheelEventSignal().Disconnect(_wheelEventCallback);
+ }
+
+ }
+ }
+
+ [Obsolete("Please do not use! this will be deprecated")]
+ public Position AnchorPoint
+ {
+ get
+ {
+ Position temp = new Position(0.0f, 0.0f, 0.0f);
+ GetProperty(View.Property.ANCHOR_POINT).Get(temp);
+ return temp;
+ }
+ set
+ {
+ SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
+ }
+ }
+
+ [Obsolete("Please do not use! this will be deprecated, please use Size2D instead")]
+ public Size Size
+ {
+ get
+ {
+ Size temp = new Size(0.0f, 0.0f, 0.0f);
+ GetProperty(View.Property.SIZE).Get(temp);
+ return temp;
+ }
+ set
+ {
+ SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(value));
+ }
+ }
+
+ [Obsolete("Please do not use! this will be deprecated")]
+ public event EventHandler OnWindowEvent
+ {
+ add
+ {
+ if (_onWindowEventHandler == null)
+ {
+ _onWindowEventCallback = OnWindow;
+ this.OnWindowSignal().Connect(_onWindowEventCallback);
+ }
+
+ _onWindowEventHandler += value;
+ }
+
+ remove
+ {
+ _onWindowEventHandler -= value;
+
+ if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
+ {
+ this.OnWindowSignal().Disconnect(_onWindowEventCallback);
+ }
+ }
+ }
+
+ [Obsolete("Please do not use! this will be deprecated")]
+ public event EventHandler OffWindowEvent
+ {
+ add
+ {
+ if (_offWindowEventHandler == null)
+ {
+ _offWindowEventCallback = OffWindow;
+ this.OffWindowSignal().Connect(_offWindowEventCallback);
+ }
+
+ _offWindowEventHandler += value;
+ }
+
+ remove
+ {
+ _offWindowEventHandler -= value;
+
+ if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
+ {
+ this.OffWindowSignal().Disconnect(_offWindowEventCallback);
+ }
+ }
+ }
+
+ [Obsolete("Please do not use! this will be deprecated")]
+ public event EventHandler OnRelayoutEvent
+ {
+ add
+ {
+ if (_onRelayoutEventHandler == null)
+ {
+ _onRelayoutEventCallback = OnRelayout;
+ this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
+ }
+
+ _onRelayoutEventHandler += value;
+ }
+
+ remove
+ {
+ _onRelayoutEventHandler -= value;
+
+ if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
+ {
+ this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
+ }
+
+ }
+ }
+
+
+
+
}
}