pub trait FullElementScrollState: FullElementCursorState {
// Required methods
fn get_mouse_pos(&self) -> Vector2;
fn get_mouse_wheel_move_v(&self) -> Vector2;
fn get_bound_box(&self, id: ElementId) -> Option<BoundingBox>;
fn internal_size(&self, id: ElementId) -> Option<Vector2>;
}Expand description
Combines cursor state, wheel input, and layout bounds for element scrolling.
Implementors supply mouse position, wheel delta, bounding box, and internal clip size for scroll clamping.
§Blanket implementation
CotisApp implements this trait when:
Renderer: RenderCompatibleWith<Manager> + MouseProviderManager: LayoutManagerCompatible<Renderer> + ElementBoundingBox + ElementClipInternalSize
Required Methods§
Sourcefn get_mouse_pos(&self) -> Vector2
fn get_mouse_pos(&self) -> Vector2
Current cursor position in pixels.
Sourcefn get_mouse_wheel_move_v(&self) -> Vector2
fn get_mouse_wheel_move_v(&self) -> Vector2
Wheel delta; x is horizontal, y is vertical per MouseProvider.
Sourcefn get_bound_box(&self, id: ElementId) -> Option<BoundingBox>
fn get_bound_box(&self, id: ElementId) -> Option<BoundingBox>
Layout bounding box for the element.
Sourcefn internal_size(&self, id: ElementId) -> Option<Vector2>
fn internal_size(&self, id: ElementId) -> Option<Vector2>
Internal clipped content size for scroll limit calculation.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".