YGStyle.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /**
  2. * Copyright (c) 2014-present, Facebook, Inc.
  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. #pragma once
  8. #include "YGFloatOptional.h"
  9. #include "Yoga-internal.h"
  10. #include "Yoga.h"
  11. struct YGStyle {
  12. YGDirection direction;
  13. YGFlexDirection flexDirection;
  14. YGJustify justifyContent;
  15. YGAlign alignContent;
  16. YGAlign alignItems;
  17. YGAlign alignSelf;
  18. YGPositionType positionType;
  19. YGWrap flexWrap;
  20. YGOverflow overflow;
  21. YGDisplay display;
  22. YGFloatOptional flex;
  23. YGFloatOptional flexGrow;
  24. YGFloatOptional flexShrink;
  25. YGValue flexBasis;
  26. std::array<YGValue, YGEdgeCount> margin;
  27. std::array<YGValue, YGEdgeCount> position;
  28. std::array<YGValue, YGEdgeCount> padding;
  29. std::array<YGValue, YGEdgeCount> border;
  30. std::array<YGValue, 2> dimensions;
  31. std::array<YGValue, 2> minDimensions;
  32. std::array<YGValue, 2> maxDimensions;
  33. YGFloatOptional aspectRatio;
  34. YGStyle();
  35. // Yoga specific properties, not compatible with flexbox specification
  36. bool operator==(const YGStyle& style);
  37. bool operator!=(YGStyle style);
  38. ~YGStyle();
  39. };