Trait stdweb::traits::IMouseEvent
[−]
[src]
pub trait IMouseEvent: IUiEvent { fn alt_key(&self) -> bool { ... } fn button(&self) -> MouseButton { ... } fn buttons(&self) -> MouseButtonsState { ... } fn client_x(&self) -> i32 { ... } fn client_y(&self) -> i32 { ... } fn ctrl_key(&self) -> bool { ... } fn get_modifier_state(&self, key: ModifierKey) -> bool { ... } fn meta_key(&self) -> bool { ... } fn movement_x(&self) -> i32 { ... } fn movement_y(&self) -> i32 { ... } fn region(&self) -> Option<String> { ... } fn related_target(&self) -> Option<EventTarget> { ... } fn screen_x(&self) -> i32 { ... } fn screen_y(&self) -> i32 { ... } fn shift_key(&self) -> bool { ... } }
The IMouseEvent
interface represents events that occur due to the user
interacting with a pointing device (such as a mouse).
Provided Methods
fn alt_key(&self) -> bool
Returns whether the Alt key was down when this event was fired.
Indicates the mouse button that fired this event.
Indicates which mouse buttons were down when this event was fired.
fn client_x(&self) -> i32
Returns the X position in the application's client area where this event occured.
fn client_y(&self) -> i32
Returns the Y position in the application's client area where this event occured.
fn ctrl_key(&self) -> bool
Indicates whether the Ctrl key was down when this event fired.
fn get_modifier_state(&self, key: ModifierKey) -> bool
Returns the current state of the specified modifier key.
fn meta_key(&self) -> bool
Indicates whether the Meta key was down when this event fired.
fn movement_x(&self) -> i32
Returns the change in X coordinate of the pointer between this event and the previous MouseMove event.
fn movement_y(&self) -> i32
Returns the change in Y coordinate of the pointer between this event and the previous MouseMove event.
fn region(&self) -> Option<String>
Returns the ID of the hit region affected by the event.
Returns the secondary target of this event, if any.
fn screen_x(&self) -> i32
Returns the X position of the pointer in screen coordinates.
fn screen_y(&self) -> i32
Returns the Y position of the pointer in screen coordinates.
fn shift_key(&self) -> bool
Indicates whether the Shift key was down when this event was fired.
Implementors
impl IMouseEvent for ClickEvent
impl IMouseEvent for DoubleClickEvent
impl IMouseEvent for MouseDownEvent
impl IMouseEvent for MouseUpEvent
impl IMouseEvent for MouseMoveEvent