Skip to main content

ScrollWheelEvent

Type Alias ScrollWheelEvent 

Source
pub type ScrollWheelEvent = ScrollEvent;
👎Deprecated:

renamed to ScrollEvent

Expand description

The former name of ScrollEvent.

Aliased Type§

pub struct ScrollWheelEvent {
    pub position: Point<Pixels>,
    pub delta: ScrollDelta,
    pub modifiers: Modifiers,
    pub touch_phase: TouchPhase,
    pub source: ScrollSource,
}

Fields§

§position: Point<Pixels>

The position the scroll targets. For touch pans this is where the pan started, so the whole gesture stays with the container it began on.

§delta: ScrollDelta

The change in scroll position for this event.

§modifiers: Modifiers

The modifiers that were held down when the scroll happened.

§touch_phase: TouchPhase

The phase of the scroll gesture.

§source: ScrollSource

The kind of input that produced this scroll.

Methods from Deref<Target = Modifiers>§

Source

pub fn modified(&self) -> bool

Returns whether any modifier key is pressed.

Source

pub fn secondary(&self, cx: &App) -> bool

Whether the semantically ‘secondary’ modifier key is pressed.

On macOS, this is the command key. On Linux and Windows, this is the control key.

Source

pub fn number_of_modifiers(&self) -> u8

Returns how many modifier keys are pressed.

Source

pub fn is_subset_of(&self, other: &Modifiers) -> bool

Checks if this Modifiers is a subset of another Modifiers.