Enum conrod::input::state::mouse::ButtonPosition
[−]
[src]
pub enum ButtonPosition {
Up,
Down(Point, Option<Id>),
}Whether the button is up or down.
Variants
UpThe button is up (i.e. pressed).
Down(Point, Option<Id>)The button is down and was originally pressed down at the given Point over the widget
at the given widget::Id.
Methods
impl ButtonPosition[src]
pub fn relative_to(self, xy: Point) -> Self[src]
If the mouse button is down, return a new one with position relative to the given xy.
pub fn is_down(&self) -> bool[src]
Is the ButtonPosition down.
pub fn is_up(&self) -> bool[src]
Is the ButtonPosition up.
pub fn if_down(&self) -> Option<(Point, Option<Id>)>[src]
Returns the position at which the button was pressed along with the widget that was
under the mouse at the time of pressing if the position is Down.
pub fn xy_if_down(&self) -> Option<Point>[src]
Returns the position at which the button was pressed if it's down.
Trait Implementations
impl Copy for ButtonPosition[src]
impl Clone for ButtonPosition[src]
fn clone(&self) -> ButtonPosition[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl Debug for ButtonPosition[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl PartialEq for ButtonPosition[src]
fn eq(&self, __arg_0: &ButtonPosition) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &ButtonPosition) -> bool[src]
This method tests for !=.