diff options
author | crupest <crupest@outlook.com> | 2018-11-10 21:53:33 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2018-11-10 21:53:33 +0800 |
commit | e5513daa53cb958b0c83d575c440f40aaf40f562 (patch) | |
tree | c6782f0cbfe4eca466f13ef571338e6b55342860 /src/ui/layout_base.hpp | |
parent | cfcd03f564e82419345a7a6900fdc17c5b8c2631 (diff) | |
download | cru-e5513daa53cb958b0c83d575c440f40aaf40f562.tar.gz cru-e5513daa53cb958b0c83d575c440f40aaf40f562.tar.bz2 cru-e5513daa53cb958b0c83d575c440f40aaf40f562.zip |
...
Diffstat (limited to 'src/ui/layout_base.hpp')
-rw-r--r-- | src/ui/layout_base.hpp | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/src/ui/layout_base.hpp b/src/ui/layout_base.hpp index 512301b7..d8e4e2d1 100644 --- a/src/ui/layout_base.hpp +++ b/src/ui/layout_base.hpp @@ -33,45 +33,6 @@ namespace cru::ui Margin // including content, padding, border and margin }; - struct Thickness - { - constexpr static Thickness Zero() - { - return Thickness(0); - } - - constexpr Thickness() : Thickness(0) { } - - constexpr explicit Thickness(const float width) - : left(width), top(width), right(width), bottom(width) { } - - constexpr explicit Thickness(const float horizontal, const float vertical) - : left(horizontal), top(vertical), right(horizontal), bottom(vertical) { } - - constexpr Thickness(const float left, const float top, const float right, const float bottom) - : left(left), top(top), right(right), bottom(bottom) { } - - float GetHorizontalTotal() const - { - return left + right; - } - - float GetVerticalTotal() const - { - return top + bottom; - } - - float Validate() const - { - return left >= 0.0 && top >= 0.0 && right >= 0.0 && bottom >= 0.0; - } - - float left; - float top; - float right; - float bottom; - }; - struct LayoutSideParams final { constexpr static LayoutSideParams Exactly(const float length, const Alignment alignment = Alignment::Center) |