Пример #1
0
 // This should be protected though but made internal because LayoutItemWrapperImpl is internal.
 internal void LayoutItemInitialize(LayoutItemWrapperImpl implementation)
 {
     layoutItemWrapperImpl               = implementation;
     layoutItemWrapperImpl.OnMeasure     = new LayoutItemWrapperImpl.OnMeasureDelegate(OnMeasure);
     layoutItemWrapperImpl.OnLayout      = new LayoutItemWrapperImpl.OnLayoutDelegate(OnLayout);
     layoutItemWrapperImpl.OnSizeChanged = new LayoutItemWrapperImpl.OnSizeChangedDelegate(OnSizeChanged);
 }
Пример #2
0
 internal LayoutItemPtr(LayoutItemWrapperImpl p) : this(LayoutPINVOKE.new_LayoutItemPtr__SWIG_1(LayoutItemWrapperImpl.getCPtr(p)), true)
 {
     if (NDalicPINVOKE.SWIGPendingException.Pending)
     {
         throw NDalicPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Пример #3
0
 internal void Reset(LayoutItemWrapperImpl rhs)
 {
     LayoutPINVOKE.LayoutItemPtr_Reset__SWIG_1(swigCPtr, LayoutItemWrapperImpl.getCPtr(rhs));
     if (NDalicPINVOKE.SWIGPendingException.Pending)
     {
         throw NDalicPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Пример #4
0
 internal LayoutItemWrapper(LayoutItemWrapperImpl implementation) : this(LayoutPINVOKE.new_LayoutItemWrapper__SWIG_2(LayoutItemWrapperImpl.getCPtr(implementation)), true)
 {
     layoutItemWrapperImpl = implementation;
     if (NDalicPINVOKE.SWIGPendingException.Pending)
     {
         throw NDalicPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Пример #5
0
        internal LayoutItemWrapperImpl __ref__()
        {
            LayoutItemWrapperImpl ret = new LayoutItemWrapperImpl(LayoutPINVOKE.LayoutItemPtr___ref__(swigCPtr), false);

            if (NDalicPINVOKE.SWIGPendingException.Pending)
            {
                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Пример #6
0
        internal LayoutItemWrapperImpl __deref__()
        {
            global::System.IntPtr cPtr = LayoutPINVOKE.LayoutItemPtr___deref__(swigCPtr);
            LayoutItemWrapperImpl ret  = (cPtr == global::System.IntPtr.Zero) ? null : new LayoutItemWrapperImpl(cPtr, false);

            if (NDalicPINVOKE.SWIGPendingException.Pending)
            {
                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Пример #7
0
 /// <summary>
 /// Get the child layout id of the given child.<br />
 /// </summary>
 /// <param name="child">The given Layout child.</param>
 internal uint GetChildId(LayoutItemWrapperImpl child)
 {
     return(layoutGroupWrapperImpl.GetChildId(child));
 }
Пример #8
0
 /// <summary>
 /// Callback when child is removed from container.<br />
 /// </summary>
 /// <param name="child">The Layout child.</param>
 internal virtual void OnChildRemove(LayoutItemWrapperImpl child)
 {
 }
Пример #9
0
 /// <summary>
 /// Callback when child is added to container.<br />
 /// Derived classes can use this to set their own child properties on the child layout's owner.<br />
 /// </summary>
 /// <param name="child">The Layout child.</param>
 internal virtual void OnChildAdd(LayoutItemWrapperImpl child)
 {
 }
Пример #10
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(LayoutItemWrapperImpl obj)
 {
     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
 }
Пример #11
0
 /// <summary>
 /// Utility to return a default size.<br />
 /// Uses the supplied size if the MeasureSpec imposed no constraints. Will get larger if allowed by the
 /// MeasureSpec.<br />
 /// </summary>
 /// <param name="size"> Default size for this layout.</param>
 /// <param name="measureSpec"> Constraints imposed by the parent.</param>
 /// <returns>The size this layout should be.</returns>
 public static LayoutLength GetDefaultSize(LayoutLength size, LayoutMeasureSpec measureSpec)
 {
     return(LayoutItemWrapperImpl.GetDefaultSize(size, measureSpec));
 }
Пример #12
0
 //It is called by LayoutGroupWrapper constructor.
 internal LayoutItem(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
 {
     System.IntPtr wrapperImpe_CPtr = LayoutPINVOKE.LayoutItemWrapper_GetImplementation(cPtr);
     layoutItemWrapperImpl = new LayoutItemWrapperImpl(wrapperImpe_CPtr, true);
     LayoutItemInitialize(layoutItemWrapperImpl);
 }
Пример #13
0
 /// <summary>
 /// Measure the layout and its content to determine the measured width and the measured height.<br />
 /// If this method is overridden, it is the subclass's responsibility to make
 /// sure the measured height and width are at least the layout's minimum height
 /// and width. <br />
 /// </summary>
 /// <param name="widthMeasureSpec">horizontal space requirements as imposed by the parent.</param>
 /// <param name="heightMeasureSpec">vertical space requirements as imposed by the parent.</param>
 protected virtual void OnMeasure(LayoutMeasureSpec widthMeasureSpec, LayoutMeasureSpec heightMeasureSpec)
 {
     SetMeasuredDimensions(new MeasuredSize(LayoutItemWrapperImpl.GetDefaultSize(layoutItemWrapperImpl.GetSuggestedMinimumWidth(), widthMeasureSpec)),
                           new MeasuredSize(LayoutItemWrapperImpl.GetDefaultSize(layoutItemWrapperImpl.GetSuggestedMinimumHeight(), heightMeasureSpec)));
 }
Пример #14
0
 internal uint Add(LayoutItemWrapperImpl layoutChild)
 {
     uint ret = LayoutPINVOKE.LayoutGroupWrapperImpl_Add(swigCPtr, LayoutItemWrapperImpl.getCPtr(layoutChild));
     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
     return ret;
 }
Пример #15
0
 internal void Remove(LayoutItemWrapperImpl child)
 {
     LayoutPINVOKE.LayoutGroupWrapperImpl_Remove__SWIG_1(swigCPtr, LayoutItemWrapperImpl.getCPtr(child));
     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
 }