diff options
author | crupest <crupest@outlook.com> | 2020-11-10 15:52:15 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-11-10 15:52:15 +0800 |
commit | 2d4a5df468f8bc13fbb657e010c393365ef79bda (patch) | |
tree | 4ee7865663348ede1a961209c980fd614d727859 /include/cru/platform | |
parent | 02ed6999e9db0c20c3f55ab9c695f939aacb110c (diff) | |
download | cru-2d4a5df468f8bc13fbb657e010c393365ef79bda.tar.gz cru-2d4a5df468f8bc13fbb657e010c393365ef79bda.tar.bz2 cru-2d4a5df468f8bc13fbb657e010c393365ef79bda.zip |
...
Diffstat (limited to 'include/cru/platform')
-rw-r--r-- | include/cru/platform/GraphBase.hpp | 6 | ||||
-rw-r--r-- | include/cru/platform/gui/InputMethod.hpp | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/include/cru/platform/GraphBase.hpp b/include/cru/platform/GraphBase.hpp index 6700765e..2b40898e 100644 --- a/include/cru/platform/GraphBase.hpp +++ b/include/cru/platform/GraphBase.hpp @@ -22,6 +22,12 @@ struct Point final { return fmt::format(u"({}, {})", ToUtf16String(x), ToUtf16String(y)); } + constexpr Point& operator+=(const Point& other) { + this->x += other.x; + this->y += other.y; + return *this; + } + float x = 0; float y = 0; }; diff --git a/include/cru/platform/gui/InputMethod.hpp b/include/cru/platform/gui/InputMethod.hpp index 53a8d671..9d090eab 100644 --- a/include/cru/platform/gui/InputMethod.hpp +++ b/include/cru/platform/gui/InputMethod.hpp @@ -37,7 +37,8 @@ struct IInputMethodContext : virtual INativeResource { virtual CompositionText GetCompositionText() = 0; - // Set the candidate window lefttop. Use this method to prepare typing. + // Set the candidate window lefttop. Relative to window lefttop. Use this + // method to prepare typing. virtual void SetCandidateWindowPosition(const Point& point) = 0; // Triggered when user starts composition. |