Skip to main content

ICustomHitTest

Trait ICustomHitTest 

Source
pub trait ICustomHitTest {
    // Required method
    fn hit_test(&self, point: Point) -> bool;

    // Provided method
    fn hit_test_geometry(&self, _geometry: &Ref<Geometry>) -> IntersectionResult { ... }
}
Expand description

An interface to allow non-templated controls to customize their hit testing when using a renderer with a simple hit-testing algorithm, where just the bounds or geometries are hit-tested.

Required Methods§

Source

fn hit_test(&self, point: Point) -> bool

Whether the control is hit at the specified point, in coordinates relative to the control.

Provided Methods§

Source

fn hit_test_geometry(&self, _geometry: &Ref<Geometry>) -> IntersectionResult

The intersection of the control with a geometry.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§