Class ITreeUpdateAlgorithmV4
This file contains the 'start a layout / relayout / detect a relayout / optimize relayout' parts.
Inheritance
Inherited Members
Namespace: NinjaTools.FlexBuilder.LayoutAlgorithms
Assembly: cs.temp.dll.dll
Syntax
public abstract class ITreeUpdateAlgorithmV4 : ITreeUpdateAlgorithm
Methods
- (void) ChildContentSizeChanged(FlexContainer, FlexItem)
When something (internal or external) changes the flex 'content-size' of a FlexItem, such that the containing FlexContainer may need to do a relayout (at the very least: will nearly always need to reposition the child); most common example is user editing a Text component's string, and/or changing the anchored positions of a child UI component, or the 'size to fit' setting of a Text component, etc.
Parameters
FlexContainer | parent | |
FlexItem | childChanged |
- (void) ChildrenChanged(FlexContainer)
BUG: in some versions of Unity this is only called when FlexItem/FlexContainer are disabled, not when they're enabled
Called whenever children were added/removed OR whenever children were enabled/disabled
Parameters
FlexContainer | fc |
- (void) ChildSizeAndOrPositionNeedsReinstating(FlexContainer, FlexItem)
Parameters
FlexContainer | parent | |
FlexItem | childExternallyModified |
- (void) ContainerPositionNeedsReinstating(FlexContainer)
OPTIONAL: not actually used yet, but hopefully will be soon; TODO: make use of this in FlexContainer On* Callbacks
Parameters
FlexContainer | fc |
- (void) ContainerSizeAndOrPositionNeedsReinstating(FlexContainer)
Parameters
FlexContainer | fc |
- (void) ContainerSizeAndOrPositionNeedsReinstating(RootFlexContainer)
Parameters
RootFlexContainer | rfc |
- (void) FlexContainerAddedOrCreated(FlexContainer, String)
TODO / BUG: this appears to conflict with RootContainerAddedToCanvas for RFCs
MUST be called whenever a new FlexContainer component is added to a GameObject (or Reset via the Editor UI)
Parameters
FlexContainer | newFC | |
String | purpose |
- (void) FlexItemAddedOrCreated(FlexItem, String)
MUST be called whenever a new FlexItem component is added to a GameObject (or Reset via the Editor UI)
Parameters
FlexItem | newItem | |
String | purpose |
- (void) FlexPropertyPathModified(FlexContainer, String)
MUST be called every time any flex-related field/property is changed - e.g. .justify, .align, .direction
Algorithm may optimize for different specific properties, or treat all the same.
Where Unity binding paths differ from the public property path (because Unity's internal bad design causes Unity to fail to discover the public variable), this method will automatically accept either interchangeably, e.g. ".cssPadding.top" is identical to "._cssPadding.top" (Unity's broken version).
Parameters
FlexContainer | fc | |
String | bindingPath |
- (void) FlexPropertyPathModified(FlexItem, String)
MUST be called every time any flex-related field/property is changed - e.g. .cssWidth, .margins, .flexGrow
When a compound property is being called, you need to give the justified version, e.g. for padding, you need to send NOT: ".cssPadding", but INSTEAD: ".cssPadding.top" / ".cssPadding.left", etc (algorithms will auto-detect the ".cssPadding" prefix and act differently
Where Unity binding paths differ from the public property path (because Unity's internal bad design causes Unity to fail to discover the public variable), this method will automatically accept either interchangeably, e.g. ".cssPadding.top" is identical to "._cssPadding.top" (Unity's broken version).
Algorithm may optimize for different specific properties, or treat all the same
Parameters
FlexItem | fi | |
String | bindingPath |
- (void) ForceRelayoutFullTree(RootFlexContainer, String)
Parameters
RootFlexContainer | rfc | |
String | purpose |
- (void) LayoutAlgorithmChanged(RootFlexContainer, IFlexboxLayoutAlgorithm, IFlexboxLayoutAlgorithm)
Parameters
RootFlexContainer | rfc | |
IFlexboxLayoutAlgorithm | oldValue | |
IFlexboxLayoutAlgorithm | newValue |
- (void) RootContainerAddedToCanvas(RootFlexContainer)
Parameters
RootFlexContainer | rfc |
- (void) UnfreezeContainer(FlexContainer)
Parameters
FlexContainer | fc |
- (void) UnfreezeItem(FlexItem)
Parameters
FlexItem | fi |