using System.Collections.Generic;
-// 1) sibling order test\r
+// 1) sibling order test
namespace Test1
{
class Example : NUIApplication
public void Initialize()
{
_stage = Stage.Instance;
- _stage.BackgroundColor = Color.White;\r
-\r
- // 1) sibling order test\r
- SiblingTest();\r
-\r
-\r
- }\r
-\r
- public void SiblingTest()\r
- {\r
- View _prev = null;\r
- Position2D _myPos = new Position2D(100, 100);\r
- List<View> list_view = new List<View>();\r
- TextLabel _txt = new TextLabel();\r
-\r
- for (int i = 0; i < 10; i++)\r
- {\r
- View _view0 = new PushButton();\r
- PushButton _view = _view0 as PushButton;\r
-\r
- _view.Name = "sibling" + i;\r
- _view.MinimumSize = new Size2D(100, 50);\r
- _view.LabelText = "sibling" + i;\r
- _view.ParentOrigin = ParentOrigin.TopLeft;\r
- _view.AnchorPoint = AnchorPoint.TopLeft;\r
- _view.Position2D = _myPos + new Position2D(20 * i, 10 * i);\r
- _view.Clicked += (sender, ee) =>\r
- {\r
- View curr = sender as View;\r
- Tizen.Log.Debug("NUI", "clicked curr view name=" + curr.Name + " sibling=" + curr.SiblingOrder);\r
- curr.RaiseToTop();\r
- if (_prev)\r
- {\r
- _prev.LowerToBottom();\r
- Tizen.Log.Debug("NUI", "raise on top is called!curr sibling=" + curr.SiblingOrder + " prev name=" + _prev.Name + " sibling=" + _prev.SiblingOrder);\r
- }\r
- _prev = curr;\r
- _txt.Text = "on top: " + curr.Name + ", sibling order=" + curr.SiblingOrder;\r
- return true;\r
- };\r
- list_view.Add(_view);\r
- }\r
-\r
- for (int i = 0; i < 10; i++)\r
- {\r
- _stage.GetDefaultLayer().Add(list_view[i]);\r
- Tizen.Log.Debug("NUI", list_view[i].Name + "'s sibling order=" + list_view[i].SiblingOrder);\r
- }\r
-\r
- _txt.ParentOrigin = ParentOrigin.TopLeft;\r
- _txt.AnchorPoint = AnchorPoint.TopLeft;\r
- _txt.Text = "on top: sibling#, sibling order=?";\r
- _txt.Position2D = _myPos + new Position2D(-50, 200);\r
- _txt.TextColor = Color.Blue;\r
- _stage.GetDefaultLayer().Add(_txt);\r
- }\r
+ _stage.BackgroundColor = Color.White;
+
+ // 1) sibling order test
+ SiblingTest();
+
+
+ }
+
+ public void SiblingTest()
+ {
+ View _prev = null;
+ Position2D _myPos = new Position2D(100, 100);
+ List<View> list_view = new List<View>();
+ TextLabel _txt = new TextLabel();
+
+ for (int i = 0; i < 10; i++)
+ {
+ View _view0 = new PushButton();
+ PushButton _view = _view0 as PushButton;
+
+ _view.Name = "sibling" + i;
+ _view.MinimumSize = new Size2D(100, 50);
+ _view.LabelText = "sibling" + i;
+ _view.ParentOrigin = ParentOrigin.TopLeft;
+ _view.AnchorPoint = AnchorPoint.TopLeft;
+ _view.Position2D = _myPos + new Position2D(20 * i, 10 * i);
+ _view.Clicked += (sender, ee) =>
+ {
+ View curr = sender as View;
+ Tizen.Log.Debug("NUI", "clicked curr view name=" + curr.Name + " sibling=" + curr.SiblingOrder);
+ curr.RaiseToTop();
+ if (_prev)
+ {
+ _prev.LowerToBottom();
+ 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;
+ return true;
+ };
+ list_view.Add(_view);
+ }
+
+ for (int i = 0; i < 10; i++)
+ {
+ _stage.GetDefaultLayer().Add(list_view[i]);
+ Tizen.Log.Debug("NUI", list_view[i].Name + "'s sibling order=" + list_view[i].SiblingOrder);
+ }
+
+ _txt.ParentOrigin = ParentOrigin.TopLeft;
+ _txt.AnchorPoint = AnchorPoint.TopLeft;
+ _txt.Text = "on top: sibling#, sibling order=?";
+ _txt.Position2D = _myPos + new Position2D(-50, 200);
+ _txt.TextColor = Color.Blue;
+ _stage.GetDefaultLayer().Add(_txt);
+ }
[STAThread]
static void _Main(string[] args)
Name: csapi-nui
Summary: dali-NUI
-Version: 0.2.30
+Version: 0.2.31
Release: 1
Group: Development/Libraries
License: Apache-2.0
-/*
- * 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.
- *
- */
+// 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.
+//
+//
+// This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
+// Some have been manually changed
namespace Tizen.NUI
{
using System;
+ /// <summary>
+ /// Color class
+ /// </summary>
public class Color : global::System.IDisposable
{
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
DisposeQueue.Instance.Add(this);
}
+ /// <summary>
+ /// To make Color instance be disposed.
+ /// </summary>
public virtual void Dispose()
{
if (!Stage.IsInstalled())
}
}
-
+ /// <summary>
+ /// Addition operator.
+ /// </summary>
+ /// <param name="arg1">First value</param>
+ /// <param name="arg2">Second value</param>
+ /// <returns>A Color containing the result of the addition</returns>
public static Color operator +(Color arg1, Color arg2)
{
return arg1.Add(arg2);
}
+ /// <summary>
+ /// Subtraction operator.
+ /// </summary>
+ /// <param name="arg1">First value</param>
+ /// <param name="arg2">Second value</param>
+ /// <returns>A Color containing the result of the subtraction</returns>
public static Color operator -(Color arg1, Color arg2)
{
return arg1.Subtract(arg2);
}
+ /// <summary>
+ /// Unary negation operator.
+ /// </summary>
+ /// <param name="arg1">Target Value</param>
+ /// <returns>A Color containg the negation</returns>
public static Color operator -(Color arg1)
{
return arg1.Subtract();
}
+ /// <summary>
+ /// Multiplication operator.
+ /// </summary>
+ /// <param name="arg1">First Value</param>
+ /// <param name="arg2">Second Value</param>
+ /// <returns>A Color containing the result of the multiplication</returns>
public static Color operator *(Color arg1, Color arg2)
{
return arg1.Multiply(arg2);
}
- public static Color operator *(Color arg1, float arg2)
- {
- return arg1.Multiply(arg2);
- }
-
+ /// <summary>
+ /// Division operator.
+ /// </summary>
+ /// <param name="arg1">First Value</param>
+ /// <param name="arg2">Second Value</param>
+ /// <returns>A Color containing the result of the division</returns>
public static Color operator /(Color arg1, Color arg2)
{
return arg1.Divide(arg2);
}
- public static Color operator /(Color arg1, float arg2)
- {
- return arg1.Divide(arg2);
- }
-
-
+ /// <summary>
+ /// Array subscript operator overload.
+ /// </summary>
+ /// <param name="index">Subscript index</param>
+ /// <returns>The float at the given index</returns>
public float this[uint index]
{
get
}
}
- public static Color GetColorFromPtr(global::System.IntPtr cPtr)
+ internal static Color GetColorFromPtr(global::System.IntPtr cPtr)
{
Color ret = new Color(cPtr, false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
-
+ /// <summary>
+ /// Default constructor
+ /// </summary>
public Color() : this(NDalicPINVOKE.new_Vector4__SWIG_0(), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
+
+ /// <summary>
+ /// Constructor.
+ /// </summary>
+ /// <param name="r">red component</param>
+ /// <param name="g">green component</param>
+ /// <param name="b">blue component</param>
+ /// <param name="a">alpha component</param>
public Color(float r, float g, float b, float a) : this(NDalicPINVOKE.new_Vector4__SWIG_1(r, g, b, a), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
+ /// <summary>
+ /// Conversion constructor from an array of four floats.
+ /// </summary>
+ /// <param name="array">array Array of R,G,B,A</param>
public Color(float[] array) : this(NDalicPINVOKE.new_Vector4__SWIG_2(array), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
- private Color Multiply(float rhs)
- {
- Color ret = new Color(NDalicPINVOKE.Vector4_Multiply__SWIG_1(swigCPtr, rhs), true);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
-
private Color MultiplyAssign(Color rhs)
{
Color ret = new Color(NDalicPINVOKE.Vector4_MultiplyAssign__SWIG_0(swigCPtr, Color.getCPtr(rhs)), false);
return ret;
}
- private Color Divide(float rhs)
- {
- Color ret = new Color(NDalicPINVOKE.Vector4_Divide__SWIG_1(swigCPtr, rhs), true);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
private Color DivideAssign(Color rhs)
{
return ret;
}
+ /// <summary>
+ /// Check if two Color classes are same.
+ /// </summary>
+ /// <param name="rhs">A Color to be compared</param>
+ /// <returns>If two Colors are are same, then true.</returns>
public bool EqualTo(Color rhs)
{
bool ret = NDalicPINVOKE.Vector4_EqualTo(swigCPtr, Color.getCPtr(rhs));
return ret;
}
+ /// <summary>
+ /// Check if two Color classes are different.
+ /// </summary>
+ /// <param name="rhs">A Color to be compared</param>
+ /// <returns>If two Colors are are different, then true.</returns>
public bool NotEqualTo(Color rhs)
{
bool ret = NDalicPINVOKE.Vector4_NotEqualTo(swigCPtr, Color.getCPtr(rhs));
return ret;
}
+ /// <summary>
+ /// red component
+ /// </summary>
public float R
{
set
}
}
+ /// <summary>
+ /// green component
+ /// </summary>
public float G
{
set
}
}
+ /// <summary>
+ /// blue component
+ /// </summary>
public float B
{
set
}
}
+ /// <summary>
+ /// alpha component
+ /// </summary>
public float A
{
set
}
}
+ /// <summary>
+ /// Get black colored Color class
+ /// </summary>
public static Color Black
{
get
}
}
+ /// <summary>
+ /// Get white colored Color class
+ /// </summary>
public static Color White
{
get
}
}
+ /// <summary>
+ /// Get red colored Color class
+ /// </summary>
public static Color Red
{
get
}
}
+ /// <summary>
+ /// Get green colored Color class
+ /// </summary>
public static Color Green
{
get
}
}
+ /// <summary>
+ /// Get blue colored Color class
+ /// </summary>
public static Color Blue
{
get
}
}
+ /// <summary>
+ /// Get yellow colored Color class
+ /// </summary>
public static Color Yellow
{
get
}
}
+ /// <summary>
+ /// Get magenta colored Color class
+ /// </summary>
public static Color Magenta
{
get
}
}
+ /// <summary>
+ /// Get cyan colored Color class
+ /// </summary>
public static Color Cyan
{
get
}
}
+ /// <summary>
+ /// Get transparent colored Color class
+ /// </summary>
public static Color Transparent
{
get
}
}
+ /// <summary>
+ /// convert Color class to Vector4 class implicitly.
+ /// </summary>
+ /// <param name="color">A Color to be converted to Vector4</param>
public static implicit operator Vector4(Color color)
{
return new Vector4(color.R, color.G, color.B, color.A);
}
+ /// <summary>
+ /// convert Vector4 class to Color class implicitly.
+ /// </summary>
+ /// <param name="vec">A Vector4 to be converted to Color</param></param>
public static implicit operator Color(Vector4 vec)
{
return new Color(vec.R, vec.G, vec.B, vec.A);
using System;
using System.Runtime.InteropServices;
+ /// <summary>
+ /// Provides the functionality of handling keyboard navigation and maintaining the two dimensional keyboard focus chain.
+ /// It provides functionality of setting the focus and moving the focus in four directions(i.e.Left, Right, Up and Down).
+ /// It also draws a highlight for the focused View and sends a event when the focus is changed.
+ /// </summary>
public class FocusManager : BaseHandle
{
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
DisposeQueue.Instance.Add(this);
}
+ /// <summary>
+ /// To make FocusManager instance be disposed.
+ /// </summary>
public override void Dispose()
{
if (!Stage.IsInstalled())
return ret;
}
+ /// <summary>
+ /// Moves the keyboard focus to the given View.
+ /// Only one View can be focused at the same time.
+ /// The View must be in the stage already and keyboard focusable.
+ /// </summary>
+ /// <param name="view">The View to be focused</param>
+ /// <returns>Whether the focus is successful or not</returns>
public bool SetCurrentFocusView(View view)
{
bool ret = NDalicManualPINVOKE.FocusManager_SetCurrentFocusActor(swigCPtr, Actor.getCPtr(view));
return ret;
}
+ /// <summary>
+ /// Gets the current focused actor.
+ /// </summary>
+ /// <returns>A handle to the current focused View or an empty handle if no View is focused</returns>
public View GetCurrentFocusView()
{
View ret = View.DownCast(new Actor(NDalicManualPINVOKE.FocusManager_GetCurrentFocusActor(swigCPtr), true));
return ret;
}
+ /// <summary>
+ /// Moves the focus to the next focusable View in the focus chain in the given direction(according to the focus traversal order).
+ /// </summary>
+ /// <param name="direction">The direction of focus movement</param>
+ /// <returns>true if the movement was successful</returns>
public bool MoveFocus(View.FocusDirection direction)
{
bool ret = NDalicManualPINVOKE.FocusManager_MoveFocus(swigCPtr, (int)direction);
return ret;
}
+ /// <summary>
+ /// Clears the focus from the current focused actor if any, so that no actor is focused in the focus chain.
+ /// It will emit FocusChanged event without current focused View.
+ /// </summary>
public void ClearFocus()
{
NDalicManualPINVOKE.FocusManager_ClearFocus(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
+ /// <summary>
+ /// Sets/Gets the status of whether the focus movement should be looped within the same focus group.
+ /// The focus movement is not looped by default.
+ /// </summary>
public bool FocusGroupLoop
{
set
return ret;
}
+ /// <summary>
+ /// Sets whether an View is a focus group that can limit the scope of focus movement to its child actors in the focus chain.
+ /// Layout controls set themselves as focus groups by default.
+ /// </summary>
+ /// <param name="view">The View to be set as a focus group</param>
+ /// <param name="isFocusGroup">Whether to set the View as a focus group or not</param>
public void SetAsFocusGroup(View view, bool isFocusGroup)
{
NDalicManualPINVOKE.FocusManager_SetAsFocusGroup(swigCPtr, Actor.getCPtr(view), isFocusGroup);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
+ /// <summary>
+ /// Checks whether the actor is set as a focus group or not.
+ /// </summary>
+ /// <param name="view">The View to be checked</param>
+ /// <returns>Whether the View is set as a focus group</returns>
public bool IsFocusGroup(View view)
{
bool ret = NDalicManualPINVOKE.FocusManager_IsFocusGroup(swigCPtr, Actor.getCPtr(view));
return ret;
}
+ /// <summary>
+ /// Returns the closest ancestor of the given actor that is a focus group.
+ /// </summary>
+ /// <param name="view">The View to be checked for its focus group</param>
+ /// <returns>The focus group the given view belongs to or an empty handle if the given view</returns>
public View GetFocusGroup(View view)
{
View ret = View.DownCast(new Actor(NDalicManualPINVOKE.FocusManager_GetFocusGroup(swigCPtr, Actor.getCPtr(view)), true));
return ret;
}
+ /// <summary>
+ /// Sets/Gets the focus indicator View.
+ /// This will replace the default focus indicator view in FocusManager and will be added to the focused view as a highlight.
+ /// </summary>
public View FocusIndicator
{
set
private static readonly FocusManager instance = FocusManager.Get();
+ /// <summary>
+ /// Gets the singleton of FocusManager object.
+ /// </summary>
public static FocusManager Instance
{
get
-//------------------------------------------------------------------------------
-// <auto-generated />
+// Copyright (c) 2017 Samsung Electronics Co., Ltd.
//
-// This file was automatically generated by SWIG (http://www.swig.org).
-// Version 3.0.9
+// 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
//
-// Do not make changes to this file unless you know what you are doing--modify
-// the SWIG interface file instead.
-//------------------------------------------------------------------------------
+// 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.
+//
+//
+// This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
+// Some have been manually changed
+
namespace Tizen.NUI
{
DisposeQueue.Instance.Add(this);
}
+ /// <summary>
+ /// To make RelayoutContainer instance be disposed.
+ /// </summary>
public virtual void Dispose()
{
if (!Stage.IsInstalled())
}
}
-
+ /// <summary>
+ /// Adds relayout information to the container if it doesn't already exist.
+ /// </summary>
+ /// <param name="actor">The actor to relayout</param>
+ /// <param name="size">The size to relayout</param>
public virtual void Add(Actor actor, Size2D size)
{
NDalicPINVOKE.RelayoutContainer_Add(swigCPtr, Actor.getCPtr(actor), Size2D.getCPtr(size));