pub struct BasicMouse {
pub down: Signal1<MouseEvent>,
pub move_: Signal1<MouseEvent>,
pub up: Signal1<MouseEvent>,
pub scroll: Signal1<f32>,
/* private fields */
}
Fields
down: Signal1<MouseEvent>
move_: Signal1<MouseEvent>
up: Signal1<MouseEvent>
scroll: Signal1<f32>
Implementations
sourceimpl BasicMouse
impl BasicMouse
pub fn new(pointer: BasicPointer) -> Self
pub fn set_cursor(&mut self, cursor: MouseCursor)
pub fn submit_down(&mut self, view_x: f32, view_y: f32, button_code: u32)
pub fn submit_move(&mut self, view_x: f32, view_y: f32)
pub fn submit_up(&mut self, view_x: f32, view_y: f32, button_code: u32)
pub fn submit_scroll(&mut self, view_x: f32, view_y: f32, velocity: f32) -> bool
Trait Implementations
sourceimpl MouseSystem for BasicMouse
impl MouseSystem for BasicMouse
sourcefn down_signal(&self) -> &Signal1<MouseEvent>
fn down_signal(&self) -> &Signal1<MouseEvent>
Emitted when a mouse button is pressed down.
sourcefn move_signal(&self) -> &Signal1<MouseEvent>
fn move_signal(&self) -> &Signal1<MouseEvent>
Emitted when the mouse cursor is moved while over the stage.
sourcefn scroll_signal(&self) -> &Signal1<f32>
fn scroll_signal(&self) -> &Signal1<f32>
A velocity emitted when the mouse wheel or trackpad is scrolled. A positive value is an upward scroll, negative is a downward scroll. Typically, each scroll wheel “click” equates to 1 velocity. Read more
sourcefn up_signal(&self) -> &Signal1<MouseEvent>
fn up_signal(&self) -> &Signal1<MouseEvent>
Emitted when a mouse button is released.
sourcefn is_supported(&self) -> bool
fn is_supported(&self) -> bool
True if the environment has a mouse.
sourcefn cursor(&self) -> MouseCursor
fn cursor(&self) -> MouseCursor
The style of the mouse cursor.
sourcefn is_down(&self, button: MouseButton) -> bool
fn is_down(&self, button: MouseButton) -> bool
@returns True if the given button is currently being held down.
Auto Trait Implementations
impl !RefUnwindSafe for BasicMouse
impl !Send for BasicMouse
impl !Sync for BasicMouse
impl Unpin for BasicMouse
impl !UnwindSafe for BasicMouse
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
sourcefn into_color(self) -> To
fn into_color(self) -> To
Convert into color
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> SetParameter for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
Sets value
as a parameter of self
.