{
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>
/// <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 us as keyword.")]
+ [Obsolete("Please do not use! this will be deprecated, instead please use as keyword.")]
public new static View DownCast(BaseHandle handle)
{
View ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as View;
return ret;
}
- [Obsolete("Please do not use! this will be deprecated, instead please us as keyword.")]
+ [Obsolete("Please do not use! this will be deprecated, instead please use as keyword.")]
public static T DownCast<T>(View view) where T : View
{
T ret = Registry.GetManagedBaseHandleFromNativePtr(view) as T;
}
}
- public bool Visibility
+ /// <summary>
+ /// Retrieves the view's parent.<br>
+ /// </summary>
+ public View Parent
+ {
+ get
+ {
+ return GetParent();
+ }
+ }
+
+ [Obsolete("Please do not use! this will be deprecated. Please use Visibility instead.")]
+ public bool Visible
{
get
{
}
}
- [Obsolete("Please do not use! this will be internal property")]
+ /// <summary>
+ /// Returns the natural size of the view.
+ /// </summary>
+ /// <remarks>
+ /// Deriving classes stipulate the natural size and by default a view has a ZERO natural size.
+ /// </remarks>
+ [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>
return ret;
}
+ /*internal View GetParent()
+ {
+ 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;
+ 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;
+ }
+
internal void SetParentOrigin(Vector3 origin)
{
NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
/// 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>
}
}
- [Obsolete("Please do not use! this will be deprecated")]
+ [Obsolete("Please do not use! this will be deprecated, please use Size2D instead")]
public Size Size
{
get