slot 0.0.1
A real time UI render framework
载入中...
搜索中...
未找到
| 类型定义 | 函数 | 变量
YGNode.h 文件参考
#include <stdbool.h>
#include <stddef.h>
#include <yoga/YGConfig.h>
#include <yoga/YGEnums.h>
#include <yoga/YGMacros.h>
YGNode.h 的引用(Include)关系图:
此图展示该文件直接或间接的被哪些文件引用了:

浏览源代码.

struct  YGSize
 

类型定义

typedef typedefYG_EXTERN_C_BEGIN struct YGNodeYGNodeRef
 
typedef const struct YGNodeYGNodeConstRef
 
typedef void(* YGDirtiedFunc) (YGNodeConstRef node)
 
typedef struct YGSize YGSize
 
typedef YGSize(* YGMeasureFunc) (YGNodeConstRef node, float width, YGMeasureMode widthMode, float height, YGMeasureMode heightMode)
 
typedef float(* YGBaselineFunc) (YGNodeConstRef node, float width, float height)
 

函数

YG_EXPORT YGNodeRef YGNodeNew (void)
 
YG_EXPORT YGNodeRef YGNodeNewWithConfig (YGConfigConstRef config)
 
YG_EXPORT YGNodeRef YGNodeClone (YGNodeConstRef node)
 
YG_EXPORT void YGNodeFree (YGNodeRef node)
 
YG_EXPORT void YGNodeFreeRecursive (YGNodeRef node)
 
YG_EXPORT void YGNodeFinalize (YGNodeRef node)
 
YG_EXPORT void YGNodeReset (YGNodeRef node)
 
YG_EXPORT void YGNodeCalculateLayout (YGNodeRef node, float availableWidth, float availableHeight, YGDirection ownerDirection)
 
YG_EXPORT bool YGNodeGetHasNewLayout (YGNodeConstRef node)
 
YG_EXPORT void YGNodeSetHasNewLayout (YGNodeRef node, bool hasNewLayout)
 
YG_EXPORT bool YGNodeIsDirty (YGNodeConstRef node)
 
YG_EXPORT void YGNodeMarkDirty (YGNodeRef node)
 
YG_EXPORT void YGNodeSetDirtiedFunc (YGNodeRef node, YGDirtiedFunc dirtiedFunc)
 
YG_EXPORT YGDirtiedFunc YGNodeGetDirtiedFunc (YGNodeConstRef node)
 
YG_EXPORT void YGNodeInsertChild (YGNodeRef node, YGNodeRef child, size_t index)
 
YG_EXPORT void YGNodeSwapChild (YGNodeRef node, YGNodeRef child, size_t index)
 
YG_EXPORT void YGNodeRemoveChild (YGNodeRef node, YGNodeRef child)
 
YG_EXPORT void YGNodeRemoveAllChildren (YGNodeRef node)
 
YG_EXPORT void YGNodeSetChildren (YGNodeRef owner, const YGNodeRef *children, size_t count)
 
YG_EXPORT YGNodeRef YGNodeGetChild (YGNodeRef node, size_t index)
 
YG_EXPORT size_t YGNodeGetChildCount (YGNodeConstRef node)
 
YG_EXPORT YGNodeRef YGNodeGetOwner (YGNodeRef node)
 
YG_EXPORT YGNodeRef YGNodeGetParent (YGNodeRef node)
 
YG_EXPORT void YGNodeSetConfig (YGNodeRef node, YGConfigRef config)
 
YG_EXPORT YGConfigConstRef YGNodeGetConfig (YGNodeRef node)
 
YG_EXPORT void YGNodeSetContext (YGNodeRef node, void *context)
 
YG_EXPORT void * YGNodeGetContext (YGNodeConstRef node)
 
YG_EXPORT void YGNodeSetMeasureFunc (YGNodeRef node, YGMeasureFunc measureFunc)
 
YG_EXPORT bool YGNodeHasMeasureFunc (YGNodeConstRef node)
 
YG_EXPORT void YGNodeSetBaselineFunc (YGNodeRef node, YGBaselineFunc baselineFunc)
 
