1.1-rc3
Public Types | Public Member Functions | Public Attributes | List of all members
Pointer Struct Reference

Pointer event data. More...

Public Types

enum  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. More...
 

Public Attributes

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

Detailed Description

Pointer event data.

Member Enumeration Documentation

◆ Button

enum 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.