Lightweight struct to hold parsed sizes safely away from VexUI dependencies. More...
#include <Layout.hpp>
Public Member Functions | |
| float | resolve (float parent) const |
| Resolve the flex value to pixels based on parent dimension. | |
| float | resolveOr (float parent, float fallback) const |
| Resolve the flex value to pixels, with a fallback if unspecified. | |
Public Attributes | |
| float | v = NAN |
| Raw value. | |
| bool | isPercent = false |
| Whether value is a percentage. | |
Lightweight struct to hold parsed sizes safely away from VexUI dependencies.
Definition at line 18 of file Layout.hpp.
|
inline |
Resolve the flex value to pixels based on parent dimension.
| parent | Parent dimension in pixels. |
Definition at line 25 of file Layout.hpp.
|
inline |
Resolve the flex value to pixels, with a fallback if unspecified.
| parent | Parent dimension in pixels. |
| fallback | Value to return if resolution results in NAN. |
Definition at line 34 of file Layout.hpp.
| bool vex::FlexValue::isPercent = false |
Whether value is a percentage.
Definition at line 20 of file Layout.hpp.
| float vex::FlexValue::v = NAN |
Raw value.
Definition at line 19 of file Layout.hpp.