Add layout margin functions to the csharp interface
This commit is contained in:
@@ -312,6 +312,9 @@ namespace Facebook.Yoga
|
|||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern float YGNodeLayoutGetHeight(YGNodeHandle node);
|
public static extern float YGNodeLayoutGetHeight(YGNodeHandle node);
|
||||||
|
|
||||||
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern float YGNodeLayoutGetMargin(YGNodeHandle node, YogaEdge edge);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern float YGNodeLayoutGetPadding(YGNodeHandle node, YogaEdge edge);
|
public static extern float YGNodeLayoutGetPadding(YGNodeHandle node, YogaEdge edge);
|
||||||
|
|
||||||
|
@@ -452,6 +452,54 @@ namespace Facebook.Yoga
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public float LayoutMarginLeft
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Native.YGNodeLayoutGetMargin(_ygNode, YogaEdge.Left);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public float LayoutMarginTop
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Native.YGNodeLayoutGetMargin(_ygNode, YogaEdge.Top);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public float LayoutMarginRight
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Native.YGNodeLayoutGetMargin(_ygNode, YogaEdge.Right);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public float LayoutMarginBottom
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Native.YGNodeLayoutGetMargin(_ygNode, YogaEdge.Bottom);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public float LayoutMarginStart
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Native.YGNodeLayoutGetMargin(_ygNode, YogaEdge.Start);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public float LayoutMarginEnd
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Native.YGNodeLayoutGetMargin(_ygNode, YogaEdge.End);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public float LayoutPaddingLeft
|
public float LayoutPaddingLeft
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@@ -333,6 +333,12 @@ namespace Facebook.Yoga
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Obsolete("use LayoutMargin properties")]
|
||||||
|
public float GetLayoutMargin(YogaEdge edge)
|
||||||
|
{
|
||||||
|
return Native.YGNodeLayoutGetMargin(_ygNode, edge);
|
||||||
|
}
|
||||||
|
|
||||||
[Obsolete("use LayoutPadding properties")]
|
[Obsolete("use LayoutPadding properties")]
|
||||||
public float GetLayoutPadding(YogaEdge edge)
|
public float GetLayoutPadding(YogaEdge edge)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user