Skip to main content

FullElementCursorState

Trait FullElementCursorState 

Source
pub trait FullElementCursorState: ElementCursorState {
    // Required method
    fn mouse_button_down(&self, mouse_button: MouseButton) -> bool;
}
Expand description

Extends ElementCursorState with raw mouse button state.

Used by MouseButtonElementManager and scroll element managers to read button presses alongside hover. You can implement this trait on custom app shells; CotisApp provides the primary blanket implementation.

Required Methods§

Source

fn mouse_button_down(&self, mouse_button: MouseButton) -> bool

Returns whether mouse_button is currently held down.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<Renderer: RenderCompatibleWith<Manager> + MouseProvider, Manager: LayoutManagerCompatible<Renderer> + ElementBoundingBox, Pipe> FullElementCursorState for CotisApp<Renderer, Manager, Pipe>

Source§

fn mouse_button_down(&self, mouse_button: MouseButton) -> bool

Implementors§