Trait rin_window::events::MouseEvents[][src]

pub trait MouseEvents<'a> {
    fn pressed(self, b: MouseButton) -> Stream<'a, (Pnt2<f64>, MouseButton)>;
fn released(self, b: MouseButton) -> Stream<'a, (Pnt2<f64>, MouseButton)>;
fn pressed_with_mods(
        self,
        b: MouseButton,
        mods: KeyModifiers
    ) -> Stream<'a, (Pnt2<f64>, MouseButton, KeyModifiers)>;
fn released_with_mods(
        self,
        b: MouseButton,
        mods: KeyModifiers
    ) -> Stream<'a, (Pnt2<f64>, MouseButton, KeyModifiers)>;
fn pressed_and_mods(
        self,
        b: MouseButton
    ) -> Stream<'a, (Pnt2<f64>, MouseButton, KeyModifiers)>;
fn released_and_mods(
        self,
        b: MouseButton
    ) -> Stream<'a, (Pnt2<f64>, MouseButton, KeyModifiers)>;
fn moved(self) -> Stream<'a, Pnt2<f64>>;
fn scrolled(self) -> Stream<'a, Vec2<f64>>;
fn is_pressed(self, b: MouseButton) -> Stream<'a, bool>;
fn with_viewport(
        self,
        viewport: Property<'a, Rect<i32>>
    ) -> Stream<'a, MouseEvent>; }

Required methods

fn pressed(self, b: MouseButton) -> Stream<'a, (Pnt2<f64>, MouseButton)>[src]

Selects only the mouse pressed event

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

Selects only the mouse released event

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

Selects only the mouse pressed event with the passed mods

fn released_with_mods(
    self,
    b: MouseButton,
    mods: KeyModifiers
) -> Stream<'a, (Pnt2<f64>, MouseButton, KeyModifiers)>
[src]

Selects only the mouse released event with the passed mods

fn pressed_and_mods(
    self,
    b: MouseButton
) -> Stream<'a, (Pnt2<f64>, MouseButton, KeyModifiers)>
[src]

Selects only the mouse pressed event with the passed mods

fn released_and_mods(
    self,
    b: MouseButton
) -> Stream<'a, (Pnt2<f64>, MouseButton, KeyModifiers)>
[src]

Selects only the mouse released event with the passed mods

fn moved(self) -> Stream<'a, Pnt2<f64>>[src]

Selects only the mouse moved event

fn scrolled(self) -> Stream<'a, Vec2<f64>>[src]

Selects only the mouse scrolled event

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

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: StreamExt<'a, MouseEvent>> MouseEvents<'a> for S[src]

Loading content...