Skip to main content

Module mouse

Module mouse 

Source
Expand description

Mouse hover hit-testing and click edge detection.

This module provides traits for querying whether the cursor is over a layout element, strategies for turning raw button state into click signals, and per-element managers that combine hover with a MouseButton.

Raw mouse state comes from cotis_utils::interactivity::mouse::MouseProvider; layout bounds come from cotis_utils::element_state::ElementBoundingBox.

Structs§

MouseButtonElementManager
Per-element click manager that combines hover and a mouse button.
MouseButtonManager
Tracks click signals for a single mouse button with a configurable strategy.

Enums§

MouseClickingStrategy
Determines when MouseButtonManager::is_clicked returns true.

Traits§

ElementCursorState
Query whether the cursor is over a layout element.
FullElementCursorState
Extends ElementCursorState with raw mouse button state.

Functions§

cursor_in_rect_with_margins
Hit test cursor against x, y, width, height after expanding or shrinking the rect per side.