2018-07-19 09:51:23 -07:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2014-present, Facebook, Inc.
|
|
|
|
*
|
|
|
|
* This source code is licensed under the MIT license found in the LICENSE
|
|
|
|
* file in the root directory of this source tree.
|
2018-02-20 05:41:48 -08:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
#pragma once
|
2018-03-15 12:29:02 -07:00
|
|
|
#include "YGFloatOptional.h"
|
2018-02-20 05:41:48 -08:00
|
|
|
#include "Yoga-internal.h"
|
|
|
|
#include "Yoga.h"
|
|
|
|
|
|
|
|
struct YGStyle {
|
|
|
|
YGDirection direction;
|
|
|
|
YGFlexDirection flexDirection;
|
|
|
|
YGJustify justifyContent;
|
|
|
|
YGAlign alignContent;
|
|
|
|
YGAlign alignItems;
|
|
|
|
YGAlign alignSelf;
|
|
|
|
YGPositionType positionType;
|
|
|
|
YGWrap flexWrap;
|
|
|
|
YGOverflow overflow;
|
|
|
|
YGDisplay display;
|
2018-03-14 04:17:09 -07:00
|
|
|
YGFloatOptional flex;
|
2018-03-14 04:17:11 -07:00
|
|
|
YGFloatOptional flexGrow;
|
2018-03-14 04:17:16 -07:00
|
|
|
YGFloatOptional flexShrink;
|
2018-02-20 05:41:48 -08:00
|
|
|
YGValue flexBasis;
|
|
|
|
std::array<YGValue, YGEdgeCount> margin;
|
|
|
|
std::array<YGValue, YGEdgeCount> position;
|
|
|
|
std::array<YGValue, YGEdgeCount> padding;
|
|
|
|
std::array<YGValue, YGEdgeCount> border;
|
|
|
|
std::array<YGValue, 2> dimensions;
|
|
|
|
std::array<YGValue, 2> minDimensions;
|
|
|
|
std::array<YGValue, 2> maxDimensions;
|
2018-07-19 09:51:25 -07:00
|
|
|
// Yoga specific properties, not compatible with flexbox specification
|
2018-04-03 14:56:29 -07:00
|
|
|
YGFloatOptional aspectRatio;
|
2018-02-20 05:41:48 -08:00
|
|
|
|
|
|
|
YGStyle();
|
|
|
|
bool operator==(const YGStyle& style);
|
|
|
|
|
2018-07-19 09:51:25 -07:00
|
|
|
bool operator!=(YGStyle style) {
|
|
|
|
return !(*this == style);
|
|
|
|
}
|
|
|
|
~YGStyle() = default;
|
2018-02-20 05:41:48 -08:00
|
|
|
};
|