LuciadCPillar 2024.0.08
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
luciad::ScrollEvent Class Referencefinal

Implementation of luciad::IInputEvent that represents a scroll gesture (for example using the mouse wheel). More...

#include <luciad/input/IInputEvent.h>

Inheritance diagram for luciad::ScrollEvent:
luciad::IInputEvent

Public Member Functions

 ScrollEvent (Coordinate location, ModifierKeys modifierKeys, double deltaY)
 Creates a scroll event. More...
 
double getDeltaY () const noexcept
 Returns the vertical scroll amount and direction. More...
 
Coordinate getLocation () const noexcept
 Returns the position of the event. More...
 
ModifierKeys getModifierKeys () const noexcept
 Returns the modifiers of the event. More...
 
- Public Member Functions inherited from luciad::IInputEvent
virtual ~IInputEvent ()=default
 

Detailed Description

Implementation of luciad::IInputEvent that represents a scroll gesture (for example using the mouse wheel).

This class contains the location, the scroll amount and direction and modifiers if any.

Since
2020.1

Constructor & Destructor Documentation

◆ ScrollEvent()

luciad::ScrollEvent::ScrollEvent ( Coordinate  location,
ModifierKeys  modifierKeys,
double  deltaY 
)
inline

Creates a scroll event.

Parameters
locationThe location of the event, defined in device independent pixels.
modifierKeysThe modifiers of the event.
deltaYthe vertical scroll amount and direction.

Member Function Documentation

◆ getDeltaY()

double luciad::ScrollEvent::getDeltaY ( ) const
inlinenoexcept

Returns the vertical scroll amount and direction.

A positive value indicates scrolling up, a negative value indicates scrolling down.

A delta of 1.0 (or -1.0) should be interpreted as follows:

  • for mouse wheels, this would correspond to 1 tick, typically 15 degrees of rotation
  • for other devices, this would correspond to 10 pixels (device independent pixels)
Returns
the vertical scroll amount and scroll direction.

◆ getLocation()

Coordinate luciad::ScrollEvent::getLocation ( ) const
inlinenoexcept

Returns the position of the event.

It is expressed in device independent pixel coordinates with top-left corner of the map being the (0,0) position.

Returns
the position of the event.

◆ getModifierKeys()

ModifierKeys luciad::ScrollEvent::getModifierKeys ( ) const
inlinenoexcept

Returns the modifiers of the event.

Returns
the modifiers of the event.