-using System;\r
-using Tizen.NUI;\r
-\r
-\r
-namespace NUISamples.TizenTV.examples\r
-{\r
- /// <summary>\r
- /// The main entry point for the application.\r
- /// </summary>\r
- /// \r
-\r
- class Application\r
- {\r
- [STAThread]\r
- static void Main(string[] args)\r
- {\r
- new VisualsUsingCustomView.VisualsExample().Run(args); //o\r
- //new ControlDashboard.Example().Run(args); //o\r
- //new DatePickerTest.Example().Run(args); //o\r
- //new HelloTest.Example().Run(args); //o\r
- //new HelloWorldTest.Example().Run(args); //o\r
- //new Test1.Example().Run(args); //o\r
- //new UserAlphaFunctionTest.Example().Run(args); //o\r
- //new MyCSharpExample.Example().Run(args); //o\r
- //new VisualViewTest.Example().Run(args); //o\r
- //new CustomControlTest.Example().Run(args); //o\r
- //new ScrollViewTest.Example().Run(args); //o\r
- //new ImageViewTest.Example().Run(args); //o\r
- //new FlexContainerTest.SampleMain().Run(args); //o \r
- //new DatePickerUsingJson.Example().Run(args); //o\r
- //new DaliTest.Example().Run(args); //o\r
- //new FirstScreen.FirstScreenApp().Run(args); //o\r
-\r
- }\r
- }\r
- \r
-}\r
+using System;
+using Tizen.NUI;
+
+
+namespace NUISamples.TizenTV.examples
+{
+ /// <summary>
+ /// The main entry point for the application.
+ /// </summary>
+ ///
+
+ class Application
+ {
+ [STAThread]
+ static void Main(string[] args)
+ {
+ new VisualsUsingCustomView.VisualsExample().Run(args); //o
+ //new ControlDashboard.Example().Run(args); //o
+ //new DatePickerTest.Example().Run(args); //o
+ //new HelloTest.Example().Run(args); //o
+ //new HelloWorldTest.Example().Run(args); //o
+ //new Test1.Example().Run(args); //o
+ //new UserAlphaFunctionTest.Example().Run(args); //o
+ //new MyCSharpExample.Example().Run(args); //o
+ //new VisualViewTest.Example().Run(args); //o
+ //new CustomControlTest.Example().Run(args); //o
+ //new ScrollViewTest.Example().Run(args); //o
+ //new ImageViewTest.Example().Run(args); //o
+ //new FlexContainerTest.SampleMain().Run(args); //o
+ //new DatePickerUsingJson.Example().Run(args); //o
+ //new DaliTest.Example().Run(args); //o
+ //new FirstScreen.FirstScreenApp().Run(args); //o
+
+ }
+ }
+
+}
_stage.BackgroundColor = Color.White;
// 1) sibling order test
- SiblingTest();\r
+ SiblingTest();
// 2) text visual test
dali_VisualBase_Creation_test();
_style = StyleManager.Get();
//_style.StyleChanged += _style_StyleChanged;
- _style.StyleChanged += (obj, e) =>\r
- {\r
- Tizen.Log.Debug("NUI", "in stylechanged.. C#side..\n");\r
- //flag = true;\r
- };\r
-
- _style.ApplyTheme("/home/owner/apps_rw/NUISamples.TizenTV/res/json/date-picker-theme.json");\r
- Tizen.Log.Debug("NUI", "#### 1) first change!");\r
-\r
-\r
- AnimatePath_1();\r
- }\r
-\r
- private void _style_StyleChanged(object sender, StyleManager.StyleChangedEventArgs e)\r
- {\r
- Tizen.Log.Debug("NUI", "style changed event handler comes");\r
- }\r
-\r
+ _style.StyleChanged += (obj, e) =>
+ {
+ Tizen.Log.Debug("NUI", "in stylechanged.. C#side..\n");
+ //flag = true;
+ };
+
+ _style.ApplyTheme("/home/owner/apps_rw/NUISamples.TizenTV/res/json/date-picker-theme.json");
+ Tizen.Log.Debug("NUI", "#### 1) first change!");
+
+
+ AnimatePath_1();
+ }
+
+ private void _style_StyleChanged(object sender, StyleManager.StyleChangedEventArgs e)
+ {
+ Tizen.Log.Debug("NUI", "style changed event handler comes");
+ }
+
public void SiblingTest()
{
View _prev = null;
Tizen.Log.Debug("NUI", "raise on top is called!curr sibling=" + curr.SiblingOrder + " prev name=" + _prev.Name + " sibling=" + _prev.SiblingOrder);
}
_prev = curr;
- _txt.Text = "on top: " + curr.Name + ", sibling order=" + curr.SiblingOrder;\r
-\r
- _style.ApplyTheme("/home/owner/apps_rw/NUISamples.TizenTV/res/json/style-example-theme-one.json");\r
- Tizen.Log.Debug("NUI", "#### 2) second change!");\r
+ _txt.Text = "on top: " + curr.Name + ", sibling order=" + curr.SiblingOrder;
+
+ _style.ApplyTheme("/home/owner/apps_rw/NUISamples.TizenTV/res/json/style-example-theme-one.json");
+ Tizen.Log.Debug("NUI", "#### 2) second change!");
return true;
};
_txt.Text = "on top: sibling#, sibling order=?";
_txt.Position2D = _myPos + new Position2D(-50, 200);
_txt.TextColor = Color.Blue;
- _stage.GetDefaultLayer().Add(_txt);\r
-\r
- }\r
-\r
- public class VisualTest : CustomView\r
- {\r
- private int TextVisualPropertyIndex = -1;\r
- private VisualBase _textVisual;\r
- private string _string;\r
-\r
- public VisualTest() : base(typeof(VisualTest).Name, CustomViewBehaviour.RequiresKeyboardNavigationSupport)\r
- {\r
- }\r
- public string TextVisual\r
- {\r
- get\r
- {\r
- return _string;\r
- }\r
- set\r
- {\r
- _string = value;\r
+ _stage.GetDefaultLayer().Add(_txt);
+
+ }
+
+ public class VisualTest : CustomView
+ {
+ private int TextVisualPropertyIndex = -1;
+ private VisualBase _textVisual;
+ private string _string;
+
+ public VisualTest() : base(typeof(VisualTest).Name, CustomViewBehaviour.RequiresKeyboardNavigationSupport)
+ {
+ }
+ public string TextVisual
+ {
+ get
+ {
+ return _string;
+ }
+ set
+ {
+ _string = value;
TextVisualPropertyIndex = RegisterProperty("textvisualtest", new PropertyValue("textvisualtest"), PropertyAccessMode.ReadWrite);
-\r
- PropertyMap textVisual = new PropertyMap();\r
- textVisual.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Text))\r
- .Add(TextVisualProperty.Text, new PropertyValue(_string))\r
- .Add(TextVisualProperty.TextColor, new PropertyValue(Color.Blue))\r
- .Add(TextVisualProperty.PointSize, new PropertyValue(10))\r
- .Add(TextVisualProperty.HorizontalAlignment, new PropertyValue("CENTER"))\r
- .Add(TextVisualProperty.VerticalAlignment, new PropertyValue("CENTER"));\r
- _textVisual = VisualFactory.Get().CreateVisual(textVisual);\r
- RegisterVisual(TextVisualPropertyIndex, _textVisual);\r
- _textVisual.DepthIndex = TextVisualPropertyIndex;\r
- }\r
+
+ PropertyMap textVisual = new PropertyMap();
+ textVisual.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Text))
+ .Add(TextVisualProperty.Text, new PropertyValue(_string))
+ .Add(TextVisualProperty.TextColor, new PropertyValue(Color.Blue))
+ .Add(TextVisualProperty.PointSize, new PropertyValue(10))
+ .Add(TextVisualProperty.HorizontalAlignment, new PropertyValue("CENTER"))
+ .Add(TextVisualProperty.VerticalAlignment, new PropertyValue("CENTER"));
+ _textVisual = VisualFactory.Get().CreateVisual(textVisual);
+ RegisterVisual(TextVisualPropertyIndex, _textVisual);
+ _textVisual.DepthIndex = TextVisualPropertyIndex;
+ }
}
- }\r
-\r
- //when use belowing testcase, Time is out and this case is BLOCK\r
- public void dali_VisualBase_Creation_test()\r
- {\r
- try\r
- {\r
- Tizen.Log.Debug("NUI", "##### start! ######");\r
-\r
- VisualTest _visualTest = new VisualTest();\r
- _visualTest.TextVisual = "Hello NUI Text Visual!";\r
- _visualTest.ParentOrigin = ParentOrigin.TopLeft;\r
- _visualTest.AnchorPoint = AnchorPoint.TopLeft;\r
- _visualTest.Size2D = new Size2D(600, 200);\r
- _visualTest.Position2D = new Position2D(50, 400);\r
- _visualTest.BackgroundColor = Color.Yellow;\r
- _stage.GetDefaultLayer().Add(_visualTest);\r
- }\r
- catch (Exception e)\r
- {\r
- Tizen.Log.Error("NUI", "##### Caught Exception" + e.ToString());\r
- throw new System.InvalidOperationException("visual test error!!!");\r
- }\r
- }\r
+ }
+
+ //when use belowing testcase, Time is out and this case is BLOCK
+ public void dali_VisualBase_Creation_test()
+ {
+ try
+ {
+ Tizen.Log.Debug("NUI", "##### start! ######");
+
+ VisualTest _visualTest = new VisualTest();
+ _visualTest.TextVisual = "Hello NUI Text Visual!";
+ _visualTest.ParentOrigin = ParentOrigin.TopLeft;
+ _visualTest.AnchorPoint = AnchorPoint.TopLeft;
+ _visualTest.Size2D = new Size2D(600, 200);
+ _visualTest.Position2D = new Position2D(50, 400);
+ _visualTest.BackgroundColor = Color.Yellow;
+ _stage.GetDefaultLayer().Add(_visualTest);
+ }
+ catch (Exception e)
+ {
+ Tizen.Log.Error("NUI", "##### Caught Exception" + e.ToString());
+ throw new System.InvalidOperationException("visual test error!!!");
+ }
+ }
public void VisualTest2()
- {\r
- try\r
- {\r
- Tizen.Log.Debug("NUI", "##### VisualTest2() start! ######");\r
-\r
- VisualFactory visualfactory = VisualFactory.Instance;\r
- PropertyMap textMap1 = new PropertyMap();\r
- textMap1.Insert(Visual.Property.Type, new PropertyValue((int)Visual.Type.Text));\r
- textMap1.Insert(TextVisualProperty.Text, new PropertyValue("Hello"));\r
- textMap1.Insert(TextVisualProperty.PointSize, new PropertyValue(10.0f));\r
-\r
- PropertyMap textMap2 = new PropertyMap();\r
- VisualBase textVisual1 = visualfactory.CreateVisual(textMap1);\r
- textVisual1.Creation = textMap2;\r
- }\r
- catch (Exception e)\r
- {\r
- Tizen.Log.Error("NUI", "Caught Exception" + e.ToString());\r
- throw new System.InvalidOperationException("visual test2 error!!!");\r
- //LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());\r
- //Assert.IsTrue(e is ArgumentException, "Argument Exception Not Recieved");\r
+ {
+ try
+ {
+ Tizen.Log.Debug("NUI", "##### VisualTest2() start! ######");
+
+ VisualFactory visualfactory = VisualFactory.Instance;
+ PropertyMap textMap1 = new PropertyMap();
+ textMap1.Insert(Visual.Property.Type, new PropertyValue((int)Visual.Type.Text));
+ textMap1.Insert(TextVisualProperty.Text, new PropertyValue("Hello"));
+ textMap1.Insert(TextVisualProperty.PointSize, new PropertyValue(10.0f));
+
+ PropertyMap textMap2 = new PropertyMap();
+ VisualBase textVisual1 = visualfactory.CreateVisual(textMap1);
+ textVisual1.Creation = textMap2;
+ }
+ catch (Exception e)
+ {
+ Tizen.Log.Error("NUI", "Caught Exception" + e.ToString());
+ throw new System.InvalidOperationException("visual test2 error!!!");
+ //LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+ //Assert.IsTrue(e is ArgumentException, "Argument Exception Not Recieved");
}
- }\r
-\r
- //[Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")]\r
- public void AnimatePath_1()\r
- {\r
- Tizen.Log.Debug("NUI", "#### 1) animate path test !");\r
- /* TEST CODE */\r
- View view = new View();\r
- view.ParentOrigin = ParentOrigin.TopLeft;\r
- view.AnchorPoint = AnchorPoint.TopLeft;\r
- view.MinimumSize = new Size2D(100, 100);\r
- view.BackgroundColor = Color.Red;\r
- _stage.GetDefaultLayer().Add(view);\r
-\r
- Position position0 = new Position(200.0f, 200.0f, 0.0f);\r
- Position position1 = new Position(300.0f, 300.0f, 0.0f);\r
- Position position2 = new Position(400.0f, 400.0f, 0.0f);\r
-\r
- Path path = new Path();\r
- path.AddPoint(position0);\r
- path.AddPoint(position1);\r
- path.AddPoint(position2);\r
- //Control points for first segment\r
- path.AddControlPoint(new Vector3(39.0f, 90.0f, 0.0f));\r
- path.AddControlPoint(new Vector3(56.0f, 119.0f, 0.0f));\r
- //Control points for second segment\r
- path.AddControlPoint(new Vector3(78.0f, 120.0f, 0.0f));\r
- path.AddControlPoint(new Vector3(93.0f, 104.0f, 0.0f));\r
-\r
- Animation animation = new Animation();\r
- animation.AnimatePath(view, path, Vector3.XAxis, 0, 5000, new AlphaFunction(AlphaFunction.BuiltinFunctions.Linear));\r
- animation.Play();\r
- Vector3 position = new Vector3();\r
- Vector3 tangent = new Vector3();\r
-\r
- path.Sample(0.0f, position, tangent);\r
- Rotation rotation = new Rotation(new Radian(new Degree(0.0f)), tangent);\r
- Tizen.Log.Debug("NUI", "################ progress = 0! ");\r
- Tizen.Log.Debug("NUI", "position=(" + position.X + "," + position.Y + "," + position.Z + ")");\r
- Tizen.Log.Debug("NUI", "view position=(" + view.Position.X + "," + view.Position.Y + "," + view.Position.Z + ")");\r
- Tizen.Log.Debug("NUI", "view position=(" + view.PositionX + "," + view.PositionY + "," + view.PositionZ + ")");\r
- Tizen.Log.Debug("NUI", "view cur position=(" + view.CurrentPosition.X + "," + view.CurrentPosition.Y + "," + view.CurrentPosition.Z + ")");\r
- Tizen.Log.Debug("NUI", "tangent=(" + tangent.X + "," + tangent.Y + "," + tangent.Z + ")");\r
- Tizen.Log.Debug("NUI", "angle between=" + Rotation.AngleBetween(view.Orientation, rotation) + " view orientation length=" + view.Orientation.Length() + " rotation length=" + rotation.Length());\r
- //Assert.AreEqual(position.X, view.PositionX, "The actor's PositionX of is not correct");\r
- //Assert.AreEqual(position.Y, actor.PositionY, "The actor's PositionY of is not correct");\r
- //Assert.AreEqual(position.Z, actor.PositionZ, "The actor's PositionZ of is not correct");\r
- //Assert.IsTrue(rotation.Equals(actor.Orientation));\r
- //await Task.Delay(250);\r
- path.Sample(0.25f, position, tangent);\r
- rotation = new Rotation(new Radian(new Degree(0.0f)), tangent);\r
- Tizen.Log.Debug("NUI", "################ progress = 0.25! ");\r
- Tizen.Log.Debug("NUI", "position=(" + position.X + "," + position.Y + "," + position.Z + ")");\r
- Tizen.Log.Debug("NUI", "view position=(" + view.Position.X + "," + view.Position.Y + "," + view.Position.Z + ")");\r
- Tizen.Log.Debug("NUI", "view position=(" + view.PositionX + "," + view.PositionY + "," + view.PositionZ + ")");\r
- Tizen.Log.Debug("NUI", "view cur position=(" + view.CurrentPosition.X + "," + view.CurrentPosition.Y + "," + view.CurrentPosition.Z + ")");\r
- Tizen.Log.Debug("NUI", "tangent=(" + tangent.X + "," + tangent.Y + "," + tangent.Z + ")");\r
- Tizen.Log.Debug("NUI", "angle between=" + Rotation.AngleBetween(view.Orientation, rotation) + " view orientation length=" + view.Orientation.Length() + " rotation length=" + rotation.Length());\r
- //Assert.AreEqual(position.X, actor.PositionX, "The PositionX of actor is not correct");\r
- //Assert.AreEqual(position.Y, actor.PositionY, "The PositionY of actor is not correct");\r
- //Assert.AreEqual(position.Z, actor.PositionZ, "The PositionZ of actor is not correct");\r
- //Assert.IsTrue(rotation.Equals(actor.Orientation));\r
- //await Task.Delay(500);\r
- path.Sample(0.75f, position, tangent);\r
- rotation = new Rotation(new Radian(new Degree(0.0f)), tangent);\r
- Tizen.Log.Debug("NUI", "################ progress = 0.75! ");\r
- Tizen.Log.Debug("NUI", "position=(" + position.X + "," + position.Y + "," + position.Z + ")");\r
- Tizen.Log.Debug("NUI", "view position=(" + view.Position.X + "," + view.Position.Y + "," + view.Position.Z + ")");\r
- Tizen.Log.Debug("NUI", "view position=(" + view.PositionX + "," + view.PositionY + "," + view.PositionZ + ")");\r
- Tizen.Log.Debug("NUI", "view cur position=(" + view.CurrentPosition.X + "," + view.CurrentPosition.Y + "," + view.CurrentPosition.Z + ")");\r
- Tizen.Log.Debug("NUI", "tangent=(" + tangent.X + "," + tangent.Y + "," + tangent.Z + ")");\r
- Tizen.Log.Debug("NUI", "angle between=" + Rotation.AngleBetween(view.Orientation, rotation) + " view orientation length=" + view.Orientation.Length() + " rotation length=" + rotation.Length());\r
- //Assert.AreEqual(position.X, actor.PositionX, "The PositionX of actor is not correct here");\r
- //Assert.AreEqual(position.Y, actor.PositionY, "The PositionY of actor is not correct here");\r
- //Assert.AreEqual(position.Z, actor.PositionZ, "The PositionZ of actor is not correct here");\r
- //Assert.IsTrue(rotation.Equals(actor.Orientation));\r
-\r
- path.Sample(1.0f, position, tangent);\r
- rotation = new Rotation(new Radian(new Degree(0.0f)), tangent);\r
- Tizen.Log.Debug("NUI", "################ progress = 1.0! ");\r
- Tizen.Log.Debug("NUI", "position=(" + position.X + "," + position.Y + "," + position.Z + ")");\r
- Tizen.Log.Debug("NUI", "view position=(" + view.Position.X + "," + view.Position.Y + "," + view.Position.Z + ")");\r
- Tizen.Log.Debug("NUI", "view position=(" + view.PositionX + "," + view.PositionY + "," + view.PositionZ + ")");\r
- Tizen.Log.Debug("NUI", "view cur position=(" + view.CurrentPosition.X + "," + view.CurrentPosition.Y + "," + view.CurrentPosition.Z + ")");\r
- Tizen.Log.Debug("NUI", "tangent=(" + tangent.X + "," + tangent.Y + "," + tangent.Z + ")");\r
- Tizen.Log.Debug("NUI", "angle between=" + Rotation.AngleBetween(view.Orientation, rotation) + " view orientation length=" + view.Orientation.Length() + " rotation length=" + rotation.Length());\r
-\r
-\r
- Tizen.Log.Debug("NUI", "#### 2) animate path test end!");\r
- }\r
-\r
-\r
-\r
-\r
+ }
+
+ //[Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")]
+ public void AnimatePath_1()
+ {
+ Tizen.Log.Debug("NUI", "#### 1) animate path test !");
+ /* TEST CODE */
+ View view = new View();
+ view.ParentOrigin = ParentOrigin.TopLeft;
+ view.AnchorPoint = AnchorPoint.TopLeft;
+ view.MinimumSize = new Size2D(100, 100);
+ view.BackgroundColor = Color.Red;
+ _stage.GetDefaultLayer().Add(view);
+
+ Position position0 = new Position(200.0f, 200.0f, 0.0f);
+ Position position1 = new Position(300.0f, 300.0f, 0.0f);
+ Position position2 = new Position(400.0f, 400.0f, 0.0f);
+
+ Path path = new Path();
+ path.AddPoint(position0);
+ path.AddPoint(position1);
+ path.AddPoint(position2);
+ //Control points for first segment
+ path.AddControlPoint(new Vector3(39.0f, 90.0f, 0.0f));
+ path.AddControlPoint(new Vector3(56.0f, 119.0f, 0.0f));
+ //Control points for second segment
+ path.AddControlPoint(new Vector3(78.0f, 120.0f, 0.0f));
+ path.AddControlPoint(new Vector3(93.0f, 104.0f, 0.0f));
+
+ Animation animation = new Animation();
+ animation.AnimatePath(view, path, Vector3.XAxis, 0, 5000, new AlphaFunction(AlphaFunction.BuiltinFunctions.Linear));
+ animation.Play();
+ Vector3 position = new Vector3();
+ Vector3 tangent = new Vector3();
+
+ path.Sample(0.0f, position, tangent);
+ Rotation rotation = new Rotation(new Radian(new Degree(0.0f)), tangent);
+ Tizen.Log.Debug("NUI", "################ progress = 0! ");
+ Tizen.Log.Debug("NUI", "position=(" + position.X + "," + position.Y + "," + position.Z + ")");
+ Tizen.Log.Debug("NUI", "view position=(" + view.Position.X + "," + view.Position.Y + "," + view.Position.Z + ")");
+ Tizen.Log.Debug("NUI", "view position=(" + view.PositionX + "," + view.PositionY + "," + view.PositionZ + ")");
+ Tizen.Log.Debug("NUI", "view cur position=(" + view.CurrentPosition.X + "," + view.CurrentPosition.Y + "," + view.CurrentPosition.Z + ")");
+ Tizen.Log.Debug("NUI", "tangent=(" + tangent.X + "," + tangent.Y + "," + tangent.Z + ")");
+ Tizen.Log.Debug("NUI", "angle between=" + Rotation.AngleBetween(view.Orientation, rotation) + " view orientation length=" + view.Orientation.Length() + " rotation length=" + rotation.Length());
+ //Assert.AreEqual(position.X, view.PositionX, "The actor's PositionX of is not correct");
+ //Assert.AreEqual(position.Y, actor.PositionY, "The actor's PositionY of is not correct");
+ //Assert.AreEqual(position.Z, actor.PositionZ, "The actor's PositionZ of is not correct");
+ //Assert.IsTrue(rotation.Equals(actor.Orientation));
+ //await Task.Delay(250);
+ path.Sample(0.25f, position, tangent);
+ rotation = new Rotation(new Radian(new Degree(0.0f)), tangent);
+ Tizen.Log.Debug("NUI", "################ progress = 0.25! ");
+ Tizen.Log.Debug("NUI", "position=(" + position.X + "," + position.Y + "," + position.Z + ")");
+ Tizen.Log.Debug("NUI", "view position=(" + view.Position.X + "," + view.Position.Y + "," + view.Position.Z + ")");
+ Tizen.Log.Debug("NUI", "view position=(" + view.PositionX + "," + view.PositionY + "," + view.PositionZ + ")");
+ Tizen.Log.Debug("NUI", "view cur position=(" + view.CurrentPosition.X + "," + view.CurrentPosition.Y + "," + view.CurrentPosition.Z + ")");
+ Tizen.Log.Debug("NUI", "tangent=(" + tangent.X + "," + tangent.Y + "," + tangent.Z + ")");
+ Tizen.Log.Debug("NUI", "angle between=" + Rotation.AngleBetween(view.Orientation, rotation) + " view orientation length=" + view.Orientation.Length() + " rotation length=" + rotation.Length());
+ //Assert.AreEqual(position.X, actor.PositionX, "The PositionX of actor is not correct");
+ //Assert.AreEqual(position.Y, actor.PositionY, "The PositionY of actor is not correct");
+ //Assert.AreEqual(position.Z, actor.PositionZ, "The PositionZ of actor is not correct");
+ //Assert.IsTrue(rotation.Equals(actor.Orientation));
+ //await Task.Delay(500);
+ path.Sample(0.75f, position, tangent);
+ rotation = new Rotation(new Radian(new Degree(0.0f)), tangent);
+ Tizen.Log.Debug("NUI", "################ progress = 0.75! ");
+ Tizen.Log.Debug("NUI", "position=(" + position.X + "," + position.Y + "," + position.Z + ")");
+ Tizen.Log.Debug("NUI", "view position=(" + view.Position.X + "," + view.Position.Y + "," + view.Position.Z + ")");
+ Tizen.Log.Debug("NUI", "view position=(" + view.PositionX + "," + view.PositionY + "," + view.PositionZ + ")");
+ Tizen.Log.Debug("NUI", "view cur position=(" + view.CurrentPosition.X + "," + view.CurrentPosition.Y + "," + view.CurrentPosition.Z + ")");
+ Tizen.Log.Debug("NUI", "tangent=(" + tangent.X + "," + tangent.Y + "," + tangent.Z + ")");
+ Tizen.Log.Debug("NUI", "angle between=" + Rotation.AngleBetween(view.Orientation, rotation) + " view orientation length=" + view.Orientation.Length() + " rotation length=" + rotation.Length());
+ //Assert.AreEqual(position.X, actor.PositionX, "The PositionX of actor is not correct here");
+ //Assert.AreEqual(position.Y, actor.PositionY, "The PositionY of actor is not correct here");
+ //Assert.AreEqual(position.Z, actor.PositionZ, "The PositionZ of actor is not correct here");
+ //Assert.IsTrue(rotation.Equals(actor.Orientation));
+
+ path.Sample(1.0f, position, tangent);
+ rotation = new Rotation(new Radian(new Degree(0.0f)), tangent);
+ Tizen.Log.Debug("NUI", "################ progress = 1.0! ");
+ Tizen.Log.Debug("NUI", "position=(" + position.X + "," + position.Y + "," + position.Z + ")");
+ Tizen.Log.Debug("NUI", "view position=(" + view.Position.X + "," + view.Position.Y + "," + view.Position.Z + ")");
+ Tizen.Log.Debug("NUI", "view position=(" + view.PositionX + "," + view.PositionY + "," + view.PositionZ + ")");
+ Tizen.Log.Debug("NUI", "view cur position=(" + view.CurrentPosition.X + "," + view.CurrentPosition.Y + "," + view.CurrentPosition.Z + ")");
+ Tizen.Log.Debug("NUI", "tangent=(" + tangent.X + "," + tangent.Y + "," + tangent.Z + ")");
+ Tizen.Log.Debug("NUI", "angle between=" + Rotation.AngleBetween(view.Orientation, rotation) + " view orientation length=" + view.Orientation.Length() + " rotation length=" + rotation.Length());
+
+
+ Tizen.Log.Debug("NUI", "#### 2) animate path test end!");
+ }
+
+
+
+
static void _Main(string[] args)
{
Example example = new Example();
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- *\r
- */\r
-\r
-using System;\r
-using Tizen.NUI;\r
-\r
-namespace MyCSharpExample\r
-{\r
- class Example : NUIApplication\r
- {\r
- const int num = 2;\r
- View[] view;\r
-\r
- View lastFocusedView;\r
-\r
- protected override void OnCreate()\r
- {\r
- base.OnCreate();\r
- Initialize();\r
- }\r
-\r
- public void Initialize()\r
- {\r
- view = new View[2];\r
-\r
- for (int i = 0; i < num; i++)\r
- {\r
- view[i] = new View();\r
- view[i].Size = new Size(200, 200, 0);\r
- view[i].BackgroundColor = Color.Blue;\r
- view[i].Position = new Position(300 + i * 300, 300, 0);\r
- view[i].Name = "MyView" + i;\r
- view[i].Focusable = true;\r
- Stage.Instance.GetDefaultLayer().Add(view[i]);\r
- view[i].FocusGained += FocusNavigationSample_FocusGained;\r
- view[i].FocusLost += FocusNavigationSample_FocusLost;\r
- view[i].KeyEvent += FocusNavigationSample_KeyEvent;\r
- }\r
-\r
- view[0].RightFocusableView = view[1];\r
- view[0].LeftFocusableView = view[1];\r
- view[1].RightFocusableView = view[0];\r
- view[1].LeftFocusableView = view[0];\r
-\r
- FocusManager.Instance.SetCurrentFocusView(view[0]);\r
- FocusManager.Instance.PreFocusChange += Instance_PreFocusChange;\r
-\r
- Stage.Instance.Touch += Instance_Touch;\r
- }\r
-\r
- private void Instance_Touch(object sender, Stage.TouchEventArgs e)\r
- {\r
- Tizen.Log.Debug("NUI", "stage touched! set key focus as lastFocusedView!");\r
- FocusManager.Instance.SetCurrentFocusView(lastFocusedView);\r
- }\r
-\r
- private bool FocusNavigationSample_KeyEvent(object source, View.KeyEventArgs e)\r
- {\r
- Tizen.Log.Debug("NUI", "...");\r
- View view = source as View;\r
-\r
- Tizen.Log.Debug("NUI", "NUI-1 " + "View-" + view.Name + ", Pressed-" + e.Key.KeyPressedName + e.Key.State.ToString());\r
-\r
- return false;\r
- }\r
-\r
- private void FocusNavigationSample_FocusLost(object sender, EventArgs e)\r
- {\r
- Tizen.Log.Debug("NUI", "...");\r
- View view = sender as View;\r
- view.BackgroundColor = Color.Blue;\r
- view.Scale = new Vector3(1.0f, 1.0f, 1.0f);\r
-\r
- Tizen.Log.Debug("NUI", "NUI-2 " + "FocusLost-" + view.Name);\r
- }\r
-\r
- private void FocusNavigationSample_FocusGained(object sender, EventArgs e)\r
- {\r
- Tizen.Log.Debug("NUI", "...");\r
- View view = sender as View;\r
- view.BackgroundColor = Color.Red;\r
- view.Scale = new Vector3(1.2f, 1.2f, 1.0f);\r
-\r
- Tizen.Log.Debug("NUI", "NUI-3 " + "FocusGained-" + view.Name);\r
- }\r
-\r
- private View Instance_PreFocusChange(object source, FocusManager.PreFocusChangeEventArgs e)\r
- {\r
- Tizen.Log.Debug("NUI", "...");\r
- View currentView = (e.CurrentView) ?? lastFocusedView;\r
- View nextView = null;\r
-\r
- Tizen.Log.Debug("NUI", "NUI-4 " + "PreFocusChange-" + e.Direction);\r
-\r
- if (currentView != null && currentView.HasBody())\r
- Tizen.Log.Debug("NUI", "NUI-5 " + " Current-" + currentView.Name);\r
-\r
- if (currentView)\r
- {\r
- switch (e.Direction)\r
- {\r
- case View.FocusDirection.Left:\r
- nextView = currentView.LeftFocusableView;\r
- if (nextView == null)\r
- Tizen.Log.Debug("NUI", "NUI-6 " + "LeftFocusableView is NULL!!!!");\r
- else\r
- Tizen.Log.Debug("NUI", "NUI-7 " + currentView.Name + ".LeftFocusableView =" + nextView.Name);\r
- break;\r
- case View.FocusDirection.Right:\r
- nextView = currentView.RightFocusableView;\r
- if (nextView == null)\r
- Tizen.Log.Debug("NUI", "NUI-8 " + "RightFocusableView is NULL!!!!");\r
- else\r
- Tizen.Log.Debug("NUI", "NUI-9 " + currentView.Name + ".RightFocusableView =" + nextView.Name);\r
- break;\r
- case View.FocusDirection.Up:\r
- nextView = currentView.UpFocusableView;\r
- if (nextView == null)\r
- Tizen.Log.Debug("NUI", "NUI-10 " + "UpFocusableView is NULL!!!!");\r
- else\r
- Tizen.Log.Debug("NUI", "NUI-11 " + currentView.Name + ".UpFocusableView =" + nextView.Name);\r
- break;\r
- case View.FocusDirection.Down:\r
- nextView = currentView.DownFocusableView;\r
- if (nextView == null)\r
- Tizen.Log.Debug("NUI", "NUI-12 " + "DownFocusableView is NULL!!!!");\r
- else\r
- Tizen.Log.Debug("NUI", "NUI-13 " + currentView.Name + ".DownFocusableView =" + nextView.Name);\r
- break;\r
- default:\r
- nextView = null; //added\r
- break;\r
- }\r
- }\r
-\r
- if (e.ProposedView == null)\r
- {\r
- Tizen.Log.Debug("NUI", "NUI-14 " + "ProposedView in NULL!!");\r
- }\r
- else if (e.ProposedView.HasBody())\r
- {\r
- Tizen.Log.Debug("NUI", "NUI-15 " + "ProposedView-" + e.ProposedView.Name);\r
- }\r
- else\r
- {\r
- Tizen.Log.Debug("NUI", "NUI-16 " + "ProposedView does NOT have body!!!" + e.ProposedView);\r
- }\r
-\r
- nextView = nextView ?? (e.ProposedView) ?? currentView;\r
- lastFocusedView = nextView;\r
-\r
- if (nextView != null && nextView.HasBody())\r
- Tizen.Log.Debug("NUI", "NUI-17 " + "Next-" + nextView.Name);\r
-\r
- return nextView;\r
- }\r
-\r
- [STAThread]\r
- static void _Main(string[] args)\r
- {\r
- Example example = new Example();\r
- example.Run(args);\r
- }\r
- }\r
+/*
+ * 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;
+using Tizen.NUI;
+
+namespace MyCSharpExample
+{
+ class Example : NUIApplication
+ {
+ const int num = 2;
+ View[] view;
+
+ View lastFocusedView;
+
+ protected override void OnCreate()
+ {
+ base.OnCreate();
+ Initialize();
+ }
+
+ public void Initialize()
+ {
+ view = new View[2];
+
+ for (int i = 0; i < num; i++)
+ {
+ view[i] = new View();
+ view[i].Size = new Size(200, 200, 0);
+ view[i].BackgroundColor = Color.Blue;
+ view[i].Position = new Position(300 + i * 300, 300, 0);
+ view[i].Name = "MyView" + i;
+ view[i].Focusable = true;
+ Stage.Instance.GetDefaultLayer().Add(view[i]);
+ view[i].FocusGained += FocusNavigationSample_FocusGained;
+ view[i].FocusLost += FocusNavigationSample_FocusLost;
+ view[i].KeyEvent += FocusNavigationSample_KeyEvent;
+ }
+
+ view[0].RightFocusableView = view[1];
+ view[0].LeftFocusableView = view[1];
+ view[1].RightFocusableView = view[0];
+ view[1].LeftFocusableView = view[0];
+
+ FocusManager.Instance.SetCurrentFocusView(view[0]);
+ FocusManager.Instance.PreFocusChange += Instance_PreFocusChange;
+
+ Stage.Instance.Touch += Instance_Touch;
+ }
+
+ private void Instance_Touch(object sender, Stage.TouchEventArgs e)
+ {
+ Tizen.Log.Debug("NUI", "stage touched! set key focus as lastFocusedView!");
+ FocusManager.Instance.SetCurrentFocusView(lastFocusedView);
+ }
+
+ private bool FocusNavigationSample_KeyEvent(object source, View.KeyEventArgs e)
+ {
+ Tizen.Log.Debug("NUI", "...");
+ View view = source as View;
+
+ Tizen.Log.Debug("NUI", "NUI-1 " + "View-" + view.Name + ", Pressed-" + e.Key.KeyPressedName + e.Key.State.ToString());
+
+ return false;
+ }
+
+ private void FocusNavigationSample_FocusLost(object sender, EventArgs e)
+ {
+ Tizen.Log.Debug("NUI", "...");
+ View view = sender as View;
+ view.BackgroundColor = Color.Blue;
+ view.Scale = new Vector3(1.0f, 1.0f, 1.0f);
+
+ Tizen.Log.Debug("NUI", "NUI-2 " + "FocusLost-" + view.Name);
+ }
+
+ private void FocusNavigationSample_FocusGained(object sender, EventArgs e)
+ {
+ Tizen.Log.Debug("NUI", "...");
+ View view = sender as View;
+ view.BackgroundColor = Color.Red;
+ view.Scale = new Vector3(1.2f, 1.2f, 1.0f);
+
+ Tizen.Log.Debug("NUI", "NUI-3 " + "FocusGained-" + view.Name);
+ }
+
+ private View Instance_PreFocusChange(object source, FocusManager.PreFocusChangeEventArgs e)
+ {
+ Tizen.Log.Debug("NUI", "...");
+ View currentView = (e.CurrentView) ?? lastFocusedView;
+ View nextView = null;
+
+ Tizen.Log.Debug("NUI", "NUI-4 " + "PreFocusChange-" + e.Direction);
+
+ if (currentView != null && currentView.HasBody())
+ Tizen.Log.Debug("NUI", "NUI-5 " + " Current-" + currentView.Name);
+
+ if (currentView)
+ {
+ switch (e.Direction)
+ {
+ case View.FocusDirection.Left:
+ nextView = currentView.LeftFocusableView;
+ if (nextView == null)
+ Tizen.Log.Debug("NUI", "NUI-6 " + "LeftFocusableView is NULL!!!!");
+ else
+ Tizen.Log.Debug("NUI", "NUI-7 " + currentView.Name + ".LeftFocusableView =" + nextView.Name);
+ break;
+ case View.FocusDirection.Right:
+ nextView = currentView.RightFocusableView;
+ if (nextView == null)
+ Tizen.Log.Debug("NUI", "NUI-8 " + "RightFocusableView is NULL!!!!");
+ else
+ Tizen.Log.Debug("NUI", "NUI-9 " + currentView.Name + ".RightFocusableView =" + nextView.Name);
+ break;
+ case View.FocusDirection.Up:
+ nextView = currentView.UpFocusableView;
+ if (nextView == null)
+ Tizen.Log.Debug("NUI", "NUI-10 " + "UpFocusableView is NULL!!!!");
+ else
+ Tizen.Log.Debug("NUI", "NUI-11 " + currentView.Name + ".UpFocusableView =" + nextView.Name);
+ break;
+ case View.FocusDirection.Down:
+ nextView = currentView.DownFocusableView;
+ if (nextView == null)
+ Tizen.Log.Debug("NUI", "NUI-12 " + "DownFocusableView is NULL!!!!");
+ else
+ Tizen.Log.Debug("NUI", "NUI-13 " + currentView.Name + ".DownFocusableView =" + nextView.Name);
+ break;
+ default:
+ nextView = null; //added
+ break;
+ }
+ }
+
+ if (e.ProposedView == null)
+ {
+ Tizen.Log.Debug("NUI", "NUI-14 " + "ProposedView in NULL!!");
+ }
+ else if (e.ProposedView.HasBody())
+ {
+ Tizen.Log.Debug("NUI", "NUI-15 " + "ProposedView-" + e.ProposedView.Name);
+ }
+ else
+ {
+ Tizen.Log.Debug("NUI", "NUI-16 " + "ProposedView does NOT have body!!!" + e.ProposedView);
+ }
+
+ nextView = nextView ?? (e.ProposedView) ?? currentView;
+ lastFocusedView = nextView;
+
+ if (nextView != null && nextView.HasBody())
+ Tizen.Log.Debug("NUI", "NUI-17 " + "Next-" + nextView.Name);
+
+ return nextView;
+ }
+
+ [STAThread]
+ static void _Main(string[] args)
+ {
+ Example example = new Example();
+ example.Run(args);
+ }
+ }
}
\ No newline at end of file
_window.SetAcceptFocus(true);
Tizen.Log.Debug("NUI", "[WindowFocusTest] set focus acceptable=true!!!");
Tizen.Log.Debug("NUI", "[WindowFocusTest] is focus acceptable=" + _window.IsFocusAcceptable());
- }\r
+ }
[STAThread]
static void _Main(string[] args)
-/*
+/*
* Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
{
// The collection of contacts
static class ContactsList
- {\r
- private const string resources = "/home/owner/apps_rw/NUISamples.TizenTV/res";\r
-\r
+ {
+ private const string resources = "/home/owner/apps_rw/NUISamples.TizenTV/res";
+
public static readonly ContactItem[] s_contactData = new ContactItem[]
{
new ContactItem ("Emmett Yates", resources + "/images/gallery-small-43.jpg",
-/*
+/*
* Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
-/*
+/*
* Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
private ScrollContainer _hideScrollContainer; // The unused Poster scrollContainer which needs to be transparent.
FocusManager _keyboardFocusManager; // Reference to Dali KeyboardFocusManager.
- protected override void OnCreate()\r
- {\r
- base.OnCreate();\r
- OnInitialize();\r
+ protected override void OnCreate()
+ {
+ base.OnCreate();
+ OnInitialize();
}
Convert.ToInt32((_stageSize.Height * Constants.TopClipLayerExpandHeightFactor))); // X, Y, Width, Height
- _hideBottomContainerAnimation.AnimateTo(_bottomContainer, "Position", new Position(0.0f, _stageSize.Height * Constants.BottomContainerHidePositionFactor, 0.0f),\r
+ _hideBottomContainerAnimation.AnimateTo(_bottomContainer, "Position", new Position(0.0f, _stageSize.Height * Constants.BottomContainerHidePositionFactor, 0.0f),
new AlphaFunction(AlphaFunction.BuiltinFunctions.EaseOutSine));
_hideBottomContainerAnimation.Play();
Convert.ToInt32((_stageSize.Width)),
Convert.ToInt32((_stageSize.Height * Constants.TopClipLayerHeightFactor))); // X, Y, Width, Height
- _showBottomContainerAnimation.AnimateTo(_bottomContainer, "Position", new Position(0.0f, _stageSize.Height * Constants.BottomContainerShowPositionFactor, 0.0f),\r
+ _showBottomContainerAnimation.AnimateTo(_bottomContainer, "Position", new Position(0.0f, _stageSize.Height * Constants.BottomContainerShowPositionFactor, 0.0f),
new AlphaFunction(AlphaFunction.BuiltinFunctions.EaseOutSine));
_showBottomContainerAnimation.Play();
}
// First screen demo Application initialisation
private void OnInitialize()
- {\r
- Tizen.Log.Debug("NUI", "OnInitialize() is called!");\r
+ {
+ Tizen.Log.Debug("NUI", "OnInitialize() is called!");
Tizen.NUI.InternalSetting.DefaultParentOriginAsTopLeft = false;
_hideScrollContainer = null;
_stage = Stage.Instance;
// Add both Top and Bottom Containers to Stage
_stage.GetDefaultLayer().Add(_topContainer);
- _stage.GetDefaultLayer().Add(_bottomContainer);\r
-\r
- // Add a clip layer to Top Container\r
+ _stage.GetDefaultLayer().Add(_bottomContainer);
+
+ // Add a clip layer to Top Container
_topClipLayer = new Layer();
_topClipLayer.AnchorPoint = AnchorPoint.BottomCenter;
_topClipLayer.ParentOrigin = ParentOrigin.BottomCenter;
_dateOfTest.UnderlineEnabled = true;
_stage.GetDefaultLayer().Add(_dateOfTest);
Tizen.Log.Debug("NUI", "### 1) ColorMode = " + _dateOfTest.ColorMode);
- _dateOfTest.ColorMode = ColorMode.UseParentColor;\r
- Tizen.Log.Debug("NUI", "### 2) ColorMode = " + _dateOfTest.ColorMode);\r
- _dateOfTest.ColorMode = ColorMode.UseOwnMultiplyParentColor;\r
+ _dateOfTest.ColorMode = ColorMode.UseParentColor;
+ Tizen.Log.Debug("NUI", "### 2) ColorMode = " + _dateOfTest.ColorMode);
+ _dateOfTest.ColorMode = ColorMode.UseOwnMultiplyParentColor;
Tizen.Log.Debug("NUI", "### 3) ColorMode = " + _dateOfTest.ColorMode);
Tizen.Log.Debug("NUI", "### 1) DrawModeType = " + _dateOfTest.DrawMode);
- _dateOfTest.DrawMode = DrawModeType.Overlay2D;\r
- Tizen.Log.Debug("NUI", "### 2) DrawModeType = " + _dateOfTest.DrawMode);\r
-\r
+ _dateOfTest.DrawMode = DrawModeType.Overlay2D;
+ Tizen.Log.Debug("NUI", "### 2) DrawModeType = " + _dateOfTest.DrawMode);
+
#endif
-\r
- }\r
+
+ }
[STAThread]
static void _Main(string[] args)
- {\r
- Tizen.Log.Debug("NUI", "Main() is called! ");\r
+ {
+ Tizen.Log.Debug("NUI", "Main() is called! ");
FirstScreenApp app = new FirstScreenApp();
app.Run(args);
- }\r
-\r
+ }
+
}
}
public const int SpotLightDuration = 5000; // Duration of Spot Light Animation.
public const int FocusTransitionDuration = 350; // MilliSecond Duration of Focus Transition Animation.
public const int FocusDuration = 350; // Duration of Focus Animation.
- public const int ScrollDuration = 350; // Duration of Scroll Animation.\r
-\r
- // public const string ImageResourcePath = "./firstscreen/images/"; // for Ubuntu\r
+ public const int ScrollDuration = 350; // Duration of Scroll Animation.
+
+ // public const string ImageResourcePath = "./firstscreen/images/"; // for Ubuntu
public const string ImageResourcePath = "/home/owner/apps_rw/NUISamples.TizenTV/res/images/"; // for target
}
public ImageView ImageItem
{
get { return _imageFocus; }
- }\r
-\r
+ }
+
}
}
private Animation _focusTransitionAnimation; // Focus Transition (scaling /unscaling) animation on items of ScrollContainer.
private Path _circularPath; // Circular path used for SpotLight Animation applied to the focused item on ScrollContainer.
- static CustomView CreateInstance()\r
- {\r
- return new ScrollContainer();\r
- }\r
-\r
- // static constructor registers the control type (for user can add kinds of visuals to it)\r
- static ScrollContainer()\r
- {\r
- // ViewRegistry registers control type with DALi type registery\r
- // also uses introspection to find any properties that need to be registered with type registry\r
- ViewRegistry.Instance.Register(CreateInstance, typeof(ScrollContainer));\r
+ static CustomView CreateInstance()
+ {
+ return new ScrollContainer();
+ }
+
+ // static constructor registers the control type (for user can add kinds of visuals to it)
+ static ScrollContainer()
+ {
+ // ViewRegistry registers control type with DALi type registery
+ // also uses introspection to find any properties that need to be registered with type registry
+ ViewRegistry.Instance.Register(CreateInstance, typeof(ScrollContainer));
}
public ScrollContainer() : base(typeof(ScrollContainer).Name, CustomViewBehaviour.DisableStyleChangeSignals |
_focusAnimation = new Animation(Constants.FocusDuration);
_focusAnimation.EndAction = Animation.EndActions.StopFinal;
_scrollAnimation = new Animation(Constants.ScrollDuration);
- _scrollAnimation.EndAction = Animation.EndActions.StopFinal;\r
-\r
- //changed to internal\r
+ _scrollAnimation.EndAction = Animation.EndActions.StopFinal;
+
+ //changed to internal
//EnableGestureDetection(Gesture.Type.Pan);
}
// This override function supports two dimensional keyboard navigation.
// This function returns the next keyboard focusable actor in ScrollContainer control towards the given direction.
- public override View GetNextKeyboardFocusableView(View currentFocusedView, View.FocusDirection direction, bool loopEnabled)\r
- {\r
- if (direction == View.FocusDirection.Left)\r
- {\r
- return View.DownCast(FocusPrevious(loopEnabled));\r
- }\r
- else if (direction == View.FocusDirection.Right)\r
- {\r
- return View.DownCast(FocusNext(loopEnabled));\r
- }\r
- else\r
- {\r
- return View.DownCast(currentFocusedView);\r
- }\r
- }\r
- \r
- public override void OnKeyboardFocusChangeCommitted(View commitedFocusableView)\r
+ public override View GetNextKeyboardFocusableView(View currentFocusedView, View.FocusDirection direction, bool loopEnabled)
+ {
+ if (direction == View.FocusDirection.Left)
+ {
+ return View.DownCast(FocusPrevious(loopEnabled));
+ }
+ else if (direction == View.FocusDirection.Right)
+ {
+ return View.DownCast(FocusNext(loopEnabled));
+ }
+ else
+ {
+ return View.DownCast(currentFocusedView);
+ }
+ }
+
+ public override void OnKeyboardFocusChangeCommitted(View commitedFocusableView)
{
Focus(_focusedItem);
}
-\r
-\r
- // This override function is invoked before chosen focusable actor will be focused.\r
- // This allows the application to preform any actions (i.e. Scroll and SpotLight animations) before the focus is actually moved to the chosen actor.\r
-\r
- // This override function is invoked whenever a pan gesture is detected on this control.\r
- // Perform Scroll Animation based upon pan gesture velocity / speed.\r
- /*public override void OnPan(PanGesture pan)\r
- {\r
- return; //currently not used\r
- }*/\r
-\r
- // This function returns current focused actor\r
+
+
+ // This override function is invoked before chosen focusable actor will be focused.
+ // This allows the application to preform any actions (i.e. Scroll and SpotLight animations) before the focus is actually moved to the chosen actor.
+
+ // This override function is invoked whenever a pan gesture is detected on this control.
+ // Perform Scroll Animation based upon pan gesture velocity / speed.
+ /*public override void OnPan(PanGesture pan)
+ {
+ return; //currently not used
+ }*/
+
+ // This function returns current focused actor
public View GetCurrentFocusedActor()
{
if (_focusedItem < 0)
if (ver1 != Version.ver1 || ver2 != Version.ver2 || ver3 != Version.ver3)
{
//throw new System.InvalidOperationException("Dali native version mismatch error! nui=" + Version.ver1 + "." + Version.ver2 + "." + Version.ver3 + " but dali=" + ver1 + "." + ver2 + "." + ver3);
- Tizen.Log.Fatal("NUI", "Dali native version mismatch error! nui=" + Version.nuiVer1 "." + Version.nuiVer2 + "." + Version.nuiVer3 + Version.nuiRelease + " but native dali=" + ver1 + "." + ver2 + "." + ver3);
+ Tizen.Log.Fatal("NUI", "Dali native version mismatch error! nui=" + Version.nuiVer1 + "." + Version.nuiVer2 + "." + Version.nuiVer3 + Version.nuiRelease + " but native dali=" + ver1 + "." + ver2 + "." + ver3);
}
}
else
// This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
// Some have been manually changed
-// friend assembly setting\r
-// compile with: /target:Tizen.NUI.ExtTEST /keyfile:FriendAssemblies.snk\r
-\r
-using System.Runtime.CompilerServices;\r
+// friend assembly setting
+// compile with: /target:Tizen.NUI.ExtTEST /keyfile:FriendAssemblies.snk
+
+using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("Tizen.NUI.Extension.Test, PublicKey=00240000048000009400000006020000002400005253413100040000010001004d7c7c03a196ecb8e7cc5056750e1f40ee2bbe99f0e53a07f2538f2b0f450bd731b9dca3706503a0378baca74a09cf3af6261b330c031f44817ab6ed64189460765a402279d3e0c1fa7295ae1dccb2e3ff329705fd85b58d66ae7cb7e95ba06e0d847c3e3ba918798f579e5caeb1c6149955e6baf24236eec46227a623e494b1")]
[assembly: InternalsVisibleTo("Tizen.MM.Test, PublicKey=00240000048000009400000006020000002400005253413100040000010001004d7c7c03a196ecb8e7cc5056750e1f40ee2bbe99f0e53a07f2538f2b0f450bd731b9dca3706503a0378baca74a09cf3af6261b330c031f44817ab6ed64189460765a402279d3e0c1fa7295ae1dccb2e3ff329705fd85b58d66ae7cb7e95ba06e0d847c3e3ba918798f579e5caeb1c6149955e6baf24236eec46227a623e494b1")]
namespace Tizen.NUI
-//------------------------------------------------------------------------------\r
-// <auto-generated />\r
-//\r
-// This file was automatically generated by SWIG (http://www.swig.org).\r
-// Version 3.0.9\r
-//\r
-// Do not make changes to this file unless you know what you are doing--modify\r
-// the SWIG interface file instead.\r
-//------------------------------------------------------------------------------\r
-\r
-namespace Tizen.NUI\r
-{\r
-\r
- public class WindowFocusSignalType : global::System.IDisposable\r
- {\r
- private global::System.Runtime.InteropServices.HandleRef swigCPtr;\r
- protected bool swigCMemOwn;\r
-\r
- internal WindowFocusSignalType(global::System.IntPtr cPtr, bool cMemoryOwn)\r
- {\r
- swigCMemOwn = cMemoryOwn;\r
- swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);\r
- }\r
-\r
- internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WindowFocusSignalType obj)\r
- {\r
- return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;\r
- }\r
-\r
- ~WindowFocusSignalType()\r
- {\r
- Dispose();\r
- }\r
-\r
- public virtual void Dispose()\r
- {\r
- lock (this)\r
- {\r
- if (swigCPtr.Handle != global::System.IntPtr.Zero)\r
- {\r
- if (swigCMemOwn)\r
- {\r
- swigCMemOwn = false;\r
- NDalicPINVOKE.delete_WindowFocusSignalType(swigCPtr);\r
- }\r
- swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);\r
- }\r
- global::System.GC.SuppressFinalize(this);\r
- }\r
- }\r
-\r
- public bool Empty()\r
- {\r
- bool ret = NDalicPINVOKE.WindowFocusSignalType_Empty(swigCPtr);\r
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
- return ret;\r
- }\r
-\r
- public uint GetConnectionCount()\r
- {\r
- uint ret = NDalicPINVOKE.WindowFocusSignalType_GetConnectionCount(swigCPtr);\r
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
- return ret;\r
- }\r
-\r
- public void Connect(System.Delegate func)\r
- {\r
- System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);\r
- {\r
- NDalicPINVOKE.WindowFocusSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));\r
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
- }\r
- }\r
-\r
- public void Disconnect(System.Delegate func)\r
- {\r
- System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);\r
- {\r
- NDalicPINVOKE.WindowFocusSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));\r
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
- }\r
- }\r
-\r
- public void Emit(bool arg)\r
- {\r
- NDalicPINVOKE.WindowFocusSignalType_Emit(swigCPtr, arg);\r
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
- }\r
-\r
- public WindowFocusSignalType() : this(NDalicPINVOKE.new_WindowFocusSignalType(), true)\r
- {\r
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
- }\r
-\r
- }\r
-\r
-}\r
+//------------------------------------------------------------------------------
+// <auto-generated />
+//
+// This file was automatically generated by SWIG (http://www.swig.org).
+// Version 3.0.9
+//
+// Do not make changes to this file unless you know what you are doing--modify
+// the SWIG interface file instead.
+//------------------------------------------------------------------------------
+
+namespace Tizen.NUI
+{
+
+ public class WindowFocusSignalType : global::System.IDisposable
+ {
+ private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+ protected bool swigCMemOwn;
+
+ internal WindowFocusSignalType(global::System.IntPtr cPtr, bool cMemoryOwn)
+ {
+ swigCMemOwn = cMemoryOwn;
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ }
+
+ internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WindowFocusSignalType obj)
+ {
+ return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+ }
+
+ ~WindowFocusSignalType()
+ {
+ Dispose();
+ }
+
+ public virtual void Dispose()
+ {
+ lock (this)
+ {
+ if (swigCPtr.Handle != global::System.IntPtr.Zero)
+ {
+ if (swigCMemOwn)
+ {
+ swigCMemOwn = false;
+ NDalicPINVOKE.delete_WindowFocusSignalType(swigCPtr);
+ }
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ }
+ global::System.GC.SuppressFinalize(this);
+ }
+ }
+
+ public bool Empty()
+ {
+ bool ret = NDalicPINVOKE.WindowFocusSignalType_Empty(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ public uint GetConnectionCount()
+ {
+ uint ret = NDalicPINVOKE.WindowFocusSignalType_GetConnectionCount(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ public void Connect(System.Delegate func)
+ {
+ System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
+ {
+ NDalicPINVOKE.WindowFocusSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
+
+ public void Disconnect(System.Delegate func)
+ {
+ System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
+ {
+ NDalicPINVOKE.WindowFocusSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
+
+ public void Emit(bool arg)
+ {
+ NDalicPINVOKE.WindowFocusSignalType_Emit(swigCPtr, arg);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ public WindowFocusSignalType() : this(NDalicPINVOKE.new_WindowFocusSignalType(), true)
+ {
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ }
+
+}
{
get
{
- int temp = 0;\r
- GetProperty(View.Property.STATE).Get(ref temp);\r
- switch (temp)\r
- {\r
- case 0:\r
- {\r
- return "NORMAL";\r
- }\r
- case 1:\r
- {\r
- return "FOCUSED";\r
- }\r
- case 2:\r
- {\r
- return "DISABLED";\r
- }\r
- default:\r
- {\r
- return "";\r
- }\r
- }\r
+ int temp = 0;
+ GetProperty(View.Property.STATE).Get(ref temp);
+ switch (temp)
+ {
+ case 0:
+ {
+ return "NORMAL";
+ }
+ case 1:
+ {
+ return "FOCUSED";
+ }
+ case 2:
+ {
+ return "DISABLED";
+ }
+ default:
+ {
+ return "";
+ }
+ }
}
set
{