Skip to main content

Module cursor

Module cursor 

Source
Expand description

Cursor icon type and global cursor state.

Widgets call set_cursor_icon in their on_event handler when hovered. The platform harness calls current_cursor_icon after each mouse-move dispatch and applies it to the OS window or browser canvas.

The framework resets the cursor to CursorIcon::Default before each mouse-move dispatch so the deepest hovered widget always wins without any explicit reset in widget code.

Enums§

CursorIcon
Logical cursor shape — mirrors egui’s CursorIcon for portability.

Functions§

current_cursor_icon
Read the cursor icon set by widgets during the current frame.
reset_cursor_icon
Reset to CursorIcon::Default.
set_cursor_icon
Set the cursor icon for this frame.