diff options
author | crupest <crupest@outlook.com> | 2022-02-09 23:00:49 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-02-09 23:00:49 +0800 |
commit | d18b5453d7ffd19667ee8ac125b34ab5328f0dc3 (patch) | |
tree | 10b969c744dd0ef90a183e4ffacddc818b86534e /include/cru/ui/render/FlexLayoutRenderObject.h | |
parent | e18c4fb46d7913f337cc25b9a6e3a25359c3f10a (diff) | |
download | cru-d18b5453d7ffd19667ee8ac125b34ab5328f0dc3.tar.gz cru-d18b5453d7ffd19667ee8ac125b34ab5328f0dc3.tar.bz2 cru-d18b5453d7ffd19667ee8ac125b34ab5328f0dc3.zip |
...
Diffstat (limited to 'include/cru/ui/render/FlexLayoutRenderObject.h')
-rw-r--r-- | include/cru/ui/render/FlexLayoutRenderObject.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/cru/ui/render/FlexLayoutRenderObject.h b/include/cru/ui/render/FlexLayoutRenderObject.h index 164bae39..ff7340cb 100644 --- a/include/cru/ui/render/FlexLayoutRenderObject.h +++ b/include/cru/ui/render/FlexLayoutRenderObject.h @@ -2,6 +2,24 @@ #include "LayoutRenderObject.h" namespace cru::ui::render { + +enum class FlexDirection { + Horizontal, + HorizontalReverse, + Vertical, + VertivalReverse +}; + +using FlexMainAlignment = Alignment; +using FlexCrossAlignment = Alignment; + +struct FlexChildLayoutData { + float expand_factor = 0; + float shrink_factor = 1; + // nullopt stands for looking at parent's setting + std::optional<FlexCrossAlignment> cross_alignment = std::nullopt; +}; + // Measure Logic (v0.1): // Cross axis measure logic is the same as stack layout. // |