Support for adding and removing Views from the Root Layer of Window 88/132488/1
authorUmar <m.umar@partner.samsung.com>
Mon, 5 Jun 2017 18:31:44 +0000 (19:31 +0100)
committerUmar <m.umar@partner.samsung.com>
Mon, 5 Jun 2017 18:31:44 +0000 (19:31 +0100)
Change-Id: I1be658ddb73b5955fc1cbd392c100e38f23dfe27

25 files changed:
NUISamples/NUISamples/NUISamples.TizenTV/examples/control-dashboard.cs
NUISamples/NUISamples/NUISamples.TizenTV/examples/custom-control.cs
NUISamples/NUISamples/NUISamples.TizenTV/examples/dali-test.cs
NUISamples/NUISamples/NUISamples.TizenTV/examples/date-picker-using-json/date-picker-using-json.cs
NUISamples/NUISamples/NUISamples.TizenTV/examples/date-picker.cs
NUISamples/NUISamples/NUISamples.TizenTV/examples/flex-container.cs
NUISamples/NUISamples/NUISamples.TizenTV/examples/hello-test.cs
NUISamples/NUISamples/NUISamples.TizenTV/examples/hello-world.cs
NUISamples/NUISamples/NUISamples.TizenTV/examples/positionUsesAnchorPoint-test.cs
NUISamples/NUISamples/NUISamples.TizenTV/examples/relative-vector.cs
NUISamples/NUISamples/NUISamples.TizenTV/examples/scroll-view.cs
NUISamples/NUISamples/NUISamples.TizenTV/examples/sibling-order-test.cs
NUISamples/NUISamples/NUISamples.TizenTV/examples/test1.cs
NUISamples/NUISamples/NUISamples.TizenTV/examples/text-test.cs
NUISamples/NUISamples/NUISamples.TizenTV/examples/user-alphafunction.cs
NUISamples/NUISamples/NUISamples.TizenTV/examples/view-navi-property.cs
NUISamples/NUISamples/NUISamples.TizenTV/examples/visual-animation-test.cs
NUISamples/NUISamples/NUISamples.TizenTV/examples/visual-animation-test2.cs
NUISamples/NUISamples/NUISamples.TizenTV/examples/visual-animation-test3.cs
NUISamples/NUISamples/NUISamples.TizenTV/examples/visual-view-test.cs
NUISamples/NUISamples/NUISamples.TizenTV/examples/visual-view-test2.cs
NUISamples/NUISamples/NUISamples.TizenTV/examples/visual-view-test3.cs
NUISamples/NUISamples/NUISamples.TizenTV/examples/visuals-example.cs
NUISamples/NUISamples/NUISamples.TizenTV/examples/visuals-using-custom-view/visuals-using-custom-view.cs
Tizen.NUI/src/public/Window.cs

index adc919a..456085e 100644 (file)
@@ -93,7 +93,7 @@ namespace ControlDashboard
             topLabel.HorizontalAlignment = HorizontalAlignment.Begin;
             topLabel.VerticalAlignment = VerticalAlignment.Center;
             topLabel.PointSize = 42.0f;
-            _window.GetDefaultLayer().Add(topLabel);
+            _window.Add(topLabel);
             //StyleManager.Get().ApplyStyle(topLabel, _resPath + "/json/control-dashboard-theme.json", "TextFieldFontSize4");
             topLabel.SetStyleName("TextFieldFontSize4");
 
@@ -111,7 +111,7 @@ namespace ControlDashboard
             _contentContainer.SetRelativeHeight(4, 0.07f);
             _contentContainer.SetRelativeHeight(5, 0.26f);
             _contentContainer.Focusable = (true);
-            _window.GetDefaultLayer().Add(_contentContainer);
+            _window.Add(_contentContainer);
 
             CreateContent();
 
