aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/cru/ui/host/WindowHost.hpp6
-rw-r--r--include/cru/ui/render/ScrollBar.hpp2
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_;
};