Search Results for

    Show / Hide Table of Contents

    Struct Padding

    Value-type, never shared between different FlexItems. Differs from CSS3Margins only in that it has no 'AUTO' optional value

    NOTE: this was a side-effect-free class up until v4.0.x added a fully automatic 'detect changes to any data, and automatically relayout, always 100% correctly' feature; that feature forces the sub-properties of this class to need to delegate to informing the owning FlexItem "I changed; trigger a relayout!"

    Implements
    IEnumerable<Length>,
    Namespace: NinjaTools.FlexBuilder.CSS3
    Assembly: cs.temp.dll.dll
    Syntax
    [Serializable]
    public struct Padding : IEnumerable<Length>

    Constructors

    - (void) Padding(Length)

    Creates a set of paddings all in the same mode (pixels or percent or auto .. etc)

    Parameters
    Length all

    - (void) Padding(LengthType)

    Parameters
    LengthType mode

    - (void) Padding(Single)

    Creates a set of paddings of same pixels on each side. Padding(Length)

    Parameters
    Single all

    - (void) Padding(Single, Single)

    Sets the top/bottom paddings to one value, and the left/right paddings to another value

    Parameters
    Single topBottom
    Single leftRight

    Fields

    - (Length) bottom

    - (Length) left

    - (Length) right

    - (Length) top

    Properties

    - (Padding) None

    Shorthand for creating a default CSS3 value of 'no padding' (technically: sets them all to '0 pixels')

    - (Boolean) requiresParentSizeToResolve

    Methods

    - (Nullable<Single>) BottomOrNull(Nullable)

    Parameters
    Nullable<Vector2> containerSize
    Returns
    Nullable<Single>

    - (Single) BottomOrZero(Nullable)

    Parameters
    Nullable<Vector2> containerSize
    Returns
    Single

    - (Single) BottomOrZero(Vector2)

    Parameters
    Vector2 containerSize
    Returns
    Single

    - (Boolean) Equals(Object)

    Parameters
    Object obj
    Returns
    Boolean
    Overrides
    ValueType.Equals(Object)

    - (IEnumerator<Length>) GetEnumerator()

    Returns: top, right, bottom, left

    Returns
    IEnumerator<Length>

    - (Int32) GetHashCode()

    Returns
    Int32
    Overrides
    ValueType.GetHashCode()

    - (PaddingValue) HorizontalPaddingOrNull(Func<>>)

    Parameters
    Func<Nullable<Single>> containerInnerLength
    Returns
    PaddingValue

    - (PaddingValue) HorizontalValue(CSSAvailableLength)

    Parameters
    CSSAvailableLength containerInnerLength
    Returns
    PaddingValue

    - (Nullable<Single>) HorizontalValueOrNull(CSSAvailableLength)

    Parameters
    CSSAvailableLength containerSize
    Returns
    Nullable<Single>

    - (Nullable<Single>) HorizontalValueOrNull(Func<>>)

    Resolves a value if possible without even calculating the parent-container's size (e.g. if this is a PIXEL length); if it needs the parent-container's size (e.g. if this is a PERCENT length) it will lazily invoke the supplied lambda; if that lambda fails to provide a value, this returns null (i.e. unresolvable), otherwise it gives the final value resolved into pixels.

    Parameters
    Func<Nullable<Single>> lazilyGenerateDefiniteContainerSize
    Returns
    Nullable<Single>

    - (Nullable<Single>) HorizontalValueOrNull(Nullable)

    Parameters
    Nullable<Single> containerSize
    Returns
    Nullable<Single>

    - (Nullable<Single>) HorizontalValueOrNull(Nullable)

    Parameters
    Nullable<Vector2> containerSize
    Returns
    Nullable<Single>

    - (Single) HorizontalValueOrZero(Nullable)

    Parameters
    Nullable<Single> containerLength
    Returns
    Single

    - (Single) HorizontalValueOrZero(Nullable)

    Parameters
    Nullable<Vector2> containerSize
    Returns
    Single

    - (Single) HorizontalValueOrZero(Single)

    Parameters
    Single containerLength
    Returns
    Single

    - (Single) HorizontalValueOrZero(Vector2)

    Parameters
    Vector2 containerSize
    Returns
    Single

    - (Nullable<Single>) LeftOrNull(Nullable)

    Parameters
    Nullable<Vector2> containerSize
    Returns
    Nullable<Single>

    - (Single) LeftOrZero(Nullable)

    Parameters
    Nullable<Vector2> containerSize
    Returns
    Single

    - (Single) LeftOrZero(Vector2)

    Parameters
    Vector2 containerSize
    Returns
    Single

    - (Boolean) RequiresParentSizeToResolve(RectTransform.Axis)

    Parameters
    RectTransform.Axis axis
    Returns
    Boolean

    - (Nullable<Single>) RightOrNull(Nullable)

    Parameters
    Nullable<Vector2> containerSize
    Returns
    Nullable<Single>

    - (Single) RightOrZero(Nullable)

    Parameters
    Nullable<Vector2> containerSize
    Returns
    Single

    - (Single) RightOrZero(Vector2)

    Parameters
    Vector2 containerSize
    Returns
    Single

    - (void) Set(Single)

    Parameters
    Single value

    - (void) Set(Single, Single)

    Sets the top/bottom paddings to one value, and the left/right paddings to another value

    Parameters
    Single topBottom
    Single leftRight

    - (Nullable<Single>) TopOrNull(Nullable)

    Parameters
    Nullable<Vector2> containerSize
    Returns
    Nullable<Single>

    - (Single) TopOrZero(Nullable)

    Parameters
    Nullable<Vector2> containerSize
    Returns
    Single

    - (Single) TopOrZero(Vector2)

    Parameters
    Vector2 containerSize
    Returns
    Single

    - (String) ToString()

    Returns
    String
    Overrides
    ValueType.ToString()

    - (PaddingValue) Value(RectTransform.Axis, CSSAvailableLength)

    Parameters
    RectTransform.Axis axis
    CSSAvailableLength containerLength
    Returns
    PaddingValue

    - (PaddingValue) Value(RectTransform.Axis, Func<>>)

    Parameters
    RectTransform.Axis axis
    Func<Nullable<Single>> containerLength
    Returns
    PaddingValue

    - (Nullable<Single>) ValueOrNull(RectTransform.Axis, CSSAvailableLength)

    Parameters
    RectTransform.Axis axis
    CSSAvailableLength containerSize
    Returns
    Nullable<Single>

    - (Nullable<Single>) ValueOrNull(RectTransform.Axis, Func<>>)

    Parameters
    RectTransform.Axis axis
    Func<Nullable<Single>> lazilyGenerateDefiniteContainerSize
    Returns
    Nullable<Single>

    - (Nullable<Single>) ValueOrNull(RectTransform.Axis, Nullable)

    Parameters
    RectTransform.Axis axis
    Nullable<Single> containerSize
    Returns
    Nullable<Single>

    - (Nullable<Single>) ValueOrNull(RectTransform.Axis, Nullable)

    Parameters
    RectTransform.Axis axis
    Nullable<Vector2> containerSize
    Returns
    Nullable<Single>

    - (Single) ValueOrZero(RectTransform.Axis, ContentLength)

    Forces the conversion from ContentLength to go to (float?) rather than (float), which unfortunately C# defaults to

    Parameters
    RectTransform.Axis axis
    ContentLength containerLength
    Returns
    Single

    - (Single) ValueOrZero(RectTransform.Axis, Nullable)

    Parameters
    RectTransform.Axis axis
    Nullable<Single> containerLength
    Returns
    Single

    - (Single) ValueOrZero(RectTransform.Axis, Nullable)

    Parameters
    RectTransform.Axis axis
    Nullable<Vector2> containerSize
    Returns
    Single

    - (Single) ValueOrZero(RectTransform.Axis, Single)

    Parameters
    RectTransform.Axis axis
    Single containerLength
    Returns
    Single

    - (Single) ValueOrZero(RectTransform.Axis, Vector2)

    Parameters
    RectTransform.Axis axis
    Vector2 containerSize
    Returns
    Single

    - (PaddingValue) VerticalPaddingOrNull(Func<>>)

    Parameters
    Func<Nullable<Single>> containerInnerLength
    Returns
    PaddingValue

    - (PaddingValue) VerticalValue(CSSAvailableLength)

    Parameters
    CSSAvailableLength containerInnerLength
    Returns
    PaddingValue

    - (Nullable<Single>) VerticalValueOrNull(CSSAvailableLength)

    Parameters
    CSSAvailableLength containerSize
    Returns
    Nullable<Single>

    - (Nullable<Single>) VerticalValueOrNull(Func<>>)

    Parameters
    Func<Nullable<Single>> lazilyGenerateDefiniteContainerSize
    Returns
    Nullable<Single>

    - (Nullable<Single>) VerticalValueOrNull(Nullable, Boolean)

    Parameters
    Nullable<Single> containerSize
    Boolean debug
    Returns
    Nullable<Single>

    - (Nullable<Single>) VerticalValueOrNull(Nullable)

    Parameters
    Nullable<Vector2> containerSize
    Returns
    Nullable<Single>

    - (Single) VerticalValueOrZero(Nullable)

    Parameters
    Nullable<Single> containerLength
    Returns
    Single

    - (Single) VerticalValueOrZero(Nullable)

    Parameters
    Nullable<Vector2> containerSize
    Returns
    Single

    - (Single) VerticalValueOrZero(Single)

    Parameters
    Single containerLength
    Returns
    Single

    - (Single) VerticalValueOrZero(Vector2)

    Parameters
    Vector2 containerSize
    Returns
    Single

    Operators

    - (Boolean) Equality(Padding, Padding)

    Parameters
    Padding left
    Padding right
    Returns
    Boolean

    - (Boolean) Inequality(Padding, Padding)

    Parameters
    Padding left
    Padding right
    Returns
    Boolean

    Implements

    IEnumerable<>,
    In This Article
    Back to top http://flexbuilder.ninja