@@ -334,7 +334,7 @@ namespace ControlDashboard
 
                     button.Clicked += (obj, ee) =>
                     {
-                        _window.GetDefaultLayer().Add(_popup);
+                        _window.Add(_popup);
                         _popup.SetDisplayState(Popup.DisplayStateType.Shown);
                         FocusManager.Instance.SetCurrentFocusView(View.DownCast((_popup.FindChildByName("Footer")).FindChildByName("OKButton")));
                         return true;
@@ -360,7 +360,7 @@ namespace ControlDashboard
                                 text.MultiLine = true;
                                 text.HorizontalAlignment = HorizontalAlignment.Center;
                                 toast.SetTitle(text);
-                                _window.GetDefaultLayer().Add(toast);
+                                _window.Add(toast);
                                 toast.SetDisplayState(Popup.DisplayStateType.Shown);
                             }
                         }
index 250d7b0..57afb4f 100644 (file)
@@ -207,7 +207,7 @@ namespace CustomControlTest
             container.WidthResizePolicy = ResizePolicyType.FillToParent;
             container.HeightResizePolicy = ResizePolicyType.FillToParent;
 
-            window.GetDefaultLayer().Add(container);
+            window.Add(container);
 
             Random random = new Random();
 
index 05d118a..2bc07ab 100755 (executable)
@@ -155,13 +155,13 @@ namespace DaliTest
             window.BackgroundColor = Color.White;
             Size windowSize = new Size(window.Size.Width, window.Size.Height, 0.0f);
             Tizen.Log.Debug("NUI", "Window size: " + windowSize.Width + ", " + windowSize.Height);
-            window.GetDefaultLayer().Add(view);
+            window.Add(view);
 
             TextLabel text = new TextLabel("Hello Mono World");
             text.ParentOrigin = ParentOrigin.Center;
             text.PivotPoint = PivotPoint.Center;
             text.HorizontalAlignment = HorizontalAlignment.Center;
-            window.GetDefaultLayer().Add(text);
+            window.Add(text);
 
             Tizen.Log.Debug("NUI",  "Text label text:  " + text.Text );
 
@@ -297,10 +297,10 @@ namespace DaliTest
             downView = new View();
             downView.Name = "downView";
 
-            Window.Instance.GetDefaultLayer().Add(leftView);
-            Window.Instance.GetDefaultLayer().Add(rightView);
-            Window.Instance.GetDefaultLayer().Add(upView);
-            Window.Instance.GetDefaultLayer().Add(downView);
+            Window.Instance.Add(leftView);
+            Window.Instance.Add(rightView);
+            Window.Instance.Add(upView);
+            Window.Instance.Add(downView);
 
             view.LeftFocusableView = leftView;
             tmpView = view.LeftFocusableView;
@@ -324,7 +324,7 @@ namespace DaliTest
                 Tizen.Log.Debug("NUI", "Failed: RightFocusedView = " + tmpView.Name);
             }
 
-            Window.Instance.GetDefaultLayer().Add(view);
+            Window.Instance.Add(view);
 
             view.UpFocusableView = upView;
             tmpView = view.UpFocusableView;
@@ -348,7 +348,7 @@ namespace DaliTest
                 Tizen.Log.Debug("NUI", "Failed: DownFocusedView = " + tmpView.Name);
             }
 
