1.10
Public Types | Public Member Functions | Public Attributes | List of all members
Pointer Struct Reference

Pointer event data. More...

#include <event.h>

Public Types

enum class  Button { none , left , middle , right }
 Definitions for pointer buttons. More...
 

Public Member Functions

constexpr Pointer () noexcept=default
 
constexpr Pointer (const DisplayPoint &p, Button b, size_t s=0) noexcept
 
constexpr Pointer (const DisplayPoint &p, const DisplayPoint &d, size_t s=0) noexcept
 
constexpr Pointer (const DisplayPoint &p, size_t s=0) noexcept
 
EGT_NODISCARD DisplayPoint delta () const
 Get the drag delta.
 

Public Attributes

Button btn {Button::none}
 Pointer button value.
 
DisplayPoint drag_start
 The mouse point where EventId::pointer_drag_start occurred.
 
DisplayPoint point
 Mouse position in display coordinates.
 
size_t slot {}
 The event slot. Used for multi-touch.
 

Detailed Description

Pointer event data.

Member Enumeration Documentation

◆ Button

enum class Button
strong

Definitions for pointer buttons.

Enumerator
none 
left 
middle 
right 

Constructor & Destructor Documentation

◆ Pointer() [1/4]

constexpr Pointer ( )
constexprdefaultnoexcept

◆ Pointer() [2/4]

constexpr Pointer ( const DisplayPoint p,
size_t  s = 0 
)
inlineexplicitconstexprnoexcept
Parameters
[in]pDisplay point of the event.
[in]sSlot of the event.

◆ Pointer() [3/4]

constexpr Pointer ( const DisplayPoint p,
Button  b,
size_t  s = 0 
)
inlineconstexprnoexcept
Parameters
[in]pDisplay point of the event.
[in]bPointer button data of the event.
[in]sSlot of the event.

◆ Pointer() [4/4]

constexpr Pointer ( const DisplayPoint p,
const DisplayPoint d,
size_t  s = 0 
)
inlineconstexprnoexcept
Parameters
[in]pDisplay point of the event.
[in]dDrag start of the event.
[in]sSlot of the event.

Member Function Documentation

◆ delta()

EGT_NODISCARD DisplayPoint delta ( ) const
inline

Get the drag delta.

Member Data Documentation

◆ btn

Pointer button value.

◆ drag_start

DisplayPoint drag_start

The mouse point where EventId::pointer_drag_start occurred.

Only valid with the following events:

◆ point

DisplayPoint point

Mouse position in display coordinates.

◆ slot

size_t slot {}

The event slot. Used for multi-touch.