YG_EXPORT bool YGNodeHasBaselineFunc (YGNodeConstRef node)
 
YG_EXPORT void YGNodeSetIsReferenceBaseline (YGNodeRef node, bool isReferenceBaseline)
 
YG_EXPORT bool YGNodeIsReferenceBaseline (YGNodeConstRef node)
 
YG_EXPORT void YGNodeSetNodeType (YGNodeRef node, YGNodeType nodeType)
 
YG_EXPORT YGNodeType YGNodeGetNodeType (YGNodeConstRef node)
 
YG_EXPORT void YGNodeSetAlwaysFormsContainingBlock (YGNodeRef node, bool alwaysFormsContainingBlock)
 
YG_EXPORT bool YGNodeGetAlwaysFormsContainingBlock (YGNodeConstRef node)
 
 YG_DEPRECATED ("YGNodeCanUseCachedMeasurement may be removed in a future version of Yoga") YG_EXPORT bool YGNodeCanUseCachedMeasurement(YGMeasureMode widthMode
 

变量

float availableWidth
 
float YGMeasureMode heightMode
 
float YGMeasureMode float availableHeight
 
float YGMeasureMode float YGMeasureMode lastWidthMode
 
float YGMeasureMode float YGMeasureMode float lastAvailableWidth
 
float YGMeasureMode float YGMeasureMode float YGMeasureMode lastHeightMode
 
float YGMeasureMode float YGMeasureMode float YGMeasureMode float lastAvailableHeight
 
float YGMeasureMode float YGMeasureMode float YGMeasureMode float float lastComputedWidth
 
float YGMeasureMode float YGMeasureMode float YGMeasureMode float float float lastComputedHeight
 
float YGMeasureMode float YGMeasureMode float YGMeasureMode float float float float marginRow
 
float YGMeasureMode float YGMeasureMode float YGMeasureMode float float float float float marginColumn
 
float YGMeasureMode float YGMeasureMode float YGMeasureMode float float float float float YGConfigRef config
 

类型定义说明

◆ YGBaselineFunc

typedef float(* YGBaselineFunc) (YGNodeConstRef node, float width, float height)
返回
a defined offset to baseline (ascent).

◆ YGDirtiedFunc

typedef void(* YGDirtiedFunc) (YGNodeConstRef node)

◆ YGMeasureFunc

typedef YGSize(* YGMeasureFunc) (YGNodeConstRef node, float width, YGMeasureMode widthMode, float height, YGMeasureMode heightMode)

Returns the computed dimensions of the node, following the constraints of widthMode and heightMode:

YGMeasureModeUndefined: The parent has not imposed any constraint on the child. It can be whatever size it wants.

YGMeasureModeAtMost: The child can be as large as it wants up to the specified size.

YGMeasureModeExactly: The parent has determined an exact size for the child. The child is going to be given those bounds regardless of how big it wants to be.

返回
the size of the leaf node, measured under the given constraints.

◆ YGNodeConstRef

typedef const struct YGNode* YGNodeConstRef

Handle to an immutable Yoga Node.

◆ YGNodeRef

typedef typedefYG_EXTERN_C_BEGIN struct YGNode* YGNodeRef

Handle to a mutable Yoga Node.

◆ YGSize

typedef struct YGSize YGSize

函数说明

◆ YG_DEPRECATED()

YG_DEPRECATED ( "YGNodeCanUseCachedMeasurement may be removed in a future version of Yoga" )

◆ YGNodeCalculateLayout()

YG_EXPORT 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.

函数调用图:

◆ YGNodeClone()

YG_EXPORT 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().

函数调用图:
这是这个函数的调用关系图:

◆ YGNodeFinalize()

YG_EXPORT 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.

函数调用图:
这是这个函数的调用关系图:

◆ YGNodeFree()

YG_EXPORT void YGNodeFree ( YGNodeRef node)

Frees the Yoga node, disconnecting it from its owner and children.

函数调用图:
这是这个函数的调用关系图:

◆ YGNodeFreeRecursive()

YG_EXPORT void YGNodeFreeRecursive ( YGNodeRef node)

Frees the subtree of Yoga nodes rooted at the given node.

函数调用图:

◆ YGNodeGetAlwaysFormsContainingBlock()

YG_EXPORT 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.

函数调用图:
这是这个函数的调用关系图:

◆ YGNodeGetChild()

YG_EXPORT YGNodeRef YGNodeGetChild ( YGNodeRef node,
size_t index )

Get the child node at a given index.

函数调用图:
这是这个函数的调用关系图:

◆ YGNodeGetChildCount()

YG_EXPORT size_t YGNodeGetChildCount ( YGNodeConstRef node)

The number of child nodes.

函数调用图:
这是这个函数的调用关系图:

◆ YGNodeGetConfig()

YG_EXPORT YGConfigConstRef YGNodeGetConfig ( YGNodeRef node)

Get the config currently set on the node.

函数调用图:
这是这个函数的调用关系图:

◆ YGNodeGetContext()

YG_EXPORT void * YGNodeGetContext ( YGNodeConstRef node)

Returns the context or NULL if no context has been set.

函数调用图:
这是这个函数的调用关系图:

◆ YGNodeGetDirtiedFunc()

YG_EXPORT YGDirtiedFunc YGNodeGetDirtiedFunc ( YGNodeConstRef node)

Returns a dirtied func if set.

函数调用图:

◆ YGNodeGetHasNewLayout()

YG_EXPORT bool YGNodeGetHasNewLayout ( YGNodeConstRef node)

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

函数调用图:
这是这个函数的调用关系图:

◆ YGNodeGetNodeType()

YG_EXPORT YGNodeType YGNodeGetNodeType ( YGNodeConstRef node)

Whether a leaf node's layout results may be truncated during layout rounding.

函数调用图:

◆ YGNodeGetOwner()

YG_EXPORT YGNodeRef YGNodeGetOwner ( YGNodeRef node)

Get the parent/owner currently set for a node.

函数调用图:
这是这个函数的调用关系图:

◆ YGNodeGetParent()

YG_EXPORT YGNodeRef YGNodeGetParent ( YGNodeRef node)

Get the parent/owner currently set for a node.

函数调用图:

◆ YGNodeHasBaselineFunc()

YG_EXPORT bool YGNodeHasBaselineFunc ( YGNodeConstRef node)

Whether a baseline function is set.

函数调用图:

◆ YGNodeHasMeasureFunc()

YG_EXPORT bool YGNodeHasMeasureFunc ( YGNodeConstRef node)

Whether a measure function is set.

函数调用图:
这是这个函数的调用关系图:

◆ YGNodeInsertChild()

YG_EXPORT void YGNodeInsertChild ( YGNodeRef node,
YGNodeRef child,
size_t index )

Inserts a child node at the given index.

函数调用图:

◆ YGNodeIsDirty()

YG_EXPORT bool YGNodeIsDirty ( YGNodeConstRef node)

Whether the node's layout results are dirty due to it or its children changing.

函数调用图:
这是这个函数的调用关系图:

◆ YGNodeIsReferenceBaseline()

YG_EXPORT bool YGNodeIsReferenceBaseline ( YGNodeConstRef node)

Whether this node is set as the reference baseline.

函数调用图:
这是这个函数的调用关系图:

◆ YGNodeMarkDirty()

YG_EXPORT void YGNodeMarkDirty ( YGNodeRef node)

Marks a node with custom measure function as dirty.

函数调用图:
这是这个函数的调用关系图:

◆ YGNodeNew()

YG_EXPORT YGNodeRef YGNodeNew ( void )

Heap allocates and returns a new Yoga node using Yoga settings.

函数调用图:

◆ YGNodeNewWithConfig()

YG_EXPORT YGNodeRef YGNodeNewWithConfig ( YGConfigConstRef config)

Heap allocates and returns a new Yoga node, with customized settings.

函数调用图:

◆ YGNodeRemoveAllChildren()

YG_EXPORT void YGNodeRemoveAllChildren ( YGNodeRef node)

Removes all children nodes.

函数调用图:
这是这个函数的调用关系图:

◆ YGNodeRemoveChild()

YG_EXPORT void YGNodeRemoveChild ( YGNodeRef node,
YGNodeRef child )

Removes the given child node.

函数调用图:
这是这个函数的调用关系图:

◆ YGNodeReset()

YG_EXPORT void YGNodeReset ( YGNodeRef node)

Resets the node to its default state.

函数调用图:
这是这个函数的调用关系图:

◆ YGNodeSetAlwaysFormsContainingBlock()

YG_EXPORT 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

函数调用图:
这是这个函数的调用关系图:

◆ YGNodeSetBaselineFunc()

YG_EXPORT void YGNodeSetBaselineFunc ( YGNodeRef node,
YGBaselineFunc baselineFunc )

Set a custom function for determining the text baseline for use in baseline alignment.

函数调用图:
这是这个函数的调用关系图:

◆ YGNodeSetChildren()

YG_EXPORT void YGNodeSetChildren ( YGNodeRef owner,
const YGNodeRef * children,
size_t count )

Sets children according to the given list of nodes.

函数调用图:
这是这个函数的调用关系图:

◆ YGNodeSetConfig()

YG_EXPORT void YGNodeSetConfig ( YGNodeRef node,
YGConfigRef config )

Set a new config for the node after creation.

函数调用图:
这是这个函数的调用关系图:

◆ YGNodeSetContext()

YG_EXPORT void YGNodeSetContext ( YGNodeRef node,
void * context )

Sets extra data on the Yoga node which may be read from during callbacks.

函数调用图:

◆ YGNodeSetDirtiedFunc()

YG_EXPORT void YGNodeSetDirtiedFunc ( YGNodeRef node,
YGDirtiedFunc dirtiedFunc )

Called when a change is made to the Yoga tree which dirties this node.

函数调用图:
这是这个函数的调用关系图:

◆ YGNodeSetHasNewLayout()

YG_EXPORT void YGNodeSetHasNewLayout ( YGNodeRef node,
bool hasNewLayout )

Sets whether a nodes layout is considered new.

函数调用图:
这是这个函数的调用关系图:

◆ YGNodeSetIsReferenceBaseline()

YG_EXPORT void YGNodeSetIsReferenceBaseline ( YGNodeRef node,
bool isReferenceBaseline )

Sets this node should be considered the reference baseline among siblings.

函数调用图:
这是这个函数的调用关系图:

◆ YGNodeSetMeasureFunc()

YG_EXPORT 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.

函数调用图:

◆ YGNodeSetNodeType()

YG_EXPORT void YGNodeSetNodeType ( YGNodeRef node,
YGNodeType nodeType )

Sets whether a leaf node's layout results may be truncated during layout rounding.

函数调用图:

◆ YGNodeSwapChild()

YG_EXPORT void YGNodeSwapChild ( YGNodeRef node,
YGNodeRef child,
size_t index )

Replaces the child node at a given index with a new one.

函数调用图:
这是这个函数的调用关系图:

变量说明

◆ availableHeight

float YGMeasureMode float availableHeight

◆ availableWidth

float availableWidth

◆ config

float YGMeasureMode float YGMeasureMode float YGMeasureMode float float float float float YGConfigRef config

◆ heightMode

float YGMeasureMode heightMode

◆ lastAvailableHeight

float YGMeasureMode float YGMeasureMode float YGMeasureMode float lastAvailableHeight

◆ lastAvailableWidth

float YGMeasureMode float YGMeasureMode float lastAvailableWidth

◆ lastComputedHeight

float YGMeasureMode float YGMeasureMode float YGMeasureMode float float float lastComputedHeight

◆ lastComputedWidth

float YGMeasureMode float YGMeasureMode float YGMeasureMode float float lastComputedWidth

◆ lastHeightMode

float YGMeasureMode float YGMeasureMode float YGMeasureMode lastHeightMode

◆ lastWidthMode

float YGMeasureMode float YGMeasureMode lastWidthMode

◆ marginColumn

float YGMeasureMode float YGMeasureMode float YGMeasureMode float float float float float marginColumn

◆ marginRow

float YGMeasureMode float YGMeasureMode float YGMeasureMode float float float float marginRow