-            Window.Instance.GetDefaultLayer().Remove(leftView);
+            Window.Instance.Remove(leftView);
             tmpView = view.LeftFocusableView;
             if (!tmpView)
             {
@@ -543,7 +543,7 @@ namespace DaliTest
             label.ParentOrigin = ParentOrigin.TopLeft;
             label.PivotPoint = PivotPoint.TopLeft;
             label.Position = new Position(0.0f, 50.0f, 0.0f);
-            Window.Instance.GetDefaultLayer().Add(label);
+            Window.Instance.Add(label);
             label.VisibilityChanged += (sender, e) =>
             {
                 if (e.Visibility)
@@ -556,7 +556,7 @@ namespace DaliTest
             button.LabelText = "Change Visibility";
             button.ParentOrigin = ParentOrigin.TopLeft;
             button.PivotPoint = PivotPoint.TopLeft;
-            Window.Instance.GetDefaultLayer().Add(button);
+            Window.Instance.Add(button);
             button.Clicked += (sender, e) =>
             {
                 if (label.Visible)
@@ -584,7 +584,7 @@ namespace DaliTest
             {
                 Tizen.Log.Debug("NUI", "Resource is ready!");
             };
-            Window.Instance.GetDefaultLayer().Add(image);
+            Window.Instance.Add(image);
         }
 
         public void WindowDevelPropertyTest()
@@ -642,7 +642,7 @@ namespace DaliTest
 
             background = spin.Background;
             Color backgroundColor = new Color();
-            background.Find(ColorVisualProperty.MixColor).Get(backgroundColor);
+            background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor);
             if( backgroundColor == Color.Red )
             {
                 Tizen.Log.Debug("NUI", "Custom View Background property : test passed");
@@ -690,7 +690,7 @@ namespace DaliTest
         {
           View container = new View();
           container.Position = new Position(-800.0f, -800.0f, 0.0f);
-          Window.Instance.GetDefaultLayer().Add(container);
+          Window.Instance.Add(container);
           Tizen.Log.Debug("NUI", "winow layer count is "+Window.Instance.GetLayerCount());
           Tizen.Log.Debug("NUI", "winow default layer child at 0 is "+Window.Instance.GetDefaultLayer().GetChildAt(0));
           // Test downcast for native control
index 84a1f89..66bd7f4 100644 (file)
@@ -65,7 +65,7 @@ namespace DatePickerUsingJson
 
             View actorTree =  View.DownCast( handle );
 
-            window.GetDefaultLayer().Add( actorTree );
+            window.Add( actorTree );
 
             View year  = actorTree.FindChildByName("Year");
             View month  =  actorTree.FindChildByName("Month" );
index 6ae7cdb..4e6c98a 100644 (file)
@@ -63,7 +63,7 @@ namespace DatePickerTest
             _container.Size = new Vector3(480.0f, 150.0f, 0.0f);
             _container.Position2D = new Position2D(400, 400);
 
-            window.GetDefaultLayer().Add(_container);
+            window.Add(_container);
 
             // Create a Spin control for year
             _spinYear = new Spin();
@@ -130,7 +130,7 @@ namespace DatePickerTest
             _textField.Text = "imf manager test!";
             _textField.BackgroundColor = Color.Blue;
             _textField.TextColor = Color.White;
-            window.GetDefaultLayer().Add(_textField);
+            window.Add(_textField);
 
             keyboardFocusManager.SetCurrentFocusView(_textField);
 
@@ -139,7 +139,7 @@ namespace DatePickerTest
             _pushButton.Size2D = new Size2D(900, 100);
             _pushButton.LabelText = "imf activate";
             _pushButton.Clicked += _pushButton_Clicked;
-            window.GetDefaultLayer().Add(_pushButton);
+            window.Add(_pushButton);
         }
 
         private bool _pushButton_Clicked(object source, EventArgs e)
index 78d29cd..1e11b77 100644 (file)
@@ -41,7 +41,7 @@ namespace FlexContainerTest
             container.FlexWrap = FlexContainer.WrapType.Wrap;
             container.FlexDirection = FlexContainer.FlexDirectionType.Column;
 
-            Window.Instance.GetDefaultLayer().Add(container);
+            Window.Instance.Add(container);
 
             numOfSamples = samples.GetLength(0);
             Tizen.Log.Debug("NUI", "NUM = " + numOfSamples);
@@ -102,7 +102,7 @@ namespace FlexContainerTest
                 pushButton2.LabelText = "Remove Handler" + _cnt;
                 return true;
             };
-            Window.Instance.GetDefaultLayer().Add(pushButton1);
+            Window.Instance.Add(pushButton1);
 
             pushButton2 = new PushButton();
             pushButton2.MinimumSize = new Size2D(400, 200);
@@ -120,7 +120,7 @@ namespace FlexContainerTest
                 pushButton2.LabelText = "Remove Handler" + _cnt;
                 return true;
             };
-            Window.Instance.GetDefaultLayer().Add(pushButton2);
+            Window.Instance.Add(pushButton2);
 
             //added
             _ani = new Animation(2000);
index b14dbfb..0d07c5c 100644 (file)
@@ -68,7 +68,7 @@ namespace HelloTest
             _text.HorizontalAlignment = HorizontalAlignment.Center;
             _text.PointSize = 32.0f;
 
