aboutsummaryrefslogtreecommitdiff
path: root/src/ui/ui_base.hpp
diff options
context:
space:
mode:
author杨宇千 <crupest@outlook.com>2018-11-27 21:12:10 +0800
committerGitHub <noreply@github.com>2018-11-27 21:12:10 +0800
commitee22597122612cd75fe62f5d808cb51478373fad (patch)
tree19b39da16f155451d5817e82e045d69d7410acbe /src/ui/ui_base.hpp
parent30333294fcd5917a9f3572f0c4c6dfc2ec429a3c (diff)
parent5b770e3bf0f3f9e22454d9e092630b22f5916ebe (diff)
downloadcru-ee22597122612cd75fe62f5d808cb51478373fad.tar.gz
cru-ee22597122612cd75fe62f5d808cb51478373fad.tar.bz2
cru-ee22597122612cd75fe62f5d808cb51478373fad.zip
Merge pull request #26 from crupest/3-scrollview
Develop scrollview.
Diffstat (limited to 'src/ui/ui_base.hpp')
-rw-r--r--src/ui/ui_base.hpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/ui/ui_base.hpp b/src/ui/ui_base.hpp
index d9c9d0b2..b898b2ed 100644
--- a/src/ui/ui_base.hpp
+++ b/src/ui/ui_base.hpp
@@ -1,5 +1,8 @@
#pragma once
+// ReSharper disable once CppUnusedIncludeDirective
+#include "pre.hpp"
+
#include <optional>
@@ -150,6 +153,16 @@ namespace cru::ui
return Point(left + width, top + height);
}
+ constexpr Point GetLeftBottom() const
+ {
+ return Point(left, top + height);
+ }
+
+ constexpr Point GetRightTop() const
+ {
+ return Point(left + width, top);
+ }
+
constexpr Size GetSize() const
{
return Size(width, height);