|
slot 0.0.1
A real time UI render framework
|
#include <yoga/Yoga.h>#include <yoga/algorithm/Cache.h>#include <yoga/algorithm/CalculateLayout.h>#include <yoga/debug/AssertFatal.h>#include <yoga/debug/Log.h>#include <yoga/event/event.h>#include <yoga/node/Node.h>
| void YGNodeCalculateLayout | ( | YGNodeRef | node, |
| float | availableWidth, | ||
| float | availableHeight, | ||
| YGDirection | ownerDirection ) |
Calculates the layout of the tree rooted at the given node.
Layout results may be read after calling YGNodeCalculateLayout() using functions like YGNodeLayoutGetLeft(), YGNodeLayoutGetTop(), etc.
YGNodeGetHasNewLayout() may be read to know if the layout of the node or its subtrees may have changed since the last time YGNodeCalculate() was called.

| bool YGNodeCanUseCachedMeasurement | ( | YGMeasureMode | widthMode, |
| float | availableWidth, | ||
| YGMeasureMode | heightMode, | ||
| float | availableHeight, | ||
| YGMeasureMode | lastWidthMode, | ||
| float | lastAvailableWidth, | ||
| YGMeasureMode | lastHeightMode, | ||
| float | lastAvailableHeight, | ||
| float | lastComputedWidth, | ||
| float | lastComputedHeight, | ||
| float | marginRow, | ||
| float | marginColumn, | ||
| YGConfigRef | config ) |

| YGNodeRef YGNodeClone | ( | YGNodeConstRef | node | ) |
Returns a mutable copy of an existing node, with the same context and children, but no owner set. Does not call the function set by YGConfigSetCloneNodeFunc().


| void YGNodeFinalize | ( | YGNodeRef | node | ) |
Frees the Yoga node without disconnecting it from its owner or children. Allows garbage collecting Yoga nodes in parallel when the entire tree is unreachable.


| void YGNodeFree | ( | YGNodeRef | node | ) |
Frees the Yoga node, disconnecting it from its owner and children.


| void YGNodeFreeRecursive | ( | YGNodeRef | node | ) |
Frees the subtree of Yoga nodes rooted at the given node.

| bool YGNodeGetAlwaysFormsContainingBlock | ( | YGNodeConstRef | node | ) |
Whether the node will always form a containing block for any descendant. This can happen in situation where the client implements something like a transform that can affect containing blocks but is not handled by Yoga directly.


Get the child node at a given index.


| size_t YGNodeGetChildCount | ( | YGNodeConstRef | node | ) |
The number of child nodes.


| YGConfigConstRef YGNodeGetConfig | ( | YGNodeRef | node | ) |
Get the config currently set on the node.


| void * YGNodeGetContext | ( | YGNodeConstRef | node | ) |
Returns the context or NULL if no context has been set.


| YGDirtiedFunc YGNodeGetDirtiedFunc | ( | YGNodeConstRef | node | ) |
Returns a dirtied func if set.

| bool YGNodeGetHasNewLayout | ( | YGNodeConstRef | node | ) |
Whether the given node may have new layout results. Must be reset by calling YGNodeSetHasNewLayout().


| YGNodeType YGNodeGetNodeType | ( | YGNodeConstRef | node | ) |
Whether a leaf node's layout results may be truncated during layout rounding.

Get the parent/owner currently set for a node.


| bool YGNodeHasBaselineFunc | ( | YGNodeConstRef | node | ) |
Whether a baseline function is set.

| bool YGNodeHasMeasureFunc | ( | YGNodeConstRef | node | ) |
Whether a measure function is set.


Inserts a child node at the given index.

| bool YGNodeIsDirty | ( | YGNodeConstRef | node | ) |
Whether the node's layout results are dirty due to it or its children changing.


| bool YGNodeIsReferenceBaseline | ( | YGNodeConstRef | node | ) |
Whether this node is set as the reference baseline.


| void YGNodeMarkDirty | ( | YGNodeRef | node | ) |
Marks a node with custom measure function as dirty.


| YGNodeRef YGNodeNew | ( | void | ) |
Heap allocates and returns a new Yoga node using Yoga settings.

| YGNodeRef YGNodeNewWithConfig | ( | YGConfigConstRef | config | ) |
Heap allocates and returns a new Yoga node, with customized settings.

| void YGNodeRemoveAllChildren | ( | YGNodeRef | node | ) |
Removes all children nodes.


Removes the given child node.


| void YGNodeReset | ( | YGNodeRef | node | ) |
Resets the node to its default state.


| void YGNodeSetAlwaysFormsContainingBlock | ( | YGNodeRef | node, |
| bool | alwaysFormsContainingBlock ) |
Make it so that this node will always form a containing block for any descendant nodes. This is useful for when a node has a property outside of of Yoga that will form a containing block. For example, transforms or some of the others listed in https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block


| void YGNodeSetBaselineFunc | ( | YGNodeRef | node, |
| YGBaselineFunc | baselineFunc ) |
Set a custom function for determining the text baseline for use in baseline alignment.


Sets children according to the given list of nodes.


| void YGNodeSetConfig | ( | YGNodeRef | node, |
| YGConfigRef | config ) |
Set a new config for the node after creation.


| void YGNodeSetContext | ( | YGNodeRef | node, |
| void * | context ) |
Sets extra data on the Yoga node which may be read from during callbacks.

| void YGNodeSetDirtiedFunc | ( | YGNodeRef | node, |
| YGDirtiedFunc | dirtiedFunc ) |
Called when a change is made to the Yoga tree which dirties this node.


| void YGNodeSetHasNewLayout | ( | YGNodeRef | node, |
| bool | hasNewLayout ) |
Sets whether a nodes layout is considered new.


| void YGNodeSetIsReferenceBaseline | ( | YGNodeRef | node, |
| bool | isReferenceBaseline ) |
Sets this node should be considered the reference baseline among siblings.


| void YGNodeSetMeasureFunc | ( | YGNodeRef | node, |
| YGMeasureFunc | measureFunc ) |
Allows providing custom measurements for a Yoga leaf node (usually for measuring text). YGNodeMarkDirty() must be set if content effecting the measurements of the node changes.

| void YGNodeSetNodeType | ( | YGNodeRef | node, |
| YGNodeType | nodeType ) |
Sets whether a leaf node's layout results may be truncated during layout rounding.
