Class ILayoutAlgorithmV3
Legacy layout algorithms use this class - highly recommended to replace them ASAP with v4 or later algorithms
Implements
Namespace: NinjaTools.FlexBuilder.LayoutAlgorithms
Assembly: cs.temp.dll.dll
Syntax
public abstract class ILayoutAlgorithmV3 : IFlexboxLayoutAlgorithm, IFlexboxDescribableLayoutAlgorithm
Fields
- (ILayoutAlgorithmV3.FlexRelayoutEvent) onRelayout
Properties
Methods
- (void) AlgorithmLayout(FlexContainer, Vector2)
Parameters
FlexContainer | fc | |
Vector2 | availableSize |
- (void) OnEnable()
- (void) ReLayout(FlexContainer)
Before RootContainers, Containers were only ever SIZED by UnityUI/the user, or by a parent Container sizing this one as its child. So the core ReLayout call was written to NEVER change the size of the Container directly - it may indirectly resize it by requesting that the Container's own parent do a ReLayout.
However RootContainers change the rules slightly: a RootContainer set to FIT_CONTENT will need to set its own size each time a ReLayout of itself happens. This is currently achieved within the LayoutAlgorithm itself - meaning that each LayoutAlgorithm has to opt-in to supporting RootContainer (only algorithms from v3.4.2 and later have that support).
TODO: move that support into this interface, making the core Algorithm Layout call have three stages (SizeChildren, ReSizeSelfIfNeeded, PositionChildren)
Parameters
FlexContainer | container |
- (void) ReLayoutChildrenOnly(FlexContainer)
Parameters
FlexContainer | fc |