-            _window.GetDefaultLayer().Add(_text);
+            _window.Add(_text);
         }
 
         // Callback for _animation finished signal handling
index 75838c1..270a7d5 100755 (executable)
@@ -59,19 +59,19 @@ namespace HelloWorldTest
             TextLabel pixelLabel = new TextLabel("Test Pixel Size 32.0f");
             pixelLabel.Position2D = new Position2D(10, 10);
             pixelLabel.PixelSize = 32.0f;
-            window.GetDefaultLayer().Add(pixelLabel);
+            window.Add(pixelLabel);
 
             TextLabel pointLabel = new TextLabel("Test Point Size 32.0f");
             pointLabel.Position2D = new Position2D(10, 100);
             pointLabel.PointSize = 32.0f;
-            window.GetDefaultLayer().Add(pointLabel);
+            window.Add(pointLabel);
 
             TextLabel ellipsis = new TextLabel("Ellipsis of TextLabel is enabled.");
             ellipsis.Size2D = new Size2D(100, 100);
             ellipsis.Position2D = new Position2D(10, 250);
             ellipsis.PointSize = 20.0f;
             ellipsis.Ellipsis = true;
-            window.GetDefaultLayer().Add(ellipsis);
+            window.Add(ellipsis);
 
             TextLabel autoScrollStopMode = new TextLabel("AutoScrollStopMode is finish-loop.");
             autoScrollStopMode.Size2D = new Size2D(400, 100);
@@ -80,7 +80,7 @@ namespace HelloWorldTest
             autoScrollStopMode.AutoScrollStopMode = AutoScrollStopMode.FinishLoop;
             //autoScrollStopMode.AutoScrollLoopDelay = 10.0f;
             autoScrollStopMode.EnableAutoScroll = true;
-            window.GetDefaultLayer().Add(autoScrollStopMode);
+            window.Add(autoScrollStopMode);
 
             _text = new TextLabel("Hello NUI World");
             _text.ParentOrigin = ParentOrigin.Center;
@@ -88,7 +88,7 @@ namespace HelloWorldTest
             _text.HorizontalAlignment = HorizontalAlignment.Center;
             _text.PointSize = 32.0f;
             _text.TextColor = Color.Magenta;
-            window.GetDefaultLayer().Add(_text);
+            window.Add(_text);
 
             _view = new View();
             _view.Size = new Size(100, 100, 100);
index fd29d03..9046852 100644 (file)
@@ -68,7 +68,7 @@ namespace PositionUsesAnchorPointTest
             _text1.Size2D = new Size2D(200, 100);
             _text1.PointSize = 10.0f;
             _text1.BackgroundColor = Color.Blue;
-            _window.GetDefaultLayer().Add(_text1);
+            _window.Add(_text1);
 
             _text2 = new TextLabel("PositionNotUsesAnchorPoint");
             _text2.ParentOrigin = ParentOrigin.Center;
@@ -79,7 +79,7 @@ namespace PositionUsesAnchorPointTest
             _text2.Size2D = new Size2D(200, 100);
             _text2.PointSize = 10.0f;
             _text2.BackgroundColor = Color.Red;
-            _window.GetDefaultLayer().Add(_text2);
+            _window.Add(_text2);
         }
 
 
index afc5bce..becc3d2 100644 (file)
@@ -66,7 +66,7 @@ namespace RelativeVectorTest
             _imageView.PivotPoint = PivotPoint.Center;
             _imageView.PixelArea = new RelativeVector4(0.0f, 0.0f, 0.0f, 0.0f);
 
-            _window.GetDefaultLayer().Add(_imageView);
+            _window.Add(_imageView);
         }
 
         // Callback for window touched signal handling
index f4dfc72..cfb8432 100644 (file)
@@ -73,7 +73,7 @@ namespace ScrollViewTest
       _scrollView.Size = new Size(windowSize.Width, windowSize.Height, 0.0f);
       _scrollView.ParentOrigin = ParentOrigin.Center;
       _scrollView.PivotPoint = PivotPoint.Center;
