pub trait IMouseEvent: IUiEvent {
Show 17 methods
// Provided methods
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 { ... }
}
Expand description
The IMouseEvent
interface represents events that occur due to the user
interacting with a pointing device (such as a mouse).
Provided Methods§
Indicates the mouse button that fired this event.
Indicates which mouse buttons were down when this event was fired.
Sourcefn client_x(&self) -> i32
fn client_x(&self) -> i32
Returns the X position in the application’s client area where this event occured.
Sourcefn client_y(&self) -> i32
fn client_y(&self) -> i32
Returns the Y position in the application’s client area where this event occured.
Sourcefn offset_x(&self) -> f64
fn offset_x(&self) -> f64
Returns the X position on the target element where this event occured.
Sourcefn offset_y(&self) -> f64
fn offset_y(&self) -> f64
Returns the Y position on the target element where this event occured.
Sourcefn get_modifier_state(&self, key: ModifierKey) -> bool
fn get_modifier_state(&self, key: ModifierKey) -> bool
Returns the current state of the specified modifier key.
Sourcefn movement_x(&self) -> i32
fn movement_x(&self) -> i32
Returns the change in X coordinate of the pointer between this event and the previous MouseMove event.
Sourcefn movement_y(&self) -> i32
fn movement_y(&self) -> i32
Returns the change in Y coordinate of the pointer between this event and the previous MouseMove event.
Returns the secondary target of this event, if any.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.