Struct conrod::input::state::mouse::ButtonMap
[−]
[src]
pub struct ButtonMap { /* fields omitted */ }
Stores the state of all mouse buttons.
If the mouse button is down, it stores the position of the mouse when the button was pressed
Methods
impl ButtonMap
[src]
fn new() -> Self
Returns a new button map with all states set to None
fn relative_to(self, xy: Point) -> Self
Returns a copy of the ButtonMap relative to the given Point
fn left(&self) -> &ButtonPosition
The state of the left mouse button.
fn middle(&self) -> &ButtonPosition
The state of the middle mouse button.
fn right(&self) -> &ButtonPosition
The state of the right mouse button.
fn press(&mut self, button: Button, xy: Point, widget: Option<Id>)
Sets the Button
in the Down
position.
fn release(&mut self, button: Button)
Set's the Button
in the Up
position.
fn pressed(&self) -> PressedButtons
An iterator yielding all pressed mouse buttons along with the location at which they were originally pressed.
Trait Implementations
impl Copy for ButtonMap
[src]
impl Clone for ButtonMap
[src]
fn clone(&self) -> ButtonMap
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Debug for ButtonMap
[src]
impl PartialEq for ButtonMap
[src]
fn eq(&self, __arg_0: &ButtonMap) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ButtonMap) -> bool
This method tests for !=
.
impl Index<Button> for ButtonMap
[src]
type Output = ButtonPosition
The returned type after indexing
fn index(&self, button: Button) -> &Self::Output
The method for the indexing (container[index]
) operation