-      window.GetDefaultLayer().Add(_scrollView);
+      window.Add(_scrollView);
 
       // Add actors to a scroll view with 3 pages
       int pageRows = 1;
index da5f17f..e07f7d5 100755 (executable)
@@ -86,7 +86,7 @@ namespace SiblingOrderTest
                 _view.PivotPoint = PivotPoint.TopLeft;
                 _view.Position2D = _myPos + new Position2D(20 * i, 10 * i);
 
-                _window.GetDefaultLayer().Add(_view);
+                _window.Add(_view);
             }
         }
 
@@ -106,7 +106,7 @@ namespace SiblingOrderTest
                 _view.Position2D = _myPos + new Position2D(20 * i, 10 * i);
                 _view.SiblingOrder = i;
 
-                _window.GetDefaultLayer().Add(_view);
+                _window.Add(_view);
             }
         }
 
@@ -126,7 +126,7 @@ namespace SiblingOrderTest
                 _view.Position2D = _myPos + new Position2D(20 * i, 10 * i);
                 _view.SiblingOrder = 10-i;
 
-                _window.GetDefaultLayer().Add(_view);
+                _window.Add(_view);
             }
         }
 
@@ -153,7 +153,7 @@ namespace SiblingOrderTest
                     _view.SiblingOrder = i-5;
                 }
 
-                _window.GetDefaultLayer().Add(_view);
+                _window.Add(_view);
             }
         }
 
@@ -180,7 +180,7 @@ namespace SiblingOrderTest
                     _view.SiblingOrder = 10-i;
                 }
 
-                _window.GetDefaultLayer().Add(_view);
+                _window.Add(_view);
             }
         }
 
index 15f74ec..42c79a6 100644 (file)
@@ -120,7 +120,7 @@ namespace Test1
 
             for (int i = 0; i < 10; i++)
             {
-                _window.GetDefaultLayer().Add(list_view[i]);
+                _window.Add(list_view[i]);
                 Tizen.Log.Debug("NUI", list_view[i].Name + "'s sibling order=" + list_view[i].SiblingOrder);
             }
 
@@ -129,7 +129,7 @@ namespace Test1
             _txt.Text = "on top: sibling#, sibling order=?";
             _txt.Position2D = _myPos + new Position2D(-50, 200);
             _txt.TextColor = Color.Blue;
-            _window.GetDefaultLayer().Add(_txt);
+            _window.Add(_txt);
 
         }
 
@@ -182,7 +182,7 @@ namespace Test1
                 _visualTest.Size2D = new Size2D(600, 200);
                 _visualTest.Position2D = new Position2D(50, 400);
                 _visualTest.BackgroundColor = Color.Yellow;
