Site Home
Docs
Go to C API
Ultralight C++ API
1.4.0
Loading...
Searching...
No Matches
ScrollEvent.h
Go to the documentation of this file.
1
/**************************************************************************************************
2
* This file is a part of Ultralight. *
3
* *
4
* See <https://ultralig.ht> for licensing and more. *
5
* *
6
* (C) 2024 Ultralight, Inc. *
7
**************************************************************************************************/
8
#pragma once
9
#include <
Ultralight/Defines.h
>
10
11
namespace
ultralight
{
12
13
///
14
/// Scroll event representing a change in scroll state.
15
///
16
/// @see View::FireScrollEvent
17
///
18
class
ScrollEvent
{
19
public
:
20
///
21
/// The scroll event granularity type
22
///
23
enum
Type
{
24
kType_ScrollByPixel
,
///< The delta value will be interpreted as number of pixels to scroll.
25
kType_ScrollByPage
,
///< The delta value will be interpreted as number of pages to scroll.
26
};
27
28
///
29
/// Scroll granularity type
30
///
31
Type
type
;
32
33
///
34
/// Horizontal scroll amount
35
///
36
int
delta_x
;
37
38
///
39
/// Vertical scroll amount
40
///
41
int
delta_y
;
42
};
43
44
}
// namespace ultralight
Defines.h
ultralight::ScrollEvent
Scroll event representing a change in scroll state.
Definition
ScrollEvent.h:18
ultralight::ScrollEvent::Type
Type
The scroll event granularity type.
Definition
ScrollEvent.h:23
ultralight::ScrollEvent::kType_ScrollByPage
@ kType_ScrollByPage
The delta value will be interpreted as number of pages to scroll.
Definition
ScrollEvent.h:25
ultralight::ScrollEvent::kType_ScrollByPixel
@ kType_ScrollByPixel
The delta value will be interpreted as number of pixels to scroll.
Definition
ScrollEvent.h:24
ultralight::ScrollEvent::delta_y
int delta_y
Vertical scroll amount.
Definition
ScrollEvent.h:41
ultralight::ScrollEvent::delta_x
int delta_x
Horizontal scroll amount.
Definition
ScrollEvent.h:36
ultralight::ScrollEvent::type
Type type
Scroll granularity type.
Definition
ScrollEvent.h:31
ultralight
Definition
App.h:14
Ultralight
ScrollEvent.h