/// <param name="heightMeasureSpec">vertical space requirements as imposed by the parent.</param>
protected override void OnMeasure(LayoutMeasureSpec widthMeasureSpec, LayoutMeasureSpec heightMeasureSpec)
{
+ Log.Info("NUI", "OnMeasure\n");
LayoutLength childWidth = new LayoutLength( 0 );
LayoutLength childHeight = new LayoutLength( 0 );
/// <param name="top"> Top position, relative to parent.</param>
/// <param name="right">Right position, relative to parent.</param>
/// <param name="bottom">Bottom position, relative to parent.</param>
- protected virtual void OnLayout(bool changed, LayoutLength left, LayoutLength top, LayoutLength right, LayoutLength bottom)
+ protected override void OnLayout(bool changed, LayoutLength left, LayoutLength top, LayoutLength right, LayoutLength bottom)
{
+ Log.Info("NUI", "OnLayout\n");
+ for( uint i = 0; i < ChildCount; ++i )
+ {
+ var childLayout = GetChildAt( i );
+ if( childLayout )
+ {
+ View childOwner = childLayout.GetOwner();
+
+ // Use position if explicitly set to child otherwise will be top left.
+ var childLeft = new LayoutLength( childOwner.Position2D.X );
+ var childTop = new LayoutLength( childOwner.Position2D.Y );
+
+ View owner = GetOwner();
+
+ if ( owner )
+ {
+ // Margin and Padding only supported when child anchor point is TOP_LEFT.
+ if ( owner.PivotPoint == PivotPoint.TopLeft || ( owner.PositionUsesPivotPoint == false ) )
+ {
+ childLeft = childLeft + owner.Padding.Start + childOwner.Margin.Start;
+ childTop = childTop + owner.Padding.Top + childOwner.Margin.Top;
+ }
+ }
+ childLayout.Layout( childLeft, childTop, childLeft + childLayout.MeasuredWidth, childTop + childLayout.MeasuredHeight );
+ }
+ }
}
/// <summary>
/// <param name="bottom">Bottom position, relative to parent.</param>
public void Layout(LayoutLength left, LayoutLength top, LayoutLength right, LayoutLength bottom)
{
+ Log.Info("NUI", "LayoutItem Layout\n");
layoutItemWrapperImpl.Layout(left, top, right, bottom);
}
/// <since_tizen> 4 </since_tizen>
public override void Add(View child)
{
- Log.Info("NUI", "Add child:" + child.Name + " to " + Name + "\n");
-
if (null == child)
{
Tizen.Log.Fatal("NUI", "Child is null");
return;
}
+ Log.Info("NUI", "Adding Child:" + child.Name + " to " + Name + "\n");
+
Container oldParent = child.GetParent();
if (oldParent != this)
{
// layoutSet flag is true when the View became a layout using the SetLayout API
if (true == layoutSet && null == child.Layout)
{
- Log.Info("NUI", "Add child Parent[" + Name + "] Layout set\n");
+ Log.Info("NUI", "Parent[" + Name + "] Layout set[" + layoutSet.ToString() + "] Pure View[" + (!layoutSet).ToString() + "]\n");
// If child is a View or explicitly set to require layouting then set child as a LayoutGroup.
// If the child is derived from a View then it may be a legacy or existing container hence will do layouting itself.
if( child.GetType() == typeof(View) || true == child.LayoutingRequired )
{
- Log.Info("NUI", "Add child Creating LayoutGroup\n");
+ Log.Info("NUI", "Creating LayoutGroup for " + child.Name + " LayoutingRequired[" + child.LayoutingRequired.ToString() + "]\n");
child.Layout = new LayoutGroup();
}
else
{
- // Adding child as a leaf, layouting will not propogate past this child.
+ // Adding child as a leaf, layouting will not propagate past this child.
// Legacy containers will be a LayoutItems too and layout their children how they wish.
- Log.Info("NUI", "Add child Creating LayoutItem for " + child.Name + "\n");
+ Log.Info("NUI", "Creating LayoutItem for " + child.Name + "\n");
child.Layout = new LayoutItem();
}
}
set
{
SetValue(SizeProperty, value);
+ // Set Specification so when layouts measure this View it matches the value set here.
+ // All Views are currently Layouts.
+ SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Width));
+ SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Height));
NotifyPropertyChanged();
}
}
// If adding a View then set layout required flag
if( child.GetType() == typeof(View) )
{
- Log.Info("NUI", "Add child LayoutingRequired for:" + child.Name + "\n");
+ Log.Info("NUI", "Add child[" + child.Name + "] LayoutingRequired set as pure view\n");
child.LayoutingRequired = true;
}
* limitations under the License.
*
*/
+using System.ComponentModel;
namespace Tizen.NUI
{
/// The default constructor.
/// </summary>
/// <param name="state">The state of the gesture.</param>
- internal PinchGesture(Gesture.StateType state) : this(NDalicPINVOKE.new_PinchGesture__SWIG_0((int)state), true)
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public PinchGesture(Gesture.StateType state) : this(NDalicPINVOKE.new_PinchGesture__SWIG_0((int)state), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
* limitations under the License.
*
*/
+using System.ComponentModel;
+using Tizen.NUI.BaseComponents;
namespace Tizen.NUI
{
- using Tizen.NUI.BaseComponents;
- internal class ScrollViewPagePathEffect : ScrollViewEffect
+ /// <summary>
+ /// ScrollView Page Path Effect.
+ /// This effect causes Views to follow a given path. The opacity of the view will be 0.0 at
+ /// the beginning of the path and will go to 1.0 as it is approximating to half of the path to return
+ /// to 0.0 at the end of the path.
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public class ScrollViewPagePathEffect : ScrollViewEffect
{
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
}
+ /// <summary>
+ /// Dispose.
+ /// </summary>
protected override void Dispose(DisposeTypes type)
{
if (disposed)
base.Dispose(type);
}
+ /// <summary>
+ /// Creates an initialized ScrollViewPagePathEffect.
+ /// </summary>
+ /// <param name="path">The path that will be used by the scroll effect.</param>
+ /// <param name="forward">Vector in page object space which will be aligned with the tangent of the path.</param>
+ /// <param name="inputPropertyIndex">Index of a property of the scroll-view which will be used as the input for the path.</param>
+ /// <param name="pageSize">Size of a page in the scrollview.</param>
+ /// <param name="pageCount">Total number of pages in the scrollview.</param>
+ /// <returns>A handle to a newly allocated Dali resource.</returns>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
public ScrollViewPagePathEffect(Path path, Vector3 forward, int inputPropertyIndex, Vector3 pageSize, uint pageCount) : this(NDalicPINVOKE.ScrollViewPagePathEffect_New(Path.getCPtr(path), Vector3.getCPtr(forward), inputPropertyIndex, Vector3.getCPtr(pageSize), pageCount), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-
}
- public static ScrollViewPagePathEffect DownCast(BaseHandle handle)
+
+ internal static ScrollViewPagePathEffect DownCast(BaseHandle handle)
{
ScrollViewPagePathEffect ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as ScrollViewPagePathEffect;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
+ /// <summary>
+ /// Manually apply effect to a page in the scroll-view.
+ /// </summary>
+ /// <param name="page">The page to be affected by this effect.</param>
+ /// <param name="pageOrder">The order of the page in the scroll view.</param>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
public void ApplyToPage(View page, uint pageOrder)
{
NDalicPINVOKE.ScrollViewPagePathEffect_ApplyToPage(swigCPtr, View.getCPtr(page), pageOrder);
* limitations under the License.
*
*/
+using System.ComponentModel;
namespace Tizen.NUI
{
-
- internal class TypeRegistry : BaseHandle
+ /// <summary>
+ /// The TypeRegistry allows registration of type instance creation functions.
+ /// These can then be created later by name and down cast to the appropriate type.
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public class TypeRegistry : BaseHandle
{
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
}
+ /// <summary>
+ /// Dispose.
+ /// </summary>
protected override void Dispose(DisposeTypes type)
{
if (disposed)
base.Dispose(type);
}
+ /// <summary>
+ /// Gets Type Registry handle.
+ /// </summary>
+ /// <returns>TypeRegistry handle.</returns>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
public static TypeRegistry Get()
{
TypeRegistry ret = new TypeRegistry(NDalicPINVOKE.TypeRegistry_Get(), true);
return ret;
}
+ /// <summary>
+ /// Allows the creation of an empty typeRegistry handle.
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
public TypeRegistry() : this(NDalicPINVOKE.new_TypeRegistry__SWIG_0(), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
- public TypeRegistry(TypeRegistry handle) : this(NDalicPINVOKE.new_TypeRegistry__SWIG_1(TypeRegistry.getCPtr(handle)), true)
+ internal TypeRegistry(TypeRegistry handle) : this(NDalicPINVOKE.new_TypeRegistry__SWIG_1(TypeRegistry.getCPtr(handle)), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
- public TypeRegistry Assign(TypeRegistry rhs)
+ internal TypeRegistry Assign(TypeRegistry rhs)
{
TypeRegistry ret = new TypeRegistry(NDalicPINVOKE.TypeRegistry_Assign(swigCPtr, TypeRegistry.getCPtr(rhs)), false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
+ /// <summary>
+ /// Gets TypeInfo for a registered type.
+ /// </summary>
+ /// <param name="uniqueTypeName">A unique type name.</param>
+ /// <returns>TypeInfo if the type exists, otherwise an empty handle.</returns>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
public Tizen.NUI.TypeInfo GetTypeInfo(string uniqueTypeName)
{
Tizen.NUI.TypeInfo ret = new Tizen.NUI.TypeInfo(NDalicPINVOKE.TypeRegistry_GetTypeInfo__SWIG_0(swigCPtr, uniqueTypeName), true);
return ret;
}
+ /// <summary>
+ /// Gets type name count.
+ /// </summary>
+ /// <returns>The counte.</returns>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
public uint GetTypeNameCount()
{
uint ret = NDalicPINVOKE.TypeRegistry_GetTypeNameCount(swigCPtr);
return ret;
}
+ /// <summary>
+ /// Gets type names by index.
+ /// </summary>
+ /// <param name="index">The index to get the type name.</param>
+ /// <returns>The type name or an empty string when index is not valid.</returns>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
public string GetTypeName(uint index)
{
string ret = NDalicPINVOKE.TypeRegistry_GetTypeName(swigCPtr, index);
private PanFinishedEventCallbackDelegate _scrollBarPanFinishedEventCallbackDelegate;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
- private delegate void ScrollPositionIntervalReachedEventCallbackDelegate();
+ private delegate void ScrollPositionIntervalReachedEventCallbackDelegate(float position);
private EventHandler<ScrollIntervalEventArgs> _scrollBarScrollPositionIntervalReachedEventHandler;
private ScrollPositionIntervalReachedEventCallbackDelegate _scrollBarScrollPositionIntervalReachedEventCallbackDelegate;
/// <summary>
/// The event emitted when panning is finished on the scroll indicator.
/// </summary>
+ /// <remarks>Event only emitted when the source of the scroll position properties are set.</remarks>
/// <since_tizen> 3 </since_tizen>
public event EventHandler<PanFinishedEventArgs> PanFinished
{
/// <summary>
- /// This is the event emitted when the current scroll position of the scrollable content.
+ /// This is the event emitted when the current scroll position of the scrollable content goes above or below the values specified by ScrollPositionIntervals property.
/// </summary>
+ /// <remarks>Event only emitted when the source of the scroll position properties are set.</remarks>
/// <since_tizen> 3 </since_tizen>
public event EventHandler<ScrollIntervalEventArgs> ScrollInterval
{
}
// Callback for ScrollBar ScrollPositionIntervalReachedSignal
- private void OnScrollBarScrollPositionIntervalReached()
+ private void OnScrollBarScrollPositionIntervalReached(float position)
{
ScrollIntervalEventArgs e = new ScrollIntervalEventArgs();
+ e.CurrentScrollPosition = position;
if (_scrollBarScrollPositionIntervalReachedEventHandler != null)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
- internal void SetScrollPropertySource(Animatable handle, int propertyScrollPosition, int propertyMinScrollPosition, int propertyMaxScrollPosition, int propertyScrollContentSize)
+ /// <summary>
+ /// Sets the source of the scroll position properties.
+ /// </summary>
+ /// <param name="handle">The handle of the object owing the scroll properties.</param>
+ /// <param name="propertyScrollPosition">The index of the scroll position property(The scroll position, type float).</param>
+ /// <param name="propertyMinScrollPosition">The index of the minimum scroll position property(The minimum scroll position, type float).</param>
+ /// <param name="propertyMaxScrollPosition">The index of the maximum scroll position property(The maximum scroll position, type float).</param>
+ /// <param name="propertyScrollContentSize">The index of the scroll content size property(The size of the scrollable content in actor coordinates, type float).</param>
+ /// <remarks>The handle to the object owing the scroll properties has been initialised and the property index must be valid.</remarks>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetScrollPropertySource(Animatable handle, int propertyScrollPosition, int propertyMinScrollPosition, int propertyMaxScrollPosition, int propertyScrollContentSize)
{
NDalicPINVOKE.ScrollBar_SetScrollPropertySource(swigCPtr, Animatable.getCPtr(handle), propertyScrollPosition, propertyMinScrollPosition, propertyMaxScrollPosition, propertyScrollContentSize);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();