Table of Contents

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

Adapter

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

Constraint

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

FlexalonObject

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

Directions

Method

Returns the layout method of this node.

Layout Method { get; }

Property Value

Layout

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

Directions

Parent

The parent layout node of this node.

FlexalonNode Parent { get; }

Property Value

FlexalonNode

Result

Returns the result of the last layout run.

FlexalonResult Result { get; }

Property Value

FlexalonResult

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

child FlexalonNode

The child to add.

AddModifier(FlexalonModifier)

Adds a modifier to this node.

void AddModifier(FlexalonModifier modifier)

Parameters

modifier FlexalonModifier

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

axis int

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

index int

The 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

axis int
parentSize float

Returns

float

GetMeasureSize(int, float)

Returns the computed size of this node during the measure step.

float GetMeasureSize(int axis, float layoutSize)

Parameters

axis int
layoutSize float

Returns

float

GetMeasureSize(Vector3)

Returns the computed size of this node during the measure step.

Vector3 GetMeasureSize(Vector3 layoutSize)

Parameters

layoutSize Vector3

Returns

Vector3

GetMinSize(int, float)

Returns the min size of this node, including margin.

float GetMinSize(int axis, float parentSize)

Parameters

axis int
parentSize float

Returns

float

GetMinSize(Vector3)

Returns the min size of this node, including margin.

Vector3 GetMinSize(Vector3 parentSize)

Parameters

parentSize Vector3

Returns

Vector3

GetSizeType(Axis)

Returns the assigned SizeType of this node.

SizeType GetSizeType(Axis axis)

Parameters

axis Axis

The 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

axis int

The 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

scale Vector3
includePadding bool

Returns

Vector3

GetWorldBoxScale(bool)

Returns the world scale of the layout box. Used for gizmos.

Vector3 GetWorldBoxScale(bool includeLocalScale)

Parameters

includeLocalScale bool

Returns

Vector3

InsertChild(FlexalonNode, int)

Inserts a child into this layout node.

void InsertChild(FlexalonNode child, int index)

Parameters

child FlexalonNode

The child to insert.

index int

The 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

modifier FlexalonModifier

SetAdapter(Adapter)

Overrides the default adapter for this node.

void SetAdapter(Adapter adapter)

Parameters

adapter Adapter

SetConstraint(Constraint, FlexalonNode)

Constrains this node to the given target node.

void SetConstraint(Constraint constraint, FlexalonNode target)

Parameters

constraint Constraint
target FlexalonNode

SetFlexalonObject(FlexalonObject)

Assigns a FlexalonObject to this node.

void SetFlexalonObject(FlexalonObject obj)

Parameters

obj FlexalonObject

SetMethod(Layout)

Assigns a layout method to this node.

void SetMethod(Layout method)

Parameters

method Layout

SetPositionResult(Vector3)

Set the position result from a layout arrange step.

void SetPositionResult(Vector3 position)

Parameters

position Vector3

SetRotationResult(Quaternion)

Set the rotation result from a layout arrange step.

void SetRotationResult(Quaternion quaternion)

Parameters

quaternion Quaternion

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

axis int
childSize float
layoutSize float
includesSizeOfParent bool

SetShrinkFillSize(Vector3, Vector3, bool)

Sets the space a child should shrink or fill.

void SetShrinkFillSize(Vector3 childSize, Vector3 layoutSize, bool includesSizeOfParent = false)

Parameters

childSize Vector3
layoutSize Vector3
includesSizeOfParent bool

SetTransformUpdater(TransformUpdater)

Assigns a transform updater to this node.

void SetTransformUpdater(TransformUpdater updater)

Parameters

updater TransformUpdater

Events

ResultChanged

Event invoked when layout results change.

event System.Action<FlexalonNode> ResultChanged

Event Type

Action<FlexalonNode>