-                _window.GetDefaultLayer().Add(_visualTest);
+                _window.Add(_visualTest);
             }
             catch (Exception e)
             {
@@ -226,7 +226,7 @@ namespace Test1
             view.PivotPoint = PivotPoint.TopLeft;
             view.MinimumSize = new Size2D(100, 100);
             view.BackgroundColor = Color.Red;
-            _window.GetDefaultLayer().Add(view);
+            _window.Add(view);
 
             Position position0 = new Position(200.0f, 200.0f, 0.0f);
             Position position1 = new Position(300.0f, 300.0f, 0.0f);
index a00a794..3530209 100755 (executable)
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2016 Samsung Electronics Co., Ltd.
+* Copyright (c) 2017 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.
@@ -53,13 +53,13 @@ namespace TextTest
             pixelLabel.Position2D = new Position2D(10, 10);
             pixelLabel.PixelSize = 32.0f;
             pixelLabel.BackgroundColor = Color.Magenta;
-            window.GetDefaultLayer().Add(pixelLabel);
+            window.Add(pixelLabel);
 
             TextLabel pointLabel = new TextLabel("Test Point Size 32.0f");
             pointLabel.Position2D = new Position2D(10, 100);
             pointLabel.PointSize = 32.0f;
             pointLabel.BackgroundColor = Color.Red;
-            window.GetDefaultLayer().Add(pointLabel);
+            window.Add(pointLabel);
 
             TextLabel ellipsis = new TextLabel("Ellipsis of TextLabel is enabled.");
             ellipsis.Size2D = new Size2D(100, 80);
@@ -67,7 +67,7 @@ namespace TextTest
             ellipsis.PointSize = 20.0f;
             ellipsis.Ellipsis = true;
             ellipsis.BackgroundColor = Color.Cyan;
-            window.GetDefaultLayer().Add(ellipsis);
+            window.Add(ellipsis);
 
             TextLabel autoScrollStopMode = new TextLabel("AutoScrollStopMode is finish-loop.");
             autoScrollStopMode.Size2D = new Size2D(400, 50);
@@ -76,7 +76,7 @@ namespace TextTest
             autoScrollStopMode.BackgroundColor = Color.Green;
             autoScrollStopMode.AutoScrollStopMode = AutoScrollStopMode.FinishLoop;
             autoScrollStopMode.EnableAutoScroll = true;
-            window.GetDefaultLayer().Add(autoScrollStopMode);
+            window.Add(autoScrollStopMode);
 
             TextField field = new TextField();
             field.Size2D = new Size2D(400, 100);
@@ -89,7 +89,7 @@ namespace TextTest
             hiddenMap.Add(HiddenInputProperty.SubstituteCount, new PropertyValue(4));
             hiddenMap.Add(HiddenInputProperty.SubstituteCharacter, new PropertyValue(0x23));
             field.HiddenInputSettings = hiddenMap;
-            window.GetDefaultLayer().Add(field);
+            window.Add(field);
         }
 
         [STAThread]
index e4ac20c..cb50761 100644 (file)
@@ -75,7 +75,7 @@ namespace UserAlphaFunctionTest
             _text.PivotPoint = PivotPoint.BottomCenter;
             _text.HorizontalAlignment = HorizontalAlignment.Center;
             _text.PointSize = 32.0f;
-            window.GetDefaultLayer().Add(_text);
+            window.Add(_text);
 
             _view1 = new View();
             _view1.Size = new Vector3(200.0f, 200.0f, 0.0f);
@@ -85,7 +85,7 @@ namespace UserAlphaFunctionTest
             _view1.WidthResizePolicy = ResizePolicyType.Fixed;
             _view1.HeightResizePolicy = ResizePolicyType.Fixed;
             _view1.AddedToWindow += OnWindow;
-            window.GetDefaultLayer().Add(_view1);
+            window.Add(_view1);
 
             _view2 = new View();
             _view2.BackgroundColor = Color.Red;
index f5e07e0..a7612ed 100644 (file)
@@ -46,7 +46,7 @@ namespace MyCSharpExample
                 view[i].Position = new Position(300 + i * 300, 300, 0);
                 view[i].Name = "MyView" + i;
                 view[i].Focusable = true;
-                Window.Instance.GetDefaultLayer().Add(view[i]);
+                Window.Instance.Add(view[i]);
                 view[i].FocusGained += FocusNavigationSample_FocusGained;
                 view[i].FocusLost += FocusNavigationSample_FocusLost;
                 view[i].Key += FocusNavigationSample_KeyEvent;
index c2678e8..d6ac8d8 100755 (executable)
@@ -70,7 +70,7 @@ namespace VisaulAnimationExample
             titleLayout.Size2D = new Size2D((int)(window.Size.Width * 0.9f), (int)(window.Size.Height * 0.9f));
             titleLayout.SetCellPadding(new Size2D(10, 10));
             titleLayout.BackgroundColor = Color.Cyan;
-            window.GetDefaultLayer().Add(titleLayout);
+            window.Add(titleLayout);
 
             _title = new TextLabel("Visual Transition / SVG / AGIF Example");
             _title.Name = ("Title");
index 9488850..92528c0 100755 (executable)
@@ -71,7 +71,7 @@ namespace VisaulAnimationExample
             titleLayout.Size2D = new Size2D((int)(window.Size.Width * 0.9f), (int)(window.Size.Height * 0.9f));
             titleLayout.SetCellPadding(new Size2D(10, 10));
             titleLayout.BackgroundColor = Color.Cyan;
