Struct nannou::ui::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: [f64; 2]) -> Press
[src]
pub fn relative_to(&self, xy: [f64; 2]) -> 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 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 Debug for Press
[src]
impl Debug for Press
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl From<Press> for Widget
[src]
impl From<Press> for Widget
impl Copy for Press
[src]
impl Copy for Press
impl PartialEq<Press> for Press
[src]
impl PartialEq<Press> for Press