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]

Selects only the mouse pressed event

pub fn released(
    self,
    b: MouseButton
) -> Stream<'a, (Point<f64, U2>, MouseButton)>
[src]

Selects only the mouse released event

pub fn pressed_with_mods(
    self,
    b: MouseButton,
    mods: KeyModifiers
) -> Stream<'a, (Point<f64, U2>, MouseButton, KeyModifiers)>
[src]

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]

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]

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]

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]

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]

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

Loading content...

Implementors

impl<'a, S> MouseEvents<'a> for S where
    S: StreamExt<'a, MouseEvent>, 
[src]

Loading content...