[][src]Trait stdweb::web::event::IMouseEvent

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 offset_x(&self) -> f64 { ... }
fn offset_y(&self) -> f64 { ... }
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).

(JavaScript docs)

Provided methods

fn alt_key(&self) -> bool

Returns whether the Alt key was down when this event was fired.

(JavaScript docs)

fn button(&self) -> MouseButton

Indicates the mouse button that fired this event.

(JavaScript docs)

fn buttons(&self) -> MouseButtonsState

Indicates which mouse buttons were down when this event was fired.

(JavaScript docs)

fn client_x(&self) -> i32

Returns the X position in the application's client area where this event occured.

(JavaScript docs)

fn client_y(&self) -> i32

Returns the Y position in the application's client area where this event occured.

(JavaScript docs)

fn offset_x(&self) -> f64

Returns the X position on the target element where this event occured.

(JavaScript docs)

fn offset_y(&self) -> f64

Returns the Y position on the target element where this event occured.

(JavaScript docs)

fn ctrl_key(&self) -> bool

Indicates whether the Ctrl key was down when this event fired.

(JavaScript docs)

fn get_modifier_state(&self, key: ModifierKey) -> bool

Returns the current state of the specified modifier key.

(JavaScript docs)

fn meta_key(&self) -> bool

Indicates whether the Meta key was down when this event fired.

(JavaScript docs)

fn movement_x(&self) -> i32

Returns the change in X coordinate of the pointer between this event and the previous MouseMove event.

(JavaScript docs)

fn movement_y(&self) -> i32

Returns the change in Y coordinate of the pointer between this event and the previous MouseMove event.

(JavaScript docs)

fn region(&self) -> Option<String>

Returns the ID of the hit region affected by the event.

(JavaScript docs)

fn related_target(&self) -> Option<EventTarget>

Returns the secondary target of this event, if any.

(JavaScript docs)

fn screen_x(&self) -> i32

Returns the X position of the pointer in screen coordinates.

(JavaScript docs)

fn screen_y(&self) -> i32

Returns the Y position of the pointer in screen coordinates.

(JavaScript docs)

fn shift_key(&self) -> bool

Indicates whether the Shift key was down when this event was fired.

(JavaScript docs)

Loading content...

Implementors

impl IMouseEvent for AuxClickEvent[src]

impl IMouseEvent for ClickEvent[src]

impl IMouseEvent for ContextMenuEvent[src]

impl IMouseEvent for DoubleClickEvent[src]

impl IMouseEvent for DragDropEvent[src]

impl IMouseEvent for DragEndEvent[src]

impl IMouseEvent for DragEnterEvent[src]

impl IMouseEvent for DragEvent[src]

impl IMouseEvent for DragExitEvent[src]

impl IMouseEvent for DragLeaveEvent[src]

impl IMouseEvent for DragOverEvent[src]

impl IMouseEvent for DragRelatedEvent[src]

impl IMouseEvent for DragStartEvent[src]

impl IMouseEvent for GotPointerCaptureEvent[src]

impl IMouseEvent for LostPointerCaptureEvent[src]

impl IMouseEvent for MouseDownEvent[src]

impl IMouseEvent for MouseEnterEvent[src]

impl IMouseEvent for MouseLeaveEvent[src]

impl IMouseEvent for MouseMoveEvent[src]

impl IMouseEvent for MouseOutEvent[src]

impl IMouseEvent for MouseOverEvent[src]

impl IMouseEvent for MouseUpEvent[src]

impl IMouseEvent for MouseWheelEvent[src]

impl IMouseEvent for PointerCancelEvent[src]

impl IMouseEvent for PointerDownEvent[src]

impl IMouseEvent for PointerEnterEvent[src]

impl IMouseEvent for PointerLeaveEvent[src]

impl IMouseEvent for PointerMoveEvent[src]

impl IMouseEvent for PointerOutEvent[src]

impl IMouseEvent for PointerOverEvent[src]

impl IMouseEvent for PointerUpEvent[src]

Loading content...