FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    MouseDevice

    struct · ferroui-base · v0.5.0

    struct MouseDevice
    

    Represents a mouse device: turns raw pointer events into routed pointer events on the element under the pointer or capturing it.

    View source

    Members

    new

    fn new() -> Rc<MouseDevice>
    

    Creates a mouse device with a pointer of its own.

    Source

    with_pointer

    fn with_pointer(pointer: Rc<Pointer>) -> Rc<MouseDevice>
    

    Creates a mouse device for an existing pointer.

    Source

    primary

    fn primary() -> Rc<MouseDevice>
    

    The primary mouse device of the current thread, created on first use.

    Source

    reset_primary_for_unit_tests

    fn reset_primary_for_unit_tests()
    

    Forgets the primary mouse device, so that tests start with a fresh one.

    Source

    pointer

    fn pointer(self: &Self) -> &Rc<Pointer>
    

    The pointer of the mouse.

    Source

    dispose

    fn dispose(self: &Self)
    

    Releases the mouse device and its pointer.

    Source

    platform_capture_lost

    fn platform_capture_lost(self: &Self)
    

    Notifies the device that the capture of its pointer was lost in the platform.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.