pub struct ViewportScrollInput {
pub delta: CanvasPoint,
pub anchor_screen: CanvasPoint,
pub ctrl_key: bool,
pub target_zoom: f32,
pub min_zoom: f32,
pub max_zoom: f32,
}Expand description
Normalized wheel or trackpad-scroll input for viewport gesture policy.
Fields§
§delta: CanvasPointLogical screen-pixel scroll delta after adapter/platform normalization.
anchor_screen: CanvasPointLogical screen-pixel anchor for zoom gestures.
ctrl_key: boolWhether the input represents a Ctrl-modified wheel/pinch gesture.
target_zoom: f32Desired zoom before clamping. Adapters own raw wheel-to-zoom normalization.
min_zoom: f32Inclusive minimum zoom clamp.
max_zoom: f32Inclusive maximum zoom clamp.
Implementations§
Source§impl ViewportScrollInput
impl ViewportScrollInput
pub fn new( delta: CanvasPoint, anchor_screen: CanvasPoint, ctrl_key: bool, target_zoom: f32, min_zoom: f32, max_zoom: f32, ) -> Self
Trait Implementations§
Source§impl Clone for ViewportScrollInput
impl Clone for ViewportScrollInput
Source§fn clone(&self) -> ViewportScrollInput
fn clone(&self) -> ViewportScrollInput
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ViewportScrollInput
Source§impl Debug for ViewportScrollInput
impl Debug for ViewportScrollInput
Source§impl<'de> Deserialize<'de> for ViewportScrollInput
impl<'de> Deserialize<'de> for ViewportScrollInput
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ViewportScrollInput
impl PartialEq for ViewportScrollInput
Source§fn eq(&self, other: &ViewportScrollInput) -> bool
fn eq(&self, other: &ViewportScrollInput) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ViewportScrollInput
impl Serialize for ViewportScrollInput
impl StructuralPartialEq for ViewportScrollInput
Auto Trait Implementations§
impl Freeze for ViewportScrollInput
impl RefUnwindSafe for ViewportScrollInput
impl Send for ViewportScrollInput
impl Sync for ViewportScrollInput
impl Unpin for ViewportScrollInput
impl UnsafeUnpin for ViewportScrollInput
impl UnwindSafe for ViewportScrollInput
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
Mutably borrows from an owned value. Read more