Donner 0.5.0
Embeddable browser-grade SVG2 engine
Loading...
Searching...
No Matches
donner::svg::Event Struct Reference

A DOM event object, carrying information about a user interaction. More...

#include "donner/svg/core/Event.h"

Collaboration diagram for donner::svg::Event:
[legend]

Public Types

enum class  Phase : uint8_t {
  None ,
  Capture ,
  Target ,
  Bubble
}
 The phase of event propagation. More...

Public Member Functions

void stopPropagation ()
 Stop the event from propagating further.
void preventDefault ()
 Prevent the default action associated with this event.

Public Attributes

EventType type
 The type of event.
Vector2d clientPosition
 Position in canvas coordinates.
Vector2d documentPosition
 Position in document coordinates.
int button = 0
 Mouse button (0=left, 1=middle, 2=right).
int buttons = 0
 Bitmask of currently pressed buttons.
bool ctrlKey = false
 Whether the Ctrl key was held.
bool shiftKey = false
 Whether the Shift key was held.
bool altKey = false
 Whether the Alt key was held.
bool metaKey = false
 Whether the Meta/Cmd key was held.
double deltaX = 0.0
 Horizontal scroll delta.
double deltaY = 0.0
 Vertical scroll delta.
Entity target = entt::null
 The original event target.
Entity currentTarget = entt::null
 The element currently handling the event.
Phase phase = Phase::None
 Current propagation phase.
bool propagationStopped = false
 Whether stopPropagation() was called.
bool defaultPrevented = false
 Whether preventDefault() was called.

Detailed Description

A DOM event object, carrying information about a user interaction.

Member Enumeration Documentation

◆ Phase

enum class donner::svg::Event::Phase : uint8_t
strong

The phase of event propagation.

Enumerator
None 

Not yet dispatched.

Capture 

Capture phase: root to target.

Target 

Target phase: at the target element.

Bubble 

Bubble phase: target parent to root.


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