docs
Loading...
Searching...
No Matches
ScrollEvent

#include <Ultralight/ScrollEvent.h>

Overview

Scroll event representing a change in scroll state.

Positive deltas scroll up (or left), like a mouse wheel turned away from the user. Pages that read the legacy wheelDelta properties see 120 for every 100 pixels (or every page) of delta.

Note
Modifier keys reported to the page (eg, ctrlKey) come from the last KeyEvent fired on the View.
See also
View::FireScrollEvent()

Public Types

enum  Type { kType_ScrollByPixel , kType_ScrollByPage }
 The scroll event granularity type. More...

Public Attributes

Type type
 Scroll granularity type.
int delta_x
 Horizontal scroll amount, in the unit named by type (logical pixels, or pages).
int delta_y
 Vertical scroll amount, in the unit named by type (logical pixels, or pages).
int x = -1
 The x-position of the cursor when the event occurred, in logical pixels relative to the View.
int y = -1
 The y-position of the cursor when the event occurred, in logical pixels relative to the View.

Member Enumeration Documentation

◆ Type

enum Type

The scroll event granularity type.

Enumerator
kType_ScrollByPixel 

The delta value will be interpreted as number of pixels to scroll.

kType_ScrollByPage 

The delta value will be interpreted as number of pages to scroll.

Member Data Documentation

◆ delta_x

int delta_x

Horizontal scroll amount, in the unit named by type (logical pixels, or pages).

◆ delta_y

int delta_y

Vertical scroll amount, in the unit named by type (logical pixels, or pages).

◆ type

Type type

Scroll granularity type.

◆ x

int x = -1

The x-position of the cursor when the event occurred, in logical pixels relative to the View.

Leave negative to dispatch at the last known cursor position instead; if either coordinate is negative, both are ignored.

◆ y

int y = -1

The y-position of the cursor when the event occurred, in logical pixels relative to the View.

Same sentinel rule as x.


The documentation for this class was generated from the following file: