pub struct SerializedPointInteraction {}prelude and serialize only.Fields§
§alt_key: boolThe button number that was pressed (if applicable) when the mouse event was fired.
Indicates which buttons are pressed on the mouse (or other input device) when a mouse event is triggered.
Each button that can be pressed is represented by a given number (see below). If more than one button is pressed, the button values are added together to produce a new number. For example, if the secondary (2) and auxiliary (4) buttons are pressed simultaneously, the value is 6 (i.e., 2 + 4).
- 1: Primary button (usually the left button)
- 2: Secondary button (usually the right button)
- 4: Auxiliary button (usually the mouse wheel button or middle button)
- 8: 4th button (typically the “Browser Back” button)
- 16 : 5th button (typically the “Browser Forward” button)
client_x: f64The horizontal coordinate within the application’s viewport at which the event occurred (as opposed to the coordinate within the page).
For example, clicking on the left edge of the viewport will always result in a mouse event with a clientX value of 0, regardless of whether the page is scrolled horizontally.
client_y: f64The vertical coordinate within the application’s viewport at which the event occurred (as opposed to the coordinate within the page).
For example, clicking on the top edge of the viewport will always result in a mouse event with a clientY value of 0, regardless of whether the page is scrolled vertically.
ctrl_key: boolTrue if the control key was down when the mouse event was fired.
meta_key: boolTrue if the meta key was down when the mouse event was fired.
offset_x: f64The offset in the X coordinate of the mouse pointer between that event and the padding edge of the target node.
offset_y: f64The offset in the Y coordinate of the mouse pointer between that event and the padding edge of the target node.
page_x: f64The X (horizontal) coordinate (in pixels) of the mouse, relative to the left edge of the entire document. This includes any portion of the document not currently visible.
Being based on the edge of the document as it is, this property takes into account any horizontal scrolling of the page. For example, if the page is scrolled such that 200 pixels of the left side of the document are scrolled out of view, and the mouse is clicked 100 pixels inward from the left edge of the view, the value returned by pageX will be 300.
page_y: f64The Y (vertical) coordinate in pixels of the event relative to the whole document.
See page_x.
screen_x: f64The X coordinate of the mouse pointer in global (screen) coordinates.
screen_y: f64The Y coordinate of the mouse pointer in global (screen) coordinates.
shift_key: boolTrue if the shift key was down when the mouse event was fired.
Implementations§
Source§impl SerializedPointInteraction
impl SerializedPointInteraction
pub fn new( trigger_button: Option<MouseButton>, held_buttons: EnumSet<MouseButton>, coordinates: Coordinates, modifiers: Modifiers, ) -> SerializedPointInteraction
Trait Implementations§
Source§impl Clone for SerializedPointInteraction
impl Clone for SerializedPointInteraction
Source§fn clone(&self) -> SerializedPointInteraction
fn clone(&self) -> SerializedPointInteraction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SerializedPointInteraction
impl Debug for SerializedPointInteraction
Source§impl Default for SerializedPointInteraction
impl Default for SerializedPointInteraction
Source§fn default() -> SerializedPointInteraction
fn default() -> SerializedPointInteraction
Source§impl<'de> Deserialize<'de> for SerializedPointInteraction
impl<'de> Deserialize<'de> for SerializedPointInteraction
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SerializedPointInteraction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SerializedPointInteraction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl<E> From<&E> for SerializedPointInteractionwhere
E: PointerInteraction,
impl<E> From<&E> for SerializedPointInteractionwhere
E: PointerInteraction,
Source§fn from(data: &E) -> SerializedPointInteraction
fn from(data: &E) -> SerializedPointInteraction
Source§impl InteractionElementOffset for SerializedPointInteraction
impl InteractionElementOffset for SerializedPointInteraction
Source§fn element_coordinates(&self) -> Point2D<f64, ElementSpace>
fn element_coordinates(&self) -> Point2D<f64, ElementSpace>
Source§fn coordinates(&self) -> Coordinates
fn coordinates(&self) -> Coordinates
Source§impl InteractionLocation for SerializedPointInteraction
impl InteractionLocation for SerializedPointInteraction
Source§fn client_coordinates(&self) -> Point2D<f64, ClientSpace>
fn client_coordinates(&self) -> Point2D<f64, ClientSpace>
Source§fn screen_coordinates(&self) -> Point2D<f64, ScreenSpace>
fn screen_coordinates(&self) -> Point2D<f64, ScreenSpace>
Source§impl PointerInteraction for SerializedPointInteraction
impl PointerInteraction for SerializedPointInteraction
Source§impl Serialize for SerializedPointInteraction
impl Serialize for SerializedPointInteraction
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for SerializedPointInteraction
Auto Trait Implementations§
impl Freeze for SerializedPointInteraction
impl RefUnwindSafe for SerializedPointInteraction
impl Send for SerializedPointInteraction
impl Sync for SerializedPointInteraction
impl Unpin for SerializedPointInteraction
impl UnsafeUnpin for SerializedPointInteraction
impl UnwindSafe for SerializedPointInteraction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<T> Brush for T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DependencyElement for T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more