Struct conrod::event::Press [−][src]
pub struct Press { pub button: Button, pub modifiers: ModifierKey, }
Contains all relevant information for a Press event.
Fields
The Button
that was pressed.
modifiers: ModifierKey
The modifier keys that were down at the time.
Methods
impl Press
[src]
impl Press
pub fn relative_to(&self, xy: Point) -> Press
[src]
pub fn relative_to(&self, xy: Point) -> Press
Returns a copy of the Press relative to the given xy
pub fn mouse(self) -> Option<MousePress>
[src]
pub fn mouse(self) -> Option<MousePress>
If the Press
event represents the pressing of a mouse button, return Some
.
pub fn key(self) -> Option<KeyPress>
[src]
pub fn key(self) -> Option<KeyPress>
If the Press
event represents the pressing of keyboard button, return Some
.
Trait Implementations
impl Copy for Press
[src]
impl Copy for Press
impl Clone for Press
[src]
impl Clone for Press
fn clone(&self) -> Press
[src]
fn clone(&self) -> Press
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl PartialEq for Press
[src]
impl PartialEq for Press
fn eq(&self, other: &Press) -> bool
[src]
fn eq(&self, other: &Press) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Press) -> bool
[src]
fn ne(&self, other: &Press) -> bool
This method tests for !=
.
impl Debug for Press
[src]
impl Debug for Press
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl From<Press> for Widget
[src]
impl From<Press> for Widget