ReXGlue SDK
Loading...
Searching...
No Matches
rex::ui::TouchEvent Class Reference
Inheritance diagram for rex::ui::TouchEvent:
[legend]

Public Types

enum class  Action : u8 { kDown , kUp , kCancel , kMove }
Public Types inherited from rex::ui::UIEvent
enum class  Type : u8 {
  kOpened , kDPIChanged , kMonitorUpdate , kMinimized ,
  kRestored , kClosing , kFileDrop , kResize ,
  kClose , kFocus , kTouch
}

Public Member Functions

 TouchEvent (Type type, u32 pointer_id, Action action, f32 x, f32 y)
bool IsHandled () const
void SetHandled (bool value)
u32 GetPointerID () const
Action GetAction () const
f32 GetX () const
f32 GetY () const
Public Member Functions inherited from rex::ui::UIEvent
 UIEvent (Type type)
Type GetType () const
template<typename T>
const T * As () const

Static Public Member Functions

static constexpr bool Carries (Type type)

Static Public Attributes

static constexpr u32 kPointerIDNone = UINT32_MAX

Member Enumeration Documentation

◆ Action

enum class rex::ui::TouchEvent::Action : u8
strong
Enumerator
kCancel 

The point lifted without its usual release action.

Constructor & Destructor Documentation

◆ TouchEvent()

rex::ui::TouchEvent::TouchEvent ( Type type,
u32 pointer_id,
Action action,
f32 x,
f32 y )
inline

Creates a touch event.

Parameters
xPoint x, possibly outside the surface.
yPoint y, possibly outside the surface.

Member Function Documentation

◆ Carries()

constexpr bool rex::ui::TouchEvent::Carries ( Type type)
inlinestaticconstexpr

Reports whether this class carries a type.

◆ IsHandled()

bool rex::ui::TouchEvent::IsHandled ( ) const
inline

Reports whether a listener consumed the event.

◆ SetHandled()

void rex::ui::TouchEvent::SetHandled ( bool value)
inline

Marks the event consumed.

Parameters
valueTrue stops later listeners from acting on it.

Member Data Documentation

◆ kPointerIDNone

u32 rex::ui::TouchEvent::kPointerIDNone = UINT32_MAX
staticconstexpr

Pointer ID meaning no current pointer.


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