77 std::optional<View::CursorStyle>
poll(
View& root);
81 bool has_pointer_ =
false;
82 bool published_ =
false;
Remembers the pointer position and the style last handed to the platform.
Definition hover_cursor.hpp:38
void set_pointer(Point p)
Record that the pointer is over the surface at p (root coordinates).
Definition hover_cursor.hpp:41
bool has_pointer() const
Definition hover_cursor.hpp:53
std::optional< View::CursorStyle > poll(View &root)
Re-resolve at the remembered pointer position and report a change.
std::optional< View::CursorStyle > poll_resolved(View::CursorStyle style)
Change detection over a style the caller resolved itself.
Point pointer() const
Definition hover_cursor.hpp:54
void clear_pointer()
The pointer left the surface.
Definition hover_cursor.hpp:48
void note_published(View::CursorStyle style)
Record a style the host just pushed to the platform itself, so the next poll does not push the same s...
Definition hover_cursor.hpp:58
View::CursorStyle published() const
The style last pushed to the platform, or default_ before any push.
Definition hover_cursor.hpp:64
CursorStyle
Cursor style hint (CSS cursor property).
Definition view.hpp:2741
@ default_
Definition view.hpp:2742
Hover-cursor tracking for platform window hosts.
Definition fwd.hpp:27
View::CursorStyle hover_cursor_at(View &root, Point p)
The cursor style a pointer at p (root-view coordinates) should show over root: the style of the view ...
@ p
Definition input_events.hpp:40
Definition geometry.hpp:20