Interface FlexalonNode
- Namespace
- Flexalon
- Assembly
- Flexalon.dll
Represents a node in the Flexalon layout tree.
public interface FlexalonNode
Properties
Adapter
Returns the active adapter for this node.
Adapter Adapter { get; }
Property Value
Children
The children of this layout node.
IReadOnlyList<FlexalonNode> Children { get; }
Property Value
- IReadOnlyList<FlexalonNode>
Constraint
Returns the constraint of this node.
Constraint Constraint { get; }
Property Value
Dirty
True if this node is dirty.
bool Dirty { get; }
Property Value
- bool
FlexalonObject
Returns the FlexalonObject of this node.
FlexalonObject FlexalonObject { get; }
Property Value
GameObject
The GameObject associated with this node.
GameObject GameObject { get; }
Property Value
- GameObject
HasFlexalonObject
Returns true if FlexalonObject is set.
bool HasFlexalonObject { get; }
Property Value
- bool
HasResult
Has layout ever run on this node?
bool HasResult { get; }
Property Value
- bool
Index
The index of this node in its parent's Children list.
int Index { get; }
Property Value
- int
IsDragging
True when this node is being dragged.
bool IsDragging { get; set; }
Property Value
- bool
Margin
Returns the assigned margin of this node.
Directions Margin { get; }
Property Value
Method
Returns the layout method of this node.
Layout Method { get; }
Property Value
Modifiers
Returns the set of modifiers that apply to layout results.
IReadOnlyList<FlexalonModifier> Modifiers { get; }
Property Value
- IReadOnlyList<FlexalonModifier>
Offset
Returns the assigned offset of this node relative to its layout position.
Vector3 Offset { get; }
Property Value
- Vector3
Padding
Returns the assigned padding of this node.
Directions Padding { get; }
Property Value
Parent
The parent layout node of this node.
FlexalonNode Parent { get; }
Property Value
Result
Returns the result of the last layout run.
FlexalonResult Result { get; }
Property Value
Rotation
Returns the assigned relative rotation of this node.
Quaternion Rotation { get; }
Property Value
- Quaternion
Scale
Returns the assigned relative scale of this node.
Vector3 Scale { get; }
Property Value
- Vector3
Size
Returns the assigned fixed size of this node.
Vector3 Size { get; }
Property Value
- Vector3
SizeOfParent
Returns the assigned size factor of this node relative to the available space.
Vector3 SizeOfParent { get; }
Property Value
- Vector3
SkipLayout
True when this node should not skipped when performing layout.
bool SkipLayout { get; }
Property Value
- bool
Methods
AddChild(FlexalonNode)
Adds a child to this layout node.
void AddChild(FlexalonNode child)
Parameters
childFlexalonNodeThe child to add.
AddModifier(FlexalonModifier)
Adds a modifier to this node.
void AddModifier(FlexalonModifier modifier)
Parameters
modifierFlexalonModifier
ApplyScaleAndRotation()
Only applies rotation and scale changes to the node. Faster than marking it dirty.
void ApplyScaleAndRotation()
CanShrink(int)
Returns true if this node is not filling this axis and has a min size set.
bool CanShrink(int axis)
Parameters
axisint
Returns
- bool
Detach()
Removes this node from its parent layout node.
void Detach()
DetachAllChildren()
Removes all children from this layout node.
void DetachAllChildren()
ForceUpdate()
Forces this node, its parent nodes, and its children nodes to update immediately.
void ForceUpdate()
GetArrangeSize()
Returns the computed size of this node during the arrange step.
Vector3 GetArrangeSize()
Returns
- Vector3
GetChild(int)
Returns the child of this layout node.
FlexalonNode GetChild(int index)
Parameters
indexintThe index of the child to return.
Returns
- FlexalonNode
The child at the given index.
GetMaxSize(int, float)
Returns the max size of this node, including margin.
float GetMaxSize(int axis, float parentSize)
Parameters
axisintparentSizefloat
Returns
- float
GetMeasureSize(int, float)
Returns the computed size of this node during the measure step.
float GetMeasureSize(int axis, float layoutSize)
Parameters
axisintlayoutSizefloat
Returns
- float
GetMeasureSize(Vector3)
Returns the computed size of this node during the measure step.
Vector3 GetMeasureSize(Vector3 layoutSize)
Parameters
layoutSizeVector3
Returns
- Vector3
GetMinSize(int, float)
Returns the min size of this node, including margin.
float GetMinSize(int axis, float parentSize)
Parameters
axisintparentSizefloat
Returns
- float
GetMinSize(Vector3)
Returns the min size of this node, including margin.
Vector3 GetMinSize(Vector3 parentSize)
Parameters
parentSizeVector3
Returns
- Vector3
GetSizeType(Axis)
Returns the assigned SizeType of this node.
SizeType GetSizeType(Axis axis)
Parameters
axisAxisThe axis to get the SizeType of.
Returns
- SizeType
The SizeType of the given axis.
GetSizeType(int)
Returns the assigned SizeType of this node.
SizeType GetSizeType(int axis)
Parameters
axisintThe axis to get the SizeType of.
Returns
- SizeType
The SizeType of the given axis.
GetWorldBoxPosition(Vector3, bool)
Returns the world position of the layout box. Used for gizmos.
Vector3 GetWorldBoxPosition(Vector3 scale, bool includePadding)
Parameters
scaleVector3includePaddingbool
Returns
- Vector3
GetWorldBoxScale(bool)
Returns the world scale of the layout box. Used for gizmos.
Vector3 GetWorldBoxScale(bool includeLocalScale)
Parameters
includeLocalScalebool
Returns
- Vector3
InsertChild(FlexalonNode, int)
Inserts a child into this layout node.
void InsertChild(FlexalonNode child, int index)
Parameters
childFlexalonNodeThe child to insert.
indexintThe index to insert the child at.
MarkDirty()
Marks this node and its parents as dirty, so they will be updated by the Flexalon component.
void MarkDirty()
RemoveModifier(FlexalonModifier)
Removes a modifier from this node.
void RemoveModifier(FlexalonModifier modifier)
Parameters
modifierFlexalonModifier
SetAdapter(Adapter)
Overrides the default adapter for this node.
void SetAdapter(Adapter adapter)
Parameters
adapterAdapter
SetConstraint(Constraint, FlexalonNode)
Constrains this node to the given target node.
void SetConstraint(Constraint constraint, FlexalonNode target)
Parameters
constraintConstrainttargetFlexalonNode
SetFlexalonObject(FlexalonObject)
Assigns a FlexalonObject to this node.
void SetFlexalonObject(FlexalonObject obj)
Parameters
objFlexalonObject
SetMethod(Layout)
Assigns a layout method to this node.
void SetMethod(Layout method)
Parameters
methodLayout
SetPositionResult(Vector3)
Set the position result from a layout arrange step.
void SetPositionResult(Vector3 position)
Parameters
positionVector3
SetRotationResult(Quaternion)
Set the rotation result from a layout arrange step.
void SetRotationResult(Quaternion quaternion)
Parameters
quaternionQuaternion
SetShrinkFillSize(int, float, float, bool)
Sets the space a child should shrink or fill.
void SetShrinkFillSize(int axis, float childSize, float layoutSize, bool includesSizeOfParent = false)
Parameters
axisintchildSizefloatlayoutSizefloatincludesSizeOfParentbool
SetShrinkFillSize(Vector3, Vector3, bool)
Sets the space a child should shrink or fill.
void SetShrinkFillSize(Vector3 childSize, Vector3 layoutSize, bool includesSizeOfParent = false)
Parameters
childSizeVector3layoutSizeVector3includesSizeOfParentbool
SetTransformUpdater(TransformUpdater)
Assigns a transform updater to this node.
void SetTransformUpdater(TransformUpdater updater)
Parameters
updaterTransformUpdater
Events
ResultChanged
Event invoked when layout results change.
event System.Action<FlexalonNode> ResultChanged
Event Type
- Action<FlexalonNode>