mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Changelog: [Internal] Include FlexLayout C++ source to ReactCommons Reviewed By: d16r, NickGerleman Differential Revision: D38716145 fbshipit-source-id: 0ca2ab040e72168f2f1b479609b6cda2787eba66
41 lines
1.1 KiB
C++
41 lines
1.1 KiB
C++
/*
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <vector>
|
|
#include "FlexItemStyle.h"
|
|
#include "FlexLayoutMacros.h"
|
|
#include "FlexboxAlgorithm.h"
|
|
#include "LayoutOutput.h"
|
|
#include "Type.h"
|
|
|
|
namespace facebook {
|
|
namespace flexlayout {
|
|
namespace core {
|
|
|
|
using namespace facebook::flexlayout::style;
|
|
using namespace facebook::flexlayout::layoutoutput;
|
|
|
|
template <typename MeasureData, typename Result>
|
|
FLEX_LAYOUT_EXPORT auto calculateLayout(
|
|
const FlexBoxStyle& parent,
|
|
const std::vector<FlexItemStyle<MeasureData, Result>>& children,
|
|
const Float minWidth,
|
|
const Float maxWidth,
|
|
const Float minHeight,
|
|
const Float maxHeight,
|
|
const Float ownerWidth) -> LayoutOutput<Result> {
|
|
return algo::calculateLayoutInternal(
|
|
parent, children, minWidth, maxWidth, minHeight, maxHeight, ownerWidth);
|
|
}
|
|
|
|
} // namespace core
|
|
} // namespace flexlayout
|
|
} // namespace facebook
|