Search Results for

    Show / Hide Table of Contents

    Struct LengthOrAuto

    Margins, Widths, and Heights use a modified version of Length that has the extra option of 'AUTO', maintaining type safety and ensuring e.g. widths dont get mis-used as max-widths. Otherwise this is identical to Length

    Namespace: NinjaTools.FlexBuilder.CSS3
    Assembly: cs.temp.dll.dll
    Syntax
    [Serializable]
    public struct LengthOrAuto

    Constructors

    - (void) LengthOrAuto(LengthOrAutoType)

    Creates a 0 length in specified units

    Parameters
    LengthOrAutoType t

    - (void) LengthOrAuto(Boolean)

    Failigs in Microsoft's C# (not fixed until C# v8 or so) require a parameter here that does literally nothing

    Parameters
    Boolean fakeArgument

    - (void) LengthOrAuto(Single)

    Creates a length in pixels

    Parameters
    Single f

    - (void) LengthOrAuto(Single, LengthOrAutoType)

    Creates a length in the specified units

    Parameters
    Single f
    LengthOrAutoType t

    Fields

    - (LengthOrAutoType) mode

    Internal, do NOT modify directly - this is only public because C# doesnt have a 'package' keyword

    - (Single) value

    Internal, do NOT modify directly - this is only public because C# doesnt have a 'package' keyword

    Properties

    - (LengthOrAuto) Auto

    Shorthand for creating a new struct with the default value explicitly (C# doesn't fully support struct-constructors)

    - (Boolean) hasDeclaredValue

    This is identical to 'is the CSS value different from 'AUTO'?'

    - (Boolean) hasNonRelativeValue

    hasResolvableValue(Nullable<Single>)

    - (Boolean) hasRelativeValue

    See hasRelativeValue

    Methods

    - (BoxLength) Clamp(Length, LengthOrNone, BoxLength, CSSAvailableLength)

    Parameters
    Length min
    LengthOrNone max
    BoxLength length
    CSSAvailableLength containerSize
    Returns
    BoxLength

    - (Single) Clamp(Length, LengthOrNone, Single, RectTransform.Axis, CSSAvailableSpace)

    Clamps this value between a 'min-width' or 'min-height' and a 'max-width' or 'max-height', using the specified axis (vertical or horizontal) to read the correct values (width or height) from the parent's size.

    Where possible use instead

    Parameters
    Length min
    LengthOrNone max
    Single length
    RectTransform.Axis axis
    CSSAvailableSpace containerSize
    Returns
    Single

    - (Single) Clamp(Length, LengthOrNone, Single, RectTransform.Axis, ContentLength)

    Clamps this value between a 'min-width' or 'min-height' and a 'max-width' or 'max-height', using the specified axis (vertical or horizontal) to read the correct values (width or height) from the parent's size.

    Parameters
    Length min
    LengthOrNone max
    Single length
    RectTransform.Axis axis
    ContentLength containerSize
    Returns
    Single

    - (Single) Clamp(Single, Single, Single)

    Parameters
    Single min
    Single max
    Single length
    Returns
    Single

    - (Boolean) Equals(Object)

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

    - (Int32) GetHashCode()

    Returns
    Int32
    Overrides
    ValueType.GetHashCode()

    - (Boolean) HasNonRelativeValue(out BoxLength)

    Parameters
    BoxLength nonRelativeValue
    Returns
    Boolean

    - (Boolean) HasNonRelativeValue(out Single)

    Parameters
    Single nonRelativeValue
    Returns
    Boolean

    - (Boolean) HasResolvableValue(CSSAvailableLength, out BoxLength)

    Parameters
    CSSAvailableLength parentSize
    BoxLength resolvedValue
    Returns
    Boolean

    - (Boolean) HasResolvableValue(CSSAvailableLength, out Single)

    Parameters
    CSSAvailableLength parentSize
    Single resolvedValue
    Returns
    Boolean

    - (Boolean) HasResolvableValue(ContentLength, out BoxLength)

    Parameters
    ContentLength parentSize
    BoxLength resolvedValue
    Returns
    Boolean

    - (Boolean) HasResolvableValue(ContentLength, out Single)

    Based on hasResolvableValue(ContentLength, out Single), but in layout cases you often instead want to use

    Parameters
    ContentLength parentSize
    Single resolvedValue
    Returns
    Boolean

    - (Boolean) hasResolvableValue(Nullable)

    See

    Parameters
    Nullable<Single> parentSize
    Returns
    Boolean

    - (String) ToString()

    Returns
    String
    Overrides
    ValueType.ToString()

    - (Single) ValueNonRelative()

    See ValueNonRelative()

    Returns
    Single
    Exceptions
    Exception

    - (Nullable<Single>) ValueOrNull(CSSAvailableLength)

    Upgraded / preferred / future version of ValueOrNull(Nullable<Single>)

    Parameters
    CSSAvailableLength containerLength
    Returns
    Nullable<Single>

    - (Nullable<Single>) ValueOrNull(Nullable)

    See ValueOrNull(Nullable<Single>)

    Parameters
    Nullable<Single> containerLength
    Returns
    Nullable<Single>

    - (Single) ValueOrZero(Nullable)

    Parameters
    Nullable<Single> containerLength
    Returns
    Single

    - (Single) ValueOrZero(Single)

    Parameters
    Single containerLength
    Returns
    Single

    Operators

    - (Boolean) Equality(LengthOrAuto, LengthOrAuto)

    Parameters
    LengthOrAuto left
    LengthOrAuto right
    Returns
    Boolean

    - (Boolean) Inequality(LengthOrAuto, LengthOrAuto)

    Parameters
    LengthOrAuto left
    LengthOrAuto right
    Returns
    Boolean
    In This Article
    Back to top http://flexbuilder.ninja