Trait rin::prelude::MouseEvents [−][src]
pub trait MouseEvents<'a> { pub fn pressed(
self,
b: MouseButton
) -> Stream<'a, (Point<f64, U2>, MouseButton)>; pub fn released(
self,
b: MouseButton
) -> Stream<'a, (Point<f64, U2>, MouseButton)>; pub fn pressed_with_mods(
self,
b: MouseButton,
mods: KeyModifiers
) -> Stream<'a, (Point<f64, U2>, MouseButton, KeyModifiers)>; pub fn released_with_mods(
self,
b: MouseButton,
mods: KeyModifiers
) -> Stream<'a, (Point<f64, U2>, MouseButton, KeyModifiers)>; pub fn pressed_and_mods(
self,
b: MouseButton
) -> Stream<'a, (Point<f64, U2>, MouseButton, KeyModifiers)>; pub fn released_and_mods(
self,
b: MouseButton
) -> Stream<'a, (Point<f64, U2>, MouseButton, KeyModifiers)>; pub fn moved(self) -> Stream<'a, Point<f64, U2>>; pub fn scrolled(
self
) -> Stream<'a, Matrix<f64, U2, U1, <DefaultAllocator as Allocator<f64, U2, U1>>::Buffer>>; pub fn is_pressed(self, b: MouseButton) -> Stream<'a, bool>; pub fn with_viewport(
self,
viewport: Property<'a, Rect<i32>>
) -> Stream<'a, MouseEvent>; }
Required methods
pub fn pressed(
self,
b: MouseButton
) -> Stream<'a, (Point<f64, U2>, MouseButton)>
[src]
self,
b: MouseButton
) -> Stream<'a, (Point<f64, U2>, MouseButton)>
Selects only the mouse pressed event
pub fn released(
self,
b: MouseButton
) -> Stream<'a, (Point<f64, U2>, MouseButton)>
[src]
self,
b: MouseButton
) -> Stream<'a, (Point<f64, U2>, MouseButton)>
Selects only the mouse released event
pub fn pressed_with_mods(
self,
b: MouseButton,
mods: KeyModifiers
) -> Stream<'a, (Point<f64, U2>, MouseButton, KeyModifiers)>
[src]
self,
b: MouseButton,
mods: KeyModifiers
) -> Stream<'a, (Point<f64, U2>, MouseButton, KeyModifiers)>
Selects only the mouse pressed event with the passed mods
pub fn released_with_mods(
self,
b: MouseButton,
mods: KeyModifiers
) -> Stream<'a, (Point<f64, U2>, MouseButton, KeyModifiers)>
[src]
self,
b: MouseButton,
mods: KeyModifiers
) -> Stream<'a, (Point<f64, U2>, MouseButton, KeyModifiers)>
Selects only the mouse released event with the passed mods
pub fn pressed_and_mods(
self,
b: MouseButton
) -> Stream<'a, (Point<f64, U2>, MouseButton, KeyModifiers)>
[src]
self,
b: MouseButton
) -> Stream<'a, (Point<f64, U2>, MouseButton, KeyModifiers)>
Selects only the mouse pressed event with the passed mods
pub fn released_and_mods(
self,
b: MouseButton
) -> Stream<'a, (Point<f64, U2>, MouseButton, KeyModifiers)>
[src]
self,
b: MouseButton
) -> Stream<'a, (Point<f64, U2>, MouseButton, KeyModifiers)>
Selects only the mouse released event with the passed mods
pub fn moved(self) -> Stream<'a, Point<f64, U2>>
[src]
Selects only the mouse moved event
pub fn scrolled(
self
) -> Stream<'a, Matrix<f64, U2, U1, <DefaultAllocator as Allocator<f64, U2, U1>>::Buffer>>
[src]
self
) -> Stream<'a, Matrix<f64, U2, U1, <DefaultAllocator as Allocator<f64, U2, U1>>::Buffer>>
Selects only the mouse scrolled event
pub fn is_pressed(self, b: MouseButton) -> Stream<'a, bool>
[src]
Returns a stream that sends true whenever the mouse is pressed and false whenever is released
pub fn with_viewport(
self,
viewport: Property<'a, Rect<i32>>
) -> Stream<'a, MouseEvent>
[src]
self,
viewport: Property<'a, Rect<i32>>
) -> Stream<'a, MouseEvent>
Transforms the mouse events into a viewport where the abolute position of the mouse will be converted into the viewport so if the mouse is at the origin of the viewport the returned coordinates will be 0,0
Implementors
impl<'a, S> MouseEvents<'a> for S where
S: StreamExt<'a, MouseEvent>,
[src]
impl<'a, S> MouseEvents<'a> for S where
S: StreamExt<'a, MouseEvent>,
[src]pub fn pressed(
self,
b: MouseButton
) -> Stream<'a, (Point<f64, U2>, MouseButton)>
[src]
self,
b: MouseButton
) -> Stream<'a, (Point<f64, U2>, MouseButton)>
pub fn released(
self,
b: MouseButton
) -> Stream<'a, (Point<f64, U2>, MouseButton)>
[src]
self,
b: MouseButton
) -> Stream<'a, (Point<f64, U2>, MouseButton)>
pub fn pressed_with_mods(
self,
b: MouseButton,
keymods: KeyModifiers
) -> Stream<'a, (Point<f64, U2>, MouseButton, KeyModifiers)>
[src]
self,
b: MouseButton,
keymods: KeyModifiers
) -> Stream<'a, (Point<f64, U2>, MouseButton, KeyModifiers)>
pub fn released_with_mods(
self,
b: MouseButton,
keymods: KeyModifiers
) -> Stream<'a, (Point<f64, U2>, MouseButton, KeyModifiers)>
[src]
self,
b: MouseButton,
keymods: KeyModifiers
) -> Stream<'a, (Point<f64, U2>, MouseButton, KeyModifiers)>
pub fn pressed_and_mods(
self,
b: MouseButton
) -> Stream<'a, (Point<f64, U2>, MouseButton, KeyModifiers)>
[src]
self,
b: MouseButton
) -> Stream<'a, (Point<f64, U2>, MouseButton, KeyModifiers)>
pub fn released_and_mods(
self,
b: MouseButton
) -> Stream<'a, (Point<f64, U2>, MouseButton, KeyModifiers)>
[src]
self,
b: MouseButton
) -> Stream<'a, (Point<f64, U2>, MouseButton, KeyModifiers)>
pub fn moved(self) -> Stream<'a, Point<f64, U2>>
[src]
pub fn scrolled(
self
) -> Stream<'a, Matrix<f64, U2, U1, <DefaultAllocator as Allocator<f64, U2, U1>>::Buffer>>
[src]
self
) -> Stream<'a, Matrix<f64, U2, U1, <DefaultAllocator as Allocator<f64, U2, U1>>::Buffer>>
pub fn is_pressed(self, b: MouseButton) -> Stream<'a, bool>
[src]
pub fn with_viewport(
self,
viewport: Property<'a, Rect<i32>>
) -> Stream<'a, MouseEvent>
[src]
self,
viewport: Property<'a, Rect<i32>>
) -> Stream<'a, MouseEvent>