diff options
author | crupest <crupest@outlook.com> | 2021-05-12 08:36:43 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-05-12 08:36:43 +0800 |
commit | 02baef645090f0514fa14b43aecf954fd55257dc (patch) | |
tree | 3d26669c5781238fb4737c9b315ad534b7c0a3e0 /include | |
parent | f54032b94817bc5a03be68d39758e9b3d67a1b59 (diff) | |
download | cru-02baef645090f0514fa14b43aecf954fd55257dc.tar.gz cru-02baef645090f0514fa14b43aecf954fd55257dc.tar.bz2 cru-02baef645090f0514fa14b43aecf954fd55257dc.zip |
...
Diffstat (limited to 'include')
-rw-r--r-- | include/cru/ui/host/WindowHost.hpp | 6 | ||||
-rw-r--r-- | include/cru/ui/render/ScrollBar.hpp | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/include/cru/ui/host/WindowHost.hpp b/include/cru/ui/host/WindowHost.hpp index bd2f7c16..cd9093bc 100644 --- a/include/cru/ui/host/WindowHost.hpp +++ b/include/cru/ui/host/WindowHost.hpp @@ -3,6 +3,7 @@ #include "../render/Base.hpp" #include "cru/common/Event.hpp" +#include "cru/platform/gui/Cursor.hpp" #include "cru/platform/gui/UiApplication.hpp" #include "cru/platform/gui/Window.hpp" @@ -118,6 +119,9 @@ class WindowHost : public Object { void SetWindowRect(const Rect& rect); + std::shared_ptr<platform::gui::ICursor> GetOverrideCursor(); + void SetOverrideCursor(std::shared_ptr<platform::gui::ICursor> cursor); + private: //*************** region: native messages *************** void OnNativeDestroy(platform::gui::INativeWindow* window, std::nullptr_t); @@ -172,5 +176,7 @@ class WindowHost : public Object { Event<platform::gui::INativeWindow*> native_window_change_event_; std::optional<Rect> saved_rect_; + + std::shared_ptr<platform::gui::ICursor> override_cursor_; }; } // namespace cru::ui::host diff --git a/include/cru/ui/render/ScrollBar.hpp b/include/cru/ui/render/ScrollBar.hpp index a271ae71..005cf3bb 100644 --- a/include/cru/ui/render/ScrollBar.hpp +++ b/include/cru/ui/render/ScrollBar.hpp @@ -147,7 +147,7 @@ class ScrollBar : public Object { Event<Scroll> scroll_attempt_event_; - std::optional<std::shared_ptr<platform::gui::ICursor>> old_cursor_; + bool cursor_overrided_ = false; platform::gui::TimerAutoCanceler auto_collapse_timer_canceler_; }; |