Search Results for

    Show / Hide Table of Contents

    Class ILayoutAlgorithmV4x1

    Extends the basic contract of all ILayoutAlgorithmV4 algorithms by adding a large number of optimizations, extra features, etc that apply to Algorithms numbered v4.1.x - but which are likely to be replaced or superceded by later algorithms in the v4.x line

    Inheritance
    Object
    IFlexboxLayoutAlgorithm
    ILayoutAlgorithmV4
    ILayoutAlgorithmV4x1
    FlexboxLayoutAlgorithm410
    ILayoutAlgorithmV44xPlus
    Implements
    IFlexboxDescribableLayoutAlgorithm,
    Inherited Members
    ILayoutAlgorithmV4.featureDescription
    ILayoutAlgorithmV4.CalculateAdvances(Int32, FlexContainer, Single, Single, Single)
    ILayoutAlgorithmV4.ResolveAlignSelf(FlexItem)
    ILayoutAlgorithmV4._HasResolvableLengthForAxis(FlexItem, Axis, Nullable<Single>)
    ILayoutAlgorithmV4._GetFirstAncestorComponent<T>(Transform)
    ILayoutAlgorithmV4._GetHighestAncestorComponent<T>(Transform)
    ILayoutAlgorithmV4.IsScrollportContainer(FlexContainer)
    ILayoutAlgorithmV4._ScaledShrinkFactor(FlexItem, Single, Axis, Nullable<Single>)
    ILayoutAlgorithmV4.ConvertBoxLengthToOuterLength(FlexItem, Axis, Single, ContentLength, Boolean)
    ILayoutAlgorithmV4.ConvertBoxLengthToOuterLength(FlexItem, Axis, Single, CSSAvailableLength, Boolean)
    ILayoutAlgorithmV4.ConvertBoxLengthToOuterLength(FlexItem, Axis, BoxLength, CSSAvailableLength, Boolean)
    ILayoutAlgorithmV4.ConvertOuterLengthToBoxLength(FlexItem, Single, Axis, CSSAvailableLength)
    ILayoutAlgorithmV4.Legacy_ConvertOuterLengthToBoxLength(FlexItem, Single, Axis, CSSAvailableLength)
    ILayoutAlgorithmV4.ConvertOuterLengthToBoxLength(FlexItem, Single, Axis, ContentLength)
    ILayoutAlgorithmV4.ConvertContentSizeToBoxSize(FlexItem, Vector2, Vector2)
    ILayoutAlgorithmV4.ConvertContentLengthToBoxLength(FlexItem, ContentLength, Axis, CSSAvailableLength)
    ILayoutAlgorithmV4.ConvertContentLengthToBoxLength(FlexItem, ContentLength, Axis, ContentLength)
    ILayoutAlgorithmV4.ConvertContentLengthToBoxLength(FlexItem, ContentLength, Axis, Nullable<Single>)
    ILayoutAlgorithmV4.ConvertContentLengthToAvailableLength(ContentLength)
    ILayoutAlgorithmV4.ConvertBoxLengthToContentLength(FlexItem, Single, Axis, CSSAvailableSpace)
    ILayoutAlgorithmV4.ConvertBoxLengthToContentLength(FlexItem, Single, Axis, ContentLength)
    ILayoutAlgorithmV4.ConvertBoxLengthToContentLength(FlexItem, BoxLength, Axis, CSSAvailableLength)
    ILayoutAlgorithmV4.ConvertSelfContainingBlockSizeToContentLength(FlexItem, DefiniteContainingBlockSize, Axis)
    ILayoutAlgorithmV4.ConvertBoxLengthToInnerLength(FlexItem, Axis, BoxLength, DefiniteContainingBlockSize)
    ILayoutAlgorithmV4.Legacy_ConvertBoxLengthToInnerLength(FlexItem, Axis, Single)
    ILayoutAlgorithmV4.ConvertPaddingLengthToContentLength(FlexItem, PaddingLength, Axis, Func<Nullable<Single>>)
    ILayoutAlgorithmV4.ConvertBoxLengthToPaddingLength(FlexItem, BoxLength, Axis, CSSAvailableSpace2)
    ILayoutAlgorithmV4.ConvertBoxLengthToBorderLength(FlexItem, Single, Axis, ContentLength)
    ILayoutAlgorithmV4.ConvertBoxLengthToPaddingLength(FlexItem, BoxLength, Axis, CSSAvailableLength)
    ILayoutAlgorithmV4.ConvertOuterLengthToBorderLength(FlexItem, Single, Axis, CSSAvailableLength)
    ILayoutAlgorithmV4.IsFullyInflexible(FlexItem)
    ILayoutAlgorithmV4.CanGrowOrShrinkIn(FlexItem, Axis)
    ILayoutAlgorithmV4.IsDefinite(FlexContainer, Axis, Single)
    ILayoutAlgorithmV4.IsDefinite(FlexItem, Axis, Single)
    ILayoutAlgorithmV4.IsDefinite(GameObject, Axis, Single)
    ILayoutAlgorithmV4.debugExecutedTimes()
    ILayoutAlgorithmV4.lastTimePhase1Executed(FlexContainer)
    ILayoutAlgorithmV4.lastTimePhase2Executed(FlexContainer)
    ILayoutAlgorithmV4.executedPhase1OnContainer(FlexContainer)
    ILayoutAlgorithmV4.executedPhase2OnContainer(FlexContainer)
    IFlexboxLayoutAlgorithm.version
    IFlexboxLayoutAlgorithm.defaultAssetName
    Namespace: NinjaTools.FlexBuilder.LayoutAlgorithms
    Assembly: cs.temp.dll.dll
    Syntax
    public abstract class ILayoutAlgorithmV4x1 : ILayoutAlgorithmV4, IFlexboxDescribableLayoutAlgorithm

    Fields

    - (IContentSizeCalculator4x1) calculatorForContentSizes

    Methods

    - (void) _CacheInvalidateMaxContentSize(FlexItem)

    Parameters
    FlexItem child

    - (void) _CacheInvalidateMinContentSize(FlexItem)

    Parameters
    FlexItem child

    - ((T1, T2)<List<FlexLine>, Dictionary<FlexItem, Vector2>>) _ExecutePhase1(FlexContainer, CSSContainerSize, Nullable)

    Parameters
    FlexContainer container
    CSSContainerSize containerKnownSize
    Nullable<Vector2> sizeOfContainerIfAlreadySetThisFrame
    Returns
    (T1, T2)<List<FlexLine>, Dictionary<FlexItem, Vector2>>

    - (void) _ExecutePhase2(FlexContainer, List)

    NOTE: requires that all children have ALREADY been sized (RectTransform sizes) set to correct values BEFORE this is invoked (it reads-back their RectTransform sizes to decide how/where to position them)

    Parameters
    FlexContainer container
    List<FlexLine> lines

    - (Axis) _InlineAxisFor(FlexItem)

    Flexbox Spec is poorly written here - it obscures the fact that 'inline axis' means something magical from outside the Spec (it is ONLY defined relative to Text contents - NOTHING else!)

    Parameters
    FlexItem element
    Returns
    Axis

    - (void) _SetChildSizes(FlexContainer, List, Dictionary, Action)

    Parameters
    FlexContainer container
    List<FlexLine> lines
    Dictionary<FlexItem, Vector2> childSizes
    Action<FlexContainer, Vector2> layoutCommandForChildContainers

    - (Vector2) CalculateContentSizeFromPhase1Results(FlexContainer, List, Axis, Boolean)

    NOTE: this has to include the line-wrapping logic in order to correctly calculate the true main/cross sizes

    Parameters
    FlexContainer container
    List<FlexLine> lines
    Axis axisMain
    Boolean showDebugMessages
    Returns
    Vector2

    - ((T1, T2)<List<FlexLine>, Dictionary<FlexItem, Vector2>>) Phase1CalculateChildSizes(FlexContainer, CSSContainerSize, CSSAvailableSpace)

    Calculates all the data that is needed to perform visual layout - this is where 99% of each algorithm's work happens -- after this call, you know the SIZE of every child-item, and you know how they are ARRANGED (in lines), but external caller must then APPLY those sizes and POSITION those children using this data.

    Phase 1: Calculate sizes of all children, and assign them into lines (just one line if wrapping is disabled), ready to be positioned

    NOTE: the CSSAvailableSpace argument isn't used for normal layout, it's only used when doing recursive layout (i.e. "container inside another container") in situations where there is no knowable 'size' for the child container, and so this enables it to fallback on using 'all the space that was available within my parent container' as its default available space WITHOUT corrupting its own size, which is still unknown at this point)

    NOTE: the "finalSizes" here do NOT include margins; they are the CSS 'border box' sizes, i.e. ready to be applied as Unity.UI 'rectTransform sizes'.

    Parameters
    FlexContainer container

    Container to process: the child items within this container will be sized

    CSSContainerSize containersNewSize

    The already-calculated size of the container (often one of the dimensions is indefinite, MAX-CONTENT)

    CSSAvailableSpace whenSizeUnknown_parentsAvailableSpace

    Null when doing direct layout, or 'parent's space pre-allocated for this child container' when a parent container triggers this call to force a child-container to calculate its own content-size

    Returns
    (T1, T2)<List<FlexLine>, Dictionary<FlexItem, Vector2>>

    - (void) Phase2PositionChildren(FlexContainer, List)

    NB: requires/assumes that the container's own .rectTransform.size has already been updated, or was already correct and is not being changed - it uses this info to precisely position everything within the container, and take account of both absolute and percentage offsets, padding, etc.

    Parameters
    FlexContainer container
    List<FlexLine> flexLines
    Exceptions
    Exception

    Implements

    IFlexboxDescribableLayoutAlgorithm,
    In This Article
    Back to top http://flexbuilder.ninja