diff options
author | 杨宇千 <crupest@outlook.com> | 2018-11-10 22:39:26 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-10 22:39:26 +0800 |
commit | 8b04c0dd788be75c2dd7d8f58aebc7d6bf6752df (patch) | |
tree | 2d00b4f6a7af93a13d271d78e6ef682c335c91c7 /src/ui/layout_base.hpp | |
parent | 7c2fb4578b6997b5ab0d98121cda253f734139c1 (diff) | |
parent | b2eced8d9719eb00796c2674fc2c23ab0c9bbdbf (diff) | |
download | cru-8b04c0dd788be75c2dd7d8f58aebc7d6bf6752df.tar.gz cru-8b04c0dd788be75c2dd7d8f58aebc7d6bf6752df.tar.bz2 cru-8b04c0dd788be75c2dd7d8f58aebc7d6bf6752df.zip |
Merge pull request #11 from crupest/listitem
Add ListItem.
Diffstat (limited to 'src/ui/layout_base.hpp')
-rw-r--r-- | src/ui/layout_base.hpp | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/src/ui/layout_base.hpp b/src/ui/layout_base.hpp index 512301b7..7ae6f65c 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) @@ -171,13 +132,6 @@ namespace cru::ui //Refresh position cache of the control and its descendants immediately. static void RefreshControlPositionCache(Control* control); - - //*************** region: layout *************** - - void InvalidateWindowLayout(Window* window); - - void RefreshInvalidWindowLayout(); - private: static void RefreshControlPositionCacheInternal(Control* control, const Point& parent_lefttop_absolute); |