YogaIntegration namespace
Integration with Yoga Layout.
Implements a layouter for the Ui library using Yoga Layout.
This library depends on the Yoga Layout library and is built if MAGNUM_WITH_YOGAINTEGRATION is enabled when building Magnum Integration. To use this library with CMake, request the Yoga component of the MagnumIntegration package and link to the MagnumIntegration::Yoga target:
find_package(MagnumIntegration REQUIRED Yoga) # ... target_link_libraries(your-app PRIVATE MagnumIntegration::Yoga)
Additionally, if you're using Magnum as a CMake subproject, bundle the magnum-integration repository and do the following before calling find_package(). Using Yoga Layout itself as a CMake subproject isn't tested at the moment, so you need to provide it as a system dependency and point CMAKE_PREFIX_PATH to its installation dir if necessary.
set(MAGNUM_WITH_YOGAINTEGRATION ON CACHE BOOL "" FORCE) add_subdirectory(magnum-integration EXCLUDE_FROM_ALL)
See Downloading and building integration libraries and Integration library usage with CMake for more information.
Classes
- class Layouter new in Git master
- Yoga layouter.
Enums
- enum class Flag: UnsignedShort { PercentageNodeOffsetX = 1 << 0, PercentageNodeOffsetY = 1 << 1, PercentageNodeOffset = PercentageNodeOffsetX|PercentageNodeOffsetY, NodeOffsetFromRight = 1 << 2, NodeOffsetFromBottom = 1 << 3, NodeOffsetFromRightBottom = NodeOffsetFromRight|NodeOffsetFromBottom, IgnoreNodeOffsetX = PercentageNodeOffsetX|NodeOffsetFromRight|(1 << 4), IgnoreNodeOffsetY = PercentageNodeOffsetY|NodeOffsetFromBottom|(1 << 5), IgnoreNodeOffset = IgnoreNodeOffsetX|IgnoreNodeOffsetY, PercentageNodeSizeX = 1 << 6, PercentageNodeSizeY = 1 << 7, PercentageNodeSize = PercentageNodeSizeX|PercentageNodeSizeY, IgnoreNodeSizeX = PercentageNodeSizeX|(1 << 8), IgnoreNodeSizeY = PercentageNodeSizeY|(1 << 9), IgnoreNodeSize = IgnoreNodeSizeX|IgnoreNodeSizeY } new in Git master
- Layout flag.
- enum class FlexDirection: UnsignedInt { Column = 0, ColumnReverse = 1, Row = 2, RowReverse = 3 } new in Git master
- Layout flex direction.
- enum class NodeOffsetType: UnsignedInt { Relative = 1, Absolute = 2 } new in Git master
- Layout node offset type.
Typedefs
-
using Flags = Containers::
EnumSet<Flag> new in Git master - Layout flags.
Functions
- auto operator<<(Debug& debug, Flag value) -> Debug& new in Git master
- Debug output operator.
- auto operator<<(Debug& debug, Flags value) -> Debug& new in Git master
- Debug output operator.
- auto operator<<(Debug& debug, FlexDirection value) -> Debug& new in Git master
- Debug output operator.
- auto operator<<(Debug& debug, NodeOffsetType value) -> Debug& new in Git master
- Debug output operator.
Enum documentation
enum class Magnum:: YogaIntegration:: Flag: UnsignedShort new in Git master
#include <Magnum/YogaIntegration/Layouter.h>
Layout flag.
| Enumerators | |
|---|---|
| PercentageNodeOffsetX |
Interpret X node offset coming from Ui:: |
| PercentageNodeOffsetY |
Interpret Y node offset coming from Ui:: |
| PercentageNodeOffset |
Interpret X and Y node offset coming from Ui:: |
| NodeOffsetFromRight |
Interpret X node offset coming from Ui:: |
| NodeOffsetFromBottom |
Interpret Y node offset coming from Ui:: |
| NodeOffsetFromRightBottom |
Interpret X and Y node offset coming from Ui:: |
| IgnoreNodeOffsetX |
Ignore X node offset coming from Ui:: |
| IgnoreNodeOffsetY |
Ignore Y node offset coming from Ui:: |
| IgnoreNodeOffset |
Ignore X and Y node offset coming from Ui:: |
| PercentageNodeSizeX |
Interpret X node size coming from Ui:: |
| PercentageNodeSizeY |
Interpret Y node size coming from Ui:: |
| PercentageNodeSize |
Interpret X and Y node size coming from Ui:: |
| IgnoreNodeSizeX |
Ignore X node size coming from Ui:: |
| IgnoreNodeSizeY |
Ignore Y node size coming from Ui:: |
| IgnoreNodeSize |
Ignore X and Y node size coming from Ui:: |
enum class Magnum:: YogaIntegration:: FlexDirection: UnsignedInt new in Git master
#include <Magnum/YogaIntegration/Layouter.h>
Layout flex direction.
Corresponds to the CSS flex-direction property, see the linked documentation for detailed explanation.
| Enumerators | |
|---|---|
| Column |
Orders child nodes in a column. Matches behavior of |
| ColumnReverse |
Orders child nodes in a column, in reverse order. Matches behavior of |
| Row |
Orders child nodes in a row. Matches behavior of |
| RowReverse |
Orders child nodes in a row, in reverse order. Matches behavior of |
enum class Magnum:: YogaIntegration:: NodeOffsetType: UnsignedInt new in Git master
#include <Magnum/YogaIntegration/Layouter.h>
Layout node offset type.
Corresponds to the CSS position property, see the linked documentation for detailed explanation.
| Enumerators | |
|---|---|
| Relative |
The offset is applied as relative to the result of given node layout calculation and doesn't affect layout of other nodes. Matches behavior of |
| Absolute |
The node is excluded from layout calculation and the offset is applied relatively to the parent node offset and size. Matches behavior of |
Typedef documentation
typedef Containers:: EnumSet<Flag> Magnum:: YogaIntegration:: Flags new in Git master
#include <Magnum/YogaIntegration/Layouter.h>
Layout flags.
Function documentation
Debug& Magnum:: YogaIntegration:: operator<<(Debug& debug,
Flag value) new in Git master
#include <Magnum/YogaIntegration/Layouter.h>
Debug output operator.
Debug& Magnum:: YogaIntegration:: operator<<(Debug& debug,
Flags value) new in Git master
#include <Magnum/YogaIntegration/Layouter.h>
Debug output operator.
Debug& Magnum:: YogaIntegration:: operator<<(Debug& debug,
FlexDirection value) new in Git master
#include <Magnum/YogaIntegration/Layouter.h>
Debug output operator.
Debug& Magnum:: YogaIntegration:: operator<<(Debug& debug,
NodeOffsetType value) new in Git master
#include <Magnum/YogaIntegration/Layouter.h>
Debug output operator.