diff options
author | crupest <crupest@outlook.com> | 2022-02-08 16:53:51 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-02-08 16:53:51 +0800 |
commit | 74bb9cd27242b9320f99ff4d2b50c3051576cc14 (patch) | |
tree | 744bac5799c593d1d6f81e7b09581bea626f2cde /include/cru/ui/events/MouseEventArgs.hpp | |
parent | b90c398de829d1ba5329651d75bae82f5e4085fe (diff) | |
download | cru-74bb9cd27242b9320f99ff4d2b50c3051576cc14.tar.gz cru-74bb9cd27242b9320f99ff4d2b50c3051576cc14.tar.bz2 cru-74bb9cd27242b9320f99ff4d2b50c3051576cc14.zip |
...
Diffstat (limited to 'include/cru/ui/events/MouseEventArgs.hpp')
-rw-r--r-- | include/cru/ui/events/MouseEventArgs.hpp | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/include/cru/ui/events/MouseEventArgs.hpp b/include/cru/ui/events/MouseEventArgs.hpp deleted file mode 100644 index 0adc65b6..00000000 --- a/include/cru/ui/events/MouseEventArgs.hpp +++ /dev/null @@ -1,27 +0,0 @@ -#pragma once -#include "UiEventArgs.hpp" - -#include <optional> - -namespace cru::ui::events { -class CRU_UI_API MouseEventArgs : public UiEventArgs { - public: - MouseEventArgs(Object* sender, Object* original_sender, - const std::optional<Point>& point = std::nullopt) - : UiEventArgs(sender, original_sender), point_(point) {} - MouseEventArgs(const MouseEventArgs& other) = default; - MouseEventArgs(MouseEventArgs&& other) = default; - MouseEventArgs& operator=(const MouseEventArgs& other) = default; - MouseEventArgs& operator=(MouseEventArgs&& other) = default; - ~MouseEventArgs() override = default; - - // This point is relative to window client lefttop. - Point GetPoint() const { return point_.value_or(Point{}); } - Point GetPoint(render::RenderObject* render_target) const; - Point GetPointToContent(render::RenderObject* render_target) const; - Point GetPointOfScreen() const; - - private: - std::optional<Point> point_; -}; -} // namespace cru::ui::events |