Files
react-native/ReactCommon/flexlayout/flexlayout/FlexLayout.h
T
J.T. YimandFacebook GitHub Bot 4eec47344e Add flexlayout dirSync to react-native-github
Summary:
Changelog:
[Internal] Include FlexLayout C++ source to ReactCommons

Reviewed By: d16r, NickGerleman

Differential Revision: D38716145

fbshipit-source-id: 0ca2ab040e72168f2f1b479609b6cda2787eba66
2022-08-17 09:55:15 -07:00

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