-            window.GetDefaultLayer().Add(titleLayout);
+            window.Add(titleLayout);
 
             _title = new TextLabel("Visual Transition Example");
             _title.Name = ("Title");
index 535d8f3..ebe3cc3 100755 (executable)
@@ -75,7 +75,7 @@ namespace VisaulAnimationExample
             titleLayout.Size2D = new Size2D((int)(window.Size.Width * 0.9f), (int)(window.Size.Height * 0.9f));
             titleLayout.SetCellPadding(new Size2D(10, 10));
             titleLayout.BackgroundColor = Color.Cyan;
-            window.GetDefaultLayer().Add(titleLayout);
+            window.Add(titleLayout);
 
             _title = new TextLabel("Visual Transition Example");
             _title.Name = ("Title");
index 2711050..f5592b6 100644 (file)
@@ -69,7 +69,7 @@ namespace VisualViewTest
             colorVisualMap1.Color = Color.Green;
             _visualView.Background = colorVisualMap1.OutputVisualMap;
 
-            window.GetDefaultLayer().Add(_visualView);
+            window.Add(_visualView);
 
             /* image visual 1. */
             imageVisualMap1 = new ImageVisual();
index 0fa3e36..8ca1943 100644 (file)
@@ -40,7 +40,7 @@ namespace VisualViewTest2
                 view[i].Position = new Position(400 + i * 800, 600, 0);
                 view[i].Focusable = true;
                 view[i].Name = "MyView" + i;
-                Window.Instance.GetDefaultLayer().Add(view[i]);
+                Window.Instance.Add(view[i]);
                 view[i].FocusGained += VisualSample_FocusGained;
                 view[i].FocusLost += VisualSample_FocusLost;
                 view[i].Key += VisualSample_KeyEvent;
@@ -135,7 +135,7 @@ namespace VisualViewTest2
             guide.Text = "Left/Right - Move focus\n" +
                 "Up/Down - Change Text\n" +
                 "Enter - Change BG image\n";
-            Window.Instance.GetDefaultLayer().Add(guide);
+            Window.Instance.Add(guide);
 
             Window.Instance.KeyEvent += Instance_Key;
             FocusManager.Instance.SetCurrentFocusView(view[0]);
index 1f01639..f58ed61 100644 (file)
@@ -67,7 +67,7 @@ namespace VisualViewTest3
             colorVisualMap1.Color = Color.Green;
             _visualView.Background = colorVisualMap1.OutputVisualMap;
 
-            window.GetDefaultLayer().Add(_visualView);
+            window.Add(_visualView);
 
             /* image visual 1. No transform setting case. */
             imageVisualMap1 = new ImageVisual();
index 5252d28..705c115 100644 (file)
@@ -61,7 +61,7 @@ namespace VisualsExampleTest
             contentLayout.SetCellPadding(new Size2D(0, 5));
             contentLayout.BackgroundColor = Color.Red;//new Color(0.949f, 0.949f, 0.949f, 1.0f);
 
-            window.GetDefaultLayer().Add(contentLayout);
+            window.Add(contentLayout);
 
             _title = new TextLabel("Visuals Example");
             _title.Name = "Title";
index ac88d9f..8998e58 100644 (file)
@@ -58,7 +58,7 @@ namespace VisualsUsingCustomView
             contentLayout.SetCellPadding(new Size2D(5, 5));
             contentLayout.BackgroundColor = new Color(0.949f, 0.949f, 0.949f, 1.0f);
 
-            window.GetDefaultLayer().Add(contentLayout);
+            window.Add(contentLayout);
 
             TextLabel title = new TextLabel("Contacts List with Visuals");
             title.Name = "Title";
index facdbb0..e2d05a7 100755 (executable)
@@ -539,13 +539,13 @@ namespace Tizen.NUI
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
-        internal void Add(View view)
+        public void Add(View view)
         {
             NDalicPINVOKE.Stage_Add(stageCPtr, View.getCPtr(view));
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
-        internal void Remove(View view)
+        public void Remove(View view)
         {
             NDalicPINVOKE.Stage_Remove(stageCPtr, View.getCPtr(view));
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();