X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2FTizen.NUI%2Fsrc%2Fpublic%2FBaseComponents%2FView.cs;h=15d421fb8deea9a5bc6c01fc49e34838ddb87382;hb=adb636bd7ce4547374b6451672efb27ca8dc6f7e;hp=4f9a003045bdbf6fd1bf20e3691dc5a7c4ef96ad;hpb=9949fb60f68361cee6f5918da567ec449db23455;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git
diff --git a/src/Tizen.NUI/src/public/BaseComponents/View.cs b/src/Tizen.NUI/src/public/BaseComponents/View.cs
index 4f9a003..15d421f 100755
--- a/src/Tizen.NUI/src/public/BaseComponents/View.cs
+++ b/src/Tizen.NUI/src/public/BaseComponents/View.cs
@@ -32,7 +32,10 @@ namespace Tizen.NUI.BaseComponents
internal View(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.View_SWIGUpcast(cPtr), cMemoryOwn)
{
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- PositionUsesPivotPoint = false;
+ if (HasBody())
+ {
+ PositionUsesPivotPoint = false;
+ }
}
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
@@ -49,11 +52,18 @@ namespace Tizen.NUI.BaseComponents
/// 4
public override void Add(View child)
{
- NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
- if (NDalicPINVOKE.SWIGPendingException.Pending)
- throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-
- Children.Add(child);
+ Container oldParent = child.GetParent();
+ if(oldParent != this)
+ {
+ if (oldParent != null)
+ {
+ oldParent.Remove(child);
+ }
+ NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ Children.Add(child);
+ }
}
///
@@ -104,9 +114,12 @@ namespace Tizen.NUI.BaseComponents
/// 4
public override Container GetParent()
{
+ //to fix memory leak issue, match the handle count with native side.
IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
-
- BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(cPtr);
+ HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
+ NDalicPINVOKE.delete_BaseHandle(CPtr);
+ CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
@@ -116,7 +129,7 @@ namespace Tizen.NUI.BaseComponents
internal bool IsTopLevelView()
{
- if(GetParent() is Layer)
+ if (GetParent() is Layer)
{
return true;
}
@@ -130,12 +143,12 @@ namespace Tizen.NUI.BaseComponents
/// 3
protected override void Dispose(DisposeTypes type)
{
- if(disposed)
+ if (disposed)
{
return;
}
- if(type == DisposeTypes.Explicit)
+ if (type == DisposeTypes.Explicit)
{
//Called by User
//Release your own managed resources here.
@@ -145,8 +158,10 @@ namespace Tizen.NUI.BaseComponents
//Release your own unmanaged resources here.
//You should not access any managed member here except static instance.
//because the execution order of Finalizes is non-deterministic.
-
- DisConnectFromSignals();
+ if (this != null)
+ {
+ DisConnectFromSignals();
+ }
if (swigCPtr.Handle != global::System.IntPtr.Zero)
{
@@ -401,6 +416,12 @@ namespace Tizen.NUI.BaseComponents
private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
{
+ if (keyEvent == global::System.IntPtr.Zero)
+ {
+ NUILog.Error("keyEvent should not be null!");
+ return true;
+ }
+
KeyEventArgs e = new KeyEventArgs();
bool result = false;
@@ -412,9 +433,9 @@ namespace Tizen.NUI.BaseComponents
Delegate[] delegateList = _keyEventHandler.GetInvocationList();
// Oring the result of each callback.
- foreach ( EventHandlerWithReturnType
///
- /// Note the initial value is 0.
+ /// Note the initial value is 0. SiblingOrder should be bigger than 0 or equal to 0.
/// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove, and LowerBelow will override the sibling order.
/// The values set by this property will likely change.
///
@@ -2264,13 +2259,58 @@ namespace Tizen.NUI.BaseComponents
{
get
{
- int temp = 0;
- GetProperty(View.Property.SIBLING_ORDER).Get(out temp);
- return temp;
+ var parentChildren = GetParent()?.Children;
+ int currentOrder = 0;
+ if (parentChildren != null)
+ {
+ currentOrder = parentChildren.IndexOf(this);
+
+ if (currentOrder < 0)
+ {
+ return 0;
+ }
+ else if (currentOrder < parentChildren.Count)
+ {
+ return currentOrder;
+ }
+ }
+
+ return 0;
}
set
{
- SetProperty(View.Property.SIBLING_ORDER, new Tizen.NUI.PropertyValue(value));
+ if(value < 0)
+ {
+ NUILog.Error("SiblingOrder should be bigger than 0 or equal to 0.");
+ return;
+ }
+ var siblings = GetParent()?.Children;
+ if (siblings != null)
+ {
+ int currentOrder = siblings.IndexOf(this);
+ if (value != currentOrder)
+ {
+ if (value == 0)
+ {
+ LowerToBottom();
+ }
+ else if (value < siblings.Count - 1)
+ {
+ if (value > currentOrder)
+ {
+ RaiseAbove(siblings[value]);
+ }
+ else
+ {
+ LowerBelow(siblings[value]);
+ }
+ }
+ else
+ {
+ RaiseToTop();
+ }
+ }
+ }
}
}
@@ -2283,7 +2323,10 @@ namespace Tizen.NUI.BaseComponents
/// /// Please do not use! this will be deprecated!
/// Instead please use NaturalSize2D.
/// 3
- [Obsolete("Please do not use! this will be deprecated, please use NaturalSize2D instead")]
+ [Obsolete("Please do not use! This will be deprecated! Please use NaturalSize2D instead! " +
+ "Like: " +
+ "TextLabel label = new TextLabel(\"Hello World!\"); " +
+ "Size2D size = label.NaturalSize2D;")]
[EditorBrowsable(EditorBrowsableState.Never)]
public Vector3 NaturalSize
{
@@ -2343,46 +2386,47 @@ namespace Tizen.NUI.BaseComponents
internal void Raise()
{
- var parentChildren = Parent?.Children;
+ var parentChildren = GetParent()?.Children;
if (parentChildren != null)
{
int currentIndex = parentChildren.IndexOf(this);
// If the view is not already the last item in the list.
- if (currentIndex != parentChildren.Count -1)
+ if (currentIndex >= 0 && currentIndex < parentChildren.Count -1)
{
View temp = parentChildren[currentIndex + 1];
parentChildren[currentIndex + 1] = this;
parentChildren[currentIndex] = temp;
+
+ NDalicPINVOKE.Raise(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
}
- NDalicPINVOKE.Raise(swigCPtr);
- if (NDalicPINVOKE.SWIGPendingException.Pending)
- throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
internal void Lower()
{
- var parentChildren = Parent?.Children;
+ var parentChildren = GetParent()?.Children;
if (parentChildren != null)
{
int currentIndex = parentChildren.IndexOf(this);
// If the view is not already the first item in the list.
- if (currentIndex > 0)
+ if (currentIndex > 0 && currentIndex < parentChildren.Count)
{
View temp = parentChildren[currentIndex - 1];
parentChildren[currentIndex - 1] = this;
parentChildren[currentIndex] = temp;
+
+ NDalicPINVOKE.Lower(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
}
-
- NDalicPINVOKE.Lower(swigCPtr);
- if (NDalicPINVOKE.SWIGPendingException.Pending)
- throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
///
@@ -2395,17 +2439,18 @@ namespace Tizen.NUI.BaseComponents
/// 3
public void RaiseToTop()
{
- var parentChildren = Parent?.Children;
+ var parentChildren = GetParent()?.Children;
if (parentChildren != null)
{
parentChildren.Remove(this);
parentChildren.Add(this);
+
+ NDalicPINVOKE.RaiseToTop(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
- NDalicPINVOKE.RaiseToTop(swigCPtr);
- if (NDalicPINVOKE.SWIGPendingException.Pending)
- throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
///
@@ -2418,17 +2463,17 @@ namespace Tizen.NUI.BaseComponents
/// 3
public void LowerToBottom()
{
- var parentChildren = Parent?.Children;
+ var parentChildren = GetParent()?.Children;
if (parentChildren != null)
{
parentChildren.Remove(this);
parentChildren.Insert(0, this);
- }
- NDalicPINVOKE.LowerToBottom(swigCPtr);
- if (NDalicPINVOKE.SWIGPendingException.Pending)
- throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ NDalicPINVOKE.LowerToBottom(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
}
///
@@ -2455,24 +2500,31 @@ namespace Tizen.NUI.BaseComponents
/// Will be raised above this view.
internal void RaiseAbove(View target)
{
- var parentChildren = Parent?.Children;
+ var parentChildren = GetParent()?.Children;
if (parentChildren != null)
{
int currentIndex = parentChildren.IndexOf(this);
int targetIndex = parentChildren.IndexOf(target);
+ if(currentIndex < 0 || targetIndex < 0 ||
+ currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
+ {
+ NUILog.Error("index should be bigger than 0 and less than children of layer count");
+ return;
+ }
// If the currentIndex is less than the target index and the target has the same parent.
if (currentIndex < targetIndex)
{
parentChildren.Remove(this);
parentChildren.Insert(targetIndex, this);
+
+ NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
}
- NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
- if (NDalicPINVOKE.SWIGPendingException.Pending)
- throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
///
@@ -2485,12 +2537,18 @@ namespace Tizen.NUI.BaseComponents
/// Will be lowered below this view.
internal void LowerBelow(View target)
{
- var parentChildren = Parent?.Children;
+ var parentChildren = GetParent()?.Children;
if (parentChildren != null)
{
int currentIndex = parentChildren.IndexOf(this);
int targetIndex = parentChildren.IndexOf(target);
+ if(currentIndex < 0 || targetIndex < 0 ||
+ currentIndex >= parentChildren.Count ||targetIndex >= parentChildren.Count)
+ {
+ NUILog.Error("index should be bigger than 0 and less than children of layer count");
+ return;
+ }
// If the currentIndex is not already the 0th index and the target has the same parent.
if ((currentIndex != 0) && (targetIndex != -1) &&
@@ -2498,12 +2556,13 @@ namespace Tizen.NUI.BaseComponents
{
parentChildren.Remove(this);
parentChildren.Insert(targetIndex, this);
+
+ NDalicPINVOKE.LowerBelow(swigCPtr, View.getCPtr(target));
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
}
- NDalicPINVOKE.LowerBelow(swigCPtr, View.getCPtr(target));
- if (NDalicPINVOKE.SWIGPendingException.Pending)
- throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
internal string GetName()
@@ -2554,8 +2613,12 @@ namespace Tizen.NUI.BaseComponents
[EditorBrowsable(EditorBrowsableState.Never)]
public Layer GetLayer()
{
+ //to fix memory leak issue, match the handle count with native side.
IntPtr cPtr = NDalicPINVOKE.Actor_GetLayer(swigCPtr);
- Layer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Layer;
+ HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ Layer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Layer;
+ NDalicPINVOKE.delete_BaseHandle(CPtr);
+ CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
@@ -2582,9 +2645,12 @@ namespace Tizen.NUI.BaseComponents
/// 3
public View FindChildByName(string viewName)
{
+ //to fix memory leak issue, match the handle count with native side.
IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
-
- View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
+ HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
+ NDalicPINVOKE.delete_BaseHandle(CPtr);
+ CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
@@ -2593,9 +2659,12 @@ namespace Tizen.NUI.BaseComponents
internal View FindChildById(uint id)
{
+ //to fix memory leak issue, match the handle count with native side.
IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
-
- View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
+ HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
+ NDalicPINVOKE.delete_BaseHandle(CPtr);
+ CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
@@ -3189,8 +3258,12 @@ namespace Tizen.NUI.BaseComponents
/// 3
public Renderer GetRendererAt(uint index)
{
+ //to fix memory leak issue, match the handle count with native side.
IntPtr cPtr = NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index);
- Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Renderer;
+ HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Renderer;
+ NDalicPINVOKE.delete_BaseHandle(CPtr);
+ CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
@@ -3261,14 +3334,16 @@ namespace Tizen.NUI.BaseComponents
return ret;
}
- internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view) {
+ internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view)
+ {
ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
- internal ViewLayoutDirectionChangedSignal LayoutDirectionChangedSignal(View view) {
+ internal ViewLayoutDirectionChangedSignal LayoutDirectionChangedSignal(View view)
+ {
ViewLayoutDirectionChangedSignal ret = new ViewLayoutDirectionChangedSignal(NDalicManualPINVOKE.LayoutDirectionChangedSignal(View.getCPtr(view)), false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
@@ -3863,13 +3938,13 @@ namespace Tizen.NUI.BaseComponents
switch (temp)
{
case "NORMAL":
- return DrawModeType.Normal;
+ return DrawModeType.Normal;
case "OVERLAY_2D":
- return DrawModeType.Overlay2D;
+ return DrawModeType.Overlay2D;
case "STENCIL":
- return DrawModeType.Stencil;
+ return DrawModeType.Stencil;
default:
- return DrawModeType.Normal;
+ return DrawModeType.Normal;
}
}
set
@@ -4075,12 +4150,12 @@ namespace Tizen.NUI.BaseComponents
///
/// Gets or sets the padding for use in layout.
///
- /// 3
- public Vector4 Padding
+ /// 4
+ public Extents Padding
{
get
{
- Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
+ Extents temp = new Extents(0, 0, 0, 0);
GetProperty(View.Property.PADDING).Get(temp);
return temp;
}
@@ -4162,13 +4237,13 @@ namespace Tizen.NUI.BaseComponents
switch (temp)
{
case "DISABLED":
- return ClippingModeType.Disabled;
+ return ClippingModeType.Disabled;
case "CLIP_CHILDREN":
- return ClippingModeType.ClipChildren;
+ return ClippingModeType.ClipChildren;
case "CLIP_TO_BOUNDING_BOX":
- return ClippingModeType.ClipToBoundingBox;
+ return ClippingModeType.ClipToBoundingBox;
default:
- return ClippingModeType.Disabled;
+ return ClippingModeType.Disabled;
}
}
set
@@ -4189,114 +4264,17 @@ namespace Tizen.NUI.BaseComponents
}
}
-
-
- ///
- /// [Obsolete("Please do not use! this will be deprecated")]
- ///
- /// 3
- /// Please do not use! this will be deprecated!
- /// Instead please use TouchEvent.
- [Obsolete("Please do not use! this will be deprecated, instead please use TouchEvent.")]
- [EditorBrowsable(EditorBrowsableState.Never)]
- public event EventHandlerWithReturnType 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")]
- ///
- /// 3
- /// Please do not use! this will be deprecated!
- /// Instead please use HoverEvent.
- [Obsolete("Please do not use! this will be deprecated, instead please use HoverEvent.")]
- [EditorBrowsable(EditorBrowsableState.Never)]
- public event EventHandlerWithReturnType 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);
- }
-
- }
- }
-
- ///
- /// Please do not use! this will be deprecated.
- ///
- /// 3
- /// Please do not use! this will be deprecated!
- /// Instead please use WheelEvent.
- [Obsolete("Please do not use! this will be deprecated, instead please use WheelEvent.")]
- [EditorBrowsable(EditorBrowsableState.Never)]
- public event EventHandlerWithReturnType 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")]
///
/// 3
/// Please do not use! this will be deprecated!
/// Instead please use PivotPoint.
- [Obsolete("Please do not use! this will be deprecated, instead please use PivotPoint")]
+ [Obsolete("Please do not use! This will be deprecated! Please use PivotPoint instead! " +
+ "Like: " +
+ "View view = new View(); " +
+ "view.PivotPoint = PivotPoint.Center; " +
+ "view.PositionUsesPivotPoint = true;")]
[EditorBrowsable(EditorBrowsableState.Never)]
public Position AnchorPoint
{
@@ -4316,7 +4294,10 @@ namespace Tizen.NUI.BaseComponents
/// [Obsolete("Please do not use! this will be deprecated")]
///
/// 3
- [Obsolete("Please do not use! this will be deprecated, please use Size2D instead")]
+ [Obsolete("Please do not use! This will be deprecated! Please use Size2D instead! " +
+ "Like: " +
+ "View view = new View(); " +
+ "view.Size2D = new Size2D(100, 100);")]
[EditorBrowsable(EditorBrowsableState.Never)]
public Size Size
{
@@ -4333,117 +4314,25 @@ namespace Tizen.NUI.BaseComponents
}
///
- /// [Obsolete("Please do not use! this will be deprecated")]
- ///
- /// 3
- /// Please do not use! this will be deprecated!
- /// Instead please use AddedToWindow.
- [Obsolete("Please do not use! this will be deprecated, instead please use AddedToWindow")]
- [EditorBrowsable(EditorBrowsableState.Never)]
- 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")]
- ///
- /// 3
- /// Please do not use! this will be deprecated!
- /// Instead please use RemovedFromWindow.
- [Obsolete("Please do not use! this will be deprecated, instead please use RemovedFromWindow")]
- [EditorBrowsable(EditorBrowsableState.Never)]
- 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")]
- ///
- /// 3
- /// Please do not use! this will be deprecated!
- /// Instead please use Relayout.
- [Obsolete("Please do not use! this will be deprecated, instead please use Relayout")]
- [EditorBrowsable(EditorBrowsableState.Never)]
- 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);
- }
-
- }
- }
-
- ///
/// "Please DO NOT use! This will be deprecated! Please use 'Container GetParent() for derived class' instead!"
///
/// 3
- //"Please DO NOT use! This will be deprecated! Please use 'Container GetParent() for derived class' instead!"
- /// 3
- [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
+ [Obsolete("Please do not use! This will be deprecated! Please use 'Container GetParent() for derived class' instead! " +
+ "Like: " +
+ "Container parent = view.GetParent(); " +
+ "View view = parent as View;")]
+ [EditorBrowsable(EditorBrowsableState.Never)]
public new View Parent
{
get
{
View ret;
IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
-
BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(cPtr);
+ //HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ //BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
+ //NDalicPINVOKE.delete_BaseHandle(CPtr);
+ //CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
if (basehandle is Layer)
{
@@ -4518,22 +4407,43 @@ namespace Tizen.NUI.BaseComponents
}
///
- /// Gets or sets the Padding for use in layout.
+ /// [Obsolete("Please do not use! this will be deprecated")]
///
+ /// Please do not use! this will be deprecated!
+ /// Instead please use Padding.
/// 4
+ [Obsolete("Please do not use! this will be deprecated, instead please use Padding.")]
+ [EditorBrowsable(EditorBrowsableState.Never)]
public Extents PaddingEX
{
get
{
Extents temp = new Extents(0, 0, 0, 0);
- GetProperty(View.Property.PADDINGEX).Get(temp);
+ GetProperty(View.Property.PADDING).Get(temp);
return temp;
}
set
{
- SetProperty(View.Property.PADDINGEX, new Tizen.NUI.PropertyValue(value));
+ SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
}
}
+
+ ///
+ /// Perform an action on a visual registered to this view.
+ /// Visuals will have actions, this API is used to perform one of these actions with the given attributes.
+ ///
+ /// The Property index of the visual.
+ /// The action to perform. See Visual to find supported actions.
+ /// Optional attributes for the action.
+ /// 5
+ /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void DoAction(int propertyIndexOfVisual, int propertyIndexOfActionId, PropertyValue attributes)
+ {
+ NDalicManualPINVOKE.View_DoAction(swigCPtr, propertyIndexOfVisual, propertyIndexOfActionId, PropertyValue.getCPtr(attributes));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
}
///