slot 0.0.1
A real time UI render framework
载入中...
搜索中...
未找到
CalculateLayout.h
浏览该文件的文档.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8#pragma once
9
10#include <yoga/Yoga.h>
12#include <yoga/event/event.h>
13#include <yoga/node/Node.h>
14
15namespace facebook::yoga {
16
18 yoga::Node* node,
19 float ownerWidth,
20 float ownerHeight,
21 Direction ownerDirection);
22
24 yoga::Node* node,
25 float availableWidth,
26 float availableHeight,
27 Direction ownerDirection,
28 SizingMode widthSizingMode,
29 SizingMode heightSizingMode,
30 float ownerWidth,
31 float ownerHeight,
32 bool performLayout,
33 LayoutPassReason reason,
34 LayoutData& layoutMarkerData,
35 uint32_t depth,
36 uint32_t generationCount);
37
39 const yoga::Node* node,
40 Direction direction,
41 FlexDirection axis,
42 float ownerAxisSize,
43 float ownerWidth,
44 /*in_out*/ SizingMode* mode,
45 /*in_out*/ float* size);
46
48 const yoga::Node* const node,
49 const Direction direction,
50 const Dimension dimension,
51 const float availableDim,
52 float paddingAndBorder,
53 const float ownerDim,
54 const float ownerWidth);
55
56void zeroOutLayoutRecursively(yoga::Node* const node);
57
59
60} // namespace facebook::yoga
float YGMeasureMode float availableHeight
Definition YGNode.h:293
float availableWidth
Definition YGNode.h:291
Definition Benchmark.cpp:19
float calculateAvailableInnerDimension(const yoga::Node *const node, const Direction direction, const Dimension dimension, const float availableDim, const float paddingAndBorder, const float ownerDim, const float ownerWidth)
Definition CalculateLayout.cpp:537
void zeroOutLayoutRecursively(yoga::Node *const node)
Definition CalculateLayout.cpp:507
LayoutPassReason
Definition event.h:26
Direction
Definition Direction.h:18
SizingMode
Definition SizingMode.h:21
void calculateLayout(yoga::Node *const node, const float ownerWidth, const float ownerHeight, const Direction ownerDirection)
Definition CalculateLayout.cpp:2449
bool calculateLayoutInternal(yoga::Node *const node, const float availableWidth, const float availableHeight, const Direction ownerDirection, const SizingMode widthSizingMode, const SizingMode heightSizingMode, const float ownerWidth, const float ownerHeight, const bool performLayout, const LayoutPassReason reason, LayoutData &layoutMarkerData, uint32_t depth, const uint32_t generationCount)
Definition CalculateLayout.cpp:2251
Dimension dimension(FlexDirection flexDirection)
Definition FlexDirection.h:105
FlexDirection
Definition FlexDirection.h:18
void constrainMaxSizeForMode(const yoga::Node *node, Direction direction, FlexDirection axis, float ownerAxisSize, float ownerWidth, SizingMode *mode, float *size)
Definition CalculateLayout.cpp:38
void cleanupContentsNodesRecursively(yoga::Node *const node)
Definition CalculateLayout.cpp:519
Dimension
Definition Dimension.h:18