From 21381b75552509d78591e03ad59510d625f79fd6 Mon Sep 17 00:00:00 2001 From: "xb.teng" Date: Tue, 25 Apr 2017 01:30:44 +0800 Subject: [PATCH] 1.[NUI 276] c# nui visual high level class refactorying. 2.Put some common enums and structs into a NUIConstants file. Note: HorizontalAlignment.HorizontalAlignBegin --> HorizontalAlignment.Begin, HorizontalAlignment.HorizontalAlignCenter --> HorizontalAlignment.Center, HorizontalAlignment.HorizontalAlignEnd --> HorizontalAlignment.End, VerticalAlignment.VerticalAlignTop --> VerticalAlignment.Top, VerticalAlignment.VerticalAlignCenter --> VerticalAlignment.Center, VerticalAlignment.VerticalAlignBottom --> VerticalAlignment.Bottom. Change-Id: I770900db2404cb46b29269853e1db3f37e7e5401 --- .../NUISamples.TizenTV/NUISamples.TizenTV.csproj | 3 +- .../NUISamples/NUISamples.TizenTV/examples/Main.cs | 3 +- .../examples/control-dashboard.cs | 12 +- .../NUISamples.TizenTV/examples/dali-test.cs | 2 +- .../NUISamples.TizenTV/examples/hello-test.cs | 2 +- .../NUISamples.TizenTV/examples/hello-world.cs | 2 +- .../NUISamples.TizenTV/examples/scroll-view.cs | 2 +- .../examples/user-alphafunction.cs | 2 +- .../examples/visual-animation-test.cs | 18 +- .../examples/visual-view-test.cs | 53 +- .../examples/visual-view-test2.cs | 24 +- .../examples/visual-view-test3.cs | 118 ++ .../visuals-using-custom-view.cs | 2 +- .../NUISamples.TizenTV/firstscreen/App.cs | 4 +- Tizen.NUI/Tizen.NUI.csproj | 1 + Tizen.NUI/src/public/Actor.cs | 137 --- Tizen.NUI/src/public/CameraActor.cs | 31 - Tizen.NUI/src/public/CustomView.cs | 26 - Tizen.NUI/src/public/CustomView/Spin.cs | 4 +- Tizen.NUI/src/public/CustomView/VisualView.cs | 14 +- Tizen.NUI/src/public/Key.cs | 13 - Tizen.NUI/src/public/NUIConstants.cs | 1232 ++++++++++++++++++++ Tizen.NUI/src/public/Position.cs | 351 ------ Tizen.NUI/src/public/Property.cs | 89 -- Tizen.NUI/src/public/StyleManager.cs | 20 - Tizen.NUI/src/public/TableView.cs | 39 - Tizen.NUI/src/public/Touch.cs | 41 - Tizen.NUI/src/public/UIComponents/TextEditor.cs | 14 +- Tizen.NUI/src/public/UIComponents/TextField.cs | 28 +- Tizen.NUI/src/public/UIComponents/TextLabel.cs | 67 +- Tizen.NUI/src/public/VisualMaps.cs | 1169 +++++++++---------- 31 files changed, 1993 insertions(+), 1530 deletions(-) create mode 100755 NUISamples/NUISamples/NUISamples.TizenTV/examples/visual-view-test3.cs create mode 100755 Tizen.NUI/src/public/NUIConstants.cs diff --git a/NUISamples/NUISamples/NUISamples.TizenTV/NUISamples.TizenTV.csproj b/NUISamples/NUISamples/NUISamples.TizenTV/NUISamples.TizenTV.csproj index 657f5d4..9cc619f 100755 --- a/NUISamples/NUISamples/NUISamples.TizenTV/NUISamples.TizenTV.csproj +++ b/NUISamples/NUISamples/NUISamples.TizenTV/NUISamples.TizenTV.csproj @@ -75,6 +75,7 @@ + @@ -204,4 +205,4 @@ - \ No newline at end of file + diff --git a/NUISamples/NUISamples/NUISamples.TizenTV/examples/Main.cs b/NUISamples/NUISamples/NUISamples.TizenTV/examples/Main.cs index 707c82c..53c4891 100755 --- a/NUISamples/NUISamples/NUISamples.TizenTV/examples/Main.cs +++ b/NUISamples/NUISamples/NUISamples.TizenTV/examples/Main.cs @@ -30,7 +30,8 @@ namespace NUISamples.TizenTV.examples //new RelativeVectorTest.Example().Run(args); //new VisaulAnimationExample.Example().Run(args); //new VisualViewTest.Example().Run(args); //o - new VisualViewTest2.VisualSample().Run(args); + //new VisualViewTest2.VisualSample().Run(args); + new VisualViewTest3.Example().Run(args); //o //new VisualsUsingCustomView.VisualsExample().Run(args); //o //new FirstScreen.FirstScreenApp().Run(args); //o //new PositionUsesAnchorPointTest.Example().Run(args); diff --git a/NUISamples/NUISamples/NUISamples.TizenTV/examples/control-dashboard.cs b/NUISamples/NUISamples/NUISamples.TizenTV/examples/control-dashboard.cs index 1537252..c1d58a0 100755 --- a/NUISamples/NUISamples/NUISamples.TizenTV/examples/control-dashboard.cs +++ b/NUISamples/NUISamples/NUISamples.TizenTV/examples/control-dashboard.cs @@ -89,8 +89,8 @@ namespace ControlDashboard topLabel.BackgroundColor = new Color(43.0f / 255.0f, 145.0f / 255.0f, 175.0f / 255.0f, 1.0f); topLabel.TextColor = Color.White; topLabel.Text = " DALi Views"; - topLabel.HorizontalAlignment = HorizontalAlignment.HorizontalAlignBegin; - topLabel.VerticalAlignment = VerticalAlignment.VerticalAlignCenter; + topLabel.HorizontalAlignment = HorizontalAlignment.Begin; + topLabel.VerticalAlignment = VerticalAlignment.Center; topLabel.PointSize = 42.0f; _stage.GetDefaultLayer().Add(topLabel); //StyleManager.Get().ApplyStyle(topLabel, _resPath + "/json/control-dashboard-theme.json", "TextFieldFontSize4"); @@ -140,8 +140,8 @@ namespace ControlDashboard // Make label for item TextLabel itemLabel = new TextLabel(" " + item.name); itemLabel.Size = new Vector3(_stage.Size.Width * 0.2f, _stage.Size.Height * 0.05f, 0.0f); - itemLabel.HorizontalAlignment = HorizontalAlignment.HorizontalAlignBegin; - itemLabel.VerticalAlignment = VerticalAlignment.VerticalAlignBottom; + itemLabel.HorizontalAlignment = HorizontalAlignment.Begin; + itemLabel.VerticalAlignment = VerticalAlignment.Bottom; //itemLabel.PointSize = 18.0f; _contentContainer.AddChild(itemLabel, new TableView.CellPosition(((uint)idx / 5) * 2, (uint)idx % 5)); @@ -357,7 +357,7 @@ namespace ControlDashboard TextLabel text = new TextLabel("This is a Toast.\nIt will auto-hide itself"); text.TextColor = Color.White; text.MultiLine = true; - text.HorizontalAlignment = HorizontalAlignment.HorizontalAlignCenter; + text.HorizontalAlignment = HorizontalAlignment.Center; toast.SetTitle(text); _stage.GetDefaultLayer().Add(toast); toast.SetDisplayState(Popup.DisplayStateType.Shown); @@ -425,7 +425,7 @@ namespace ControlDashboard TextLabel titleActor = new TextLabel(title); titleActor.TextColor = Color.White; titleActor.MultiLine = true; - titleActor.HorizontalAlignment = HorizontalAlignment.HorizontalAlignCenter; + titleActor.HorizontalAlignment = HorizontalAlignment.Center; return titleActor; } diff --git a/NUISamples/NUISamples/NUISamples.TizenTV/examples/dali-test.cs b/NUISamples/NUISamples/NUISamples.TizenTV/examples/dali-test.cs index e53faee..de517e2 100755 --- a/NUISamples/NUISamples/NUISamples.TizenTV/examples/dali-test.cs +++ b/NUISamples/NUISamples/NUISamples.TizenTV/examples/dali-test.cs @@ -152,7 +152,7 @@ namespace DaliTest TextLabel text = new TextLabel("Hello Mono World"); text.ParentOrigin = ParentOrigin.Center; text.AnchorPoint = AnchorPoint.Center; - text.HorizontalAlignment = HorizontalAlignment.HorizontalAlignCenter; + text.HorizontalAlignment = HorizontalAlignment.Center; stage.GetDefaultLayer().Add(text); Tizen.Log.Debug("NUI", "Text label text: " + text.Text ); diff --git a/NUISamples/NUISamples/NUISamples.TizenTV/examples/hello-test.cs b/NUISamples/NUISamples/NUISamples.TizenTV/examples/hello-test.cs index 22f513f..f1bd160 100755 --- a/NUISamples/NUISamples/NUISamples.TizenTV/examples/hello-test.cs +++ b/NUISamples/NUISamples/NUISamples.TizenTV/examples/hello-test.cs @@ -64,7 +64,7 @@ namespace HelloTest _text = new TextLabel("Hello Mono World"); _text.ParentOrigin = ParentOrigin.Center; _text.AnchorPoint = AnchorPoint.Center; - _text.HorizontalAlignment = HorizontalAlignment.HorizontalAlignCenter; + _text.HorizontalAlignment = HorizontalAlignment.Center; _text.PointSize = 32.0f; _stage.GetDefaultLayer().Add(_text); diff --git a/NUISamples/NUISamples/NUISamples.TizenTV/examples/hello-world.cs b/NUISamples/NUISamples/NUISamples.TizenTV/examples/hello-world.cs index 9af16c1..52baf54 100755 --- a/NUISamples/NUISamples/NUISamples.TizenTV/examples/hello-world.cs +++ b/NUISamples/NUISamples/NUISamples.TizenTV/examples/hello-world.cs @@ -59,7 +59,7 @@ namespace HelloWorldTest _text = new TextLabel("Hello NUI World"); _text.ParentOrigin = ParentOrigin.Center; _text.AnchorPoint = AnchorPoint.Center; - _text.HorizontalAlignment = HorizontalAlignment.HorizontalAlignCenter; + _text.HorizontalAlignment = HorizontalAlignment.Center; _text.PointSize = 32.0f; _text.TextColor = Color.Magenta; stage.GetDefaultLayer().Add(_text); diff --git a/NUISamples/NUISamples/NUISamples.TizenTV/examples/scroll-view.cs b/NUISamples/NUISamples/NUISamples.TizenTV/examples/scroll-view.cs index d7db380..72fcb49 100755 --- a/NUISamples/NUISamples/NUISamples.TizenTV/examples/scroll-view.cs +++ b/NUISamples/NUISamples/NUISamples.TizenTV/examples/scroll-view.cs @@ -141,7 +141,7 @@ namespace ScrollViewTest _text = new TextLabel("View Touch Event Handler Test"); _text.ParentOrigin = ParentOrigin.Center; _text.AnchorPoint = AnchorPoint.Center; - _text.HorizontalAlignment = HorizontalAlignment.HorizontalAlignCenter; + _text.HorizontalAlignment = HorizontalAlignment.Center; _text.PointSize = 20.0f; _scrollView.Add(_text); diff --git a/NUISamples/NUISamples/NUISamples.TizenTV/examples/user-alphafunction.cs b/NUISamples/NUISamples/NUISamples.TizenTV/examples/user-alphafunction.cs index 70e1d16..6277d4e 100755 --- a/NUISamples/NUISamples/NUISamples.TizenTV/examples/user-alphafunction.cs +++ b/NUISamples/NUISamples/NUISamples.TizenTV/examples/user-alphafunction.cs @@ -72,7 +72,7 @@ namespace UserAlphaFunctionTest _text = new TextLabel("Hello Mono World"); _text.ParentOrigin = ParentOrigin.BottomCenter; _text.AnchorPoint = AnchorPoint.BottomCenter; - _text.HorizontalAlignment = HorizontalAlignment.HorizontalAlignCenter; + _text.HorizontalAlignment = HorizontalAlignment.Center; _text.PointSize = 32.0f; stage.GetDefaultLayer().Add(_text); diff --git a/NUISamples/NUISamples/NUISamples.TizenTV/examples/visual-animation-test.cs b/NUISamples/NUISamples/NUISamples.TizenTV/examples/visual-animation-test.cs index 6574f2b..8206a37 100755 --- a/NUISamples/NUISamples/NUISamples.TizenTV/examples/visual-animation-test.cs +++ b/NUISamples/NUISamples/NUISamples.TizenTV/examples/visual-animation-test.cs @@ -75,7 +75,7 @@ namespace VisaulAnimationExample _title.SetStyleName("Title"); _title.WidthResizePolicy = ResizePolicyType.FillToParent; _title.HeightResizePolicy = ResizePolicyType.UseNaturalSize; - _title.HorizontalAlignment = HorizontalAlignment.HorizontalAlignCenter; + _title.HorizontalAlignment = HorizontalAlignment.Center; titleLayout.AddChild(_title, new TableView.CellPosition(0, 0)); titleLayout.SetFitHeight(0); @@ -100,9 +100,9 @@ namespace VisaulAnimationExample _icon.URL = _resPath + "/images/application-icon-0.png"; _icon.DepthIndex = 1; _icon.Size = new Size2D(50, 50); - _icon.SizePolicy = new Vector2(1, 1); + _icon.SizePolicy = VisualTransformPolicyType.Absolute; _icon.Position = new Position2D(5, 5); - _icon.PositionPolicy = new Vector2(1, 1); + _icon.PositionPolicy = VisualTransformPolicyType.Absolute; _icon.Origin = Visual.AlignType.TopBegin; _icon.AnchorPoint = Visual.AlignType.TopBegin; _icon.MixColor = new Color(0, 1, 0, 0.5f); @@ -131,9 +131,9 @@ namespace VisaulAnimationExample NPatchVisual npatch1 = new NPatchVisual(); npatch1.URL = _resPath + "/images/gallery-2.jpg"; npatch1.Size = new Size2D(400, 400); - npatch1.SizePolicy = new Vector2(1, 1); + npatch1.SizePolicy = VisualTransformPolicyType.Absolute; npatch1.Position = new Position2D(400, 0); - npatch1.PositionPolicy = new Vector2(1, 1); + npatch1.PositionPolicy = VisualTransformPolicyType.Absolute; npatch1.Origin = Visual.AlignType.TopBegin; npatch1.AnchorPoint = Visual.AlignType.TopBegin; npatch1.Border = new Rectangle(100, 100, 100, 100); @@ -154,9 +154,9 @@ namespace VisaulAnimationExample svgVisual = new SVGVisual(); svgVisual.URL = _resPath + "/images/Kid1.svg"; svgVisual.Size = new Size2D(300, 300); - svgVisual.SizePolicy = new Vector2(1, 1); + svgVisual.SizePolicy = VisualTransformPolicyType.Absolute; svgVisual.Position = new Position2D(0, 0); - svgVisual.PositionPolicy = new Vector2(1, 1); + svgVisual.PositionPolicy = VisualTransformPolicyType.Absolute; svgVisual.Origin = Visual.AlignType.TopBegin; svgVisual.AnchorPoint = Visual.AlignType.TopBegin; VisualView1.AddVisual("svg_visual1", svgVisual); @@ -194,9 +194,9 @@ namespace VisaulAnimationExample gifVisual = new AnimatedImageVisual(); gifVisual.URL = _resPath + "/images/dog-anim.gif"; gifVisual.Size = new Size2D(200, 200); - gifVisual.SizePolicy = new Vector2(1, 1); + gifVisual.SizePolicy = VisualTransformPolicyType.Absolute; gifVisual.Position = new Position2D(0, 0); - gifVisual.PositionPolicy = new Vector2(1, 1); + gifVisual.PositionPolicy = VisualTransformPolicyType.Absolute; gifVisual.Origin = Visual.AlignType.TopBegin; gifVisual.AnchorPoint = Visual.AlignType.TopBegin; VisualView2.AddVisual("gif_visual", gifVisual); diff --git a/NUISamples/NUISamples/NUISamples.TizenTV/examples/visual-view-test.cs b/NUISamples/NUISamples/NUISamples.TizenTV/examples/visual-view-test.cs index d9be666..3945ba2 100755 --- a/NUISamples/NUISamples/NUISamples.TizenTV/examples/visual-view-test.cs +++ b/NUISamples/NUISamples/NUISamples.TizenTV/examples/visual-view-test.cs @@ -67,6 +67,7 @@ namespace VisualViewTest ColorVisual colorVisualMap1 = new ColorVisual(); colorVisualMap1.MixColor = Color.Green; _visualView.Background = colorVisualMap1.OutputVisualMap; + stage.GetDefaultLayer().Add(_visualView); /* image visual 1. */ @@ -74,8 +75,10 @@ namespace VisualViewTest imageVisualMap1.URL = resources + "/images/image-1.jpg"; imageVisualMap1.Size = new Vector2(200.0f, 200.0f); imageVisualMap1.Position = new Vector2(10.0f, 10.0f); - imageVisualMap1.PositionPolicy = new Vector2(1, 1); - imageVisualMap1.SizePolicy = new Vector2(1, 1); + imageVisualMap1.PositionPolicy = VisualTransformPolicyType.Absolute; + Console.WriteLine("PositionPolicy:{0}",imageVisualMap1.PositionPolicy); + imageVisualMap1.SizePolicy = VisualTransformPolicyType.Absolute; + Console.WriteLine("SizePolicy:{0}",imageVisualMap1.SizePolicy); imageVisualMap1.Origin = Visual.AlignType.TopBegin; imageVisualMap1.AnchorPoint = Visual.AlignType.TopBegin; _visualView.AddVisual("imageVisual1", imageVisualMap1); @@ -85,8 +88,8 @@ namespace VisualViewTest imageVisualMap2.URL = resources + "/images/image-2.jpg"; imageVisualMap2.Size = new Vector2(250.0f, 200.0f); imageVisualMap2.Position = new Vector2(220.0f, 10.0f); - imageVisualMap2.PositionPolicy = new Vector2(1, 1); - imageVisualMap2.SizePolicy = new Vector2(1, 1); + imageVisualMap2.PositionPolicy = VisualTransformPolicyType.Absolute; + imageVisualMap2.SizePolicy = VisualTransformPolicyType.Absolute; imageVisualMap2.Origin = Visual.AlignType.TopBegin; imageVisualMap2.AnchorPoint = Visual.AlignType.TopBegin; _visualView.AddVisual("imageVisual2", imageVisualMap2); @@ -98,8 +101,8 @@ namespace VisualViewTest textVisualMap1.Size = new Vector2(900.0f, 250.0f); textVisualMap1.Position = new Vector2(10.0f, 220.0f); - textVisualMap1.PositionPolicy = new Vector2(1, 1); - textVisualMap1.SizePolicy = new Vector2(1, 1); + textVisualMap1.PositionPolicy = VisualTransformPolicyType.Absolute; + textVisualMap1.SizePolicy = VisualTransformPolicyType.Absolute; textVisualMap1.Origin = Visual.AlignType.TopBegin; textVisualMap1.AnchorPoint = Visual.AlignType.TopBegin; _visualView.AddVisual("textVisual1", textVisualMap1); @@ -111,8 +114,8 @@ namespace VisualViewTest borderVisualMap1.Size = new Vector2(100.0f, 100.0f); borderVisualMap1.Position = new Vector2(10.0f, 380.0f); - borderVisualMap1.PositionPolicy = new Vector2(1, 1); - borderVisualMap1.SizePolicy = new Vector2(1, 1); + borderVisualMap1.PositionPolicy = VisualTransformPolicyType.Absolute; + borderVisualMap1.SizePolicy = VisualTransformPolicyType.Absolute; borderVisualMap1.Origin = Visual.AlignType.TopBegin; borderVisualMap1.AnchorPoint = Visual.AlignType.TopBegin; _visualView.AddVisual("borderVisual1", borderVisualMap1); @@ -140,8 +143,8 @@ namespace VisualViewTest gradientVisualMap1.Size = new Vector2(100.0f, 100.0f); gradientVisualMap1.Position = new Vector2(120.0f, 380.0f); - gradientVisualMap1.PositionPolicy = new Vector2(1, 1); - gradientVisualMap1.SizePolicy = new Vector2(1, 1); + gradientVisualMap1.PositionPolicy = VisualTransformPolicyType.Absolute; + gradientVisualMap1.SizePolicy = VisualTransformPolicyType.Absolute; gradientVisualMap1.Origin = Visual.AlignType.TopBegin; gradientVisualMap1.AnchorPoint = Visual.AlignType.TopBegin; _visualView.AddVisual("gradientVisual1", gradientVisualMap1); @@ -156,8 +159,8 @@ namespace VisualViewTest primitiveVisualMap1.Size = new Vector2(100.0f, 100.0f); primitiveVisualMap1.Position = new Vector2(230.0f, 380.0f); - primitiveVisualMap1.PositionPolicy = new Vector2(1, 1); - primitiveVisualMap1.SizePolicy = new Vector2(1, 1); + primitiveVisualMap1.PositionPolicy = VisualTransformPolicyType.Absolute; + primitiveVisualMap1.SizePolicy = VisualTransformPolicyType.Absolute; primitiveVisualMap1.Origin = Visual.AlignType.TopBegin; primitiveVisualMap1.AnchorPoint = Visual.AlignType.TopBegin; _visualView.AddVisual("primitiveVisual1", primitiveVisualMap1); @@ -172,8 +175,8 @@ namespace VisualViewTest primitiveVisualMap2.Size = new Vector2(100.0f, 100.0f); primitiveVisualMap2.Position = new Vector2(340.0f, 380.0f); - primitiveVisualMap2.PositionPolicy = new Vector2(1, 1); - primitiveVisualMap2.SizePolicy = new Vector2(1, 1); + primitiveVisualMap2.PositionPolicy = VisualTransformPolicyType.Absolute; + primitiveVisualMap2.SizePolicy = VisualTransformPolicyType.Absolute; primitiveVisualMap2.Origin = Visual.AlignType.TopBegin; primitiveVisualMap2.AnchorPoint = Visual.AlignType.TopBegin; _visualView.AddVisual("primitiveVisual2", primitiveVisualMap2); @@ -188,8 +191,8 @@ namespace VisualViewTest primitiveVisualMap3.Size = new Vector2(100.0f, 100.0f); primitiveVisualMap3.Position = new Vector2(10.0f, 490.0f); - primitiveVisualMap3.PositionPolicy = new Vector2(1, 1); - primitiveVisualMap3.SizePolicy = new Vector2(1, 1); + primitiveVisualMap3.PositionPolicy = VisualTransformPolicyType.Absolute; + primitiveVisualMap3.SizePolicy = VisualTransformPolicyType.Absolute; primitiveVisualMap3.Origin = Visual.AlignType.TopBegin; primitiveVisualMap3.AnchorPoint = Visual.AlignType.TopBegin; _visualView.AddVisual("primitiveVisual3", primitiveVisualMap3); @@ -204,8 +207,8 @@ namespace VisualViewTest primitiveVisualMap4.Size = new Vector2(100.0f, 100.0f); primitiveVisualMap4.Position = new Vector2(120.0f, 490.0f); - primitiveVisualMap4.PositionPolicy = new Vector2(1, 1); - primitiveVisualMap4.SizePolicy = new Vector2(1, 1); + primitiveVisualMap4.PositionPolicy = VisualTransformPolicyType.Absolute; + primitiveVisualMap4.SizePolicy = VisualTransformPolicyType.Absolute; primitiveVisualMap4.Origin = Visual.AlignType.TopBegin; primitiveVisualMap4.AnchorPoint = Visual.AlignType.TopBegin; _visualView.AddVisual("primitiveVisual4", primitiveVisualMap4); @@ -220,8 +223,8 @@ namespace VisualViewTest primitiveVisualMap5.Size = new Vector2(100.0f, 100.0f); primitiveVisualMap5.Position = new Vector2(230.0f, 490.0f); - primitiveVisualMap5.PositionPolicy = new Vector2(1, 1); - primitiveVisualMap5.SizePolicy = new Vector2(1, 1); + primitiveVisualMap5.PositionPolicy = VisualTransformPolicyType.Absolute; + primitiveVisualMap5.SizePolicy = VisualTransformPolicyType.Absolute; primitiveVisualMap5.Origin = Visual.AlignType.TopBegin; primitiveVisualMap5.AnchorPoint = Visual.AlignType.TopBegin; _visualView.AddVisual("primitiveVisual5", primitiveVisualMap5); @@ -235,8 +238,8 @@ namespace VisualViewTest meshVisualMap1.Size = new Size2D(400, 400); meshVisualMap1.Position = new Position2D(-50, 600); - meshVisualMap1.PositionPolicy = new Vector2(1, 1); - meshVisualMap1.SizePolicy = new Vector2(1, 1); + meshVisualMap1.PositionPolicy = VisualTransformPolicyType.Absolute; + meshVisualMap1.SizePolicy = VisualTransformPolicyType.Absolute; meshVisualMap1.Origin = Visual.AlignType.TopBegin; meshVisualMap1.AnchorPoint = Visual.AlignType.TopBegin; _visualView.AddVisual("meshVisual1", meshVisualMap1); @@ -246,8 +249,10 @@ namespace VisualViewTest npatchImageVisualMap1.URL = resources + "/images/gallery-4.jpg"; npatchImageVisualMap1.Size = new Size2D(400, 400); npatchImageVisualMap1.Position = new Position2D(300, 600); - npatchImageVisualMap1.PositionPolicy = new Vector2(1, 1); - npatchImageVisualMap1.SizePolicy = new Vector2(1, 1); + npatchImageVisualMap1.PositionPolicyX = VisualTransformPolicyType.Absolute; + npatchImageVisualMap1.PositionPolicyY = VisualTransformPolicyType.Absolute; + npatchImageVisualMap1.SizePolicyWidth = VisualTransformPolicyType.Absolute; + npatchImageVisualMap1.SizePolicyHeight = VisualTransformPolicyType.Absolute; npatchImageVisualMap1.Origin = Visual.AlignType.TopBegin; npatchImageVisualMap1.AnchorPoint = Visual.AlignType.TopBegin; npatchImageVisualMap1.Border = new Rectangle(100, 100, 100, 100); diff --git a/NUISamples/NUISamples/NUISamples.TizenTV/examples/visual-view-test2.cs b/NUISamples/NUISamples/NUISamples.TizenTV/examples/visual-view-test2.cs index 1b3d030..123bf80 100755 --- a/NUISamples/NUISamples/NUISamples.TizenTV/examples/visual-view-test2.cs +++ b/NUISamples/NUISamples/NUISamples.TizenTV/examples/visual-view-test2.cs @@ -53,9 +53,9 @@ namespace VisualViewTest2 imageMap.AnchorPoint = Visual.AlignType.TopBegin; imageMap.Origin = Visual.AlignType.TopBegin; imageMap.Position = new Vector2(0, 0); - imageMap.PositionPolicy = new Vector2(1, 1); + imageMap.PositionPolicy = VisualTransformPolicyType.Absolute; imageMap.Size = new Vector2(500, 500); - imageMap.SizePolicy = new Vector2(1, 1); + imageMap.SizePolicy = VisualTransformPolicyType.Absolute; imageMap.DepthIndex = 0; view[0].AddVisual("bgVisual", imageMap); @@ -65,9 +65,9 @@ namespace VisualViewTest2 highlightImageMap.AnchorPoint = Visual.AlignType.TopBegin; highlightImageMap.Origin = Visual.AlignType.TopBegin; highlightImageMap.Size = new Vector2(40, 40); - highlightImageMap.SizePolicy = new Vector2(1, 1); + highlightImageMap.SizePolicy = VisualTransformPolicyType.Absolute; highlightImageMap.Position = new Vector2(10, 10); - highlightImageMap.PositionPolicy = new Vector2(1, 1); + highlightImageMap.PositionPolicy = VisualTransformPolicyType.Absolute; highlightImageMap.DepthIndex = 1; view[0].AddVisual("iconVisual", highlightImageMap); @@ -78,9 +78,9 @@ namespace VisualViewTest2 textMap1.Origin = Visual.AlignType.TopBegin; textMap1.PointSize = 20; textMap1.Position = new Vector2(60, 210); - textMap1.PositionPolicy = new Vector2(1, 1); + textMap1.PositionPolicy = VisualTransformPolicyType.Absolute; textMap1.Size = new Vector2(600, 200); - textMap1.SizePolicy = new Vector2(1, 1); + textMap1.SizePolicy = VisualTransformPolicyType.Absolute; textMap1.TextColor = Color.Red; textMap1.DepthIndex = 5; view[0].AddVisual("textVisual", textMap1); @@ -92,20 +92,20 @@ namespace VisualViewTest2 imageMap2.AnchorPoint = Visual.AlignType.TopBegin; imageMap2.Origin = Visual.AlignType.TopBegin; imageMap2.Position = new Vector2(0, 0); - imageMap2.PositionPolicy = new Vector2(1, 1); + imageMap2.PositionPolicy = VisualTransformPolicyType.Absolute; imageMap2.Size = new Vector2(500, 500); - imageMap2.SizePolicy = new Vector2(1, 1); + imageMap2.SizePolicy = VisualTransformPolicyType.Absolute; imageMap2.DepthIndex = 0; view[1].AddVisual("bgVisual", imageMap2); dimImageMap = new ImageVisual(); dimImageMap.URL = resourcePath + "star-dim.png"; dimImageMap.Size = new Vector2(40, 40); - dimImageMap.SizePolicy = new Vector2(1, 1); + dimImageMap.SizePolicy = VisualTransformPolicyType.Absolute; dimImageMap.AnchorPoint = Visual.AlignType.TopBegin; dimImageMap.Origin = Visual.AlignType.TopBegin; dimImageMap.Position = new Vector2(10, 10); - dimImageMap.PositionPolicy = new Vector2(1, 1); + dimImageMap.PositionPolicy = VisualTransformPolicyType.Absolute; dimImageMap.DepthIndex = 1; view[1].AddVisual("iconVisual", dimImageMap); @@ -115,9 +115,9 @@ namespace VisualViewTest2 textMap2.AnchorPoint = Visual.AlignType.TopBegin; textMap2.Origin = Visual.AlignType.TopBegin; textMap2.Position = new Vector2(60, 210); - textMap2.PositionPolicy = new Vector2(1, 1); + textMap2.PositionPolicy = VisualTransformPolicyType.Absolute; textMap2.Size = new Vector2(600, 200); - textMap2.SizePolicy = new Vector2(1, 1); + textMap2.SizePolicy = VisualTransformPolicyType.Absolute; textMap2.TextColor = Color.Black; textMap2.DepthIndex = 5; view[1].AddVisual("textVisual", textMap2); diff --git a/NUISamples/NUISamples/NUISamples.TizenTV/examples/visual-view-test3.cs b/NUISamples/NUISamples/NUISamples.TizenTV/examples/visual-view-test3.cs new file mode 100755 index 0000000..7d2d023 --- /dev/null +++ b/NUISamples/NUISamples/NUISamples.TizenTV/examples/visual-view-test3.cs @@ -0,0 +1,118 @@ +/* + * Copyright (c) 2016 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; +using System.Runtime.InteropServices; +using Tizen.NUI; +using Tizen.NUI.Constants; + +namespace VisualViewTest3 +{ + // An example of Visual View control. + class Example : NUIApplication + { + private VisualView _visualView = null; + //private const string resources = "/home/owner/apps_rw/NUISamples.TizenTV/res"; + private Window _window; + + public Example() : base() + { + } + + public Example(string stylesheet) : base(stylesheet) + { + } + + public Example(string stylesheet, WindowMode windowMode) : base(stylesheet, windowMode) + { + } + + protected override void OnCreate() + { + base.OnCreate(); + Initialize(); + } + + private ImageVisual imageVisualMap1; + private ImageVisual imageVisualMap2; + private int cnt; + + public void Initialize() + { + Stage stage = Stage.Instance; + + /* Create a visual view. */ + _visualView = new VisualView(); + _visualView.ParentOrigin = ParentOrigin.TopLeft; + _visualView.AnchorPoint = AnchorPoint.TopLeft; + _visualView.Size = new Size(stage.Size.Width, stage.Size.Height, 0.0f); + + /* color visual */ + ColorVisual colorVisualMap1 = new ColorVisual(); + colorVisualMap1.Color = Color.Green; + _visualView.Background = colorVisualMap1.OutputVisualMap; + + stage.GetDefaultLayer().Add(_visualView); + + /* image visual 1. No transform setting case. */ + imageVisualMap1 = new ImageVisual(); + imageVisualMap1.URL = resources + "/images/image-1.jpg"; + imageVisualMap1.DepthIndex = 1.0f; + //_visualView.AddVisual("imageVisual1", imageVisualMap1); + + /* image visual 2. Using RelativePosition and SizePolicyWidth setting case. */ + imageVisualMap2 = new ImageVisual(); + imageVisualMap2.URL = resources + "/images/image-2.jpg"; + /* Using Size, you can set SizePolicyWidth and SizePolicyHeight separately, default by relative. */ + imageVisualMap2.Size = new Vector2(400.0f, 0.3f); + /* Using RelativePosition, then PositionPolicyX and PositionPolicyY will be relative. */ + imageVisualMap2.RelativePosition = new Vector2(0.1f, 0.1f); + imageVisualMap2.SizePolicyWidth = VisualTransformPolicyType.Absolute; + imageVisualMap2.Origin = Visual.AlignType.TopBegin; + imageVisualMap2.AnchorPoint = Visual.AlignType.TopBegin; + /* Ensure imageVisual show */ + imageVisualMap2.DepthIndex = 9.0f; + _visualView.AddVisual("imageVisual2", imageVisualMap2); + /* If imageVisual2 added first, the it will be covered by imageVisual1. + so, we need to set their depth index to ensure they all can be showed. + */ + _visualView.AddVisual("imageVisual1", imageVisualMap1); + + _window = this.Window; + _window.WindowFocusChanged += (sender, ee) => + { + cnt++; + Tizen.Log.Debug("NUI", "[WindowFocusTest] WindowFocusChanged event comes! focus gained=" + ee.FocusGained); + }; + + Tizen.Log.Debug("NUI", "[WindowFocusTest] is focus acceptable=" + _window.IsFocusAcceptable()); + _window.SetAcceptFocus(false); + Tizen.Log.Debug("NUI", "[WindowFocusTest] set focus acceptable=false!!!"); + Tizen.Log.Debug("NUI", "[WindowFocusTest] is focus acceptable=" + _window.IsFocusAcceptable()); + _window.SetAcceptFocus(true); + Tizen.Log.Debug("NUI", "[WindowFocusTest] set focus acceptable=true!!!"); + Tizen.Log.Debug("NUI", "[WindowFocusTest] is focus acceptable=" + _window.IsFocusAcceptable()); + } + + [STAThread] + static void _Main(string[] args) + { + Example example = new Example(); + example.Run(args); + } + } +} diff --git a/NUISamples/NUISamples/NUISamples.TizenTV/examples/visuals-using-custom-view/visuals-using-custom-view.cs b/NUISamples/NUISamples/NUISamples.TizenTV/examples/visuals-using-custom-view/visuals-using-custom-view.cs index bcc1ef2..21a0875 100755 --- a/NUISamples/NUISamples/NUISamples.TizenTV/examples/visuals-using-custom-view/visuals-using-custom-view.cs +++ b/NUISamples/NUISamples/NUISamples.TizenTV/examples/visuals-using-custom-view/visuals-using-custom-view.cs @@ -64,7 +64,7 @@ namespace VisualsUsingCustomView title.StyleName = "Title"; title.WidthResizePolicy = ResizePolicyType.FillToParent; title.HeightResizePolicy = ResizePolicyType.UseNaturalSize; - title.HorizontalAlignment = HorizontalAlignment.HorizontalAlignCenter; + title.HorizontalAlignment = HorizontalAlignment.Center; contentLayout.Add(title); contentLayout.SetFitHeight(0); diff --git a/NUISamples/NUISamples/NUISamples.TizenTV/firstscreen/App.cs b/NUISamples/NUISamples/NUISamples.TizenTV/firstscreen/App.cs index 92fdfa8..b1067c4 100755 --- a/NUISamples/NUISamples/NUISamples.TizenTV/firstscreen/App.cs +++ b/NUISamples/NUISamples/NUISamples.TizenTV/firstscreen/App.cs @@ -442,8 +442,8 @@ namespace FirstScreen _dateOfTest.BackgroundColor = new Color(43.0f / 255.0f, 145.0f / 255.0f, 175.0f / 255.0f, 1.0f); _dateOfTest.TextColor = Color.White; _dateOfTest.Text = " Common Interface Define Verification Test of 2017-02-10 #1"; - _dateOfTest.HorizontalAlignment = HorizontalAlignment.HorizontalAlignBegin; - _dateOfTest.VerticalAlignment = VerticalAlignment.VerticalAlignCenter; + _dateOfTest.HorizontalAlignment = HorizontalAlignment.Begin; + _dateOfTest.VerticalAlignment = VerticalAlignment.Center; _dateOfTest.PointSize = 12.0f; _dateOfTest.UnderlineEnabled = true; _stage.GetDefaultLayer().Add(_dateOfTest); diff --git a/Tizen.NUI/Tizen.NUI.csproj b/Tizen.NUI/Tizen.NUI.csproj index 529e72d..574d90b 100755 --- a/Tizen.NUI/Tizen.NUI.csproj +++ b/Tizen.NUI/Tizen.NUI.csproj @@ -313,6 +313,7 @@ + diff --git a/Tizen.NUI/src/public/Actor.cs b/Tizen.NUI/src/public/Actor.cs index b381575..1648899 100755 --- a/Tizen.NUI/src/public/Actor.cs +++ b/Tizen.NUI/src/public/Actor.cs @@ -2138,142 +2138,5 @@ namespace Tizen.NUI SetProperty(Actor.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)value)); } } - - } - - /// - /// This specifies whether the Actor uses its own color, or inherits. - /// - public enum ColorMode - { - /// - /// Actor will use its own color. - /// - UseOwnColor, - /// - /// Actor will use its parent color. - /// - UseParentColor, - /// - /// Actor will blend its color with its parents color. - /// - UseOwnMultiplyParentColor, - /// - /// Actor will blend its alpha with its parents alpha. This means when parent fades in or out child does as well. This is the default. - /// - UseOwnMultiplyParentAlpha } - - /// - /// This specifies the dimesion of width or heigh for size negotiation. - /// - public enum DimensionType - { - /// - /// Width dimension - /// - Width = 0x1, - /// - /// Height dimension - /// - Height = 0x2, - /// - /// Mask to cover all flags - /// - AllDimensions = 0x3 - } - - /// - /// Enumeration for the instance of how the actor and it's children will be drawn. - /// - public enum DrawModeType - { - /// - /// The default draw-mode - /// - Normal = 0, - /// - /// Draw the actor and its children as an overlay - /// - Overlay2D = 1, - /// - /// Will be replaced by separate ClippingMode enum. Draw the actor and its children into the stencil buffer - /// - Stencil = 3 - } - - /// - /// Enumeration for size negotiation resize policies. - /// - public enum ResizePolicyType - { - /// - /// Size is fixed as set by SetSize - /// - Fixed, - /// - /// Size is to use the actor's natural size - /// - /// - UseNaturalSize, - /// - /// Size is to fill up to the actor's parent's bounds. Aspect ratio is not maintained. - /// - FillToParent, - /// - /// The actors size will be ( ParentSize * SizeRelativeToParentFactor ). - /// - SizeRelativeToParent, - /// - /// The actors size will be ( ParentSize + SizeRelativeToParentFactor ). - /// - SizeFixedOffsetFromParent, - /// - /// Size will adjust to wrap around all children - /// - FitToChildren, - /// - /// One dimension is dependent on the other - /// - DimensionDependency, - /// - /// The size will be assigned to the actor - /// - UseAssignedSize - } - - /// - /// Enumeration for policies to determine how an actor should resize itself when having its size set in size negotiation. - /// - public enum SizeScalePolicyType - { - /// - /// Use the size that was set - /// - UseSizeSet, - /// - /// Fit within the size set maintaining natural size aspect ratio - /// - FitWithAspectRatio, - /// - /// Fit within the size set maintaining natural size aspect ratio - /// - FillWithAspectRatio - } - - /// - /// Enumeration for ClippingMode describing how this Actor's children will be clipped against it. - /// - public enum ClippingModeType - { - /// - /// This Actor will not clip its children. - /// - Disabled, - /// - /// This Actor will clip all children to within its boundaries (the actor will also be visible itself). - /// - ClipChildren - } - } diff --git a/Tizen.NUI/src/public/CameraActor.cs b/Tizen.NUI/src/public/CameraActor.cs index 755b234..13e1332 100755 --- a/Tizen.NUI/src/public/CameraActor.cs +++ b/Tizen.NUI/src/public/CameraActor.cs @@ -597,35 +597,4 @@ namespace Tizen.NUI } } - - /// - /// Enumeration for type determination of how camera operates. - /// - public enum CameraType - { - /// - /// Camera orientation is taken from CameraActor. - /// - FreeLook, - /// - /// Camera is oriented to always look at a target. - /// - LookAtTarget - } - - /// - /// Enumeration for projection modes. - /// - public enum ProjectionMode - { - /// - /// Distance causes foreshortening; objects further from the camera appear smaller. - /// - PerspectiveProjection, - /// - /// Relative distance from the camera does not affect the size of objects. - /// - OrthographicProjection - } - } diff --git a/Tizen.NUI/src/public/CustomView.cs b/Tizen.NUI/src/public/CustomView.cs index b5c6975..aa632e1 100755 --- a/Tizen.NUI/src/public/CustomView.cs +++ b/Tizen.NUI/src/public/CustomView.cs @@ -14,7 +14,6 @@ * limitations under the License. * */ -using System.ComponentModel; namespace Tizen.NUI { @@ -716,29 +715,4 @@ namespace Tizen.NUI { } } - - /// - /// This specifies ccustomView behaviour types. - /// - public enum CustomViewBehaviour - { - /// - /// Use to provide default behaviour (size negotiation is on, event callbacks are not called) - /// - ViewBehaviourDefault = 0, - /// - /// True if control does not need size negotiation, i.e. it can be skipped in the algorithm - /// - DisableSizeNegotiation = 1 << 0, - /// - /// Use to provide key navigation support. - /// - RequiresKeyboardNavigationSupport = 1 << 5, - /// - /// Use to make style change event disabled. - /// - DisableStyleChangeSignals = 1 << 6, - [EditorBrowsable(EditorBrowsableState.Never)] - LastViewBehaviourFlag - } } diff --git a/Tizen.NUI/src/public/CustomView/Spin.cs b/Tizen.NUI/src/public/CustomView/Spin.cs index 817eeca..8e14111 100755 --- a/Tizen.NUI/src/public/CustomView/Spin.cs +++ b/Tizen.NUI/src/public/CustomView/Spin.cs @@ -96,8 +96,8 @@ namespace Tizen.NUI _textField.SizeModeFactor = new Vector3(1.0f, 0.45f, 1.0f); _textField.PlaceholderText = "----"; _textField.BackgroundColor = _textBackgroundColor; - _textField.HorizontalAlignment = HorizontalAlignment.HorizontalAlignCenter; - _textField.VerticalAlignment = VerticalAlignment.VerticalAlignCenter; + _textField.HorizontalAlignment = HorizontalAlignment.Center; + _textField.VerticalAlignment = VerticalAlignment.Center; _textField.Focusable = (true); _textField.Name = "_textField"; _textField.Position2D = new Position2D(0, 40); diff --git a/Tizen.NUI/src/public/CustomView/VisualView.cs b/Tizen.NUI/src/public/CustomView/VisualView.cs index 3bb3ba0..2ceefa1 100755 --- a/Tizen.NUI/src/public/CustomView/VisualView.cs +++ b/Tizen.NUI/src/public/CustomView/VisualView.cs @@ -125,13 +125,17 @@ namespace Tizen.NUI /// The name of visual to remove. public void RemoveVisual(string visualName) { - foreach (var item in _visualDictionary.ToList()) + foreach (var item in _visualDictionary) { if (item.Value.Name == visualName) { EnableVisual(item.Key, false); UnregisterVisual(item.Key); + _tranformDictionary.Remove(item.Key); _visualDictionary.Remove(item.Key); + + RelayoutRequest(); + break; } } } @@ -147,13 +151,19 @@ namespace Tizen.NUI } } - /// /// Remove all visuals of visual view. /// public void RemoveAll() { + foreach (var item in _visualDictionary) + { + EnableVisual(item.Key, false); + UnregisterVisual(item.Key); + } _visualDictionary.Clear(); + _tranformDictionary.Clear(); + RelayoutRequest(); } /// diff --git a/Tizen.NUI/src/public/Key.cs b/Tizen.NUI/src/public/Key.cs index 2834e53..33b0b71 100755 --- a/Tizen.NUI/src/public/Key.cs +++ b/Tizen.NUI/src/public/Key.cs @@ -317,17 +317,4 @@ namespace Tizen.NUI } } - - public enum DeviceClassType - { - None, - Seat, - Keyboard, - Mouse, - Touch, - Pen, - Pointer, - Gamepad - } - } diff --git a/Tizen.NUI/src/public/NUIConstants.cs b/Tizen.NUI/src/public/NUIConstants.cs new file mode 100755 index 0000000..31c4ec3 --- /dev/null +++ b/Tizen.NUI/src/public/NUIConstants.cs @@ -0,0 +1,1232 @@ +// 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. +// 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.ComponentModel; + +namespace Tizen.NUI +{ + /// + /// This specifies whether the Actor uses its own color, or inherits. + /// + public enum ColorMode + { + /// + /// Actor will use its own color. + /// + UseOwnColor, + /// + /// Actor will use its parent color. + /// + UseParentColor, + /// + /// Actor will blend its color with its parents color. + /// + UseOwnMultiplyParentColor, + /// + /// Actor will blend its alpha with its parents alpha. This means when parent fades in or out child does as well. This is the default. + /// + UseOwnMultiplyParentAlpha + } + + /// + /// This specifies the dimesion of width or heigh for size negotiation. + /// + public enum DimensionType + { + /// + /// Width dimension + /// + Width = 0x1, + /// + /// Height dimension + /// + Height = 0x2, + /// + /// Mask to cover all flags + /// + AllDimensions = 0x3 + } + + /// + /// Enumeration for the instance of how the actor and it's children will be drawn. + /// + public enum DrawModeType + { + /// + /// The default draw-mode + /// + Normal = 0, + /// + /// Draw the actor and its children as an overlay + /// + Overlay2D = 1, + /// + /// Will be replaced by separate ClippingMode enum. Draw the actor and its children into the stencil buffer + /// + Stencil = 3 + } + + /// + /// Enumeration for size negotiation resize policies. + /// + public enum ResizePolicyType + { + /// + /// Size is fixed as set by SetSize + /// + Fixed, + /// + /// Size is to use the actor's natural size + /// + /// + UseNaturalSize, + /// + /// Size is to fill up to the actor's parent's bounds. Aspect ratio is not maintained. + /// + FillToParent, + /// + /// The actors size will be ( ParentSize * SizeRelativeToParentFactor ). + /// + SizeRelativeToParent, + /// + /// The actors size will be ( ParentSize + SizeRelativeToParentFactor ). + /// + SizeFixedOffsetFromParent, + /// + /// Size will adjust to wrap around all children + /// + FitToChildren, + /// + /// One dimension is dependent on the other + /// + DimensionDependency, + /// + /// The size will be assigned to the actor + /// + UseAssignedSize + } + + /// + /// Enumeration for policies to determine how an actor should resize itself when having its size set in size negotiation. + /// + public enum SizeScalePolicyType + { + /// + /// Use the size that was set + /// + UseSizeSet, + /// + /// Fit within the size set maintaining natural size aspect ratio + /// + FitWithAspectRatio, + /// + /// Fit within the size set maintaining natural size aspect ratio + /// + FillWithAspectRatio + } + + /// + /// Enumeration for ClippingMode describing how this Actor's children will be clipped against it. + /// + public enum ClippingModeType + { + /// + /// This Actor will not clip its children. + /// + Disabled, + /// + /// This Actor will clip all children to within its boundaries (the actor will also be visible itself). + /// + ClipChildren + } + + /// + /// Enumeration for type determination of how camera operates. + /// + public enum CameraType + { + /// + /// Camera orientation is taken from CameraActor. + /// + FreeLook, + /// + /// Camera is oriented to always look at a target. + /// + LookAtTarget + } + + /// + /// Enumeration for projection modes. + /// + public enum ProjectionMode + { + /// + /// Distance causes foreshortening; objects further from the camera appear smaller. + /// + PerspectiveProjection, + /// + /// Relative distance from the camera does not affect the size of objects. + /// + OrthographicProjection + } + + /// + /// This specifies ccustomView behaviour types. + /// + public enum CustomViewBehaviour + { + /// + /// Use to provide default behaviour (size negotiation is on, event callbacks are not called) + /// + ViewBehaviourDefault = 0, + /// + /// True if control does not need size negotiation, i.e. it can be skipped in the algorithm + /// + DisableSizeNegotiation = 1 << 0, + /// + /// Use to provide key navigation support. + /// + RequiresKeyboardNavigationSupport = 1 << 5, + /// + /// Use to make style change event disabled. + /// + DisableStyleChangeSignals = 1 << 6, + [EditorBrowsable(EditorBrowsableState.Never)] + LastViewBehaviourFlag + } + + public enum DeviceClassType + { + None, + Seat, + Keyboard, + Mouse, + Touch, + Pen, + Pointer, + Gamepad + } + + /// + /// This specifies all the property types.
+ /// Enumeration for the property types supported. + ///
+ public enum PropertyType + { + /// + /// No type + /// + None, + /// + /// A boolean type + /// + Boolean, + /// + /// A float type + /// + Float, + /// + /// An integer type + /// + Integer, + /// + /// a vector array of size=2 with float precision + /// + Vector2, + /// + /// a vector array of size=3 with float precision + /// + Vector3, + /// + /// a vector array of size=4 with float precision + /// + Vector4, + /// + /// a 3x3 matrix + /// + Matrix3, + /// + /// a 4x4 matrix + /// + Matrix, + /// + /// an integer array of size=4 + /// + Rectangle, + /// + /// either a quaternion or an axis angle rotation + /// + Rotation, + /// + /// A string type + /// + String, + /// + /// an array of PropertyValue + /// + Array, + /// + /// a string key to PropertyValue mapping + /// + Map + } + + /// + /// This specifies the property access mode types.
+ /// Enumeration for the access mode for custom properties. + ///
+ public enum PropertyAccessMode + { + /// + /// if the property is read-only + /// + ReadOnly, + /// + /// If the property is read/writeable + /// + ReadWrite, + /// + /// If the property can be animated or constrained + /// + Animatable, + /// + /// The number of access modes + /// + AccessModeCount + } + + /// + /// Types of style change. Enumeration for StyleChange type. + /// + public enum StyleChangeType + { + /// + /// Denotes that the default font has changed. + /// + DefaultFontChange, + /// + /// Denotes that the default font size has changed. + /// + DefaultFontSizeChange, + /// + /// Denotes that the theme has changed. + /// + ThemeChange + } + + /// + /// Enumeration for horizontal alignment types. + /// + public enum HorizontalAlignmentType + { + /// + /// Align horizontally left + /// + Left, + /// + /// Align horizontally center + /// + Center, + /// + /// Align horizontally right + /// + Right + } + + /// + /// Enumeration for vertical alignment types. + /// + public enum VerticalAlignmentType + { + /// + /// Align vertically top + /// + Top, + /// + /// Align vertically center + /// + Center, + /// + /// Align vertically bottom + /// + Bottom + } + + /// + /// Enumeration for point state type. + /// + public enum PointStateType + { + /// + /// Touch or hover started + /// + Started, + /// + /// Touch or hover finished + /// + Finished, + /// + /// Screen touched + /// + Down = Started, + /// + /// Touch stopped + /// + Up = Finished, + /// + /// Finger dragged or hovered + /// + Motion, + /// + /// Leave the boundary of an actor + /// + Leave, + /// + /// No change from last event.
+ /// Useful when a multi-point event occurs where all points are sent but indicates that this particular point has not changed since the last time. + ///
+ Stationary, + /// + /// A system event has occurred which has interrupted the touch or hover event sequence. + /// + Interrupted + } + + /// + /// Enumeration for the text horizontal aligning. + /// + public enum HorizontalAlignment + { + /// + /// Texts place at the begin of horizontal direction. + /// + Begin, + /// + /// Texts place at the center of horizontal direction. + /// + Center, + /// + /// Texts place at the end of horizontal direction. + /// + End + } + + /// + /// Enumeration for the text horizontal aligning. + /// + public enum VerticalAlignment + { + /// + /// Texts place at the top of vertical direction. + /// + Top, + /// + /// Texts place at the center of vertical direction. + /// + Center, + /// + /// Texts place at the bottom of vertical direction. + /// + Bottom + } + + /// + /// This specifies wrap mode types
+ /// WrapModeU and WrapModeV separately decide how the texture should be sampled when the u and v coordinate exceeds the range of 0.0 to 1.0. + ///
+ public enum WrapModeType + { + /// + /// Defualt value + /// + Default = 0, + /// + /// Clamp to edge + /// + ClampToEdge, + /// + /// Repeat + /// + Repeat, + /// + /// Mirrored repeat + /// + MirroredRepeat + } + + /// + /// The type of coordinate system for certain attributes of the points in a gradient. + /// + public enum GradientVisualUnitsType + { + /// + /// Uses the normals for the start, end & center points, i.e. top-left is (-0.5, -0.5) and bottom-right is (0.5, 0.5). + /// + ObjectBoundingBox, + /// + /// Uses the user coordinates for the start, end & center points, i.e. in a 200 by 200 control, top-left is (0, 0) and bottom-right is (200, 200). + /// + UserSpace + } + + /// + /// This specifies SpreadMethod types.
+ /// SpreadMethod defines what happens if the gradient starts or ends inside the bounds of the target rectangle.
+ ///
+ public enum GradientVisualSpreadMethodType + { + /// + /// Uses the terminal colors of the gradient to fill the remainder of the quad. + /// + Pad, + /// + /// Reflect the gradient pattern start-to-end, end-to-start, start-to-end etc. until the quad is filled. + /// + Reflect, + /// + /// Repeat the gradient pattern start-to-end, start-to-end, start-to-end etc. until the quad is filled. + /// + Repeat + } + + /// + /// The shading mode used by MeshVisual. + /// + public enum MeshVisualShadingModeValue + { + /// + /// *Simplest*. One color that is lit by ambient and diffuse lighting. + /// + TexturelessWithDiffuseLighting, + /// + /// Uses only the visual image textures provided with specular lighting in addition to ambient and diffuse lighting. + /// + TexturedWithSpecularLighting, + /// + /// Uses all textures provided including a gloss, normal and texture map along with specular, ambient and diffuse lighting. + /// + TexturedWithDetailedSpecularLighting + } + + /// + /// The primitive shape to render as a PrimitiveVisual. + /// + public enum PrimitiveVisualShapeType + { + /// + /// A perfectly round geometrical object in three-dimensional space. + /// + Sphere, + /// + /// The area bound between two circles, i.e. a cone with the tip removed. + /// + ConicalFrustrum, + /// + /// Equivalent to a conical frustrum with top radius of zero. + /// Equivalent to a conical frustrum with top radius of zero. + Cone, + /// + /// Equivalent to a conical frustrum with top radius of zero. + /// + Cylinder, + /// + /// Equivalent to a conical frustrum with equal radii for the top and bottom circles. + /// + Cube, + /// + /// Equivalent to a bevelled cube with a bevel percentage of zero. + /// + Octahedron, + /// + /// Equivalent to a bevelled cube with a bevel percentage of one. + /// + BevelledCube + } + + /// + /// This specifies fitting mode types. Fitting options, used when resizing images to fit desired dimensions.
+ /// A fitting mode controls the region of a loaded image to be mapped to the desired image rectangle.
+ /// All fitting modes preserve the aspect ratio of the image contents.
+ ///
+ public enum FittingModeType + { + /// + /// Full-screen image display: Limit loaded image resolution to device resolution using ShrinkToFit mode. + /// + ShrinkToFit, + /// + /// Thumbnail gallery grid: Limit loaded image resolution to screen tile using ScaleToFill mode. + /// + ScaleToFill, + /// + /// Image columns: Limit loaded image resolution to column width using FitWidth mode. + /// + FitWidth, + /// + /// Image rows: Limit loaded image resolution to row height using FitHeight mode. + /// + FitHeight + } + + /// + /// This specifies sampling mode types. Filtering options, used when resizing images to sample original pixels.
+ /// A SamplingMode controls how pixels in an input image are sampled and combined to generate each pixel of a destination image during a scaling.
+ /// NoFilter and Box modes do not guarantee that the output pixel array exactly matches the rectangle specified by the desired dimensions and FittingMode,
+ /// but all other filter modes do if the desired dimensions are `<=` the raw dimensions of the input image file.
+ ///
+ public enum SamplingModeType + { + /// + /// Iteratively box filter to generate an image of 1/2, 1/4, 1/8, etc width and height and approximately the desired size.
+ /// This is the default. + ///
+ Box, + /// + /// For each output pixel, read one input pixel. + /// + Nearest, + /// + /// For each output pixel, read a quad of four input pixels and write a weighted average of them. + /// + Linear, + /// + /// Iteratively box filter to generate an image of 1/2, 1/4, 1/8 etc width and height and approximately the desired size,
+ /// then for each output pixel, read one pixel from the last level of box filtering.
+ ///
+ BoxThenNearest, + /// + /// Iteratively box filter to almost the right size, then for each output pixel, read four pixels from the last level of box filtering and write their weighted average. + /// + BoxThenLinear, + /// + /// No filtering is performed. If the SCALE_TO_FILL scaling mode is enabled, the borders of the image may be trimmed to match the aspect ratio of the desired dimensions. + /// + NoFilter, + /// + /// For caching algorithms where a client strongly prefers a cache-hit to reuse a cached image. + /// + DontCare + } + + /// + /// This specifies policy types that could be used by the transform for the offset or size. + /// + public enum VisualTransformPolicyType + { + /// + /// Relative to the control (percentage [0.0f to 1.0f] of the control). + /// + Relative = 0, + /// + /// Absolute value in world units. + /// + Absolute = 1 + } + + /// + /// This specifies all the transform property types. + /// + public enum VisualTransformPropertyType + { + /// + /// Offset of the visual, which can be either relative (percentage [0.0f to 1.0f] of the parent) or absolute (in world units). + /// + Offset, + /// + /// Size of the visual, which can be either relative (percentage [0.0f to 1.0f] of the parent) or absolute (in world units). + /// + Size, + /// + /// The origin of the visual within its control area. + /// + Origin, + /// + /// The anchor-point of the visual + /// + AnchorPoint, + /// + /// Whether the x or y OFFSET values are relative (percentage [0.0f to 1.0f] of the control) or absolute (in world units). + /// + OffsetPolicy, + /// + /// Whether the width or height SIZE values are relative (percentage [0.0f to 1.0f] of the control) or absolute (in world units). + /// + SizePolicy + } + + /// + /// This specifies visual types. + /// + public struct Visual + { + /// + /// The index for the visual type. + /// + public enum Type + { + /// + /// Renders a solid color as an internal border to the control's quad. + /// + Border, + /// + /// Renders a solid color to the control's quad. + /// + Color, + /// + /// Renders a smooth transition of colors to the control's quad. + /// + Gradient, + /// + /// Renders an image into the control's quad. + /// + Image, + /// + /// Renders a mesh using an "obj" file, optionally with textures provided by an "mtl" file. + /// + Mesh, + /// + /// Renders a simple 3D shape, such as a cube or sphere. + /// + Primitive, + /// + /// Renders a simple wire-frame outlining a quad. + /// + Wireframe, + /// + /// Renders text. + /// + Text, + /// + /// Renders an n-patch image. + /// + NPatch, + /// + /// Renders an SVG image. + /// + SVG, + /// + /// Renders a animated image. (Animated GIF) + /// + AnimatedImage + } + + /// + /// This specifies visual properties. + /// + public struct Property + { + public static readonly int Type = NDalic.VISUAL_PROPERTY_TYPE; + public static readonly int Shader = NDalic.VISUAL_PROPERTY_SHADER; + public static readonly int Transform = NDalic.VISUAL_PROPERTY_TRANSFORM; + public static readonly int PremultipliedAlpha = NDalic.VISUAL_PROPERTY_PREMULTIPLIED_ALPHA; + public static readonly int MixColor = NDalic.VISUAL_PROPERTY_MIX_COLOR; + public static readonly int Opacity = NDalic.VISUAL_PROPERTY_MIX_COLOR + 1; + } + + /// + /// This specifies shader properties. + /// + public struct ShaderProperty + { + public static readonly int VertexShader = NDalic.VISUAL_SHADER_VERTEX; + public static readonly int FragmentShader = NDalic.VISUAL_SHADER_FRAGMENT; + public static readonly int ShaderSubdivideGridX = NDalic.VISUAL_SHADER_SUBDIVIDE_GRID_X; + public static readonly int ShaderSubdivideGridY = NDalic.VISUAL_SHADER_SUBDIVIDE_GRID_Y; + public static readonly int ShaderHints = NDalic.VISUAL_SHADER_HINTS; + } + + /// + /// This specifies Visaul align types. + /// + public enum AlignType + { + TopBegin = 0, + TopCenter, + TopEnd, + CenterBegin, + Center, + CenterEnd, + BottomBegin, + BottomCenter, + BottomEnd + } + } + + /// + /// This specifies properties of BorderVisual. + /// + public struct BorderVisualProperty + { + public static readonly int Color = NDalic.BORDER_VISUAL_COLOR; + public static readonly int Size = NDalic.BORDER_VISUAL_SIZE; + public static readonly int AntiAliasing = NDalic.BORDER_VISUAL_ANTI_ALIASING; + } + + /// + /// This specifies properties of ColorVisual. + /// + public struct ColorVisualProperty + { + public static readonly int MixColor = NDalic.COLOR_VISUAL_MIX_COLOR; + } + + /// + /// This specifies properties of GradientVisual. + /// + public struct GradientVisualProperty + { + public static readonly int StartPosition = NDalic.GRADIENT_VISUAL_START_POSITION; + public static readonly int EndPosition = NDalic.GRADIENT_VISUAL_END_POSITION; + public static readonly int Center = NDalic.GRADIENT_VISUAL_CENTER; + public static readonly int Radius = NDalic.GRADIENT_VISUAL_RADIUS; + public static readonly int StopOffset = NDalic.GRADIENT_VISUAL_STOP_OFFSET; + public static readonly int StopColor = NDalic.GRADIENT_VISUAL_STOP_COLOR; + public static readonly int Units = NDalic.GRADIENT_VISUAL_UNITS; + public static readonly int SpreadMethod = NDalic.GRADIENT_VISUAL_SPREAD_METHOD; + } + + /// + /// This specifies properties of ImageVisual. + /// + public struct ImageVisualProperty + { + public static readonly int URL = NDalic.IMAGE_VISUAL_URL; + public static readonly int FittingMode = NDalic.IMAGE_VISUAL_FITTING_MODE; + public static readonly int SamplingMode = NDalic.IMAGE_VISUAL_SAMPLING_MODE; + public static readonly int DesiredWidth = NDalic.IMAGE_VISUAL_DESIRED_WIDTH; + public static readonly int DesiredHeight = NDalic.IMAGE_VISUAL_DESIRED_HEIGHT; + public static readonly int SynchronousLoading = NDalic.IMAGE_VISUAL_SYNCHRONOUS_LOADING; + public static readonly int BorderOnly = NDalic.IMAGE_VISUAL_BORDER_ONLY; + public static readonly int PixelArea = NDalic.IMAGE_VISUAL_PIXEL_AREA; + public static readonly int WrapModeU = NDalic.IMAGE_VISUAL_WRAP_MODE_U; + public static readonly int WrapModeV = NDalic.IMAGE_VISUAL_WRAP_MODE_V; + public static readonly int Border = NDalic.IMAGE_VISUAL_BORDER; + } + + /// + /// This specifies properties of MeshVisual. + /// + public struct MeshVisualProperty + { + public static readonly int ObjectURL = NDalic.MESH_VISUAL_OBJECT_URL; + public static readonly int MaterialtURL = NDalic.MESH_VISUAL_MATERIAL_URL; + public static readonly int TexturesPath = NDalic.MESH_VISUAL_TEXTURES_PATH; + public static readonly int ShadingMode = NDalic.MESH_VISUAL_SHADING_MODE; + public static readonly int UseMipmapping = NDalic.MESH_VISUAL_USE_MIPMAPPING; + public static readonly int UseSoftNormals = NDalic.MESH_VISUAL_USE_SOFT_NORMALS; + public static readonly int LightPosition = NDalic.MESH_VISUAL_LIGHT_POSITION; + } + + /// + /// This specifies properties of PrimitiveVisual. + /// + public struct PrimitiveVisualProperty + { + public static readonly int Shape = NDalic.PRIMITIVE_VISUAL_SHAPE; + public static readonly int MixColor = NDalic.PRIMITIVE_VISUAL_MIX_COLOR; + public static readonly int Slices = NDalic.PRIMITIVE_VISUAL_SLICES; + public static readonly int Stacks = NDalic.PRIMITIVE_VISUAL_STACKS; + public static readonly int ScaleTopRadius = NDalic.PRIMITIVE_VISUAL_SCALE_TOP_RADIUS; + public static readonly int ScaleBottomRadius = NDalic.PRIMITIVE_VISUAL_SCALE_BOTTOM_RADIUS; + public static readonly int ScaleHeight = NDalic.PRIMITIVE_VISUAL_SCALE_HEIGHT; + public static readonly int ScaleRadius = NDalic.PRIMITIVE_VISUAL_SCALE_RADIUS; + public static readonly int ScaleDimensions = NDalic.PRIMITIVE_VISUAL_SCALE_DIMENSIONS; + public static readonly int BevelPercentage = NDalic.PRIMITIVE_VISUAL_BEVEL_PERCENTAGE; + public static readonly int BevelSmoothness = NDalic.PRIMITIVE_VISUAL_BEVEL_SMOOTHNESS; + public static readonly int LightPosition = NDalic.PRIMITIVE_VISUAL_LIGHT_POSITION; + } + + /// + /// This specifies properties of TextVisual. + /// + public struct TextVisualProperty + { + public static readonly int Text = NDalic.TEXT_VISUAL_TEXT; + public static readonly int FontFamily = NDalic.TEXT_VISUAL_FONT_FAMILY; + public static readonly int FontStyle = NDalic.TEXT_VISUAL_FONT_STYLE; + public static readonly int PointSize = NDalic.TEXT_VISUAL_POINT_SIZE; + public static readonly int MultiLine = NDalic.TEXT_VISUAL_MULTI_LINE; + public static readonly int HorizontalAlignment = NDalic.TEXT_VISUAL_HORIZONTAL_ALIGNMENT; + public static readonly int VerticalAlignment = NDalic.TEXT_VISUAL_VERTICAL_ALIGNMENT; + public static readonly int TextColor = NDalic.TEXT_VISUAL_TEXT_COLOR; + public static readonly int EnableMarkup = NDalic.TEXT_VISUAL_ENABLE_MARKUP; + } + + /// + /// This specifies properties of NpatchImageVisual. + /// + public struct NpatchImageVisualProperty + { + public static readonly int URL = NDalic.IMAGE_VISUAL_URL; + public static readonly int FittingMode = NDalic.IMAGE_VISUAL_FITTING_MODE; + public static readonly int SamplingMode = NDalic.IMAGE_VISUAL_SAMPLING_MODE; + public static readonly int DesiredWidth = NDalic.IMAGE_VISUAL_DESIRED_WIDTH; + public static readonly int DesiredHeight = NDalic.IMAGE_VISUAL_DESIRED_HEIGHT; + public static readonly int SynchronousLoading = NDalic.IMAGE_VISUAL_SYNCHRONOUS_LOADING; + public static readonly int BorderOnly = NDalic.IMAGE_VISUAL_BORDER_ONLY; + public static readonly int PixelArea = NDalic.IMAGE_VISUAL_PIXEL_AREA; + public static readonly int WrapModeU = NDalic.IMAGE_VISUAL_WRAP_MODE_U; + public static readonly int WrapModeV = NDalic.IMAGE_VISUAL_WRAP_MODE_V; + public static readonly int Border = NDalic.IMAGE_VISUAL_WRAP_MODE_V + 1; + } + + /// + /// ParentOrigin constants. + /// + public struct ParentOrigin + { + public static float Top + { + get + { + float ret = NDalicPINVOKE.ParentOriginTop_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static float Bottom + { + get + { + float ret = NDalicPINVOKE.ParentOriginBottom_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static float Left + { + get + { + float ret = NDalicPINVOKE.ParentOriginLeft_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static float Right + { + get + { + float ret = NDalicPINVOKE.ParentOriginRight_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static float Middle + { + get + { + float ret = NDalicPINVOKE.ParentOriginMiddle_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static Position TopLeft + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginTopLeft_get(); + Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static Position TopCenter + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginTopCenter_get(); + Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static Position TopRight + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginTopRight_get(); + Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static Position CenterLeft + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginCenterLeft_get(); + Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static Position Center + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginCenter_get(); + Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static Position CenterRight + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginCenterRight_get(); + Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static Position BottomLeft + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginBottomLeft_get(); + Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static Position BottomCenter + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginBottomCenter_get(); + Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static Position BottomRight + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginBottomRight_get(); + Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + } + + /// + /// AnchorPoint constants. + /// + public struct AnchorPoint + { + public static float Top + { + get + { + float ret = NDalicPINVOKE.AnchorPointTop_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static float Bottom + { + get + { + float ret = NDalicPINVOKE.AnchorPointBottom_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static float Left + { + get + { + float ret = NDalicPINVOKE.AnchorPointLeft_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static float Right + { + get + { + float ret = NDalicPINVOKE.AnchorPointRight_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static float Middle + { + get + { + float ret = NDalicPINVOKE.AnchorPointMiddle_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static Position TopLeft + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointTopLeft_get(); + Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static Position TopCenter + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointTopCenter_get(); + Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static Position TopRight + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointTopRight_get(); + Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static Position CenterLeft + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointCenterLeft_get(); + Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static Position Center + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointCenter_get(); + Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static Position CenterRight + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointCenterRight_get(); + Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static Position BottomLeft + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointBottomLeft_get(); + Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static Position BottomCenter + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointBottomCenter_get(); + Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static Position BottomRight + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointBottomRight_get(); + Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + } + /// + /// PositionAxis constants. + /// + public struct PositionAxis + { + public static Position X + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_XAXIS_get(); + Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static Position Y + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_YAXIS_get(); + Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static Position Z + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_ZAXIS_get(); + Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static Position NegativeX + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_NEGATIVE_XAXIS_get(); + Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static Position NegativeY + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_NEGATIVE_YAXIS_get(); + Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static Position NegativeZ + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_NEGATIVE_ZAXIS_get(); + Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + } +} \ No newline at end of file diff --git a/Tizen.NUI/src/public/Position.cs b/Tizen.NUI/src/public/Position.cs index 112bbd3..4075eb4 100755 --- a/Tizen.NUI/src/public/Position.cs +++ b/Tizen.NUI/src/public/Position.cs @@ -822,356 +822,5 @@ namespace Tizen.NUI { return new Position(vec.X, vec.Y, vec.Z); } - - } - - /// - /// ParentOrigin constants. - /// - public struct ParentOrigin - { - public static float Top - { - get - { - float ret = NDalicPINVOKE.ParentOriginTop_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - public static float Bottom - { - get - { - float ret = NDalicPINVOKE.ParentOriginBottom_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - public static float Left - { - get - { - float ret = NDalicPINVOKE.ParentOriginLeft_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - public static float Right - { - get - { - float ret = NDalicPINVOKE.ParentOriginRight_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - public static float Middle - { - get - { - float ret = NDalicPINVOKE.ParentOriginMiddle_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - public static Position TopLeft - { - get - { - global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginTopLeft_get(); - Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - public static Position TopCenter - { - get - { - global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginTopCenter_get(); - Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - public static Position TopRight - { - get - { - global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginTopRight_get(); - Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - public static Position CenterLeft - { - get - { - global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginCenterLeft_get(); - Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - public static Position Center - { - get - { - global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginCenter_get(); - Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - public static Position CenterRight - { - get - { - global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginCenterRight_get(); - Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - public static Position BottomLeft - { - get - { - global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginBottomLeft_get(); - Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - public static Position BottomCenter - { - get - { - global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginBottomCenter_get(); - Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - public static Position BottomRight - { - get - { - global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginBottomRight_get(); - Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - } - - /// - /// AnchorPoint constants. - /// - public struct AnchorPoint - { - public static float Top - { - get - { - float ret = NDalicPINVOKE.AnchorPointTop_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - public static float Bottom - { - get - { - float ret = NDalicPINVOKE.AnchorPointBottom_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - public static float Left - { - get - { - float ret = NDalicPINVOKE.AnchorPointLeft_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - public static float Right - { - get - { - float ret = NDalicPINVOKE.AnchorPointRight_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - public static float Middle - { - get - { - float ret = NDalicPINVOKE.AnchorPointMiddle_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - public static Position TopLeft - { - get - { - global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointTopLeft_get(); - Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - public static Position TopCenter - { - get - { - global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointTopCenter_get(); - Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - public static Position TopRight - { - get - { - global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointTopRight_get(); - Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - public static Position CenterLeft - { - get - { - global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointCenterLeft_get(); - Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - public static Position Center - { - get - { - global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointCenter_get(); - Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - public static Position CenterRight - { - get - { - global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointCenterRight_get(); - Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - public static Position BottomLeft - { - get - { - global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointBottomLeft_get(); - Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - public static Position BottomCenter - { - get - { - global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointBottomCenter_get(); - Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - public static Position BottomRight - { - get - { - global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointBottomRight_get(); - Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - } - /// - /// PositionAxis constants. - /// - public struct PositionAxis - { - public static Position X - { - get - { - global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_XAXIS_get(); - Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - public static Position Y - { - get - { - global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_YAXIS_get(); - Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - public static Position Z - { - get - { - global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_ZAXIS_get(); - Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - public static Position NegativeX - { - get - { - global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_NEGATIVE_XAXIS_get(); - Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - public static Position NegativeY - { - get - { - global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_NEGATIVE_YAXIS_get(); - Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - public static Position NegativeZ - { - get - { - global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_NEGATIVE_ZAXIS_get(); - Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } } } diff --git a/Tizen.NUI/src/public/Property.cs b/Tizen.NUI/src/public/Property.cs index f0c93a3..b697a36 100755 --- a/Tizen.NUI/src/public/Property.cs +++ b/Tizen.NUI/src/public/Property.cs @@ -1483,93 +1483,4 @@ namespace Tizen.NUI } } - - /// - /// This specifies all the property types.
- /// Enumeration for the property types supported. - ///
- public enum PropertyType - { - /// - /// No type - /// - None, - /// - /// A boolean type - /// - Boolean, - /// - /// A float type - /// - Float, - /// - /// An integer type - /// - Integer, - /// - /// a vector array of size=2 with float precision - /// - Vector2, - /// - /// a vector array of size=3 with float precision - /// - Vector3, - /// - /// a vector array of size=4 with float precision - /// - Vector4, - /// - /// a 3x3 matrix - /// - Matrix3, - /// - /// a 4x4 matrix - /// - Matrix, - /// - /// an integer array of size=4 - /// - Rectangle, - /// - /// either a quaternion or an axis angle rotation - /// - Rotation, - /// - /// A string type - /// - String, - /// - /// an array of PropertyValue - /// - Array, - /// - /// a string key to PropertyValue mapping - /// - Map - } - - /// - /// This specifies the property access mode types.
- /// Enumeration for the access mode for custom properties. - ///
- public enum PropertyAccessMode - { - /// - /// if the property is read-only - /// - ReadOnly, - /// - /// If the property is read/writeable - /// - ReadWrite, - /// - /// If the property can be animated or constrained - /// - Animatable, - /// - /// The number of access modes - /// - AccessModeCount - } - } diff --git a/Tizen.NUI/src/public/StyleManager.cs b/Tizen.NUI/src/public/StyleManager.cs index 3025e3b..9125f27 100755 --- a/Tizen.NUI/src/public/StyleManager.cs +++ b/Tizen.NUI/src/public/StyleManager.cs @@ -250,24 +250,4 @@ namespace Tizen.NUI } } - - /// - /// Types of style change. Enumeration for StyleChange type. - /// - public enum StyleChangeType - { - /// - /// Denotes that the default font has changed. - /// - DefaultFontChange, - /// - /// Denotes that the default font size has changed. - /// - DefaultFontSizeChange, - /// - /// Denotes that the theme has changed. - /// - ThemeChange - } - } diff --git a/Tizen.NUI/src/public/TableView.cs b/Tizen.NUI/src/public/TableView.cs index bdd21ec..82c8579 100755 --- a/Tizen.NUI/src/public/TableView.cs +++ b/Tizen.NUI/src/public/TableView.cs @@ -813,43 +813,4 @@ namespace Tizen.NUI } } - - /// - /// Enumeration for horizontal alignment types. - /// - public enum HorizontalAlignmentType - { - /// - /// Align horizontally left - /// - Left, - /// - /// Align horizontally center - /// - Center, - /// - /// Align horizontally right - /// - Right - } - - /// - /// Enumeration for vertical alignment types. - /// - public enum VerticalAlignmentType - { - /// - /// Align vertically top - /// - Top, - /// - /// Align vertically center - /// - Center, - /// - /// Align vertically bottom - /// - Bottom - } - } diff --git a/Tizen.NUI/src/public/Touch.cs b/Tizen.NUI/src/public/Touch.cs index 057562c..bfa1e1d 100755 --- a/Tizen.NUI/src/public/Touch.cs +++ b/Tizen.NUI/src/public/Touch.cs @@ -231,45 +231,4 @@ namespace Tizen.NUI } } - - /// - /// Enumeration for point state type. - /// - public enum PointStateType - { - /// - /// Touch or hover started - /// - Started, - /// - /// Touch or hover finished - /// - Finished, - /// - /// Screen touched - /// - Down = Started, - /// - /// Touch stopped - /// - Up = Finished, - /// - /// Finger dragged or hovered - /// - Motion, - /// - /// Leave the boundary of an actor - /// - Leave, - /// - /// No change from last event.
- /// Useful when a multi-point event occurs where all points are sent but indicates that this particular point has not changed since the last time. - ///
- Stationary, - /// - /// A system event has occurred which has interrupted the touch or hover event sequence. - /// - Interrupted - } - } diff --git a/Tizen.NUI/src/public/UIComponents/TextEditor.cs b/Tizen.NUI/src/public/UIComponents/TextEditor.cs index 1028af0..d3233f8 100755 --- a/Tizen.NUI/src/public/UIComponents/TextEditor.cs +++ b/Tizen.NUI/src/public/UIComponents/TextEditor.cs @@ -474,13 +474,13 @@ namespace Tizen.NUI.UIComponents switch (temp) { case "BEGIN": - return HorizontalAlignment.HorizontalAlignBegin; + return HorizontalAlignment.Begin; case "CENTER": - return HorizontalAlignment.HorizontalAlignCenter; + return HorizontalAlignment.Center; case "END": - return HorizontalAlignment.HorizontalAlignEnd; + return HorizontalAlignment.End; default: - return HorizontalAlignment.HorizontalAlignBegin; + return HorizontalAlignment.Begin; } } set @@ -488,17 +488,17 @@ namespace Tizen.NUI.UIComponents string valueToString = ""; switch (value) { - case HorizontalAlignment.HorizontalAlignBegin: + case HorizontalAlignment.Begin: { valueToString = "BEGIN"; break; } - case HorizontalAlignment.HorizontalAlignCenter: + case HorizontalAlignment.Center: { valueToString = "CENTER"; break; } - case HorizontalAlignment.HorizontalAlignEnd: + case HorizontalAlignment.End: { valueToString = "END"; break; diff --git a/Tizen.NUI/src/public/UIComponents/TextField.cs b/Tizen.NUI/src/public/UIComponents/TextField.cs index 796f030..b5a54de 100755 --- a/Tizen.NUI/src/public/UIComponents/TextField.cs +++ b/Tizen.NUI/src/public/UIComponents/TextField.cs @@ -609,13 +609,13 @@ namespace Tizen.NUI.UIComponents switch (temp) { case "BEGIN": - return HorizontalAlignment.HorizontalAlignBegin; + return HorizontalAlignment.Begin; case "CENTER": - return HorizontalAlignment.HorizontalAlignCenter; + return HorizontalAlignment.Center; case "END": - return HorizontalAlignment.HorizontalAlignEnd; + return HorizontalAlignment.End; default: - return HorizontalAlignment.HorizontalAlignBegin; + return HorizontalAlignment.Begin; } } set @@ -623,17 +623,17 @@ namespace Tizen.NUI.UIComponents string valueToString = ""; switch (value) { - case HorizontalAlignment.HorizontalAlignBegin: + case HorizontalAlignment.Begin: { valueToString = "BEGIN"; break; } - case HorizontalAlignment.HorizontalAlignCenter: + case HorizontalAlignment.Center: { valueToString = "CENTER"; break; } - case HorizontalAlignment.HorizontalAlignEnd: + case HorizontalAlignment.End: { valueToString = "END"; break; @@ -666,13 +666,13 @@ namespace Tizen.NUI.UIComponents switch (temp) { case "TOP": - return VerticalAlignment.VerticalAlignTop; + return VerticalAlignment.Top; case "CENTER": - return VerticalAlignment.VerticalAlignCenter; + return VerticalAlignment.Center; case "BOTTOM": - return VerticalAlignment.VerticalAlignBottom; + return VerticalAlignment.Bottom; default: - return VerticalAlignment.VerticalAlignBottom; + return VerticalAlignment.Bottom; } } set @@ -680,17 +680,17 @@ namespace Tizen.NUI.UIComponents string valueToString = ""; switch (value) { - case VerticalAlignment.VerticalAlignTop: + case VerticalAlignment.Top: { valueToString = "TOP"; break; } - case VerticalAlignment.VerticalAlignCenter: + case VerticalAlignment.Center: { valueToString = "CENTER"; break; } - case VerticalAlignment.VerticalAlignBottom: + case VerticalAlignment.Bottom: { valueToString = "BOTTOM"; break; diff --git a/Tizen.NUI/src/public/UIComponents/TextLabel.cs b/Tizen.NUI/src/public/UIComponents/TextLabel.cs index 3de2162..dd0254d 100755 --- a/Tizen.NUI/src/public/UIComponents/TextLabel.cs +++ b/Tizen.NUI/src/public/UIComponents/TextLabel.cs @@ -321,13 +321,13 @@ namespace Tizen.NUI.UIComponents switch (temp) { case "BEGIN": - return HorizontalAlignment.HorizontalAlignBegin; + return HorizontalAlignment.Begin; case "CENTER": - return HorizontalAlignment.HorizontalAlignCenter; + return HorizontalAlignment.Center; case "END": - return HorizontalAlignment.HorizontalAlignEnd; + return HorizontalAlignment.End; default: - return HorizontalAlignment.HorizontalAlignBegin; + return HorizontalAlignment.Begin; } } set @@ -335,17 +335,17 @@ namespace Tizen.NUI.UIComponents string valueToString = ""; switch (value) { - case HorizontalAlignment.HorizontalAlignBegin: + case HorizontalAlignment.Begin: { valueToString = "BEGIN"; break; } - case HorizontalAlignment.HorizontalAlignCenter: + case HorizontalAlignment.Center: { valueToString = "CENTER"; break; } - case HorizontalAlignment.HorizontalAlignEnd: + case HorizontalAlignment.End: { valueToString = "END"; break; @@ -379,13 +379,13 @@ namespace Tizen.NUI.UIComponents switch (temp) { case "TOP": - return VerticalAlignment.VerticalAlignTop; + return VerticalAlignment.Top; case "CENTER": - return VerticalAlignment.VerticalAlignCenter; + return VerticalAlignment.Center; case "BOTTOM": - return VerticalAlignment.VerticalAlignBottom; + return VerticalAlignment.Bottom; default: - return VerticalAlignment.VerticalAlignBottom; + return VerticalAlignment.Bottom; } } set @@ -393,17 +393,17 @@ namespace Tizen.NUI.UIComponents string valueToString = ""; switch (value) { - case VerticalAlignment.VerticalAlignTop: + case VerticalAlignment.Top: { valueToString = "TOP"; break; } - case VerticalAlignment.VerticalAlignCenter: + case VerticalAlignment.Center: { valueToString = "CENTER"; break; } - case VerticalAlignment.VerticalAlignBottom: + case VerticalAlignment.Bottom: { valueToString = "BOTTOM"; break; @@ -707,43 +707,4 @@ namespace Tizen.NUI.UIComponents } } - - /// - /// Enumeration for the text horizontal aligning. - /// - public enum HorizontalAlignment - { - /// - /// Texts place at the begin of horizontal direction. - /// - HorizontalAlignBegin, - /// - /// Texts place at the center of horizontal direction. - /// - HorizontalAlignCenter, - /// - /// Texts place at the end of horizontal direction. - /// - HorizontalAlignEnd - } - - /// - /// Enumeration for the text horizontal aligning. - /// - public enum VerticalAlignment - { - /// - /// Texts place at the top of vertical direction. - /// - VerticalAlignTop, - /// - /// Texts place at the center of vertical direction. - /// - VerticalAlignCenter, - /// - /// Texts place at the bottom of vertical direction. - /// - VerticalAlignBottom - } - } diff --git a/Tizen.NUI/src/public/VisualMaps.cs b/Tizen.NUI/src/public/VisualMaps.cs index cec7ed3..bcb5005 100755 --- a/Tizen.NUI/src/public/VisualMaps.cs +++ b/Tizen.NUI/src/public/VisualMaps.cs @@ -33,20 +33,21 @@ namespace Tizen.NUI private PropertyMap _visualTransformMap = null; - private float _depthIndex = 0.0f; + private float? _depthIndex = null; protected PropertyMap _outputVisualMap = null; - internal string Name { set; get; } + internal int VisualIndex { set; get; } + internal VisualView Parent { set; @@ -61,16 +62,21 @@ namespace Tizen.NUI /// Get or set size of the visual.
/// It can be either relative (percentage of the parent) /// or absolute (in world units).
+ /// Optional. ///
public Vector2 Size { get { - return _visualSize; + return _visualSize ?? (new Vector2(1.0f, 1.0f)); } set { _visualSize = value; + if (_visualSizePolicy == null) + { + _visualSizePolicy = new Vector2(0.0f, 0.0f); + } UpdateVisual(); } } @@ -79,66 +85,300 @@ namespace Tizen.NUI /// Get or set offset of the visual.
/// It can be either relative (percentage of the parent) /// or absolute (in world units).
+ /// Optional. /// public Vector2 Position { get { - return _visualOffset; + return _visualOffset ?? (new Vector2(0.0f, 0.0f)); } set { _visualOffset = value; + if (_visualOffsetPolicy == null) + { + _visualOffsetPolicy = new Vector2(0.0f, 0.0f); + } + UpdateVisual(); + } + } + + /// + /// Get or set relative size of the visual
+ /// (percentage [0.0f to 1.0f] of the control).
+ /// Optional. + ///
+ public RelativeVector2 RelativeSize + { + get + { + return _visualSize ?? (new RelativeVector2(1.0f, 1.0f)); + } + set + { + _visualSize = value; + _visualSizePolicy = new Vector2(0.0f, 0.0f); UpdateVisual(); } } /// - /// Get or set offset policy of the visual.
- /// Indicates which components of the offset are relative - /// (percentage of the parent) or absolute (in world units).
- /// 0 indicates the component is relative, and 1 absolute.
+ /// Get or set relative offset of the visual
+ /// (percentage [0.0f to 1.0f] of the control).
+ /// Optional. ///
- public Vector2 PositionPolicy + public RelativeVector2 RelativePosition { get { - return _visualOffsetPolicy; + return _visualOffset ?? (new RelativeVector2(0.0f, 0.0f)); } set { - _visualOffsetPolicy = value; + _visualOffset = value; + _visualOffsetPolicy = new Vector2(0.0f, 0.0f); UpdateVisual(); } } /// - /// Get or set size policy of the visual.
- /// Indicates which components of the size are relative - /// (percentage of the parent) or absolute (in world units).
- /// 0 indicates the component is relative, and 1 absolute.
+ /// Get or set whether the x and y offset values are relative
+ /// (percentage [0.0f to 1.0f] of the control) or absolute (in world units).
+ /// Be default, both the x and the y offset is relative.
+ /// Optional. ///
- public Vector2 SizePolicy + public VisualTransformPolicyType PositionPolicy { get { - return _visualSizePolicy; + if (_visualOffsetPolicy != null && _visualOffsetPolicy.X == 1.0f + && _visualOffsetPolicy.Y == 1.0f) + { + return VisualTransformPolicyType.Absolute; + } + return VisualTransformPolicyType.Relative; } set { - _visualSizePolicy = value; + switch (value) + { + case VisualTransformPolicyType.Relative: + _visualOffsetPolicy = new Vector2(0.0f, 0.0f); + break; + case VisualTransformPolicyType.Absolute: + _visualOffsetPolicy = new Vector2(1.0f, 1.0f); + break; + default: + _visualOffsetPolicy = new Vector2(0.0f, 0.0f); + break; + } UpdateVisual(); } } /// - /// Get or set the origin of the visual within its control area. + /// Get or set whether the x offset values are relative
+ /// (percentage [0.0f to 1.0f] of the control) or absolute (in world units).
+ /// Be default, the x offset is relative.
+ /// Optional. + ///
+ public VisualTransformPolicyType PositionPolicyX + { + get + { + if (_visualOffsetPolicy != null && _visualOffsetPolicy.X == 1.0f) + { + return VisualTransformPolicyType.Absolute; + } + return VisualTransformPolicyType.Relative; + } + set + { + if (_visualOffsetPolicy == null) + { + _visualOffsetPolicy = new Vector2(0.0f, 0.0f); + } + + switch (value) + { + case VisualTransformPolicyType.Relative: + _visualOffsetPolicy.X = 0.0f; + break; + case VisualTransformPolicyType.Absolute: + _visualOffsetPolicy.X = 1.0f; + break; + default: + _visualOffsetPolicy.X = 0.0f; + break; + } + + UpdateVisual(); + } + } + + /// + /// Get or set whether the y offset values are relative
+ /// (percentage [0.0f to 1.0f] of the control) or absolute (in world units).
+ /// Be default, the y offset is relative.
+ /// Optional. + ///
+ public VisualTransformPolicyType PositionPolicyY + { + get + { + if (_visualOffsetPolicy != null && _visualOffsetPolicy.Y == 1.0f) + { + return VisualTransformPolicyType.Absolute; + } + return VisualTransformPolicyType.Relative; + } + set + { + if (_visualOffsetPolicy == null) + { + _visualOffsetPolicy = new Vector2(0.0f, 0.0f); + } + + switch (value) + { + case VisualTransformPolicyType.Relative: + _visualOffsetPolicy.Y = 0.0f; + break; + case VisualTransformPolicyType.Absolute: + _visualOffsetPolicy.Y = 1.0f; + break; + default: + _visualOffsetPolicy.Y = 0.0f; + break; + } + UpdateVisual(); + } + } + + /// + /// Get or set whether the width or height size values are relative
+ /// (percentage [0.0f to 1.0f] of the control) or absolute (in world units).
+ /// Be default, both the width and the height offset is relative to the control's size.
+ /// Optional. + ///
+ public VisualTransformPolicyType SizePolicy + { + get + { + if (_visualSizePolicy != null && _visualSizePolicy.X == 1.0f + && _visualSizePolicy.Y == 1.0f) + { + return VisualTransformPolicyType.Absolute; + } + return VisualTransformPolicyType.Relative; + } + set + { + switch (value) + { + case VisualTransformPolicyType.Relative: + _visualSizePolicy = new Vector2(0.0f, 0.0f); + break; + case VisualTransformPolicyType.Absolute: + _visualSizePolicy = new Vector2(1.0f, 1.0f); + break; + default: + _visualSizePolicy = new Vector2(0.0f, 0.0f); + break; + } + UpdateVisual(); + } + } + + /// + /// Get or set whether the width size values are relative
+ /// (percentage [0.0f to 1.0f] of the control) or absolute (in world units).
+ /// Be default, the width value is relative to the control's width.
+ /// Optional. + ///
+ public VisualTransformPolicyType SizePolicyWidth + { + get + { + if (_visualSizePolicy != null && _visualSizePolicy.Width == 1.0f) + { + return VisualTransformPolicyType.Absolute; + } + return VisualTransformPolicyType.Relative; + } + set + { + if (_visualSizePolicy == null) + { + _visualSizePolicy = new Vector2(0.0f, 0.0f); + } + + switch (value) + { + case VisualTransformPolicyType.Relative: + _visualSizePolicy.Width = 0.0f; + break; + case VisualTransformPolicyType.Absolute: + _visualSizePolicy.Width = 1.0f; + break; + default: + _visualSizePolicy.Width = 0.0f; + break; + } + UpdateVisual(); + } + } + + /// + /// Get or set whether the height size values are relative
+ /// (percentage [0.0f to 1.0f] of the control) or absolute (in world units).
+ /// Be default, both the height value is relative to the control's height.
+ /// Optional. + ///
+ public VisualTransformPolicyType SizePolicyHeight + { + get + { + if (_visualSizePolicy != null && _visualSizePolicy.Height == 1.0f) + { + return VisualTransformPolicyType.Absolute; + } + return VisualTransformPolicyType.Relative; + } + set + { + if (_visualSizePolicy == null) + { + _visualSizePolicy = new Vector2(0.0f, 0.0f); + } + + switch (value) + { + case VisualTransformPolicyType.Relative: + _visualSizePolicy.Height = 0.0f; + break; + case VisualTransformPolicyType.Absolute: + _visualSizePolicy.Height = 1.0f; + break; + default: + _visualSizePolicy.Height = 0.0f; + break; + } + UpdateVisual(); + } + } + + /// + /// Get or set the origin of the visual within its control area.
+ /// By default, the origin is Center.
+ /// Optional. ///
public Visual.AlignType Origin { get { - return _visualOrigin ?? (Visual.AlignType)(-1); + return _visualOrigin ?? (Visual.AlignType.Center); } set { @@ -148,13 +388,15 @@ namespace Tizen.NUI } /// - /// Get or set the anchor-point of the visual. + /// Get or set the anchor-point of the visual.
+ /// By default, the anchor point is Center.
+ /// Optional. ///
public Visual.AlignType AnchorPoint { get { - return _visualAnchorPoint ?? (Visual.AlignType)(-1); + return _visualAnchorPoint ?? (Visual.AlignType.Center); } set { @@ -164,13 +406,15 @@ namespace Tizen.NUI } /// - /// Get or set the depth index of the visual. + /// Get or set the depth index of the visual.
+ /// By default, the depth index is 0.
+ /// Optional. ///
public float DepthIndex { get { - return _depthIndex; + return _depthIndex ?? (0.0f); } set { @@ -257,6 +501,7 @@ namespace Tizen.NUI UpdateVisual(); } } + /// /// Enables/disables premultiplied alpha.
/// The premultiplied alpha is false by default unless this behaviour is modified by the derived Visual type. @@ -265,7 +510,7 @@ namespace Tizen.NUI { get { - return _premultipliedAlpha??false; + return _premultipliedAlpha ?? (false); } set { @@ -273,6 +518,7 @@ namespace Tizen.NUI UpdateVisual(); } } + /// /// Mix color is a blend color for any visual. /// @@ -288,6 +534,7 @@ namespace Tizen.NUI UpdateVisual(); } } + /// /// Opacity is the alpha component of the mixColor, above. /// @@ -295,7 +542,7 @@ namespace Tizen.NUI { get { - return _opacity??(-1.0f); + return _opacity ?? (1.0f); } set { @@ -327,7 +574,8 @@ namespace Tizen.NUI private WrapModeType? _wrapModeV = null; /// - /// Get or set the URL of the image. + /// Get or set the URL of the image.
+ /// Mandatory. ///
public string URL { @@ -344,14 +592,15 @@ namespace Tizen.NUI /// /// Get or set fitting options, used when resizing images to fit desired dimensions.
- /// If not supplied, default is FittingMode::SHRINK_TO_FIT.
+ /// If not supplied, default is FittingModeType.ShrinkToFit.
/// For Normal Quad images only.
+ /// Optional. ///
public FittingModeType FittingMode { get { - return _fittingMode ?? (FittingModeType)(-1); + return _fittingMode ?? (FittingModeType.ShrinkToFit); } set { @@ -362,14 +611,15 @@ namespace Tizen.NUI /// /// Get or set filtering options, used when resizing images to sample original pixels.
- /// If not supplied, default is SamplingMode::BOX.
+ /// If not supplied, default is SamplingModeType.Box.
/// For Normal Quad images only.
+ /// Optional. ///
public SamplingModeType SamplingMode { get { - return _samplingMode ?? (SamplingModeType)(-1); + return _samplingMode ?? (SamplingModeType.Box); } set { @@ -382,6 +632,7 @@ namespace Tizen.NUI /// Get or set the desired image width.
/// If not specified, the actual image width is used.
/// For Normal Quad images only.
+ /// Optional. ///
public int DesiredWidth { @@ -400,6 +651,7 @@ namespace Tizen.NUI /// Get or set the desired image height.
/// If not specified, the actual image height is used.
/// For Normal Quad images only.
+ /// Optional. /// public int DesiredHeight { @@ -418,12 +670,13 @@ namespace Tizen.NUI /// Get or set whether to load the image synchronously.
/// If not specified, the default is false, i.e. the image is loaded asynchronously.
/// For Normal Quad images only.
+ /// Optional. /// public bool SynchronousLoading { get { - return _synchronousLoading ?? false; + return _synchronousLoading ?? (false); } set { @@ -436,12 +689,13 @@ namespace Tizen.NUI /// Get or set whether to draws the borders only(If true).
/// If not specified, the default is false.
/// For N-Patch images only.
+ /// Optional. /// public bool BorderOnly { get { - return _borderOnly ?? false; + return _borderOnly ?? (false); } set { @@ -454,14 +708,15 @@ namespace Tizen.NUI /// Get or set the image area to be displayed.
/// It is a rectangular area.
/// The first two elements indicate the top-left position of the area, and the last two elements are the area width and height respectively.
- /// If not specified, the default value is [0.0, 0.0, 1.0, 1.0], i.e. the entire area of the image.
+ /// If not specified, the default value is Vector4(0.0, 0.0, 1.0, 1.0), i.e. the entire area of the image.
/// For For Normal QUAD image only.
+ /// Optional. /// public Vector4 PixelArea { get { - return _pixelArea; + return _pixelArea ?? (new Vector4(0.0f, 0.0f, 1.0f, 1.0f)); } set { @@ -473,14 +728,15 @@ namespace Tizen.NUI /// /// Get or set the wrap mode for u coordinate.
/// It decides how the texture should be sampled when the u coordinate exceeds the range of 0.0 to 1.0.
- /// If not specified, the default is CLAMP.
+ /// If not specified, the default is WrapModeType.Default(CLAMP).
/// For Normal QUAD image only.
+ /// Optional. ///
public WrapModeType WrapModeU { get { - return _wrapModeU ?? (WrapModeType)(-1); + return _wrapModeU ?? (WrapModeType.Default); } set { @@ -493,14 +749,15 @@ namespace Tizen.NUI /// Get or set the wrap mode for v coordinate.
/// It decides how the texture should be sampled when the v coordinate exceeds the range of 0.0 to 1.0.
/// The first two elements indicate the top-left position of the area, and the last two elements are the area width and height respectively.
- /// If not specified, the default is CLAMP.
+ /// If not specified, the default is WrapModeType.Default(CLAMP).
/// For Normal QUAD image only. + /// Optional. /// public WrapModeType WrapModeV { get { - return _wrapModeV ?? (WrapModeType)(-1); + return _wrapModeV ?? (WrapModeType.Default); } set { @@ -511,22 +768,25 @@ namespace Tizen.NUI protected override void ComposingPropertyMap() { - _outputVisualMap = new PropertyMap(); - _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Image)); - if (_url != null) { _outputVisualMap.Add(ImageVisualProperty.URL, new PropertyValue(_url)); } - if (_fittingMode != null) { _outputVisualMap.Add(ImageVisualProperty.FittingMode, new PropertyValue((int)_fittingMode)); } - if (_samplingMode != null) { _outputVisualMap.Add(ImageVisualProperty.SamplingMode, new PropertyValue((int)_samplingMode)); } - if (_desiredWidth != null) { _outputVisualMap.Add(ImageVisualProperty.DesiredWidth, new PropertyValue((int)_desiredWidth)); } - if (_desiredHeight != null) { _outputVisualMap.Add(ImageVisualProperty.DesiredHeight, new PropertyValue((int)_desiredHeight)); } - if (_synchronousLoading != null) { _outputVisualMap.Add(ImageVisualProperty.SynchronousLoading, new PropertyValue((bool)_synchronousLoading)); } - if (_borderOnly != null) { _outputVisualMap.Add(ImageVisualProperty.BorderOnly, new PropertyValue((bool)_borderOnly)); } - if (_pixelArea != null) { _outputVisualMap.Add(ImageVisualProperty.PixelArea, new PropertyValue(_pixelArea)); } - if (_wrapModeU != null) { _outputVisualMap.Add(ImageVisualProperty.WrapModeU, new PropertyValue((int)_wrapModeU)); } - if (_wrapModeV != null) { _outputVisualMap.Add(ImageVisualProperty.WrapModeV, new PropertyValue((int)_wrapModeV)); } - if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); } - if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); } - if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); } - if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); } + if (_url != null) + { + _outputVisualMap = new PropertyMap(); + _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Image)); + _outputVisualMap.Add(ImageVisualProperty.URL, new PropertyValue(_url)); + if (_fittingMode != null) { _outputVisualMap.Add(ImageVisualProperty.FittingMode, new PropertyValue((int)_fittingMode)); } + if (_samplingMode != null) { _outputVisualMap.Add(ImageVisualProperty.SamplingMode, new PropertyValue((int)_samplingMode)); } + if (_desiredWidth != null) { _outputVisualMap.Add(ImageVisualProperty.DesiredWidth, new PropertyValue((int)_desiredWidth)); } + if (_desiredHeight != null) { _outputVisualMap.Add(ImageVisualProperty.DesiredHeight, new PropertyValue((int)_desiredHeight)); } + if (_synchronousLoading != null) { _outputVisualMap.Add(ImageVisualProperty.SynchronousLoading, new PropertyValue((bool)_synchronousLoading)); } + if (_borderOnly != null) { _outputVisualMap.Add(ImageVisualProperty.BorderOnly, new PropertyValue((bool)_borderOnly)); } + if (_pixelArea != null) { _outputVisualMap.Add(ImageVisualProperty.PixelArea, new PropertyValue(_pixelArea)); } + if (_wrapModeU != null) { _outputVisualMap.Add(ImageVisualProperty.WrapModeU, new PropertyValue((int)_wrapModeU)); } + if (_wrapModeV != null) { _outputVisualMap.Add(ImageVisualProperty.WrapModeV, new PropertyValue((int)_wrapModeV)); } + if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); } + if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); } + if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); } + if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); } + } } } @@ -550,7 +810,8 @@ namespace Tizen.NUI private bool? _enableMarkup = null; /// - /// Get or set the text to display in UTF-8 format. + /// Get or set the text to display in UTF-8 format.
+ /// Mandatory. ///
public string Text { @@ -566,7 +827,8 @@ namespace Tizen.NUI } /// - /// Get or set the requested font family to use. + /// Get or set the requested font family to use.
+ /// Optional. ///
public string FontFamily { @@ -582,7 +844,8 @@ namespace Tizen.NUI } /// - /// Get or set the requested font style to use. + /// Get or set the requested font style to use.
+ /// Optional. ///
public PropertyMap FontStyle { @@ -598,13 +861,14 @@ namespace Tizen.NUI } /// - /// Get or set the size of font in points. + /// Get or set the size of font in points.
+ /// Mandatory. ///
public float PointSize { get { - return _pointSize ?? (-1.0f); + return _pointSize ?? (0.0f); } set { @@ -614,13 +878,15 @@ namespace Tizen.NUI } /// - /// Get or set the single-line or multi-line layout option. + /// Get or set the single-line or multi-line layout option.
+ /// If not specified, the default is false.
+ /// Optional. ///
public bool MultiLine { get { - return _multiLine ?? false; + return _multiLine ?? (false); } set { @@ -631,7 +897,8 @@ namespace Tizen.NUI /// /// Get or set the line horizontal alignment.
- /// If not specified, the default is BEGIN.
+ /// If not specified, the default is Begin.
+ /// Optional. ///
public HorizontalAlignment HorizontalAlignment { @@ -640,30 +907,30 @@ namespace Tizen.NUI switch (_horizontalAlignment) { case "BEGIN": - return HorizontalAlignment.HorizontalAlignBegin; + return HorizontalAlignment.Begin; case "CENTER": - return HorizontalAlignment.HorizontalAlignCenter; + return HorizontalAlignment.Center; case "END": - return HorizontalAlignment.HorizontalAlignEnd; + return HorizontalAlignment.End; default: - return HorizontalAlignment.HorizontalAlignBegin; + return HorizontalAlignment.Begin; } } set { switch (value) { - case HorizontalAlignment.HorizontalAlignBegin: + case HorizontalAlignment.Begin: { _horizontalAlignment = "BEGIN"; break; } - case HorizontalAlignment.HorizontalAlignCenter: + case HorizontalAlignment.Center: { _horizontalAlignment = "CENTER"; break; } - case HorizontalAlignment.HorizontalAlignEnd: + case HorizontalAlignment.End: { _horizontalAlignment = "END"; break; @@ -680,7 +947,8 @@ namespace Tizen.NUI /// /// Get or set the line vertical alignment.
- /// If not specified, the default is TOP.
+ /// If not specified, the default is Top.
+ /// Optional. ///
public VerticalAlignment VerticalAlignment { @@ -689,30 +957,30 @@ namespace Tizen.NUI switch (_verticalAlignment) { case "TOP": - return VerticalAlignment.VerticalAlignTop; + return VerticalAlignment.Top; case "CENTER": - return VerticalAlignment.VerticalAlignCenter; + return VerticalAlignment.Center; case "BOTTOM": - return VerticalAlignment.VerticalAlignBottom; + return VerticalAlignment.Bottom; default: - return VerticalAlignment.VerticalAlignBottom; + return VerticalAlignment.Top; } } set { switch (value) { - case VerticalAlignment.VerticalAlignTop: + case VerticalAlignment.Top: { _verticalAlignment = "TOP"; break; } - case VerticalAlignment.VerticalAlignCenter: + case VerticalAlignment.Center: { _verticalAlignment = "CENTER"; break; } - case VerticalAlignment.VerticalAlignBottom: + case VerticalAlignment.Bottom: { _verticalAlignment = "BOTTOM"; break; @@ -728,7 +996,8 @@ namespace Tizen.NUI } /// - /// Get or set the color of the text. + /// Get or set the color of the text.
+ /// Optional. ///
public Color TextColor { @@ -744,13 +1013,14 @@ namespace Tizen.NUI } /// - /// Get or set whether the mark-up processing is enabled. + /// Get or set whether the mark-up processing is enabled.
+ /// Optional. ///
public bool EnableMarkup { get { - return _enableMarkup ?? false; + return _enableMarkup ?? (false); } set { @@ -761,21 +1031,24 @@ namespace Tizen.NUI protected override void ComposingPropertyMap() { - _outputVisualMap = new PropertyMap(); - _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Text)); - if (_text != null) { _outputVisualMap.Add(TextVisualProperty.Text, new PropertyValue(_text)); } - if (_fontFamily != null) { _outputVisualMap.Add(TextVisualProperty.FontFamily, new PropertyValue(_fontFamily)); } - if (_fontStyle != null) { _outputVisualMap.Add(TextVisualProperty.FontStyle, new PropertyValue(_fontStyle)); } - if (_pointSize != null) { _outputVisualMap.Add(TextVisualProperty.PointSize, new PropertyValue((float)_pointSize)); } - if (_multiLine != null) { _outputVisualMap.Add(TextVisualProperty.MultiLine, new PropertyValue((bool)_multiLine)); } - if (_horizontalAlignment != null) { _outputVisualMap.Add(TextVisualProperty.HorizontalAlignment, new PropertyValue(_horizontalAlignment)); } - if (_verticalAlignment != null) { _outputVisualMap.Add(TextVisualProperty.VerticalAlignment, new PropertyValue(_verticalAlignment)); } - if (_textColor != null) { _outputVisualMap.Add(TextVisualProperty.TextColor, new PropertyValue(_textColor)); } - if (_enableMarkup != null) { _outputVisualMap.Add(TextVisualProperty.EnableMarkup, new PropertyValue((bool)_enableMarkup)); } - if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); } - if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); } - if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); } - if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); } + if (_text != null && _pointSize != null) + { + _outputVisualMap = new PropertyMap(); + _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Text)); + _outputVisualMap.Add(TextVisualProperty.Text, new PropertyValue(_text)); + _outputVisualMap.Add(TextVisualProperty.PointSize, new PropertyValue((float)_pointSize)); + if (_fontFamily != null) { _outputVisualMap.Add(TextVisualProperty.FontFamily, new PropertyValue(_fontFamily)); } + if (_fontStyle != null) { _outputVisualMap.Add(TextVisualProperty.FontStyle, new PropertyValue(_fontStyle)); } + if (_multiLine != null) { _outputVisualMap.Add(TextVisualProperty.MultiLine, new PropertyValue((bool)_multiLine)); } + if (_horizontalAlignment != null) { _outputVisualMap.Add(TextVisualProperty.HorizontalAlignment, new PropertyValue(_horizontalAlignment)); } + if (_verticalAlignment != null) { _outputVisualMap.Add(TextVisualProperty.VerticalAlignment, new PropertyValue(_verticalAlignment)); } + if (_textColor != null) { _outputVisualMap.Add(TextVisualProperty.TextColor, new PropertyValue(_textColor)); } + if (_enableMarkup != null) { _outputVisualMap.Add(TextVisualProperty.EnableMarkup, new PropertyValue((bool)_enableMarkup)); } + if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); } + if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); } + if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); } + if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); } + } } } @@ -793,7 +1066,8 @@ namespace Tizen.NUI private bool? _antiAliasing = null; /// - /// Get or set the color of the border. + /// Get or set the color of the border.
+ /// Mandatory. ///
public Color Color { @@ -809,7 +1083,8 @@ namespace Tizen.NUI } /// - /// Get or set the width of the border (in pixels). + /// Get or set the width of the border (in pixels).
+ /// Mandatory. ///
public float BorderSize { @@ -827,12 +1102,13 @@ namespace Tizen.NUI /// /// Get or set whether anti-aliasing of the border is required.
/// If not supplied, default is false.
+ /// Optional. ///
public bool AntiAliasing { get { - return _antiAliasing ?? false; + return _antiAliasing ?? (false); } set { @@ -843,15 +1119,18 @@ namespace Tizen.NUI protected override void ComposingPropertyMap() { - _outputVisualMap = new PropertyMap(); - _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Border)); - if (_color != null) { _outputVisualMap.Add(BorderVisualProperty.Color, new PropertyValue(_color)); } - if (_size != null) { _outputVisualMap.Add(BorderVisualProperty.Size, new PropertyValue((float)_size)); } - if (_antiAliasing != null) { _outputVisualMap.Add(BorderVisualProperty.AntiAliasing, new PropertyValue((bool)_antiAliasing)); } - if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); } - if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); } - if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); } - if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); } + if (_color != null && _size != null) + { + _outputVisualMap = new PropertyMap(); + _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Border)); + _outputVisualMap.Add(BorderVisualProperty.Size, new PropertyValue((float)_size)); + _outputVisualMap.Add(BorderVisualProperty.Color, new PropertyValue(_color)); + if (_antiAliasing != null) { _outputVisualMap.Add(BorderVisualProperty.AntiAliasing, new PropertyValue((bool)_antiAliasing)); } + if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); } + if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); } + if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); } + if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); } + } } } @@ -867,7 +1146,8 @@ namespace Tizen.NUI private Color _mixColorForColorVisual = null; /// - /// Get or set the solid color required. + /// Get or set the solid color required.
+ /// Mandatory. ///
public Color Color { @@ -884,12 +1164,15 @@ namespace Tizen.NUI protected override void ComposingPropertyMap() { - _outputVisualMap = new PropertyMap(); - _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Color)); - if (_mixColorForColorVisual != null) { _outputVisualMap.Add(ColorVisualProperty.MixColor, new PropertyValue(_mixColorForColorVisual)); } - if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); } - if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); } - if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); } + if (_mixColorForColorVisual != null) + { + _outputVisualMap = new PropertyMap(); + _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Color)); + _outputVisualMap.Add(ColorVisualProperty.MixColor, new PropertyValue(_mixColorForColorVisual)); + if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); } + if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); } + if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); } + } } } @@ -983,6 +1266,7 @@ namespace Tizen.NUI /// Get or set all the stop offsets.
/// A PropertyArray of float.
/// If not supplied, default is 0.0f and 1.0f.
+ /// Optional. /// public PropertyArray StopOffset { @@ -1001,6 +1285,7 @@ namespace Tizen.NUI /// Get or set the color at the stop offsets.
/// A PropertyArray of Color.
/// At least 2 values required to show a gradient.
+ /// Mandatory. /// public PropertyArray StopColor { @@ -1017,13 +1302,14 @@ namespace Tizen.NUI /// /// Get or set defines the coordinate system for certain attributes of the points in a gradient.
- /// If not supplied, default is GradientVisualUnitsType.OBJECT_BOUNDING_BOX.
+ /// If not supplied, default is GradientVisualUnitsType.ObjectBoundingBox.
+ /// Optional. ///
public GradientVisualUnitsType Units { get { - return _units ?? (GradientVisualUnitsType)(-1); + return _units ?? (GradientVisualUnitsType.ObjectBoundingBox); } set { @@ -1034,13 +1320,14 @@ namespace Tizen.NUI /// /// Get or set indicates what happens if the gradient starts or ends inside the bounds of the target rectangle.
- /// If not supplied, default is GradientVisualSpreadMethodType.PAD.
+ /// If not supplied, default is GradientVisualSpreadMethodType.Pad.
+ /// Optional. ///
public GradientVisualSpreadMethodType SpreadMethod { get { - return _spreadMethod ?? (GradientVisualSpreadMethodType)(-1); + return _spreadMethod ?? (GradientVisualSpreadMethodType.Pad); } set { @@ -1051,20 +1338,23 @@ namespace Tizen.NUI protected override void ComposingPropertyMap() { - _outputVisualMap = new PropertyMap(); - _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Gradient)); - if (_startPosition != null) { _outputVisualMap.Add(GradientVisualProperty.StartPosition, new PropertyValue(_startPosition)); } - if (_endPosition != null) { _outputVisualMap.Add(GradientVisualProperty.EndPosition, new PropertyValue(_endPosition)); } - if (_center != null) { _outputVisualMap.Add(GradientVisualProperty.Center, new PropertyValue(_center)); } - if (_radius != null) { _outputVisualMap.Add(GradientVisualProperty.Radius, new PropertyValue((float)_radius)); } - if (_stopOffset != null) { _outputVisualMap.Add(GradientVisualProperty.StopOffset, new PropertyValue(_stopOffset)); } - if (_stopColor != null) { _outputVisualMap.Add(GradientVisualProperty.StopColor, new PropertyValue(_stopColor)); } - if (_units != null) { _outputVisualMap.Add(GradientVisualProperty.Units, new PropertyValue((int)_units)); } - if (_spreadMethod != null) { _outputVisualMap.Add(GradientVisualProperty.SpreadMethod, new PropertyValue((int)_spreadMethod)); } - if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); } - if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); } - if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); } - if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); } + if (((_startPosition != null && _endPosition != null) || (_center != null && _radius != null)) && _stopColor != null) + { + _outputVisualMap = new PropertyMap(); + _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Gradient)); + _outputVisualMap.Add(GradientVisualProperty.StopColor, new PropertyValue(_stopColor)); + if (_startPosition != null) { _outputVisualMap.Add(GradientVisualProperty.StartPosition, new PropertyValue(_startPosition)); } + if (_endPosition != null) { _outputVisualMap.Add(GradientVisualProperty.EndPosition, new PropertyValue(_endPosition)); } + if (_center != null) { _outputVisualMap.Add(GradientVisualProperty.Center, new PropertyValue(_center)); } + if (_radius != null) { _outputVisualMap.Add(GradientVisualProperty.Radius, new PropertyValue((float)_radius)); } + if (_stopOffset != null) { _outputVisualMap.Add(GradientVisualProperty.StopOffset, new PropertyValue(_stopOffset)); } + if (_units != null) { _outputVisualMap.Add(GradientVisualProperty.Units, new PropertyValue((int)_units)); } + if (_spreadMethod != null) { _outputVisualMap.Add(GradientVisualProperty.SpreadMethod, new PropertyValue((int)_spreadMethod)); } + if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); } + if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); } + if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); } + if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); } + } } } @@ -1086,7 +1376,8 @@ namespace Tizen.NUI private Vector3 _lightPosition = null; /// - /// Get or set the location of the ".obj" file. + /// Get or set the location of the ".obj" file.
+ /// Mandatory. ///
public string ObjectURL { @@ -1104,6 +1395,7 @@ namespace Tizen.NUI /// /// Get or set the location of the ".mtl" file.
/// If not specified, then a textureless object is assumed.
+ /// Optional. ///
public string MaterialtURL { @@ -1138,13 +1430,14 @@ namespace Tizen.NUI /// /// Get or set the type of shading mode that the mesh will use.
/// If anything the specified shading mode requires is missing, a simpler mode that can be handled with what has been supplied will be used instead.
- /// If not specified, it will use the best it can support (will try MeshVisualShadingModeValue.TEXTURED_WITH_DETAILED_SPECULAR_LIGHTING first).
+ /// If not specified, it will use the best it can support (will try MeshVisualShadingModeValue.TexturedWithDetailedSpecularLighting first).
+ /// Optional. ///
public MeshVisualShadingModeValue ShadingMode { get { - return _shadingMode??(MeshVisualShadingModeValue)(-1); + return _shadingMode ?? (MeshVisualShadingModeValue.TexturedWithDetailedSpecularLighting); } set { @@ -1156,12 +1449,13 @@ namespace Tizen.NUI /// /// Get or set whether to use mipmaps for textures or not.
/// If not specified, the default is true.
+ /// Optional. ///
public bool UseMipmapping { get { - return _useMipmapping??false; + return _useMipmapping ?? (true); } set { @@ -1173,12 +1467,13 @@ namespace Tizen.NUI /// /// Get or set whether to average normals at each point to smooth textures or not.
/// If not specified, the default is true.
+ /// Optional. ///
public bool UseSoftNormals { get { - return _useSoftNormals??false; + return _useSoftNormals ?? (true); } set { @@ -1192,6 +1487,7 @@ namespace Tizen.NUI /// This is based off the stage's dimensions, so using the width and height of the stage halved will correspond to the center, /// and using all zeroes will place the light at the top left corner.
/// If not specified, the default is an offset outwards from the center of the screen.
+ /// Optional. /// public Vector3 LightPosition { @@ -1208,19 +1504,21 @@ namespace Tizen.NUI protected override void ComposingPropertyMap() { - _outputVisualMap = new PropertyMap(); - _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Mesh)); - if (_objectURL != null) { _outputVisualMap.Add(MeshVisualProperty.ObjectURL, new PropertyValue(_objectURL)); } - if (_materialtURL != null) { _outputVisualMap.Add(MeshVisualProperty.MaterialtURL, new PropertyValue(_materialtURL)); } - if (_texturesPath != null) { _outputVisualMap.Add(MeshVisualProperty.TexturesPath, new PropertyValue(_texturesPath)); } - if (_shadingMode != null) { _outputVisualMap.Add(MeshVisualProperty.ShadingMode, new PropertyValue((int)_shadingMode)); } - if (_useMipmapping != null) { _outputVisualMap.Add(MeshVisualProperty.UseMipmapping, new PropertyValue((bool)_useMipmapping)); } - if (_useSoftNormals != null) { _outputVisualMap.Add(MeshVisualProperty.UseSoftNormals, new PropertyValue((bool)_useSoftNormals)); } - if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); } - if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); } - if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); } - if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); } - + if (_objectURL != null) + { + _outputVisualMap = new PropertyMap(); + _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Mesh)); + _outputVisualMap.Add(MeshVisualProperty.ObjectURL, new PropertyValue(_objectURL)); + if (_materialtURL != null) { _outputVisualMap.Add(MeshVisualProperty.MaterialtURL, new PropertyValue(_materialtURL)); } + if (_texturesPath != null) { _outputVisualMap.Add(MeshVisualProperty.TexturesPath, new PropertyValue(_texturesPath)); } + if (_shadingMode != null) { _outputVisualMap.Add(MeshVisualProperty.ShadingMode, new PropertyValue((int)_shadingMode)); } + if (_useMipmapping != null) { _outputVisualMap.Add(MeshVisualProperty.UseMipmapping, new PropertyValue((bool)_useMipmapping)); } + if (_useSoftNormals != null) { _outputVisualMap.Add(MeshVisualProperty.UseSoftNormals, new PropertyValue((bool)_useSoftNormals)); } + if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); } + if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); } + if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); } + if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); } + } } } @@ -1248,13 +1546,14 @@ namespace Tizen.NUI /// /// Get or set the specific shape to render.
- /// If not specified, the default is PrimitiveVisualShapeType.SPHERE.
+ /// If not specified, the default is PrimitiveVisualShapeType.Sphere.
+ /// Optional. ///
public PrimitiveVisualShapeType Shape { get { - return _shape??(PrimitiveVisualShapeType)(-1); + return _shape ?? (PrimitiveVisualShapeType.Sphere); } set { @@ -1267,12 +1566,13 @@ namespace Tizen.NUI /// Get or set the color of the shape.
/// If not specified, the default is Color(0.5, 0.5, 0.5, 1.0).
/// Applies to ALL shapes.
+ /// Optional. /// public Color MixColor { get { - return _mixColorForPrimitiveVisual; + return _mixColorForPrimitiveVisual ?? (new Color(0.5f, 0.5f, 0.5f, 1.0f)); } set { @@ -1286,12 +1586,13 @@ namespace Tizen.NUI /// For spheres and conical frustrums, this determines how many divisions there are as you go around the object.
/// If not specified, the default is 128.
/// The range is from 1 to 255.
+ /// Optional. /// public int Slices { get { - return _slices??(-1); + return _slices ?? (128); } set { @@ -1305,12 +1606,13 @@ namespace Tizen.NUI /// For spheres, 'stacks' determines how many layers there are as you go down the object.
/// If not specified, the default is 128.
/// The range is from 1 to 255.
+ /// Optional. /// public int Stacks { get { - return _stacks??(-1); + return _stacks ?? (128); } set { @@ -1322,14 +1624,15 @@ namespace Tizen.NUI /// /// Get or set the scale of the radius of the top circle of a conical frustrum.
/// If not specified, the default is 1.0f.
- /// Applies to: - PrimitiveVisualShapeType.CONICAL_FRUSTRUM
+ /// Applies to: - PrimitiveVisualShapeType.ConicalFrustrum
/// Only values greater than or equal to 0.0f are accepted.
+ /// Optional. ///
public float ScaleTopRadius { get { - return _scaleTopRadius ?? (-1.0f); + return _scaleTopRadius ?? (1.0f); } set { @@ -1341,15 +1644,16 @@ namespace Tizen.NUI /// /// Get or set the scale of the radius of the bottom circle of a conical frustrum.
/// If not specified, the default is 1.5f.
- /// Applies to: - PrimitiveVisualShapeType.CONICAL_FRUSTRUM
- /// - PrimitiveVisualShapeType.CONE
+ /// Applies to: - PrimitiveVisualShapeType.ConicalFrustrum
+ /// - PrimitiveVisualShapeType.Cone
/// Only values greater than or equal to 0.0f are accepted.
+ /// Optional. ///
public float ScaleBottomRadius { get { - return _scaleBottomRadius ?? (-1.0f); + return _scaleBottomRadius ?? (1.5f); } set { @@ -1362,16 +1666,17 @@ namespace Tizen.NUI /// Get or set the scale of the height of a conic.
/// If not specified, the default is 3.0f.
/// Applies to:
- /// - Shape::CONICAL_FRUSTRUM
- /// - Shape::CONE
- /// - Shape::CYLINDER
+ /// - PrimitiveVisualShapeType.ConicalFrustrum
+ /// - PrimitiveVisualShapeType.Cone
+ /// - PrimitiveVisualShapeType.Cylinder
/// Only values greater than or equal to 0.0f are accepted.
+ /// Optional. /// public float ScaleHeight { get { - return _scaleHeight??(-1.0f); + return _scaleHeight ?? (3.0f); } set { @@ -1384,14 +1689,15 @@ namespace Tizen.NUI /// Get or set the scale of the radius of a cylinder.
/// If not specified, the default is 1.0f.
/// Applies to:
- /// - Shape::CYLINDER
+ /// - PrimitiveVisualShapeType.Cylinder
/// Only values greater than or equal to 0.0f are accepted.
+ /// Optional. /// public float ScaleRadius { get { - return _scaleRadius ?? (-1.0f); + return _scaleRadius ?? (1.0f); } set { @@ -1404,16 +1710,17 @@ namespace Tizen.NUI /// Get or set the dimensions of a cuboid. Scales in the same fashion as a 9-patch image.
/// If not specified, the default is Vector3.One.
/// Applies to:
- /// - Shape::CUBE
- /// - Shape::OCTAHEDRON
- /// - Shape::BEVELLED_CUBE
+ /// - PrimitiveVisualShapeType.Cube
+ /// - PrimitiveVisualShapeType.Octahedron
+ /// - PrimitiveVisualShapeType.BevelledCube
/// Each vector3 parameter should be greater than or equal to 0.0f.
+ /// Optional. /// public Vector3 ScaleDimensions { get { - return _scaleDimensions; + return _scaleDimensions ?? (Vector3.One); } set { @@ -1427,14 +1734,15 @@ namespace Tizen.NUI /// Bevel percentage ranges from 0.0 to 1.0. It affects the ratio of the outer face widths to the width of the overall cube.
/// If not specified, the default is 0.0f (no bevel).
/// Applies to:
- /// - Shape::BEVELLED_CUBE
+ /// - PrimitiveVisualShapeType.BevelledCube
/// The range is from 0.0f to 1.0f.
+ /// Optional. /// public float BevelPercentage { get { - return _bevelPercentage ?? (-1.0f); + return _bevelPercentage ?? (0.0f); } set { @@ -1447,14 +1755,15 @@ namespace Tizen.NUI /// Get or set defines how smooth the bevelled edges should be.
/// If not specified, the default is 0.0f (sharp edges).
/// Applies to:
- /// - Shape::BEVELLED_CUBE
+ /// - PrimitiveVisualShapeType.BevelledCube
/// The range is from 0.0f to 1.0f.
+ /// Optional. /// public float BevelSmoothness { get { - return _bevelSmoothness ?? (-1.0f); + return _bevelSmoothness ?? (0.0f); } set { @@ -1468,7 +1777,8 @@ namespace Tizen.NUI /// This is based off the stage's dimensions, so using the width and height of the stage halved will correspond to the center, /// and using all zeroes will place the light at the top left corner.
/// If not specified, the default is an offset outwards from the center of the screen.
- /// Applies to ALL shapes. + /// Applies to ALL shapes.
+ /// Optional. /// public Vector3 LightPosition { @@ -1519,7 +1829,8 @@ namespace Tizen.NUI private Rectangle _border = null; /// - /// Get or set the URL of the image. + /// Get or set the URL of the image.
+ /// Mandatory. ///
public string URL { @@ -1538,6 +1849,7 @@ namespace Tizen.NUI /// Get or set whether to draws the borders only(If true).
/// If not specified, the default is false.
/// For N-Patch images only.
+ /// Optional. /// public bool BorderOnly { @@ -1553,7 +1865,9 @@ namespace Tizen.NUI } /// - /// The border of the image in the order: left, right, bottom, top. + /// The border of the image in the order: left, right, bottom, top.
+ /// For N-Patch images only.
+ /// Optional. ///
public Rectangle Border { @@ -1570,462 +1884,23 @@ namespace Tizen.NUI protected override void ComposingPropertyMap() { - _outputVisualMap = new PropertyMap(); - _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.NPatch)); - if (_url != null) { _outputVisualMap.Add(NpatchImageVisualProperty.URL, new PropertyValue(_url)); } - if (_borderOnly != null) { _outputVisualMap.Add(NpatchImageVisualProperty.BorderOnly, new PropertyValue((bool)_borderOnly)); } - if (_border != null) { _outputVisualMap.Add(NpatchImageVisualProperty.Border, new PropertyValue(_border)); } - if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); } - if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); } - if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); } - if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); } - - } - } - - - /// - /// This specifies wrap mode types
- /// WrapModeU and WrapModeV separately decide how the texture should be sampled when the u and v coordinate exceeds the range of 0.0 to 1.0. - ///
- public enum WrapModeType - { - /// - /// Defualt value - /// - Default = 0, - /// - /// Clamp to edge - /// - ClampToEdge, - /// - /// Repeat - /// - Repeat, - /// - /// Mirrored repeat - /// - MirroredRepeat - } - - /// - /// The type of coordinate system for certain attributes of the points in a gradient. - /// - public enum GradientVisualUnitsType - { - /// - /// Uses the normals for the start, end & center points, i.e. top-left is (-0.5, -0.5) and bottom-right is (0.5, 0.5). - /// - ObjectBoundingBox, - /// - /// Uses the user coordinates for the start, end & center points, i.e. in a 200 by 200 control, top-left is (0, 0) and bottom-right is (200, 200). - /// - UserSpace - } - - /// - /// This specifies SpreadMethod types.
- /// SpreadMethod defines what happens if the gradient starts or ends inside the bounds of the target rectangle.
- ///
- public enum GradientVisualSpreadMethodType - { - /// - /// Uses the terminal colors of the gradient to fill the remainder of the quad. - /// - Pad, - /// - /// Reflect the gradient pattern start-to-end, end-to-start, start-to-end etc. until the quad is filled. - /// - Reflect, - /// - /// Repeat the gradient pattern start-to-end, start-to-end, start-to-end etc. until the quad is filled. - /// - Repeat - } - - /// - /// The shading mode used by MeshVisual. - /// - public enum MeshVisualShadingModeValue - { - /// - /// *Simplest*. One color that is lit by ambient and diffuse lighting. - /// - TexturelessWithDiffuseLighting, - /// - /// Uses only the visual image textures provided with specular lighting in addition to ambient and diffuse lighting. - /// - TexturedWithSpecularLighting, - /// - /// Uses all textures provided including a gloss, normal and texture map along with specular, ambient and diffuse lighting. - /// - TexturedWithDetailedSpecularLighting - } - - /// - /// The primitive shape to render as a PrimitiveVisual. - /// - public enum PrimitiveVisualShapeType - { - /// - /// A perfectly round geometrical object in three-dimensional space. - /// - Sphere, - /// - /// The area bound between two circles, i.e. a cone with the tip removed. - /// - ConicalFrustrum, - /// - /// Equivalent to a conical frustrum with top radius of zero. - /// Equivalent to a conical frustrum with top radius of zero. - Cone, - /// - /// Equivalent to a conical frustrum with top radius of zero. - /// - Cylinder, - /// - /// Equivalent to a conical frustrum with equal radii for the top and bottom circles. - /// - Cube, - /// - /// Equivalent to a bevelled cube with a bevel percentage of zero. - /// - Octahedron, - /// - /// Equivalent to a bevelled cube with a bevel percentage of one. - /// - BevelledCube - } - - /// - /// This specifies fitting mode types. Fitting options, used when resizing images to fit desired dimensions.
- /// A fitting mode controls the region of a loaded image to be mapped to the desired image rectangle.
- /// All fitting modes preserve the aspect ratio of the image contents.
- ///
- public enum FittingModeType - { - /// - /// Full-screen image display: Limit loaded image resolution to device resolution using ShrinkToFit mode. - /// - ShrinkToFit, - /// - /// Thumbnail gallery grid: Limit loaded image resolution to screen tile using ScaleToFill mode. - /// - ScaleToFill, - /// - /// Image columns: Limit loaded image resolution to column width using FitWidth mode. - /// - FitWidth, - /// - /// Image rows: Limit loaded image resolution to row height using FitHeight mode. - /// - FitHeight - } - - /// - /// This specifies sampling mode types. Filtering options, used when resizing images to sample original pixels.
- /// A SamplingMode controls how pixels in an input image are sampled and combined to generate each pixel of a destination image during a scaling.
- /// NoFilter and Box modes do not guarantee that the output pixel array exactly matches the rectangle specified by the desired dimensions and FittingMode,
- /// but all other filter modes do if the desired dimensions are `<=` the raw dimensions of the input image file.
- ///
- public enum SamplingModeType - { - /// - /// Iteratively box filter to generate an image of 1/2, 1/4, 1/8, etc width and height and approximately the desired size.
- /// This is the default. - ///
- Box, - /// - /// For each output pixel, read one input pixel. - /// - Nearest, - /// - /// For each output pixel, read a quad of four input pixels and write a weighted average of them. - /// - Linear, - /// - /// Iteratively box filter to generate an image of 1/2, 1/4, 1/8 etc width and height and approximately the desired size,
- /// then for each output pixel, read one pixel from the last level of box filtering.
- ///
- BoxThenNearest, - /// - /// Iteratively box filter to almost the right size, then for each output pixel, read four pixels from the last level of box filtering and write their weighted average. - /// - BoxThenLinear, - /// - /// No filtering is performed. If the SCALE_TO_FILL scaling mode is enabled, the borders of the image may be trimmed to match the aspect ratio of the desired dimensions. - /// - NoFilter, - /// - /// For caching algorithms where a client strongly prefers a cache-hit to reuse a cached image. - /// - DontCare - } - - /// - /// This specifies policy types that could be used by the transform for the offset or size. - /// - public enum VisualTransformPolicyType - { - /// - /// Relative to the control (percentage [0.0f to 1.0f] of the control). - /// - Relative = 0, - /// - /// Absolute value in world units. - /// - Absolute = 1 - } - - /// - /// This specifies all the transform property types. - /// - public enum VisualTransformPropertyType - { - /// - /// Offset of the visual, which can be either relative (percentage [0.0f to 1.0f] of the parent) or absolute (in world units). - /// - Offset, - /// - /// Size of the visual, which can be either relative (percentage [0.0f to 1.0f] of the parent) or absolute (in world units). - /// - Size, - /// - /// The origin of the visual within its control area. - /// - Origin, - /// - /// The anchor-point of the visual - /// - AnchorPoint, - /// - /// Whether the x or y OFFSET values are relative (percentage [0.0f to 1.0f] of the control) or absolute (in world units). - /// - OffsetPolicy, - /// - /// Whether the width or height SIZE values are relative (percentage [0.0f to 1.0f] of the control) or absolute (in world units). - /// - SizePolicy - } - - /// - /// This specifies visual types. - /// - public struct Visual - { - /// - /// The index for the visual type. - /// - public enum Type - { - /// - /// Renders a solid color as an internal border to the control's quad. - /// - Border, - /// - /// Renders a solid color to the control's quad. - /// - Color, - /// - /// Renders a smooth transition of colors to the control's quad. - /// - Gradient, - /// - /// Renders an image into the control's quad. - /// - Image, - /// - /// Renders a mesh using an "obj" file, optionally with textures provided by an "mtl" file. - /// - Mesh, - /// - /// Renders a simple 3D shape, such as a cube or sphere. - /// - Primitive, - /// - /// Renders a simple wire-frame outlining a quad. - /// - Wireframe, - /// - /// Renders text. - /// - Text, - /// - /// Renders an n-patch image. - /// - NPatch, - /// - /// Renders an SVG image. - /// - SVG, - /// - /// Renders a animated image. (Animated GIF) - /// - AnimatedImage - } - - /// - /// This specifies visual properties. - /// - public struct Property - { - public static readonly int Type = NDalic.VISUAL_PROPERTY_TYPE; - public static readonly int Shader = NDalic.VISUAL_PROPERTY_SHADER; - public static readonly int Transform = NDalic.VISUAL_PROPERTY_TRANSFORM; - public static readonly int PremultipliedAlpha = NDalic.VISUAL_PROPERTY_PREMULTIPLIED_ALPHA; - public static readonly int MixColor = NDalic.VISUAL_PROPERTY_MIX_COLOR; - public static readonly int Opacity = NDalic.VISUAL_PROPERTY_MIX_COLOR + 1; - } - - /// - /// This specifies shader properties. - /// - public struct ShaderProperty - { - public static readonly int VertexShader = NDalic.VISUAL_SHADER_VERTEX; - public static readonly int FragmentShader = NDalic.VISUAL_SHADER_FRAGMENT; - public static readonly int ShaderSubdivideGridX = NDalic.VISUAL_SHADER_SUBDIVIDE_GRID_X; - public static readonly int ShaderSubdivideGridY = NDalic.VISUAL_SHADER_SUBDIVIDE_GRID_Y; - public static readonly int ShaderHints = NDalic.VISUAL_SHADER_HINTS; - } - - /// - /// This specifies Visaul align types. - /// - public enum AlignType - { - TopBegin = 0, - TopCenter, - TopEnd, - CenterBegin, - Center, - CenterEnd, - BottomBegin, - BottomCenter, - BottomEnd + if (_url != null) + { + _outputVisualMap = new PropertyMap(); + _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.NPatch)); + _outputVisualMap.Add(NpatchImageVisualProperty.URL, new PropertyValue(_url)); + if (_borderOnly != null) { _outputVisualMap.Add(NpatchImageVisualProperty.BorderOnly, new PropertyValue((bool)_borderOnly)); } + if (_border != null) { _outputVisualMap.Add(NpatchImageVisualProperty.Border, new PropertyValue(_border)); } + if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); } + if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); } + if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); } + if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); } + } } } /// - /// This specifies properties of BorderVisual. - /// - public struct BorderVisualProperty - { - public static readonly int Color = NDalic.BORDER_VISUAL_COLOR; - public static readonly int Size = NDalic.BORDER_VISUAL_SIZE; - public static readonly int AntiAliasing = NDalic.BORDER_VISUAL_ANTI_ALIASING; - } - - /// - /// This specifies properties of ColorVisual. - /// - public struct ColorVisualProperty - { - public static readonly int MixColor = NDalic.COLOR_VISUAL_MIX_COLOR; - } - - /// - /// This specifies properties of GradientVisual. - /// - public struct GradientVisualProperty - { - public static readonly int StartPosition = NDalic.GRADIENT_VISUAL_START_POSITION; - public static readonly int EndPosition = NDalic.GRADIENT_VISUAL_END_POSITION; - public static readonly int Center = NDalic.GRADIENT_VISUAL_CENTER; - public static readonly int Radius = NDalic.GRADIENT_VISUAL_RADIUS; - public static readonly int StopOffset = NDalic.GRADIENT_VISUAL_STOP_OFFSET; - public static readonly int StopColor = NDalic.GRADIENT_VISUAL_STOP_COLOR; - public static readonly int Units = NDalic.GRADIENT_VISUAL_UNITS; - public static readonly int SpreadMethod = NDalic.GRADIENT_VISUAL_SPREAD_METHOD; - } - - /// - /// This specifies properties of ImageVisual. - /// - public struct ImageVisualProperty - { - public static readonly int URL = NDalic.IMAGE_VISUAL_URL; - public static readonly int FittingMode = NDalic.IMAGE_VISUAL_FITTING_MODE; - public static readonly int SamplingMode = NDalic.IMAGE_VISUAL_SAMPLING_MODE; - public static readonly int DesiredWidth = NDalic.IMAGE_VISUAL_DESIRED_WIDTH; - public static readonly int DesiredHeight = NDalic.IMAGE_VISUAL_DESIRED_HEIGHT; - public static readonly int SynchronousLoading = NDalic.IMAGE_VISUAL_SYNCHRONOUS_LOADING; - public static readonly int BorderOnly = NDalic.IMAGE_VISUAL_BORDER_ONLY; - public static readonly int PixelArea = NDalic.IMAGE_VISUAL_PIXEL_AREA; - public static readonly int WrapModeU = NDalic.IMAGE_VISUAL_WRAP_MODE_U; - public static readonly int WrapModeV = NDalic.IMAGE_VISUAL_WRAP_MODE_V; - public static readonly int Border = NDalic.IMAGE_VISUAL_BORDER; - } - - /// - /// This specifies properties of MeshVisual. - /// - public struct MeshVisualProperty - { - public static readonly int ObjectURL = NDalic.MESH_VISUAL_OBJECT_URL; - public static readonly int MaterialtURL = NDalic.MESH_VISUAL_MATERIAL_URL; - public static readonly int TexturesPath = NDalic.MESH_VISUAL_TEXTURES_PATH; - public static readonly int ShadingMode = NDalic.MESH_VISUAL_SHADING_MODE; - public static readonly int UseMipmapping = NDalic.MESH_VISUAL_USE_MIPMAPPING; - public static readonly int UseSoftNormals = NDalic.MESH_VISUAL_USE_SOFT_NORMALS; - public static readonly int LightPosition = NDalic.MESH_VISUAL_LIGHT_POSITION; - } - - /// - /// This specifies properties of PrimitiveVisual. - /// - public struct PrimitiveVisualProperty - { - public static readonly int Shape = NDalic.PRIMITIVE_VISUAL_SHAPE; - public static readonly int MixColor = NDalic.PRIMITIVE_VISUAL_MIX_COLOR; - public static readonly int Slices = NDalic.PRIMITIVE_VISUAL_SLICES; - public static readonly int Stacks = NDalic.PRIMITIVE_VISUAL_STACKS; - public static readonly int ScaleTopRadius = NDalic.PRIMITIVE_VISUAL_SCALE_TOP_RADIUS; - public static readonly int ScaleBottomRadius = NDalic.PRIMITIVE_VISUAL_SCALE_BOTTOM_RADIUS; - public static readonly int ScaleHeight = NDalic.PRIMITIVE_VISUAL_SCALE_HEIGHT; - public static readonly int ScaleRadius = NDalic.PRIMITIVE_VISUAL_SCALE_RADIUS; - public static readonly int ScaleDimensions = NDalic.PRIMITIVE_VISUAL_SCALE_DIMENSIONS; - public static readonly int BevelPercentage = NDalic.PRIMITIVE_VISUAL_BEVEL_PERCENTAGE; - public static readonly int BevelSmoothness = NDalic.PRIMITIVE_VISUAL_BEVEL_SMOOTHNESS; - public static readonly int LightPosition = NDalic.PRIMITIVE_VISUAL_LIGHT_POSITION; - } - - /// - /// This specifies properties of TextVisual. - /// - public struct TextVisualProperty - { - public static readonly int Text = NDalic.TEXT_VISUAL_TEXT; - public static readonly int FontFamily = NDalic.TEXT_VISUAL_FONT_FAMILY; - public static readonly int FontStyle = NDalic.TEXT_VISUAL_FONT_STYLE; - public static readonly int PointSize = NDalic.TEXT_VISUAL_POINT_SIZE; - public static readonly int MultiLine = NDalic.TEXT_VISUAL_MULTI_LINE; - public static readonly int HorizontalAlignment = NDalic.TEXT_VISUAL_HORIZONTAL_ALIGNMENT; - public static readonly int VerticalAlignment = NDalic.TEXT_VISUAL_VERTICAL_ALIGNMENT; - public static readonly int TextColor = NDalic.TEXT_VISUAL_TEXT_COLOR; - public static readonly int EnableMarkup = NDalic.TEXT_VISUAL_ENABLE_MARKUP; - } - - /// - /// This specifies properties of NpatchImageVisual. - /// - public struct NpatchImageVisualProperty - { - public static readonly int URL = NDalic.IMAGE_VISUAL_URL; - public static readonly int FittingMode = NDalic.IMAGE_VISUAL_FITTING_MODE; - public static readonly int SamplingMode = NDalic.IMAGE_VISUAL_SAMPLING_MODE; - public static readonly int DesiredWidth = NDalic.IMAGE_VISUAL_DESIRED_WIDTH; - public static readonly int DesiredHeight = NDalic.IMAGE_VISUAL_DESIRED_HEIGHT; - public static readonly int SynchronousLoading = NDalic.IMAGE_VISUAL_SYNCHRONOUS_LOADING; - public static readonly int BorderOnly = NDalic.IMAGE_VISUAL_BORDER_ONLY; - public static readonly int PixelArea = NDalic.IMAGE_VISUAL_PIXEL_AREA; - public static readonly int WrapModeU = NDalic.IMAGE_VISUAL_WRAP_MODE_U; - public static readonly int WrapModeV = NDalic.IMAGE_VISUAL_WRAP_MODE_V; - public static readonly int Border = NDalic.IMAGE_VISUAL_WRAP_MODE_V + 1; - } - - /// - /// A class encapsulating the property map of a SVG visual. + /// A class encapsulating the property map of a SVG visual. /// public class SVGVisual : VisualMap { @@ -2050,13 +1925,16 @@ namespace Tizen.NUI protected override void ComposingPropertyMap() { - _outputVisualMap = new PropertyMap(); - _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.SVG)); - if (_url != null) { _outputVisualMap.Add(ImageVisualProperty.URL, new PropertyValue(_url)); } - if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); } - if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); } - if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); } - if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); } + if (_url != null) + { + _outputVisualMap = new PropertyMap(); + _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.SVG)); + _outputVisualMap.Add(ImageVisualProperty.URL, new PropertyValue(_url)); + if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); } + if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); } + if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); } + if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); } + } } } @@ -2086,13 +1964,16 @@ namespace Tizen.NUI protected override void ComposingPropertyMap() { - _outputVisualMap = new PropertyMap(); - _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.AnimatedImage)); - if (_url != null) { _outputVisualMap.Add(ImageVisualProperty.URL, new PropertyValue(_url)); } - if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); } - if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); } - if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); } - if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); } + if (_url != null) + { + _outputVisualMap = new PropertyMap(); + _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.AnimatedImage)); + _outputVisualMap.Add(ImageVisualProperty.URL, new PropertyValue(_url)); + if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); } + if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); } + if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); } + if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); } + } } } -- 2.7.4