From 8e47b1c84a92578b6c34a341e32a368112c2ef91 Mon Sep 17 00:00:00 2001 From: dongsug-song <35130733+dongsug-song@users.noreply.github.com> Date: Thu, 8 Aug 2019 20:15:08 +0900 Subject: [PATCH] [NUI] Merge Layout related changes from dalihub (#968) --- src/Tizen.NUI/src/internal/Layouting/FlexLayout.cs | 0 src/Tizen.NUI/src/internal/Layouting/GridLayout.cs | 1 - .../Layouting/Interop/Interop.AbsoluteLayout.cs | 39 --- .../Layouting/Interop/Interop.GridLayout.cs | 53 ---- .../internal/Layouting/Interop/Interop.Layout.cs | 18 +- .../Interop/Interop.LayoutGroupWrapper.cs | 81 ------ .../Interop/Interop.LayoutGroupWrapperImpl.cs | 15 -- .../Layouting/Interop/Interop.LayoutItemPtr.cs | 183 ------------- .../Layouting/Interop/Interop.LayoutItemWrapper.cs | 70 ----- .../Layouting/Interop/Interop.LayoutLength.cs | 110 -------- .../Layouting/Interop/Interop.LayoutParent.cs | 16 -- .../Layouting/Interop/Interop.LayoutSize.cs | 93 ------- .../Layouting/Interop/Interop.LinearLayout.cs | 76 ------ .../internal/Layouting/Interop/LayoutPINVOKE.cs | 29 -- .../src/internal/Layouting/LayoutController.cs | 279 +++++++++++++++++++- src/Tizen.NUI/src/internal/Layouting/LayoutData.cs | 100 ++++--- .../src/internal/Layouting/LayoutGroup.cs | 83 +++++- src/Tizen.NUI/src/internal/Layouting/LayoutItem.cs | 85 +++--- .../src/internal/Layouting/LayoutTransition.cs | 291 +++++++++++++++++++++ src/Tizen.NUI/src/public/BaseComponents/View.cs | 143 +++++----- 20 files changed, 838 insertions(+), 927 deletions(-) mode change 100644 => 100755 src/Tizen.NUI/src/internal/Layouting/FlexLayout.cs delete mode 100755 src/Tizen.NUI/src/internal/Layouting/Interop/Interop.AbsoluteLayout.cs delete mode 100755 src/Tizen.NUI/src/internal/Layouting/Interop/Interop.GridLayout.cs delete mode 100755 src/Tizen.NUI/src/internal/Layouting/Interop/Interop.LayoutGroupWrapper.cs delete mode 100755 src/Tizen.NUI/src/internal/Layouting/Interop/Interop.LayoutGroupWrapperImpl.cs delete mode 100755 src/Tizen.NUI/src/internal/Layouting/Interop/Interop.LayoutItemPtr.cs delete mode 100755 src/Tizen.NUI/src/internal/Layouting/Interop/Interop.LayoutItemWrapper.cs delete mode 100755 src/Tizen.NUI/src/internal/Layouting/Interop/Interop.LayoutLength.cs delete mode 100755 src/Tizen.NUI/src/internal/Layouting/Interop/Interop.LayoutParent.cs delete mode 100755 src/Tizen.NUI/src/internal/Layouting/Interop/Interop.LayoutSize.cs delete mode 100755 src/Tizen.NUI/src/internal/Layouting/Interop/Interop.LinearLayout.cs delete mode 100755 src/Tizen.NUI/src/internal/Layouting/Interop/LayoutPINVOKE.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/Layouting/LayoutController.cs create mode 100755 src/Tizen.NUI/src/internal/Layouting/LayoutTransition.cs diff --git a/src/Tizen.NUI/src/internal/Layouting/FlexLayout.cs b/src/Tizen.NUI/src/internal/Layouting/FlexLayout.cs old mode 100644 new mode 100755 diff --git a/src/Tizen.NUI/src/internal/Layouting/GridLayout.cs b/src/Tizen.NUI/src/internal/Layouting/GridLayout.cs index 9ccf0c7..887cb15 100755 --- a/src/Tizen.NUI/src/internal/Layouting/GridLayout.cs +++ b/src/Tizen.NUI/src/internal/Layouting/GridLayout.cs @@ -127,7 +127,6 @@ namespace Tizen.NUI desiredChildWidth = (int)childLayoutItem.MeasuredWidth.Size.AsRoundedValue(); // If child has a margin then add it to desired size - Extents childMargin = childLayoutItem.Margin; desiredChildHeight += childMargin.Top + childMargin.Bottom; desiredChildWidth += childMargin.Start + childMargin.End; diff --git a/src/Tizen.NUI/src/internal/Layouting/Interop/Interop.AbsoluteLayout.cs b/src/Tizen.NUI/src/internal/Layouting/Interop/Interop.AbsoluteLayout.cs deleted file mode 100755 index 35d0492..0000000 --- a/src/Tizen.NUI/src/internal/Layouting/Interop/Interop.AbsoluteLayout.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace Tizen.NUI -{ - internal static partial class Interop - { - internal static partial class AbsoluteLayout - { - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_AbsoluteLayout_SWIGUpcast")] - public static extern global::System.IntPtr AbsoluteLayout_SWIGUpcast(global::System.IntPtr jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_AbsoluteLayout__SWIG_0")] - public static extern global::System.IntPtr new_AbsoluteLayout__SWIG_0(); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_AbsoluteLayout_New")] - public static extern global::System.IntPtr AbsoluteLayout_New(); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_AbsoluteLayout_DownCast")] - public static extern global::System.IntPtr AbsoluteLayout_DownCast(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_AbsoluteLayout__SWIG_1")] - public static extern global::System.IntPtr new_AbsoluteLayout__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_AbsoluteLayout_Assign")] - public static extern global::System.IntPtr AbsoluteLayout_Assign(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_AbsoluteLayout")] - public static extern void delete_AbsoluteLayout(global::System.Runtime.InteropServices.HandleRef jarg1); - } - } -} diff --git a/src/Tizen.NUI/src/internal/Layouting/Interop/Interop.GridLayout.cs b/src/Tizen.NUI/src/internal/Layouting/Interop/Interop.GridLayout.cs deleted file mode 100755 index d9336e9..0000000 --- a/src/Tizen.NUI/src/internal/Layouting/Interop/Interop.GridLayout.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace Tizen.NUI -{ - internal static partial class Interop - { - internal static partial class GridLayout - { - - // GridLayout_SWIGUpcast - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_GridLayout_SWIGUpcast")] - public static extern global::System.IntPtr GridLayout_SWIGUpcast(global::System.IntPtr jarg1); - - - // GridLayout_New - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_GridLayout_New")] - public static extern global::System.IntPtr GridLayout_New(); - - - // delete_GridLayout - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_GridLayout_delete")] - public static extern void delete_GridLayout(global::System.Runtime.InteropServices.HandleRef jarg1); - - - // GridLayout_Downcast - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_GridLayout_DownCast")] - public static extern global::System.IntPtr GridLayout_DownCast(global::System.Runtime.InteropServices.HandleRef jarg1); - - - // new_GridLayout_SWIG_1 - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_GridLayout_SWIG_1")] - public static extern global::System.IntPtr new_GridLayout_SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1); - - - // GridLayout_Assign - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_GridLayout_GridLayout_Assign")] - public static extern global::System.IntPtr GridLayout_Assign(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); - - - // GridLayout_SetColumns - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_GridLayout_SetColumns")] - public static extern void GridLayout_SetColumns(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); - - - // GridLayout_GetColumns - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_GridLayout__GetColumns")] - public static extern int GridLayout_GetColumns(global::System.Runtime.InteropServices.HandleRef jarg1); - - } - } -} diff --git a/src/Tizen.NUI/src/internal/Layouting/Interop/Interop.Layout.cs b/src/Tizen.NUI/src/internal/Layouting/Interop/Interop.Layout.cs index 83d1a27..e1b713f 100755 --- a/src/Tizen.NUI/src/internal/Layouting/Interop/Interop.Layout.cs +++ b/src/Tizen.NUI/src/internal/Layouting/Interop/Interop.Layout.cs @@ -31,7 +31,7 @@ namespace Tizen.NUI [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_ViewLayoutDirectionSignal_Emit")] public static extern void ViewLayoutDirectionChangedSignal_Emit(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); - + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_ViewLayoutDirectionSignal")] public static extern global::System.IntPtr new_ViewLayoutDirectionChangedSignal(); @@ -40,22 +40,6 @@ namespace Tizen.NUI [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_ViewLayoutDirectionSignal")] public static extern void delete_ViewLayoutDirectionChangedSignal(global::System.Runtime.InteropServices.HandleRef jarg1); - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_GetLayout__SWIG_0")] - public static extern global::System.IntPtr GetLayout__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_GetLayout__SWIG_1")] - public static extern global::System.IntPtr GetLayout__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_SetLayout__SWIG_0")] - public static extern void SetLayout__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_SetLayout__SWIG_1")] - public static extern void SetLayout__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); - } } } diff --git a/src/Tizen.NUI/src/internal/Layouting/Interop/Interop.LayoutGroupWrapper.cs b/src/Tizen.NUI/src/internal/Layouting/Interop/Interop.LayoutGroupWrapper.cs deleted file mode 100755 index bdee11c..0000000 --- a/src/Tizen.NUI/src/internal/Layouting/Interop/Interop.LayoutGroupWrapper.cs +++ /dev/null @@ -1,81 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace Tizen.NUI -{ - internal static partial class Interop - { - internal static partial class LayoutGroupWrapper - { - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutGroupWrapper_SWIGUpcast")] - public static extern global::System.IntPtr LayoutGroupWrapper_SWIGUpcast(global::System.IntPtr jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutGroupWrapper_UNKNOWN_ID_get")] - public static extern uint LayoutGroupWrapper_UNKNOWN_ID_get(); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutGroupWrapper_ChildProperty_MARGIN_SPECIFICATION_get")] - public static extern int LayoutGroupWrapper_ChildProperty_MARGIN_SPECIFICATION_get(); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_LayoutGroupWrapper_ChildProperty")] - public static extern global::System.IntPtr new_LayoutGroupWrapper_ChildProperty(); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_LayoutGroupWrapper_ChildProperty")] - public static extern void delete_LayoutGroupWrapper_ChildProperty(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_LayoutGroupWrapper__SWIG_0")] - public static extern global::System.IntPtr new_LayoutGroupWrapper__SWIG_0(); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_LayoutGroupWrapper")] - public static extern void delete_LayoutGroupWrapper(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_LayoutGroupWrapper__SWIG_1")] - public static extern global::System.IntPtr new_LayoutGroupWrapper__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutGroupWrapper_Assign")] - public static extern global::System.IntPtr LayoutGroupWrapper_Assign(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutGroupWrapper_DownCast")] - public static extern global::System.IntPtr LayoutGroupWrapper_DownCast(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutGroupWrapper_Add")] - public static extern uint LayoutGroupWrapper_Add(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutGroupWrapper_Remove__SWIG_0")] - public static extern void LayoutGroupWrapper_Remove__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, uint jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutGroupWrapper_Remove__SWIG_1")] - public static extern void LayoutGroupWrapper_Remove__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutGroupWrapper_GetChildAt")] - public static extern global::System.IntPtr LayoutGroupWrapper_GetChildAt(global::System.Runtime.InteropServices.HandleRef jarg1, uint jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutGroupWrapper_GetChildCount")] - public static extern uint LayoutGroupWrapper_GetChildCount(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutGroupWrapper_GetChild")] - public static extern global::System.IntPtr LayoutGroupWrapper_GetChild(global::System.Runtime.InteropServices.HandleRef jarg1, uint jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_LayoutGroupWrapper__SWIG_2")] - public static extern global::System.IntPtr new_LayoutGroupWrapper__SWIG_2(global::System.Runtime.InteropServices.HandleRef jarg1); - - - } - } -} diff --git a/src/Tizen.NUI/src/internal/Layouting/Interop/Interop.LayoutGroupWrapperImpl.cs b/src/Tizen.NUI/src/internal/Layouting/Interop/Interop.LayoutGroupWrapperImpl.cs deleted file mode 100755 index 5e79ba4..0000000 --- a/src/Tizen.NUI/src/internal/Layouting/Interop/Interop.LayoutGroupWrapperImpl.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace Tizen.NUI -{ - internal static partial class Interop - { - internal static partial class LayoutGroupWrapperImpl - { - - - } - } -} diff --git a/src/Tizen.NUI/src/internal/Layouting/Interop/Interop.LayoutItemPtr.cs b/src/Tizen.NUI/src/internal/Layouting/Interop/Interop.LayoutItemPtr.cs deleted file mode 100755 index 823fac8..0000000 --- a/src/Tizen.NUI/src/internal/Layouting/Interop/Interop.LayoutItemPtr.cs +++ /dev/null @@ -1,183 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace Tizen.NUI -{ - internal static partial class Interop - { - internal static partial class LayoutItemPtr - { - - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_LayoutItemPtr__SWIG_0")] - public static extern global::System.IntPtr new_LayoutItemPtr__SWIG_0(); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_LayoutItemPtr__SWIG_1")] - public static extern global::System.IntPtr new_LayoutItemPtr__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_LayoutItemPtr__SWIG_2")] - public static extern global::System.IntPtr new_LayoutItemPtr__SWIG_2(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_LayoutItemPtr")] - public static extern void delete_LayoutItemPtr(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemPtr_Get")] - public static extern global::System.IntPtr LayoutItemPtr_Get(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemPtr___deref__")] - public static extern global::System.IntPtr LayoutItemPtr___deref__(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemPtr___ref__")] - public static extern global::System.IntPtr LayoutItemPtr___ref__(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemPtr_Assign__SWIG_0")] - public static extern global::System.IntPtr LayoutItemPtr_Assign__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemPtr_Assign__SWIG_1")] - public static extern global::System.IntPtr LayoutItemPtr_Assign__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemPtr_Reset__SWIG_0")] - public static extern void LayoutItemPtr_Reset__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemPtr_Reset__SWIG_1")] - public static extern void LayoutItemPtr_Reset__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemPtr_Detach")] - public static extern global::System.IntPtr LayoutItemPtr_Detach(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemPtr_New")] - public static extern global::System.IntPtr LayoutItemPtr_New(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemPtr_Initialize")] - public static extern void LayoutItemPtr_Initialize(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, string jarg3); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemPtr_Unparent")] - public static extern void LayoutItemPtr_Unparent(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemPtr_SetAnimateLayout")] - public static extern void LayoutItemPtr_SetAnimateLayout(global::System.Runtime.InteropServices.HandleRef jarg1, bool jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemPtr_IsLayoutAnimated")] - public static extern bool LayoutItemPtr_IsLayoutAnimated(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemPtr_Measure")] - public static extern void LayoutItemPtr_Measure(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemPtr_Layout")] - public static extern void LayoutItemPtr_Layout(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, global::System.Runtime.InteropServices.HandleRef jarg4, global::System.Runtime.InteropServices.HandleRef jarg5); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemPtr_GetDefaultSize")] - public static extern global::System.IntPtr LayoutItemPtr_GetDefaultSize(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemPtr_GetParent")] - public static extern global::System.IntPtr LayoutItemPtr_GetParent(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemPtr_RequestLayout")] - public static extern void LayoutItemPtr_RequestLayout(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemPtr_IsLayoutRequested")] - public static extern bool LayoutItemPtr_IsLayoutRequested(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemPtr_GetMeasuredWidth")] - public static extern global::System.IntPtr LayoutItemPtr_GetMeasuredWidth(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemPtr_GetMeasuredHeight")] - public static extern global::System.IntPtr LayoutItemPtr_GetMeasuredHeight(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemPtr_GetMeasuredWidthAndState")] - public static extern global::System.IntPtr LayoutItemPtr_GetMeasuredWidthAndState(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemPtr_GetMeasuredHeightAndState")] - public static extern global::System.IntPtr LayoutItemPtr_GetMeasuredHeightAndState(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemPtr_GetSuggestedMinimumWidth")] - public static extern global::System.IntPtr LayoutItemPtr_GetSuggestedMinimumWidth(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemPtr_GetSuggestedMinimumHeight")] - public static extern global::System.IntPtr LayoutItemPtr_GetSuggestedMinimumHeight(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemPtr_SetMinimumWidth")] - public static extern void LayoutItemPtr_SetMinimumWidth(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemPtr_SetMinimumHeight")] - public static extern void LayoutItemPtr_SetMinimumHeight(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemPtr_GetMinimumWidth")] - public static extern global::System.IntPtr LayoutItemPtr_GetMinimumWidth(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemPtr_GetMinimumHeight")] - public static extern global::System.IntPtr LayoutItemPtr_GetMinimumHeight(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemPtr_GetPadding")] - public static extern global::System.IntPtr LayoutItemPtr_GetPadding(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemPtr_SetMeasuredDimensions")] - public static extern void LayoutItemPtr_SetMeasuredDimensions(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemPtr_DoAction")] - public static extern bool LayoutItemPtr_DoAction(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, global::System.Runtime.InteropServices.HandleRef jarg3); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemPtr_GetTypeName")] - public static extern string LayoutItemPtr_GetTypeName(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemPtr_GetTypeInfo")] - public static extern bool LayoutItemPtr_GetTypeInfo(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemPtr_DoConnectSignal")] - public static extern bool LayoutItemPtr_DoConnectSignal(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, string jarg3, global::System.Runtime.InteropServices.HandleRef jarg4); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemPtr_Reference")] - public static extern void LayoutItemPtr_Reference(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemPtr_Unreference")] - public static extern void LayoutItemPtr_Unreference(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemPtr_ReferenceCount")] - public static extern int LayoutItemPtr_ReferenceCount(global::System.Runtime.InteropServices.HandleRef jarg1); - - } - } -} diff --git a/src/Tizen.NUI/src/internal/Layouting/Interop/Interop.LayoutItemWrapper.cs b/src/Tizen.NUI/src/internal/Layouting/Interop/Interop.LayoutItemWrapper.cs deleted file mode 100755 index dc04477..0000000 --- a/src/Tizen.NUI/src/internal/Layouting/Interop/Interop.LayoutItemWrapper.cs +++ /dev/null @@ -1,70 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace Tizen.NUI -{ - internal static partial class Interop - { - internal static partial class LayoutItemWrapper - { - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemWrapper_SWIGUpcast")] - public static extern global::System.IntPtr LayoutItemWrapper_SWIGUpcast(global::System.IntPtr jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemWrapper_ChildProperty_WIDTH_SPECIFICATION_get")] - public static extern int LayoutItemWrapper_ChildProperty_WIDTH_SPECIFICATION_get(); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemWrapper_ChildProperty_HEIGHT_SPECIFICATION_get")] - public static extern int LayoutItemWrapper_ChildProperty_HEIGHT_SPECIFICATION_get(); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_LayoutItemWrapper_ChildProperty")] - public static extern global::System.IntPtr new_LayoutItemWrapper_ChildProperty(); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_LayoutItemWrapper_ChildProperty")] - public static extern void delete_LayoutItemWrapper_ChildProperty(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_LayoutItemWrapper__SWIG_0")] - public static extern global::System.IntPtr new_LayoutItemWrapper__SWIG_0(); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_LayoutItemWrapper")] - public static extern void delete_LayoutItemWrapper(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemWrapper_New")] - public static extern global::System.IntPtr LayoutItemWrapper_New(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_LayoutItemWrapper__SWIG_1")] - public static extern global::System.IntPtr new_LayoutItemWrapper__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemWrapper_Assign")] - public static extern global::System.IntPtr LayoutItemWrapper_Assign(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemWrapper_GetOwner")] - public static extern global::System.IntPtr LayoutItemWrapper_GetOwner(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemWrapper_SetAnimateLayout")] - public static extern void LayoutItemWrapper_SetAnimateLayout(global::System.Runtime.InteropServices.HandleRef jarg1, bool jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutItemWrapper_IsLayoutAnimated")] - public static extern bool LayoutItemWrapper_IsLayoutAnimated(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_LayoutItemWrapper__SWIG_2")] - public static extern global::System.IntPtr new_LayoutItemWrapper__SWIG_2(global::System.Runtime.InteropServices.HandleRef jarg1); - - - - } - } -} diff --git a/src/Tizen.NUI/src/internal/Layouting/Interop/Interop.LayoutLength.cs b/src/Tizen.NUI/src/internal/Layouting/Interop/Interop.LayoutLength.cs deleted file mode 100755 index 413e6a4..0000000 --- a/src/Tizen.NUI/src/internal/Layouting/Interop/Interop.LayoutLength.cs +++ /dev/null @@ -1,110 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace Tizen.NUI -{ - internal static partial class Interop - { - internal static partial class LayoutLength - { - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_LayoutLength__SWIG_0")] - public static extern global::System.IntPtr new_LayoutLength__SWIG_0(int jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_LayoutLength__SWIG_1")] - public static extern global::System.IntPtr new_LayoutLength__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutLength_Assign")] - public static extern global::System.IntPtr LayoutLength_Assign(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutLength_EqualTo__SWIG_0")] - public static extern bool LayoutLength_EqualTo__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutLength_EqualTo__SWIG_1")] - public static extern bool LayoutLength_EqualTo__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutLength_NotEqualTo")] - public static extern bool LayoutLength_NotEqualTo(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutLength_LessThan__SWIG_0")] - public static extern bool LayoutLength_LessThan__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutLength_GreaterThan__SWIG_0")] - public static extern bool LayoutLength_GreaterThan__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutLength_Add__SWIG_0")] - public static extern global::System.IntPtr LayoutLength_Add__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutLength_Add__SWIG_1")] - public static extern global::System.IntPtr LayoutLength_Add__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutLength_Subtract__SWIG_0")] - public static extern global::System.IntPtr LayoutLength_Subtract__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutLength_Subtract__SWIG_1")] - public static extern global::System.IntPtr LayoutLength_Subtract__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutLength_AddAssign__SWIG_0")] - public static extern global::System.IntPtr LayoutLength_AddAssign__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutLength_AddAssign__SWIG_1")] - public static extern global::System.IntPtr LayoutLength_AddAssign__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutLength_SubtractAssign__SWIG_0")] - public static extern global::System.IntPtr LayoutLength_SubtractAssign__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutLength_SubtractAssign__SWIG_1")] - public static extern global::System.IntPtr LayoutLength_SubtractAssign__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutLength_Divide__SWIG_0")] - public static extern global::System.IntPtr LayoutLength_Divide__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutLength_Divide__SWIG_1")] - public static extern global::System.IntPtr LayoutLength_Divide__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutLength_Multiply__SWIG_0")] - public static extern global::System.IntPtr LayoutLength_Multiply__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutLength_Multiply__SWIG_1")] - public static extern global::System.IntPtr LayoutLength_Multiply__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutLength_Multiply__SWIG_2")] - public static extern global::System.IntPtr LayoutLength_Multiply__SWIG_2(global::System.Runtime.InteropServices.HandleRef jarg1, float jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutLength_mValue_set")] - public static extern void LayoutLength_mValue_set(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutLength_mValue_get")] - public static extern int LayoutLength_mValue_get(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_LayoutLength")] - public static extern void delete_LayoutLength(global::System.Runtime.InteropServices.HandleRef jarg1); - - - } - } -} diff --git a/src/Tizen.NUI/src/internal/Layouting/Interop/Interop.LayoutParent.cs b/src/Tizen.NUI/src/internal/Layouting/Interop/Interop.LayoutParent.cs deleted file mode 100755 index 6d2ef55..0000000 --- a/src/Tizen.NUI/src/internal/Layouting/Interop/Interop.LayoutParent.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace Tizen.NUI -{ - internal static partial class Interop - { - internal static partial class LayoutParent - { - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutParent_GetParent")] - public static extern global::System.IntPtr LayoutParent_GetParent(global::System.Runtime.InteropServices.HandleRef jarg1); - - } - } -} diff --git a/src/Tizen.NUI/src/internal/Layouting/Interop/Interop.LayoutSize.cs b/src/Tizen.NUI/src/internal/Layouting/Interop/Interop.LayoutSize.cs deleted file mode 100755 index fcebbfa..0000000 --- a/src/Tizen.NUI/src/internal/Layouting/Interop/Interop.LayoutSize.cs +++ /dev/null @@ -1,93 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace Tizen.NUI -{ - internal static partial class Interop - { - internal static partial class LayoutSize - { - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_LayoutSize__SWIG_0")] - public static extern global::System.IntPtr new_LayoutSize__SWIG_0(); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_LayoutSize__SWIG_1")] - public static extern global::System.IntPtr new_LayoutSize__SWIG_1(int jarg1, int jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_LayoutSize__SWIG_2")] - public static extern global::System.IntPtr new_LayoutSize__SWIG_2(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutSize_Assign")] - public static extern global::System.IntPtr LayoutSize_Assign(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutSize_GetWidth")] - public static extern int LayoutSize_GetWidth(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutSize_GetHeight")] - public static extern int LayoutSize_GetHeight(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutSize_SetWidth__SWIG_0")] - public static extern void LayoutSize_SetWidth__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutSize_SetHeight__SWIG_0")] - public static extern void LayoutSize_SetHeight__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutSize_SetWidth__SWIG_1")] - public static extern void LayoutSize_SetWidth__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutSize_SetHeight__SWIG_1")] - public static extern void LayoutSize_SetHeight__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutSize_EqualTo")] - public static extern bool LayoutSize_EqualTo(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutSize_x_set")] - public static extern void LayoutSize_x_set(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutSize_x_get")] - public static extern int LayoutSize_x_get(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutSize_width_set")] - public static extern void LayoutSize_width_set(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutSize_width_get")] - public static extern int LayoutSize_width_get(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutSize_y_set")] - public static extern void LayoutSize_y_set(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutSize_y_get")] - public static extern int LayoutSize_y_get(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutSize_height_set")] - public static extern void LayoutSize_height_set(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LayoutSize_height_get")] - public static extern int LayoutSize_height_get(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_LayoutSize")] - public static extern void delete_LayoutSize(global::System.Runtime.InteropServices.HandleRef jarg1); - - } - } -} diff --git a/src/Tizen.NUI/src/internal/Layouting/Interop/Interop.LinearLayout.cs b/src/Tizen.NUI/src/internal/Layouting/Interop/Interop.LinearLayout.cs deleted file mode 100755 index f0287b1..0000000 --- a/src/Tizen.NUI/src/internal/Layouting/Interop/Interop.LinearLayout.cs +++ /dev/null @@ -1,76 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace Tizen.NUI -{ - internal static partial class Interop - { - internal static partial class LinearLayout - { - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LinearLayout_SWIGUpcast")] - public static extern global::System.IntPtr LinearLayout_SWIGUpcast(global::System.IntPtr jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_LinearLayout__SWIG_0")] - public static extern global::System.IntPtr new_LinearLayout__SWIG_0(); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LinearLayout_New")] - public static extern global::System.IntPtr LinearLayout_New(); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LinearLayout_DownCast")] - public static extern global::System.IntPtr LinearLayout_DownCast(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_LinearLayout__SWIG_1")] - public static extern global::System.IntPtr new_LinearLayout__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LinearLayout_Assign")] - public static extern global::System.IntPtr LinearLayout_Assign(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_LinearLayout")] - public static extern void delete_LinearLayout(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LinearLayout_SetCellPadding")] - public static extern void LinearLayout_SetCellPadding(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LinearLayout_GetCellPadding")] - public static extern global::System.IntPtr LinearLayout_GetCellPadding(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LinearLayout_SetOrientation")] - public static extern void LinearLayout_SetOrientation(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LinearLayout_GetOrientation")] - public static extern int LinearLayout_GetOrientation(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LinearLayout_SetAlignment")] - public static extern void LinearLayout_SetAlignment(global::System.Runtime.InteropServices.HandleRef jarg1, uint jarg2); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LinearLayout_GetAlignment")] - public static extern uint LinearLayout_GetAlignment(global::System.Runtime.InteropServices.HandleRef jarg1); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_LinearLayout_ChildProperty_WEIGHT_get")] - public static extern int LinearLayout_ChildProperty_WEIGHT_get(); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_LinearLayout_ChildProperty")] - public static extern global::System.IntPtr new_LinearLayout_ChildProperty(); - - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_LinearLayout_ChildProperty")] - public static extern void delete_LinearLayout_ChildProperty(global::System.Runtime.InteropServices.HandleRef jarg1); - } - } -} diff --git a/src/Tizen.NUI/src/internal/Layouting/Interop/LayoutPINVOKE.cs b/src/Tizen.NUI/src/internal/Layouting/Interop/LayoutPINVOKE.cs deleted file mode 100755 index 2deacc7..0000000 --- a/src/Tizen.NUI/src/internal/Layouting/Interop/LayoutPINVOKE.cs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -namespace Tizen.NUI -{ - class LayoutPINVOKE - { - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_GetImplementation__SWIG_0")] - public static extern global::System.IntPtr GetImplementation__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1); - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_GetImplementation__SWIG_2")] - public static extern global::System.IntPtr GetImplementation__SWIG_2(global::System.Runtime.InteropServices.HandleRef jarg1); - - } -} diff --git a/src/Tizen.NUI/src/internal/Layouting/LayoutController.cs b/src/Tizen.NUI/src/internal/Layouting/LayoutController.cs old mode 100644 new mode 100755 index 84d8d85..55c15b6 --- a/src/Tizen.NUI/src/internal/Layouting/LayoutController.cs +++ b/src/Tizen.NUI/src/internal/Layouting/LayoutController.cs @@ -15,10 +15,11 @@ * */ -using System.ComponentModel; -using System; using Tizen.NUI.BaseComponents; using System.Runtime.InteropServices; +using System.Collections.Generic; +using System.Diagnostics; +using System; namespace Tizen.NUI { @@ -33,12 +34,19 @@ namespace Tizen.NUI [UnmanagedFunctionPointer(CallingConvention.StdCall)] internal delegate void Callback(int id); - event Callback mInstance; + event Callback _instance; - //A Flat to check if it is already disposed. + // A Flag to check if it is already disposed. protected bool disposed = false; private Window _window; + + Animation _coreAnimation; + + private List _layoutTransitionDataQueue; + + private List _itemRemovalQueue; + /// /// Constructs a LayoutController which controls the measuring and layouting.
/// Window attach this LayoutController to. @@ -50,8 +58,10 @@ namespace Tizen.NUI // Wrap cPtr in a managed handle. unmanagedLayoutController = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - mInstance = new Callback(Process); - Interop.LayoutController.LayoutController_SetCallback(unmanagedLayoutController, mInstance); + _instance = new Callback(Process); + Interop.LayoutController.LayoutController_SetCallback(unmanagedLayoutController, _instance); + + _layoutTransitionDataQueue = new List(); } /// @@ -80,7 +90,6 @@ namespace Tizen.NUI } } - /// /// Destructor which adds LayoutController to the Dispose queue. /// @@ -97,6 +106,28 @@ namespace Tizen.NUI } /// + /// Add transition data for a LayoutItem to the transition stack. + /// + /// Transition data for a LayoutItem. + internal void AddTransitionDataEntry( LayoutData transitionDataEntry) + { + _layoutTransitionDataQueue.Add(transitionDataEntry); + } + + /// + /// Add LayoutItem to a removal stack for removal after transitions finish. + /// + /// LayoutItem to remove. + internal void AddToRemovalStack( LayoutItem itemToRemove) + { + if (_itemRemovalQueue == null) + { + _itemRemovalQueue = new List(); + } + _itemRemovalQueue.Add(itemToRemove); + } + + /// /// Dispose Explict or Implicit /// protected virtual void Dispose(DisposeTypes type) @@ -241,6 +272,13 @@ namespace Tizen.NUI new LayoutLength(rootPosition.Y), new LayoutLength(rootPosition.X) + root.Layout.MeasuredWidth.Size, new LayoutLength(rootPosition.Y) + root.Layout.MeasuredHeight.Size ); + + bool readyToPlay = SetupCoreAnimation(); + + if (readyToPlay) + { + PlayAnimation(); + } } } @@ -290,6 +328,231 @@ namespace Tizen.NUI root.Layout.Layout(left, top, right, bottom); } } + + /// + /// Play the animation. + /// + private void PlayAnimation() + { + _coreAnimation.Play(); + } + + private void AnimationFinished(object sender, EventArgs e) + { + // Iterate list of LayoutItem that were set for removal. + // Now the core animation has finished their Views can be removed. + if (_itemRemovalQueue != null) + { + foreach (LayoutItem item in _itemRemovalQueue) + { + // Check incase the parent was already removed and the Owner was + // removed already. + if (item.Owner) + { + // Check again incase the parent has already been removed. + ILayoutParent layoutParent = item.GetParent(); + LayoutGroup layoutGroup = layoutParent as LayoutGroup; + if (layoutGroup !=null) + { + layoutGroup.Owner?.RemoveChild(item.Owner); + } + + } + } + _itemRemovalQueue.Clear(); + // If LayoutItems added to stack whilst the core animation is playing + // they would have been cleared here. + // Could have another stack to be added to whilst the animation is running. + // After the running stack is cleared it can be populated with the content + // of the other stack. Then the main removal stack iterated when AnimationFinished + // occurs again. + } + } + + /// + /// Set up the animation from each LayoutItems position data. + /// Iterates the transition stack, adding an Animator to the core animation. + /// + private bool SetupCoreAnimation() + { + // Initialize animation for this layout run. + bool animationPending = false; + + if (_layoutTransitionDataQueue.Count > 0 ) // Something to animate + { + _coreAnimation = new Animation(); + _coreAnimation.EndAction = Animation.EndActions.StopFinal; + _coreAnimation.Finished += AnimationFinished; + + // Iterate all items that have been queued for repositioning. + foreach (LayoutData layoutPositionData in _layoutTransitionDataQueue) + { + AddAnimatorsToAnimation(layoutPositionData); + } + + animationPending = true; + + // transitions have now been applied, clear stack, ready for new transitions on + // next layout traversal. + _layoutTransitionDataQueue.Clear(); + } + return animationPending; + } + + private void SetupAnimationForPosition(LayoutData layoutPositionData, TransitionComponents positionTransitionComponents) + { + // A removed item does not have a valid target position within the layout so don't try to position. + if( layoutPositionData.ConditionForAnimation != TransitionCondition.Remove ) + { + _coreAnimation.AnimateTo(layoutPositionData.Item.Owner, "Position", + new Vector3(layoutPositionData.Left, layoutPositionData.Top, 0.0f), + positionTransitionComponents.Delay, + positionTransitionComponents.Duration, + positionTransitionComponents.AlphaFunction ); + } + } + + private void SetupAnimationForText(LayoutData layoutPositionData) + { + // Text size cant be animated so is set to it's final size. + // It is due to the internals of the Text not being able to recalculate fast enough. + if (layoutPositionData.Item.Owner is TextLabel || layoutPositionData.Item.Owner is TextField) + { + float itemWidth = layoutPositionData.Right-layoutPositionData.Left; + float itemHeight = layoutPositionData.Bottom-layoutPositionData.Top; + // Set size directly. + layoutPositionData.Item.Owner.Size2D = new Size2D((int)itemWidth, (int)itemHeight); + } + else + { + _coreAnimation.AnimateTo(layoutPositionData.Item.Owner, "Size", + new Vector3(layoutPositionData.Right-layoutPositionData.Left, + layoutPositionData.Bottom-layoutPositionData.Top, + 0.0f), + 0, 1000); + } + } + + void SetupAnimationForCustomTransitions(TransitionList transitionsToAnimate, View view ) + { + if (transitionsToAnimate.Count > 0) + { + foreach (LayoutTransition transition in transitionsToAnimate) + { + if ( transition.AnimatableProperty != AnimatableProperties.Position) + { + _coreAnimation.AnimateTo(view, + transition.AnimatableProperty.ToString(), + transition.TargetValue, + transition.Animator.Delay, + transition.Animator.Duration, + transition.Animator.AlphaFunction ); + } + } + } + } + + /// + /// Interate transitions and replace Position Components if replacements found in list. + /// + private void FindAndReplaceAnimatorComponentsForProperty(TransitionList sourceTransitionList, + AnimatableProperties propertyToMatch, + ref TransitionComponents transitionComponentToUpdate) + { + foreach( LayoutTransition matchedTransitionList in sourceTransitionList) + { + if (matchedTransitionList.AnimatableProperty == propertyToMatch) + { + // Matched property to animate is for the propertyToMatch so use provided Animator. + transitionComponentToUpdate = matchedTransitionList.Animator; + } + } + } + + /// + /// Sets up the main animation with the animators for each item (each layoutPositionData structure) + /// + private void AddAnimatorsToAnimation( LayoutData layoutPositionData ) + { + LayoutTransition positionTransition = new LayoutTransition(); + TransitionCondition conditionForAnimators = layoutPositionData.ConditionForAnimation; + + // LayoutChanged transitions overrides ChangeOnAdd and ChangeOnRemove as siblings will + // reposition to the new layout not to the insertion/removal of a sibling. + if (layoutPositionData.ConditionForAnimation.HasFlag(TransitionCondition.LayoutChanged)) + { + conditionForAnimators = TransitionCondition.LayoutChanged; + } + + // Set up a default transition, will be overwritten if inherited from parent or set explicitly. + const int START_TIME = 0; + const int END_TIME = 100; + AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Linear); + // positionTransitionComponents will be overwritten if set explicitly + TransitionComponents positionTransitionComponents = new TransitionComponents(START_TIME, END_TIME, alphaFunction); + bool matchedCustomTransitions = false; + + // Inherit parent transitions if none already set on View for the condition. + // Transitions set on View rather than LayoutItem so if the Layout changes the transition persist. + // Still need to inherit Position animator from parent but not other animatable properties if already set. + + TransitionList transitionsForCurrentCondition; + + ILayoutParent layoutParent = layoutPositionData.Item.GetParent(); + if (layoutParent !=null) + { + // Check if item to aninmate has it's own Transitions for this condition. + if (layoutPositionData.Item.Owner.LayoutTransitions.ContainsKey(conditionForAnimators)) + { + matchedCustomTransitions = true; // If a key exists then a List of atleast 1 transition exists. + } + else + { + // Item doesn't have it's own transitions for this condition so copy parents if + // has a parent with transitions. + transitionsForCurrentCondition = new TransitionList(); + LayoutGroup layoutGroup = layoutParent as LayoutGroup; + TransitionList parentTransitionList; + // Note TryGetValue returns null if key not matched. + if (layoutGroup.Owner.LayoutTransitions.TryGetValue(conditionForAnimators, out parentTransitionList)) + { + // Copy parent transitions for this condition to temporary TransitionList. + LayoutTransitionsHelper.CopyTransitions(parentTransitionList, + transitionsForCurrentCondition); + + SetupAnimationForCustomTransitions(transitionsForCurrentCondition, layoutPositionData.Item.Owner); + matchedCustomTransitions = false; + } + } + } + + // SetupAnimationXXXX functions add Animators to the core Animation, these can be custom or set by the + // layout system in the case of Positioning. + + if (matchedCustomTransitions) + { + // Position transition can be for a layout changing to another layout or an item being added or removed. + // There can only be one position transition, it will be replaced if set multiple times. + // transitionsForCurrentCondition represent all non position (custom) properties that should be animated. + // There can be multiple properties hence returned as a list. + if (layoutPositionData.Item.Owner.LayoutTransitions.TryGetValue(conditionForAnimators, out transitionsForCurrentCondition)) + { + // Search for Position property in the transitionsForCurrentCondition list of custom transitions, + // and only use the particular parts of the animator as custom transitions should not effect all parameters of Position. + // Typically Delay, Duration and Alphafunction can be custom. + FindAndReplaceAnimatorComponentsForProperty(transitionsForCurrentCondition, + AnimatableProperties.Position, + ref positionTransitionComponents); + + SetupAnimationForCustomTransitions(transitionsForCurrentCondition, layoutPositionData.Item.Owner); + } + } + + SetupAnimationForPosition(layoutPositionData, positionTransitionComponents); + + SetupAnimationForText(layoutPositionData); + } + } // class LayoutController -} // namespace Tizen.NUI \ No newline at end of file +} // namespace Tizen.NUI diff --git a/src/Tizen.NUI/src/internal/Layouting/LayoutData.cs b/src/Tizen.NUI/src/internal/Layouting/LayoutData.cs index 90b87dd..0979d8c 100755 --- a/src/Tizen.NUI/src/internal/Layouting/LayoutData.cs +++ b/src/Tizen.NUI/src/internal/Layouting/LayoutData.cs @@ -16,55 +16,95 @@ */ using System.Collections.Generic; +using System; +using System.ComponentModel; namespace Tizen.NUI { + /// + /// The conditions for transitions. + /// + [FlagsAttribute] + /// Hidden-API which is usually used as Inhouse-API. If required to be opened as Public-API, ACR process is needed. + [EditorBrowsable(EditorBrowsableState.Never)] + public enum TransitionCondition + { + /// + /// Default when a condition has not been set. + /// + /// Hidden-API which is usually used as Inhouse-API. If required to be opened as Public-API, ACR process is needed. + [EditorBrowsable(EditorBrowsableState.Never)] + Unspecified = 0, + + /// + /// Animate changing layout to another layout. + /// + /// Hidden-API which is usually used as Inhouse-API. If required to be opened as Public-API, ACR process is needed. + [EditorBrowsable(EditorBrowsableState.Never)] + LayoutChanged = 1, + + /// + /// Animate adding item. + /// + /// Hidden-API which is usually used as Inhouse-API. If required to be opened as Public-API, ACR process is needed. + [EditorBrowsable(EditorBrowsableState.Never)] + Add = 2, + + /// + /// Animate removing item. + /// + /// Hidden-API which is usually used as Inhouse-API. If required to be opened as Public-API, ACR process is needed. + [EditorBrowsable(EditorBrowsableState.Never)] + Remove = 4, + + /// + /// Animation when an item changes due to a sibbling being added. + /// + /// Hidden-API which is usually used as Inhouse-API. If required to be opened as Public-API, ACR process is needed. + [EditorBrowsable(EditorBrowsableState.Never)] + ChangeOnAdd = 8, + + /// + /// Animation when an item changes due to a sibbling being removed. + /// + /// Hidden-API which is usually used as Inhouse-API. If required to be opened as Public-API, ACR process is needed. + [EditorBrowsable(EditorBrowsableState.Never)] + ChangeOnRemove = 16 + } /// - /// [Draft] Class to hold layout position data + /// [Draft] Class to hold layout animation and position data /// - internal struct LayoutPositionData + internal struct LayoutData { /// /// [Draft] Initialized constructor /// + /// Layout item. + /// Condition for the position values. /// Left position. /// Top position. /// Right position. /// Bottom position. - /// If an animation is required to the given positions. - public LayoutPositionData( float left, float top, float right, float bottom, bool animated ) + public LayoutData( LayoutItem item, TransitionCondition condition, float left, float top, float right, float bottom ) { - _left = left; - _top = top; - _right = right; - _bottom = bottom; - _animated = animated; + Item = item; + ConditionForAnimation = condition; + Left = left; + Top = top; + Right = right; + Bottom = bottom; } - private float _left; - private float _top; - private float _right; - private float _bottom; - private bool _animated; - }; + public LayoutItem Item{ get;} - /// - /// [Draft] Class to hold Layout data for each entity being laid out. - /// - internal class LayoutData - { - /// - /// [Draft] Constructor - /// - public LayoutData() - { - LayoutPositionDataList = new List(); - } + public TransitionCondition ConditionForAnimation{get;} - private List layoutPositionDataList; + public float Left{get;} + public float Top{get;} + public float Right{get;} + public float Bottom{get;} - internal List LayoutPositionDataList { get => layoutPositionDataList; set => layoutPositionDataList = value; } - } // LayoutData + }; } // namespace Tizen.NUI diff --git a/src/Tizen.NUI/src/internal/Layouting/LayoutGroup.cs b/src/Tizen.NUI/src/internal/Layouting/LayoutGroup.cs index d74749a..08a0de1 100755 --- a/src/Tizen.NUI/src/internal/Layouting/LayoutGroup.cs +++ b/src/Tizen.NUI/src/internal/Layouting/LayoutGroup.cs @@ -17,6 +17,7 @@ using System; using System.Collections.Generic; using System.ComponentModel; +using System.Diagnostics; using Tizen.NUI.BaseComponents; using System.Linq; @@ -46,13 +47,17 @@ namespace Tizen.NUI _children = new List(); } - /// + /// /// From ILayoutParent.
///
public virtual void Add(LayoutItem childLayout) { _children.Add(childLayout); childLayout.SetParent(this); + // Child added to use a Add transition. + childLayout.ConditionForAnimation = ConditionForAnimation | TransitionCondition.Add; + // Child's parent sets all other children not being added to a ChangeOnAdd transition. + SetConditionsForAnimationOnLayoutGroup(TransitionCondition.ChangeOnAdd); OnChildAdd(childLayout); RequestLayout(); } @@ -64,6 +69,7 @@ namespace Tizen.NUI { foreach( LayoutItem childLayout in _children ) { + childLayout.ConditionForAnimation = ConditionForAnimation | TransitionCondition.Remove; childLayout.Owner = null; } _children.Clear(); @@ -76,17 +82,29 @@ namespace Tizen.NUI ///
public virtual void Remove(LayoutItem layoutItem) { + bool childRemoved = false; foreach( LayoutItem childLayout in _children.ToList() ) { if( childLayout == layoutItem ) { - childLayout.SetParent(null); + Window.Instance.LayoutController.AddToRemovalStack(childLayout); _children.Remove(childLayout); + ConditionForAnimation = ConditionForAnimation | TransitionCondition.Remove; + // Add LayoutItem to the transition stack so can animate it out. + Window.Instance.LayoutController.AddTransitionDataEntry(new LayoutData(layoutItem, ConditionForAnimation, 0,0,0,0)); + + childRemoved = true; } } + if (childRemoved) + { + // If child removed then set all siblings not being added to a ChangeOnRemove transition. + SetConditionsForAnimationOnLayoutGroup(TransitionCondition.ChangeOnRemove); + } RequestLayout(); } + // Attaches to View ChildAdded signal so called when a View is added to a view. private void AddChildToLayoutGroup(View child) { // Only give children a layout if their parent is an explicit container or a pure View. @@ -122,18 +140,64 @@ namespace Tizen.NUI Add(child.Layout); } } + // Parent transitions are not attached to children. } /// /// If the child has a layout then it is removed from the parent layout. /// - /// Child to remove.true - private void RemoveChildFromLayoutGroup(View child) + /// Child View to remove. + internal void RemoveChildFromLayoutGroup(View child) { - if(child.Layout != null) + Debug.Assert(child.Layout !=null); + Remove(child.Layout); + } + + /// + /// Set all children in a LayoutGroup to the supplied condition. + /// Children with Add or Remove conditions should not be changed. + /// + private void SetConditionsForAnimationOnLayoutGroup( TransitionCondition conditionToSet) + { + foreach( LayoutItem childLayout in _children ) { - Remove(child.Layout); + switch( conditionToSet ) + { + case TransitionCondition.ChangeOnAdd : + { + // If other children also being added (TransitionCondition.Add) then do not change their + // conditions, Continue to use their Add transitions. + if (childLayout.ConditionForAnimation.HasFlag(TransitionCondition.Add)) + { + break; // Child being Added so don't update it's condition + } + else + { + // Set siblings for the child being added to use the ChangeOnAdd transition. + childLayout.ConditionForAnimation = TransitionCondition.ChangeOnAdd; + } + break; + } + case TransitionCondition.ChangeOnRemove : + { + if (childLayout.ConditionForAnimation.HasFlag(TransitionCondition.Remove)) + { + break; // Child being Removed so don't update it's condition + } + else + { + childLayout.ConditionForAnimation = TransitionCondition.ChangeOnRemove; + } + break; + } + case TransitionCondition.LayoutChanged : + { + childLayout.ConditionForAnimation = TransitionCondition.LayoutChanged; + break; + } + } } + } /// @@ -345,9 +409,10 @@ namespace Tizen.NUI AddChildToLayoutGroup(view); } - // Layout attached to owner so connect to ChildAdded and ChildRemoved signals. + // Connect to owner ChildAdded signal. Owner.ChildAdded += OnChildAddedToOwner; - Owner.ChildRemoved += OnChildRemovedFromOwner; + + // Removing Child from the owners View will directly call the LayoutGroup removal API. } // Virtual Methods that can be overridden by derived classes. @@ -440,4 +505,4 @@ namespace Tizen.NUI child.Measure( childWidthMeasureSpec, childHeightMeasureSpec ); } } -} +} \ No newline at end of file diff --git a/src/Tizen.NUI/src/internal/Layouting/LayoutItem.cs b/src/Tizen.NUI/src/internal/Layouting/LayoutItem.cs index 1249749..ff31dee 100755 --- a/src/Tizen.NUI/src/internal/Layouting/LayoutItem.cs +++ b/src/Tizen.NUI/src/internal/Layouting/LayoutItem.cs @@ -44,21 +44,24 @@ namespace Tizen.NUI private ILayoutParent Parent; - private LayoutLength _left; - private LayoutLength _right; - private LayoutLength _top; - private LayoutLength _bottom; - private LayoutData _layoutData; + LayoutData _layoutPositionData; private Extents _padding; private Extents _margin; + public TransitionCondition ConditionForAnimation{get; set;} + /// /// [Draft] The View that this Layout has been assigned to. /// public View Owner{get; set;} // Should not keep a View alive. /// + /// [Draft] Is this Layout set to animate its content. + /// + public bool Animate{get; set;} + + /// /// [Draft] Margin for this LayoutItem /// public Extents Margin @@ -137,11 +140,7 @@ namespace Tizen.NUI private void Initialize() { - _layoutData = new LayoutData(); - _left = new LayoutLength(0); - _top = new LayoutLength(0); - _right = new LayoutLength(0); - _bottom = new LayoutLength(0); + _layoutPositionData = new LayoutData(this,TransitionCondition.Unspecified,0,0,0,0); _padding = new Extents(0,0,0,0); _margin = new Extents(0,0,0,0); } @@ -166,6 +165,12 @@ namespace Tizen.NUI // Add layout to parent layout if a layout container View parent = Owner.GetParent() as View; (parent?.Layout as LayoutGroup)?.Add( this ); + + // If Add or ChangeOnAdd then do not update condition + if (ConditionForAnimation.HasFlag(TransitionCondition.Unspecified)) + { + ConditionForAnimation = TransitionCondition.LayoutChanged; + } } /// @@ -215,7 +220,10 @@ namespace Tizen.NUI /// Bottom position, relative to parent. public void Layout(LayoutLength left, LayoutLength top, LayoutLength right, LayoutLength bottom) { - bool changed = SetFrame(left, top, right, bottom); + bool changed = SetFrame(left.AsRoundedValue(), + top.AsRoundedValue(), + right.AsRoundedValue(), + bottom.AsRoundedValue()); // Check if Measure needed before Layouting if (changed || ((Flags & LayoutFlags.LayoutRequired) == LayoutFlags.LayoutRequired)) @@ -366,9 +374,9 @@ namespace Tizen.NUI /// Sets the minimum width of the layout.
/// It is not guaranteed the layout will be able to achieve this minimum width (for example, if its parent /// layout constrains it with less available width).
- /// 1. if the owner's View.LayoutWidthSpecification has exact value, then that value overrides the minimum size.
- /// 2. If the owner's View.LayoutWidthSpecification is set to View.LayoutParamPolicies.WrapContent, then the view's width is set based on the suggested minimum width. (@see GetSuggestedMinimumWidth()).
- /// 3. If the owner's View.LayoutWidthSpecification is set to View.LayoutParamPolicies.MatchParent, then the parent width takes precedence over the minimum width.
+ /// 1. if the owner's View.WidthSpecification has exact value, then that value overrides the minimum size.
+ /// 2. If the owner's View.WidthSpecification is set to View.LayoutParamPolicies.WrapContent, then the view's width is set based on the suggested minimum width. (@see GetSuggestedMinimumWidth()).
+ /// 3. If the owner's View.WidthSpecification is set to View.LayoutParamPolicies.MatchParent, then the parent width takes precedence over the minimum width.
///
public LayoutLength MinimumWidth {get; set;} @@ -376,9 +384,9 @@ namespace Tizen.NUI /// Sets the minimum height of the layout.
/// It is not guaranteed the layout will be able to achieve this minimum height (for example, if its parent /// layout constrains it with less available height).
- /// 1. if the owner's View.LayoutHeightSpecification has exact value, then that value overrides the minimum size.
- /// 2. If the owner's View.LayoutHeightSpecification is set to View.LayoutParamPolicies.WrapContent, then the view's height is set based on the suggested minimum height. (@see GetSuggestedMinimumHeight()).
- /// 3. If the owner's View.LayoutHeightSpecification is set to View.LayoutParamPolicies.MatchParent, then the parent height takes precedence over the minimum height.
+ /// 1. if the owner's View.HeightSpecification has exact value, then that value overrides the minimum size.
+ /// 2. If the owner's View.HeightSpecification is set to View.LayoutParamPolicies.WrapContent, then the view's height is set based on the suggested minimum height. (@see GetSuggestedMinimumHeight()).
+ /// 3. If the owner's View.HeightSpecification is set to View.LayoutParamPolicies.MatchParent, then the parent height takes precedence over the minimum height.
///
public LayoutLength MinimumHeight {get; set;} @@ -489,30 +497,37 @@ namespace Tizen.NUI { } - private bool SetFrame(LayoutLength left, LayoutLength top, LayoutLength right, LayoutLength bottom) + private bool SetFrame(float left, float top, float right, float bottom) { bool changed = false; - if( _left != left || _right != right || _top != top || _bottom != bottom ) + if ( _layoutPositionData.Left != left || + _layoutPositionData.Right != right || + _layoutPositionData.Top != top || + _layoutPositionData.Bottom != bottom ) { changed = true; - } - LayoutLength oldWidth = _right - _left; - LayoutLength oldHeight = _bottom - _top; - LayoutLength newWidth = right - left; - LayoutLength newHeight = bottom - top; - bool sizeChanged = ( newWidth != oldWidth ) || ( newHeight != oldHeight ); - - _left = left; - _top = top; - _right = right; - _bottom = bottom; - - // Set actual positions of View. - Owner.SetX(_left.AsRoundedValue()); - Owner.SetY(_top.AsRoundedValue()); - Owner.SetSize((int)newWidth.AsRoundedValue(), (int)newHeight.AsRoundedValue()); + float oldWidth = _layoutPositionData.Right - _layoutPositionData.Left; + float oldHeight = _layoutPositionData.Bottom - _layoutPositionData.Top; + float newWidth = right - left; + float newHeight = bottom - top; + bool sizeChanged = ( newWidth != oldWidth ) || ( newHeight != oldHeight ); + + // Set condition to layout changed as currently unspecified. Add, Remove would have specified a condition. + if (ConditionForAnimation.HasFlag(TransitionCondition.Unspecified)) + { + ConditionForAnimation = TransitionCondition.LayoutChanged; + } + + // Store new layout position data + _layoutPositionData = new LayoutData(this, ConditionForAnimation, left, top, right, bottom); + + Window.Instance.LayoutController.AddTransitionDataEntry(_layoutPositionData); + + // Reset condition for animation ready for next transition when required. + ConditionForAnimation = TransitionCondition.Unspecified; + } return changed; } diff --git a/src/Tizen.NUI/src/internal/Layouting/LayoutTransition.cs b/src/Tizen.NUI/src/internal/Layouting/LayoutTransition.cs new file mode 100755 index 0000000..3f9543c --- /dev/null +++ b/src/Tizen.NUI/src/internal/Layouting/LayoutTransition.cs @@ -0,0 +1,291 @@ +/* + * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +using System.Collections.Generic; +using System; +using System.ComponentModel; + +namespace Tizen.NUI +{ + /// + /// Define a List of LayoutTransitions + /// + /// Hidden-API which is usually used as Inhouse-API. If required to be opened as Public-API, ACR process is needed. + [EditorBrowsable(EditorBrowsableState.Never)] + public class TransitionList : List {} + + /// + /// The properties that can be animated. + /// + /// Hidden-API which is usually used as Inhouse-API. If required to be opened as Public-API, ACR process is needed. + [EditorBrowsable(EditorBrowsableState.Never)] + public enum AnimatableProperties + { + /// + /// Position property. + /// + /// Hidden-API which is usually used as Inhouse-API. If required to be opened as Public-API, ACR process is needed. + [EditorBrowsable(EditorBrowsableState.Never)] + Position, + /// + /// Size property. + /// + /// Hidden-API which is usually used as Inhouse-API. If required to be opened as Public-API, ACR process is needed. + [EditorBrowsable(EditorBrowsableState.Never)] + Size, + /// + /// Opacity property. + /// + /// Hidden-API which is usually used as Inhouse-API. If required to be opened as Public-API, ACR process is needed. + [EditorBrowsable(EditorBrowsableState.Never)] + Opacity + } + + /// + /// Parts of the transition that can be configured to provide a custom effect. + /// + /// Hidden-API which is usually used as Inhouse-API. If required to be opened as Public-API, ACR process is needed. + [EditorBrowsable(EditorBrowsableState.Never)] + public class TransitionComponents + { + /// + /// TransitionComponents default constructor. + /// + /// Hidden-API which is usually used as Inhouse-API. If required to be opened as Public-API, ACR process is needed. + [EditorBrowsable(EditorBrowsableState.Never)] + public TransitionComponents() + { + Delay = 0; + Duration = 100; + AlphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Linear); + } + + /// + /// TransitionComponents constructor. Stores delay, duration and AlphaFunction. + /// + /// The delay before the animator starts. + /// the duration fo the animator. + /// alpha function to use . + /// Hidden-API which is usually used as Inhouse-API. If required to be opened as Public-API, ACR process is needed. + [EditorBrowsable(EditorBrowsableState.Never)] + public TransitionComponents(int delay, int duration, AlphaFunction alphaFunction) + { + Delay = delay; + Duration = duration; + AlphaFunction = alphaFunction; + } + + /// + /// Time the transition should execute. Milliseconds. + /// + /// Hidden-API which is usually used as Inhouse-API. If required to be opened as Public-API, ACR process is needed. + [EditorBrowsable(EditorBrowsableState.Never)] + public int Duration; + + /// + /// Delay before the transition executes. Milliseconds. + /// + /// Hidden-API which is usually used as Inhouse-API. If required to be opened as Public-API, ACR process is needed. + [EditorBrowsable(EditorBrowsableState.Never)] + public int Delay; + + /// + /// Function to alter the transition path over time. + /// + /// Hidden-API which is usually used as Inhouse-API. If required to be opened as Public-API, ACR process is needed. + [EditorBrowsable(EditorBrowsableState.Never)] + public AlphaFunction AlphaFunction; + } + + /// + /// LayoutTransition stores the aninmation setting for a transition conidition. + /// + /// Hidden-API which is usually used as Inhouse-API. If required to be opened as Public-API, ACR process is needed. + [EditorBrowsable(EditorBrowsableState.Never)] + public class LayoutTransition + { + /// + /// LayoutTransition default constructor. + /// + /// Hidden-API which is usually used as Inhouse-API. If required to be opened as Public-API, ACR process is needed. + [EditorBrowsable(EditorBrowsableState.Never)] + public LayoutTransition() + { + Condition = TransitionCondition.Unspecified; + AnimatableProperty = AnimatableProperties.Position; + Animator = null; + TargetValue = 0; + } + + /// + /// LayoutTransition constructor. + /// + /// The animatable condition. + /// the property to animate. + /// target value of the property. + /// Components to define the animator. + /// Hidden-API which is usually used as Inhouse-API. If required to be opened as Public-API, ACR process is needed. + [EditorBrowsable(EditorBrowsableState.Never)] + public LayoutTransition( TransitionCondition condition, + AnimatableProperties animatableProperty, + object targetValue, + TransitionComponents animator) + { + Condition = condition; + AnimatableProperty = animatableProperty; + Animator = animator; + TargetValue = targetValue; + } + + /// + /// Condition for this Transition + /// + /// Hidden-API which is usually used as Inhouse-API. If required to be opened as Public-API, ACR process is needed. + [EditorBrowsable(EditorBrowsableState.Never)] + public TransitionCondition Condition{get; set;} + + /// + /// Property to animate. + /// + /// Hidden-API which is usually used as Inhouse-API. If required to be opened as Public-API, ACR process is needed. + [EditorBrowsable(EditorBrowsableState.Never)] + public AnimatableProperties AnimatableProperty{get; set;} + + /// + /// Components of the Animator. + /// + /// Hidden-API which is usually used as Inhouse-API. If required to be opened as Public-API, ACR process is needed. + [EditorBrowsable(EditorBrowsableState.Never)] + public TransitionComponents Animator{get; set;} + + /// + /// Target value to animate to. + /// + /// Hidden-API which is usually used as Inhouse-API. If required to be opened as Public-API, ACR process is needed. + [EditorBrowsable(EditorBrowsableState.Never)] + public object TargetValue{get; set;} + } + + + /// + /// Class to help manage the adding and updating of transitions. + /// + internal static class LayoutTransitionsHelper + { + /// + /// Adds the given transition and condition to a transition list. + /// + /// The list to add the transition to. + /// Condition for the transition. + /// The transition to add. + /// True is set explicitly, false if inherited. + static public void AddTransitionForCondition( + Dictionary targetTransitionList, + TransitionCondition condition, + LayoutTransition transition, + bool explicitlySet) + { + bool replaced = false; + bool conditionNotInDictionary = false; + TransitionList transitionListMatchingCondition; + if (targetTransitionList.TryGetValue(condition, out transitionListMatchingCondition)) + { + for (var index=0; index < transitionListMatchingCondition?.Count; index++ ) + { + if (transitionListMatchingCondition[index].AnimatableProperty == transition.AnimatableProperty) + { + if (explicitlySet) + { + transitionListMatchingCondition[index] = transition; + replaced = true; + continue; + } + } + } + } + else + { + conditionNotInDictionary = true; + } + + if (replaced == false) + { + if (transitionListMatchingCondition == null) + { + transitionListMatchingCondition = new TransitionList(); + } + transitionListMatchingCondition.Add(transition); + // Update dictionary with new or replaced entry. + if (conditionNotInDictionary) + { + targetTransitionList.Add(condition, transitionListMatchingCondition); // new entry + } + else + { + targetTransitionList[condition] = transitionListMatchingCondition; // replaced + } + } + } + + /// + /// Retreive the transition list for the given condition. + /// + /// The source collection of transition lists to retrieve. + /// Condition for the transition. + /// transition list to return as out parameter. + /// True if a transition list found for the given condition> + static public bool GetTransitionsListForCondition( + Dictionary sourceTransitionCollection, + TransitionCondition condition, + TransitionList transitionsForCondition ) + { + TransitionCondition resolvedCondition = condition; + bool matched = false; + // LayoutChanged transitions overrides ChangeOnAdd and ChangeOnRemove as siblings will + // reposition to the new layout not to the insertion/removal of a sibling. + if ((condition & TransitionCondition.LayoutChanged) == TransitionCondition.LayoutChanged) + { + resolvedCondition = TransitionCondition.LayoutChanged; + } + + if (sourceTransitionCollection.TryGetValue(resolvedCondition, out transitionsForCondition)) + { + matched = true; + } + + return matched; + } + + /// + /// Copy the transitions in the source list to the target list + /// + /// The source transition list. + /// The target transition list to copy to. + static public void CopyTransitions( TransitionList sourceTransitionList, + TransitionList targetTransitionList ) + { + targetTransitionList.Clear(); + foreach (LayoutTransition transitionToApply in sourceTransitionList) + { + // Overwite existing transitions + targetTransitionList.Add(transitionToApply); + } + + } + } + +} // namespace Tizen.NUI \ No newline at end of file diff --git a/src/Tizen.NUI/src/public/BaseComponents/View.cs b/src/Tizen.NUI/src/public/BaseComponents/View.cs index 50ee78a..21cbf48 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/View.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/View.cs @@ -63,21 +63,6 @@ namespace Tizen.NUI.BaseComponents public const int WrapContent = -2; } - /// - /// [Draft] Replaced by LayoutParamPolicies, will be removed once occurrences replaced. - /// - internal enum ChildLayoutData - { - /// - /// Constant which indicates child size should match parent size - /// - MatchParent = LayoutParamPolicies.MatchParent, - /// - /// Constant which indicates parent should take the smallest size possible to wrap it's children with their desired size - /// - WrapContent = LayoutParamPolicies.WrapContent, - } - internal enum ResourceLoadingStatusType { Invalid = -1, @@ -1309,6 +1294,9 @@ namespace Tizen.NUI.BaseComponents private global::System.Runtime.InteropServices.HandleRef swigCPtr; private LayoutItem _layout; // Exclusive layout assigned to this View. + + // List of transitions paired with the condition that uses the transition. + private Dictionary _layoutTransitions; private int _widthPolicy = LayoutParamPolicies.WrapContent; // Layout width policy private int _heightPolicy = LayoutParamPolicies.WrapContent; // Layout height policy private float _weight = 0.0f; // Weighting of child View in a Layout @@ -2278,7 +2266,7 @@ namespace Tizen.NUI.BaseComponents /// This means by default others are impossible so it is recommended that NUI object typed properties are configured by their constructor with parameters.
/// For example, this code is working fine : view.Scale = new Vector3( 2.0f, 1.5f, 0.0f);
/// but this will not work! : view.Scale.X = 2.0f; view.Scale.Y = 1.5f;
- /// It may not match the current value in some cases, i.e. when the animation is progressing or the maximum or minimu size is set.
+ /// It may not match the current value in some cases, i.e. when the animation is progressing or the maximum or minimum size is set.
/// /// 3 public Size2D Size2D @@ -2295,6 +2283,9 @@ namespace Tizen.NUI.BaseComponents // All Views are currently Layouts. MeasureSpecificationWidth = new MeasureSpecification(new LayoutLength(value.Width), MeasureSpecification.ModeType.Exactly); MeasureSpecificationHeight = new MeasureSpecification(new LayoutLength(value.Height), MeasureSpecification.ModeType.Exactly); + _widthPolicy = value.Width; + _heightPolicy = value.Height; + _layout?.RequestLayout(); NotifyPropertyChanged(); } } @@ -3411,7 +3402,7 @@ namespace Tizen.NUI.BaseComponents } /// - /// The required policy for this dimension, ChildLayoutData enum or exact value. + /// The required policy for this dimension, LayoutParamPolicies enum or exact value. /// /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API. /// @@ -3437,7 +3428,7 @@ namespace Tizen.NUI.BaseComponents } /// - /// The required policy for this dimension, ChildLayoutData enum or exact value. + /// The required policy for this dimension, LayoutParamPolicies enum or exact value. /// /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API. /// @@ -3462,6 +3453,36 @@ namespace Tizen.NUI.BaseComponents } } + /// + /// Gets the List of transitions for this View. + /// + /// Hidden-API which is usually used as Inhouse-API. If required to be opened as Public-API, ACR process is needed. + [EditorBrowsable(EditorBrowsableState.Never)] + public Dictionary LayoutTransitions + { + get + { + if (_layoutTransitions == null) + { + _layoutTransitions = new Dictionary(); + } + return _layoutTransitions; + } + } + + internal LayoutTransition LayoutTransition + { + set + { + if (_layoutTransitions == null) + { + _layoutTransitions = new Dictionary(); + } + LayoutTransitionsHelper.AddTransitionForCondition(_layoutTransitions,value.Condition,value, true); + + AttachTransitionsToChildren(value); + } + } /// /// [Obsolete("Please do not use! this will be deprecated")] @@ -3536,36 +3557,6 @@ namespace Tizen.NUI.BaseComponents } } - /// - /// Child property to specify desired width, use MatchParent/WrapContent) - /// - internal ChildLayoutData LayoutWidthSpecification - { - get - { - return (ChildLayoutData)_widthPolicy; - } - set - { - _widthPolicy = (int)value; - } - } - - /// - /// Child property to specify desired height, use MatchParent/WrapContent) - /// - internal ChildLayoutData LayoutHeightSpecification - { - get - { - return (ChildLayoutData)_heightPolicy; - } - set - { - _heightPolicy = (int)value; - } - } - internal float Weight { get @@ -3659,8 +3650,6 @@ namespace Tizen.NUI.BaseComponents /// /// Set the layout on this View. Replaces any existing Layout. /// - /// - /// internal LayoutItem Layout { get @@ -3783,6 +3772,17 @@ namespace Tizen.NUI.BaseComponents } } + internal void AttachTransitionsToChildren(LayoutTransition transition) + { + // Iterate children, adding the transition unless a transition + // for the same condition and property has already been + // explicitly added. + foreach (View view in Children) + { + LayoutTransitionsHelper.AddTransitionForCondition(view.LayoutTransitions,transition.Condition, transition, false); + } + } + internal float ParentOriginX { get @@ -4066,23 +4066,22 @@ namespace Tizen.NUI.BaseComponents /// 4 public override void Remove(View child) { + if (!child || child.GetParent()==null) // Early out if child null. + return; + bool hasLayout = (_layout != null); Log.Info("NUI","Removing View:" + child.Name + "layout[" + hasLayout.ToString() +"]\n"); - Interop.Actor.Actor_Remove(swigCPtr, View.getCPtr(child)); - if (NDalicPINVOKE.SWIGPendingException.Pending) - throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - Children.Remove(child); - child.InternalParent = null; - - if (ChildRemoved != null) + // If View has a layout then do a deferred child removal + // Actual child removal is performed by the layouting system so + // transitions can be completed. + if (hasLayout) { - ChildRemovedEventArgs e = new ChildRemovedEventArgs + (_layout as LayoutGroup)?.RemoveChildFromLayoutGroup( child ); + } + else { - Removed = child - }; - ChildRemoved(this, e); + RemoveChild(child); } } @@ -5282,6 +5281,26 @@ namespace Tizen.NUI.BaseComponents return (IntPtr)swigCPtr; } + internal void RemoveChild(View child) + { + // Do actual child removal + Interop.Actor.Actor_Remove(swigCPtr, View.getCPtr(child)); + if (NDalicPINVOKE.SWIGPendingException.Pending) + throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + Children.Remove(child); + child.InternalParent = null; + + if (ChildRemoved != null) + { + ChildRemovedEventArgs e = new ChildRemovedEventArgs + { + Removed = child + }; + ChildRemoved(this, e); + } + } + /// /// Removes the layout from this View. /// -- 2.7.4