[NUI] Change the border UI values ​​to properties.
authorjoogab.yun <joogab.yun@samsung.com>
Thu, 14 Apr 2022 05:39:58 +0000 (14:39 +0900)
committerJaehyun Cho <jaehyun0cho@gmail.com>
Wed, 20 Apr 2022 08:38:08 +0000 (17:38 +0900)
src/Tizen.NUI/src/public/Window/BorderWindow.cs
src/Tizen.NUI/src/public/Window/DefaultBorder.cs
src/Tizen.NUI/src/public/Window/IBorderInterface.cs
test/Tizen.NUI.Samples/Tizen.NUI.Samples/Samples/BorderWindowTest.cs

index 31ee3ee..7ef3963 100755 (executable)
@@ -128,11 +128,11 @@ namespace Tizen.NUI
             //  +=====+
             // '+' is BorderLineThickness
             // '=' is BorderHeight
-            WindowSize += new Size2D((int)borderInterface.GetBorderLineThickness() * 2, (int)(borderInterface.GetBorderHeight() + borderInterface.GetBorderLineThickness()));
+            WindowSize += new Size2D((int)borderInterface.BorderLineThickness * 2, (int)(borderInterface.BorderHeight + borderInterface.BorderLineThickness));
 
             if (CreateBorder() == false)
             {
-                WindowSize -= new Size2D((int)borderInterface.GetBorderLineThickness() * 2, (int)(borderInterface.GetBorderHeight() + borderInterface.GetBorderLineThickness()));
+                WindowSize -= new Size2D((int)borderInterface.BorderLineThickness * 2, (int)(borderInterface.BorderHeight + borderInterface.BorderLineThickness));
                 Resized -= OnBorderWindowResized;
                 isBorderWindow = false;
                 this.borderInterface = null;
@@ -142,7 +142,7 @@ namespace Tizen.NUI
 
             SetTransparency(true);
             BackgroundColor = Color.Transparent;
-            borderInterface.SetWindow(this);
+            borderInterface.BorderWindow = this;
 
             EnableFloatingMode(true);
 
@@ -169,7 +169,7 @@ namespace Tizen.NUI
             }
             else
             {
-                if (borderInterface.IsOverlayMode() == true)
+                if (borderInterface.OverlayMode == true)
                 {
                     rootView.InterceptTouchEvent += OverlayInterceptTouch;
                 }
@@ -192,42 +192,42 @@ namespace Tizen.NUI
             BorderDirection direction = BorderDirection.None;
 
             // check bottom left corner
-            if (xPosition < borderInterface.GetTouchThickness() && yPosition > WindowSize.Height + borderInterface.GetBorderHeight() - borderInterface.GetTouchThickness())
+            if (xPosition < borderInterface.TouchThickness && yPosition > WindowSize.Height + borderInterface.BorderHeight - borderInterface.TouchThickness)
             {
                 direction = BorderDirection.BottomLeft;
             }
             // check bottom right corner
-            else if (xPosition > WindowSize.Width + borderInterface.GetBorderLineThickness()*2 - borderInterface.GetTouchThickness() && yPosition > WindowSize.Height + borderInterface.GetBorderHeight() - borderInterface.GetTouchThickness())
+            else if (xPosition > WindowSize.Width + borderInterface.BorderLineThickness * 2 - borderInterface.TouchThickness && yPosition > WindowSize.Height + borderInterface.BorderHeight - borderInterface.TouchThickness)
             {
                 direction = BorderDirection.BottomRight;
             }
             // check top left corner
-            else if (xPosition < borderInterface.GetTouchThickness() && yPosition <  borderInterface.GetTouchThickness())
+            else if (xPosition < borderInterface.TouchThickness && yPosition <  borderInterface.TouchThickness)
             {
                 direction = BorderDirection.TopLeft;
             }
             // check top right corner
-            else if (xPosition > WindowSize.Width + borderInterface.GetBorderLineThickness()*2 - borderInterface.GetTouchThickness() && yPosition < borderInterface.GetTouchThickness())
+            else if (xPosition > WindowSize.Width + borderInterface.BorderLineThickness * 2 - borderInterface.TouchThickness && yPosition < borderInterface.TouchThickness)
             {
                 direction = BorderDirection.TopRight;
             }
             // check left side
-            else if (xPosition < borderInterface.GetTouchThickness())
+            else if (xPosition < borderInterface.TouchThickness)
             {
                 direction = BorderDirection.Left;
             }
             // check right side
-            else if (xPosition > WindowSize.Width + borderInterface.GetBorderLineThickness()*2 - borderInterface.GetTouchThickness())
+            else if (xPosition > WindowSize.Width + borderInterface.BorderLineThickness*2 - borderInterface.TouchThickness)
             {
                 direction = BorderDirection.Right;
             }
             // check bottom side
-            else if (yPosition > WindowSize.Height + borderInterface.GetBorderHeight() + borderInterface.GetBorderLineThickness() - borderInterface.GetTouchThickness())
+            else if (yPosition > WindowSize.Height + borderInterface.BorderHeight + borderInterface.BorderLineThickness - borderInterface.TouchThickness)
             {
                 direction = BorderDirection.Bottom;
             }
             // check top side
-            else if (yPosition < borderInterface.GetTouchThickness())
+            else if (yPosition < borderInterface.TouchThickness)
             {
                 direction = BorderDirection.Top;
             }
@@ -288,7 +288,7 @@ namespace Tizen.NUI
 
         private void OverlayMode(bool enable)
         {
-            if (borderInterface.IsOverlayMode() == true)
+            if (borderInterface.OverlayMode == true)
             {
                 if (enable == true)
                 {
@@ -324,16 +324,16 @@ namespace Tizen.NUI
             Tizen.Log.Info("NUI", $"OnBorderWindowResized {e.WindowSize.Width},{e.WindowSize.Height}\n");
             int resizeWidth = e.WindowSize.Width;
             int resizeHeight = e.WindowSize.Height;
-            if (borderInterface.GetMinSize() != null)
+            if (borderInterface.MinSize != null)
             {
-                resizeWidth = borderInterface.GetMinSize().Width > resizeWidth ? (int)borderInterface.GetMinSize().Width : resizeWidth;
-                resizeHeight = borderInterface.GetMinSize().Height > resizeHeight ? (int)borderInterface.GetMinSize().Height : resizeHeight;
+                resizeWidth = borderInterface.MinSize.Width > resizeWidth ? (int)borderInterface.MinSize.Width : resizeWidth;
+                resizeHeight = borderInterface.MinSize.Height > resizeHeight ? (int)borderInterface.MinSize.Height : resizeHeight;
             }
 
-            if (borderInterface.GetMaxSize() != null)
+            if (borderInterface.MaxSize != null)
             {
-                resizeWidth = borderInterface.GetMaxSize().Width < resizeWidth ? (int)borderInterface.GetMaxSize().Width : resizeWidth;
-                resizeHeight = borderInterface.GetMaxSize().Height < resizeHeight ? (int)borderInterface.GetMaxSize().Height : resizeHeight;
+                resizeWidth = borderInterface.MaxSize.Width < resizeWidth ? (int)borderInterface.MaxSize.Width : resizeWidth;
+                resizeHeight = borderInterface.MaxSize.Height < resizeHeight ? (int)borderInterface.MaxSize.Height : resizeHeight;
             }
 
             if (resizeWidth != e.WindowSize.Width || resizeHeight != e.WindowSize.Height)
@@ -341,7 +341,7 @@ namespace Tizen.NUI
                 WindowSize = new Size2D(resizeWidth, resizeHeight);
             }
 
-            if (borderInterface.IsOverlayMode() == true && IsMaximized() == true)
+            if (borderInterface.OverlayMode == true && IsMaximized() == true)
             {
                 Interop.ActorInternal.SetSize(GetBorderWindowRootLayer().SwigCPtr, resizeWidth, resizeHeight);
                 Interop.ActorInternal.SetSize(GetBorderWindowBottomLayer().SwigCPtr, resizeWidth, resizeHeight);
@@ -350,7 +350,7 @@ namespace Tizen.NUI
             else
             {
                 Interop.ActorInternal.SetSize(GetBorderWindowRootLayer().SwigCPtr, resizeWidth, resizeHeight);
-                Interop.ActorInternal.SetSize(GetBorderWindowBottomLayer().SwigCPtr, resizeWidth + borderInterface.GetBorderLineThickness() * 2, resizeHeight+borderInterface.GetBorderHeight() + borderInterface.GetBorderLineThickness());
+                Interop.ActorInternal.SetSize(GetBorderWindowBottomLayer().SwigCPtr, resizeWidth + borderInterface.BorderLineThickness * 2, resizeHeight+borderInterface.BorderHeight + borderInterface.BorderLineThickness);
                 OverlayMode(false);
             }
 
@@ -368,7 +368,7 @@ namespace Tizen.NUI
                 Interop.ActorInternal.SetParentOrigin(borderWindowBottomLayer.SwigCPtr, Tizen.NUI.ParentOrigin.TopCenter.SwigCPtr);
                 Interop.Actor.SetAnchorPoint(borderWindowBottomLayer.SwigCPtr, Tizen.NUI.PivotPoint.TopCenter.SwigCPtr);
                 Interop.Actor.Add(rootLayer.SwigCPtr, borderWindowBottomLayer.SwigCPtr);
-                Interop.ActorInternal.SetSize(borderWindowBottomLayer.SwigCPtr, WindowSize.Width+borderInterface.GetBorderLineThickness()*2, WindowSize.Height+borderInterface.GetBorderLineThickness());
+                Interop.ActorInternal.SetSize(borderWindowBottomLayer.SwigCPtr, WindowSize.Width+borderInterface.BorderLineThickness * 2, WindowSize.Height + borderInterface.BorderLineThickness);
                 borderWindowBottomLayer.SetWindow(this);
                 borderWindowBottomLayer.LowerToBottom();
 
@@ -386,8 +386,8 @@ namespace Tizen.NUI
                 Interop.ActorInternal.SetParentOrigin(borderWindowRootLayer.SwigCPtr, Tizen.NUI.ParentOrigin.TopCenter.SwigCPtr);
                 Interop.Actor.SetAnchorPoint(borderWindowRootLayer.SwigCPtr, Tizen.NUI.PivotPoint.TopCenter.SwigCPtr);
                 Interop.Actor.Add(rootLayer.SwigCPtr, borderWindowRootLayer.SwigCPtr);
-                Interop.ActorInternal.SetSize(borderWindowRootLayer.SwigCPtr, WindowSize.Width, WindowSize.Height-borderInterface.GetBorderHeight()-borderInterface.GetBorderLineThickness());
-                Interop.ActorInternal.SetPosition(borderWindowRootLayer.SwigCPtr, 0, borderInterface.GetBorderLineThickness());
+                Interop.ActorInternal.SetSize(borderWindowRootLayer.SwigCPtr, WindowSize.Width, WindowSize.Height-borderInterface.BorderHeight - borderInterface.BorderLineThickness);
+                Interop.ActorInternal.SetPosition(borderWindowRootLayer.SwigCPtr, 0, borderInterface.BorderLineThickness);
                 Tizen.NUI.Object.SetProperty(borderWindowRootLayer.SwigCPtr, Tizen.NUI.BaseComponents.View.Property.ClippingMode, new Tizen.NUI.PropertyValue((int)Tizen.NUI.ClippingModeType.ClipToBoundingBox));
 
                 if (NDalicPINVOKE.SWIGPendingException.Pending) { throw NDalicPINVOKE.SWIGPendingException.Retrieve(); }
@@ -399,7 +399,7 @@ namespace Tizen.NUI
         internal void DisposeBorder()
         {
             Resized -= OnBorderWindowResized;
-            if (borderInterface.IsOverlayMode() == true && rootView != null)
+            if (borderInterface.OverlayMode == true && rootView != null)
             {
                 rootView.InterceptTouchEvent -= OverlayInterceptTouch;
             }
@@ -411,8 +411,8 @@ namespace Tizen.NUI
         {
             if (isBorderWindow == true)
             {
-                var height = (ushort)(size.GetHeight() + borderInterface.GetBorderHeight()+borderInterface.GetBorderLineThickness());
-                var width = (ushort)(size.GetWidth() + borderInterface.GetBorderLineThickness()*2);
+                var height = (ushort)(size.GetHeight() + borderInterface.BorderHeight + borderInterface.BorderLineThickness);
+                var width = (ushort)(size.GetWidth() + borderInterface.BorderLineThickness * 2);
                 size.SetHeight(height);
                 size.SetWidth(width);
             }
@@ -420,10 +420,10 @@ namespace Tizen.NUI
 
         private void convertRealWindowSizeToBorderWindowSize(Uint16Pair size)
         {
-            if (isBorderWindow == true && !(borderInterface.IsOverlayMode() == true && IsMaximized() == true))
+            if (isBorderWindow == true && !(borderInterface.OverlayMode == true && IsMaximized() == true))
             {
-                var height = (ushort)(size.GetHeight() - borderInterface.GetBorderHeight()-borderInterface.GetBorderLineThickness());
-                var width = (ushort)(size.GetWidth() - borderInterface.GetBorderLineThickness()*2);
+                var height = (ushort)(size.GetHeight() - borderInterface.BorderHeight - borderInterface.BorderLineThickness);
+                var width = (ushort)(size.GetWidth() - borderInterface.BorderLineThickness * 2);
                 size.SetHeight(height);
                 size.SetWidth(width);
             }
index 92022a6..4850713 100755 (executable)
@@ -56,7 +56,6 @@ namespace Tizen.NUI
         #region Fields
         private Color backgroundColor;
         private View rootView;
-        private Window window = null;
 
         private ImageView minimalizeIcon;
         private ImageView maximalizeIcon;
@@ -94,24 +93,61 @@ namespace Tizen.NUI
         #region Methods
 
         /// <summary>
-        /// Sets the window which the border is enabled.
+        /// The thickness of the border.
         /// </summary>
-        /// <param name="window">The window in which the border is enabled.</param>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public virtual void SetWindow(Window window)
-        {
-          this.window = window;
-        }
+        public uint BorderLineThickness {get; set;}
+
+        /// <summary>
+        /// The thickness of the border's touch area.
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public uint TouchThickness {get; set;}
+
+        /// <summary>
+        /// The height of the border.
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public uint BorderHeight {get; set;}
+
+        /// <summary>
+        /// The minimum size by which the window will small.
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public Size2D MinSize {get; set;}
+
+        /// <summary>
+        /// The maximum size by which the window will big.
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public Size2D MaxSize {get; set;}
 
         /// <summary>
-        /// Returns the window which borders is enabled.
+        /// The window with borders added.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public virtual Window GetWindow()
+        public Window BorderWindow {get; set;}
+
+        /// <summary>
+        /// Whether overlay mode.
+        /// If overlay mode is true, the border area is hidden when the window is maximized.
+        /// And if you touched at screen, the border area is shown on the screen.
+        /// Default value is false;
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public bool OverlayMode {get; set;}
+
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public DefaultBorder()
         {
-            return window;
+            BorderLineThickness = DefaultLineThickness;
+            TouchThickness = DefaultTouchThickness;
+            BorderHeight = DefaultHeight;
+            MinSize = DefaultMinSize;
+            OverlayMode = false;
         }
 
+
         /// <summary>
         /// Create border UI. Users can override this method to draw border UI.
         /// </summary>
@@ -199,18 +235,18 @@ namespace Tizen.NUI
             {
                 if (preScale > e.PinchGesture.Scale)
                 {
-                    if (window.IsMaximized())
+                    if (BorderWindow.IsMaximized())
                     {
-                        window.Maximize(false);
+                        BorderWindow.Maximize(false);
                     }
                     else
                     {
-                        window.Minimize(true);
+                        BorderWindow.Minimize(true);
                     }
                 }
                 else
                 {
-                    window.Maximize(true);
+                    BorderWindow.Maximize(true);
                 }
             }
         }
@@ -222,40 +258,40 @@ namespace Tizen.NUI
 
             if (panGesture.State == Gesture.StateType.Started)
             {
-                direction = window.GetDirection(panGesture.Position.X, panGesture.Position.Y);
+                direction = BorderWindow.GetDirection(panGesture.Position.X, panGesture.Position.Y);
                 if (direction == Window.BorderDirection.Move)
                 {
-                    if (window.IsMaximized() == true)
+                    if (BorderWindow.IsMaximized() == true)
                     {
-                        window.Maximize(false);
+                        BorderWindow.Maximize(false);
                     }
                     else
                     {
-                        window.RequestMoveToServer();
+                        BorderWindow.RequestMoveToServer();
                     }
                 }
                 else if (direction != Window.BorderDirection.None)
                 {
-                    window.RequestResizeToServer((Window.ResizeDirection)direction);
+                    BorderWindow.RequestResizeToServer((Window.ResizeDirection)direction);
                 }
             }
             else if (panGesture.State == Gesture.StateType.Continuing)
             {
                 if (direction == Window.BorderDirection.BottomLeft || direction == Window.BorderDirection.BottomRight || direction == Window.BorderDirection.TopLeft || direction == Window.BorderDirection.TopRight)
                 {
-                    window.WindowSize += new Size2D((int)panGesture.ScreenDisplacement.X, (int)panGesture.ScreenDisplacement.Y);
+                    BorderWindow.WindowSize += new Size2D((int)panGesture.ScreenDisplacement.X, (int)panGesture.ScreenDisplacement.Y);
                 }
                 else if (direction == Window.BorderDirection.Left || direction == Window.BorderDirection.Right)
                 {
-                    window.WindowSize += new Size2D((int)panGesture.ScreenDisplacement.X, 0);
+                    BorderWindow.WindowSize += new Size2D((int)panGesture.ScreenDisplacement.X, 0);
                 }
                 else if (direction == Window.BorderDirection.Bottom || direction == Window.BorderDirection.Top)
                 {
-                    window.WindowSize += new Size2D(0, (int)panGesture.ScreenDisplacement.Y);
+                    BorderWindow.WindowSize += new Size2D(0, (int)panGesture.ScreenDisplacement.Y);
                 }
                 else if (direction == Window.BorderDirection.Move)
                 {
-                    window.WindowPosition += new Position2D((int)panGesture.ScreenDisplacement.X, (int)panGesture.ScreenDisplacement.Y);
+                    BorderWindow.WindowPosition += new Position2D((int)panGesture.ScreenDisplacement.X, (int)panGesture.ScreenDisplacement.Y);
                 }
             }
             else if (panGesture.State == Gesture.StateType.Finished || panGesture.State == Gesture.StateType.Cancelled)
@@ -275,13 +311,13 @@ namespace Tizen.NUI
             if (e.Touch.GetState(0) == PointStateType.Down)
             {
               ClearWindowGesture();
-              if(window.IsMinimized() == true)
+              if (BorderWindow.IsMinimized() == true)
               {
-                window.RequestResizeToServer(Window.ResizeDirection.TopLeft);
+                BorderWindow.RequestResizeToServer(Window.ResizeDirection.TopLeft);
               }
               else
               {
-                window.RequestResizeToServer(Window.ResizeDirection.BottomLeft);
+                BorderWindow.RequestResizeToServer(Window.ResizeDirection.BottomLeft);
               }
             }
             return true;
@@ -296,13 +332,13 @@ namespace Tizen.NUI
             if (e.Touch.GetState(0) == PointStateType.Down)
             {
               ClearWindowGesture();
-              if(window.IsMinimized() == true)
+              if (BorderWindow.IsMinimized() == true)
               {
-                window.RequestResizeToServer(Window.ResizeDirection.TopRight);
+                BorderWindow.RequestResizeToServer(Window.ResizeDirection.TopRight);
               }
               else
               {
-                window.RequestResizeToServer(Window.ResizeDirection.BottomRight);
+                BorderWindow.RequestResizeToServer(Window.ResizeDirection.BottomRight);
               }
             }
             return true;
@@ -318,7 +354,7 @@ namespace Tizen.NUI
             if (e.Touch.GetState(0) == PointStateType.Up)
             {
                 ClearWindowGesture();
-                window.Minimize(true);
+                BorderWindow.Minimize(true);
             }
             return true;
         }
@@ -332,13 +368,13 @@ namespace Tizen.NUI
             if (e.Touch.GetState(0) == PointStateType.Up)
             {
                 ClearWindowGesture();
-                if (window.IsMaximized())
+                if (BorderWindow.IsMaximized())
                 {
-                  window.Maximize(false);
+                  BorderWindow.Maximize(false);
                 }
                 else
                 {
-                  window.Maximize(true);
+                  BorderWindow.Maximize(true);
                 }
             }
             return true;
@@ -352,8 +388,8 @@ namespace Tizen.NUI
         {
             if (e.Touch.GetState(0) == PointStateType.Up)
             {
-                window.Destroy();
-                window = null;
+                BorderWindow.Destroy();
+                BorderWindow = null;
             }
             return true;
         }
@@ -361,9 +397,9 @@ namespace Tizen.NUI
 
         private void UpdateIcons()
         {
-            if (window != null && rootView != null)
+            if (BorderWindow != null && rootView != null)
             {
-                if (window.IsMaximized() == true)
+                if (BorderWindow.IsMaximized() == true)
                 {
                     if (maximalizeIcon != null)
                     {
@@ -387,7 +423,7 @@ namespace Tizen.NUI
                     }
                     rootView.CornerRadius = new Vector4(0, 0, 0, 0);
                     rootView.CornerRadiusPolicy = VisualTransformPolicyType.Relative;
-                    window.SetTransparency(false);
+                    BorderWindow.SetTransparency(false);
                 }
                 else
                 {
@@ -413,7 +449,7 @@ namespace Tizen.NUI
                     }
                     rootView.CornerRadius = new Vector4(0.03f, 0.03f, 0.03f, 0.03f);
                     rootView.CornerRadiusPolicy = VisualTransformPolicyType.Relative;
-                    window.SetTransparency(true);
+                    BorderWindow.SetTransparency(true);
                 }
             }
         }
@@ -461,7 +497,7 @@ namespace Tizen.NUI
         private void AddInterceptGesture()
         {
             isWinGestures = false;
-            window.InterceptTouchEvent += OnWinInterceptedTouch;
+            BorderWindow.InterceptTouchEvent += OnWinInterceptedTouch;
         }
 
         // Intercept touch on window.
@@ -502,7 +538,7 @@ namespace Tizen.NUI
             {
                 return true;
             };
-            window.Add(windowView);
+            BorderWindow.Add(windowView);
 
             winTapGestureDetector = new TapGestureDetector();
             winTapGestureDetector.Attach(windowView);
@@ -513,7 +549,7 @@ namespace Tizen.NUI
             winPanGestureDetector.Attach(windowView);
             winPanGestureDetector.Detected += OnWinPanGestureDetected;
 
-            window.InterceptTouchEvent -= OnWinInterceptedTouch;
+            BorderWindow.InterceptTouchEvent -= OnWinInterceptedTouch;
             isWinGestures = true;
             return false;
         }
@@ -526,13 +562,13 @@ namespace Tizen.NUI
               currentGesture = CurrentGesture.TapGesture;
               if (e.TapGesture.NumberOfTaps == 2)
               {
-                  if (window.IsMaximized() == false)
+                  if (BorderWindow.IsMaximized() == false)
                   {
-                    window.Maximize(true);
+                    BorderWindow.Maximize(true);
                   }
                   else
                   {
-                    window.Maximize(false);
+                    BorderWindow.Maximize(false);
                   }
               }
               else
@@ -552,13 +588,13 @@ namespace Tizen.NUI
                 if (panGesture.State == Gesture.StateType.Started)
                 {
                     currentGesture = CurrentGesture.PanGesture;
-                    if (window.IsMaximized() == true)
+                    if (BorderWindow.IsMaximized() == true)
                     {
-                        window.Maximize(false);
+                        BorderWindow.Maximize(false);
                     }
                     else
                     {
-                        window.RequestMoveToServer();
+                        BorderWindow.RequestMoveToServer();
                     }
                 }
                 else if (panGesture.State == Gesture.StateType.Finished || panGesture.State == Gesture.StateType.Cancelled)
@@ -577,8 +613,8 @@ namespace Tizen.NUI
                 winTapGestureDetector.Dispose();
 
                 isWinGestures = false;
-                window.Remove(windowView);
-                window.InterceptTouchEvent += OnWinInterceptedTouch;
+                BorderWindow.Remove(windowView);
+                BorderWindow.InterceptTouchEvent += OnWinInterceptedTouch;
             }
         }
 
@@ -594,70 +630,13 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Returns the thickness of the border.
-        /// </summary>
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public virtual uint GetBorderLineThickness()
-        {
-            return DefaultLineThickness;
-        }
-
-        /// <summary>
-        /// Returns the thickness of the border's touch area.
-        /// </summary>
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public virtual uint GetTouchThickness()
-        {
-            return DefaultTouchThickness;
-        }
-
-        /// <summary>
-        /// Returns the height of the border.
-        /// </summary>
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public virtual uint GetBorderHeight()
-        {
-            return DefaultHeight;
-        }
-
-        /// <summary>
-        /// Returns the minimum size by which the window will small.
-        /// </summary>
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public virtual Size2D GetMinSize()
-        {
-            return DefaultMinSize;
-        }
-
-        /// <summary>
-        /// Returns the maximum size by which the window will big.
-        /// </summary>
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public virtual Size2D GetMaxSize()
-        {
-            return null;
-        }
-
-        /// <summary>
-        /// Returns whether overlay mode is present.
-        /// If overlay mode is true, the border area is hidden when the window is maximized.
-        /// And if you touched at screen, the border area is shown on the screen.
-        /// Default value is false;
-        /// </summary>
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public virtual bool IsOverlayMode()
-        {
-            return false;
-        }
-
-        /// <summary>
         /// Dispose
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public virtual void Dispose()
         {
             ClearWindowGesture();
-            window.InterceptTouchEvent -= OnWinInterceptedTouch;
+            BorderWindow.InterceptTouchEvent -= OnWinInterceptedTouch;
             borderPanGestureDetector.Dispose();
             borderPinchGestureDetector.Dispose();
             if (windowView != null)
index e3d6848..bfd1e58 100755 (executable)
@@ -28,78 +28,72 @@ namespace Tizen.NUI
     public interface IBorderInterface
     {
         /// <summary>
-        /// Create border UI. User can override this method to draw border UI.
+        /// The thickness of the border.
         /// </summary>
-        /// <param name="rootView">The root view on which the border.</param>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public void CreateBorderView(View rootView);
-
+        public uint BorderLineThickness {get;}
 
         /// <summary>
-        /// Called after the border UI is created.
+        /// The thickness of the border's touch area.
         /// </summary>
-        /// <param name="rootView">The root view on which the border.</param>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public void OnCreated(View rootView);
+        public uint TouchThickness {get;}
 
         /// <summary>
-        /// Called when the window is resized.
+        /// The height of the border.
         /// </summary>
-        /// <param name="width">The width of the resized window</param>
-        /// <param name="height">The height of the resized window</param>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public void OnResized(int width, int height);
+        public uint BorderHeight {get;}
 
         /// <summary>
-        /// Returns the thickness of the border.
+        /// The minimum size by which the window will small.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public uint GetBorderLineThickness();
+        public Size2D MinSize {get;}
 
         /// <summary>
-        /// Returns the thickness of the border's touch area.
+        /// The maximum size by which the window will big.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public uint GetTouchThickness();
+        public Size2D MaxSize {get;}
 
         /// <summary>
-        /// Returns the height of the border.
+        /// The window with borders added.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public uint GetBorderHeight();
+        public Window BorderWindow {get; set;}
 
         /// <summary>
-        /// Returns the minimum size by which the window will small.
+        /// Whether overlay mode.
+        /// If overlay mode is true, the border area is hidden when the window is maximized.
+        /// And if you touched at screen, the border area is shown on the screen.
+        /// Default value is false;
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public Size2D GetMinSize();
+        public bool OverlayMode {get;}
 
-        /// <summary>
-        /// Returns the maximum size by which the window will big.
-        /// </summary>
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public Size2D GetMaxSize();
 
         /// <summary>
-        /// Sets The window to which the border is added.
+        /// Create border UI. User can override this method to draw border UI.
         /// </summary>
+        /// <param name="rootView">The root view on which the border.</param>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public void SetWindow(Window window);
+        public void CreateBorderView(View rootView);
 
         /// <summary>
-        /// Returns the window with borders added.
+        /// Called after the border UI is created.
         /// </summary>
+        /// <param name="rootView">The root view on which the border.</param>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public Window GetWindow();
+        public void OnCreated(View rootView);
 
         /// <summary>
-        /// Returns whether overlay mode is present.
-        /// If overlay mode is true, the border area is hidden when the window is maximized.
-        /// And if you touched at screen, the border area is shown on the screen.
-        /// Default value is false;
+        /// Called when the window is resized.
         /// </summary>
+        /// <param name="width">The width of the resized window</param>
+        /// <param name="height">The height of the resized window</param>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public bool IsOverlayMode();
+        public void OnResized(int width, int height);
 
         /// <summary>
         /// Dispose
index 0265132..4b757d7 100755 (executable)
@@ -26,13 +26,12 @@ namespace Tizen.NUI.Samples
 
       public CustomBorder() : base()
       {
+        BorderHeight = 60;
       }
 
-
       public override void CreateBorderView(View rootView)
       {
           this.rootView = rootView;
-          // rootView.BackgroundColor = new Color(1, 1, 1, 0.3f);
           rootView.CornerRadius = new Vector4(0.03f, 0.03f, 0.03f, 0.03f);
           rootView.CornerRadiusPolicy = VisualTransformPolicyType.Relative;
 
@@ -150,52 +149,11 @@ namespace Tizen.NUI.Samples
         }
       }
 
-      public override uint GetBorderLineThickness()
-      {
-        return base.GetBorderLineThickness();
-      }
-
-      public override uint GetTouchThickness()
-      {
-        return base.GetTouchThickness();
-      }
-
-      public override uint GetBorderHeight()
-      {
-        return base.GetBorderHeight();
-      }
-
-      public override Size2D GetMinSize()
-      {
-        return base.GetMinSize();
-      }
-
-      public override Size2D GetMaxSize()
-      {
-        return base.GetMaxSize();
-      }
-
-      public override void SetWindow(Window window)
-      {
-        base.SetWindow(window);
-      }
-
-      public override Window GetWindow()
-      {
-        return base.GetWindow();
-      }
-
       public override void Dispose()
       {
         base.Dispose();
       }
 
-      public override bool IsOverlayMode()
-      {
-        return true;
-      }
-
-
     }
 
     void CreateSubWindowOne()