UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FPointerEvent Struct Reference

#include <Events.h>

+ Inheritance diagram for FPointerEvent:

Public Member Functions

 FPointerEvent ()
 
 FPointerEvent (uint32 InPointerIndex, const UE::Slate::FDeprecateVector2DParameter &InScreenSpacePosition, const UE::Slate::FDeprecateVector2DParameter &InLastScreenSpacePosition, const TSet< FKey > &InPressedButtons, FKey InEffectingButton, float InWheelDelta, const FModifierKeysState &InModifierKeys)
 
 FPointerEvent (uint32 InUserIndex, uint32 InPointerIndex, const UE::Slate::FDeprecateVector2DParameter &InScreenSpacePosition, const UE::Slate::FDeprecateVector2DParameter &InLastScreenSpacePosition, const TSet< FKey > &InPressedButtons, FKey InEffectingButton, float InWheelDelta, const FModifierKeysState &InModifierKeys)
 
 FPointerEvent (FInputDeviceId InDeviceId, uint32 InPointerIndex, const UE::Slate::FDeprecateVector2DParameter &InScreenSpacePosition, const UE::Slate::FDeprecateVector2DParameter &InLastScreenSpacePosition, const TSet< FKey > &InPressedButtons, FKey InEffectingButton, float InWheelDelta, const FModifierKeysState &InModifierKeys, const TOptional< int32 > InOptionalSlateUserIndex=TOptional< int32 >())
 
 FPointerEvent (uint32 InUserIndex, uint32 InPointerIndex, const UE::Slate::FDeprecateVector2DParameter &InScreenSpacePosition, const UE::Slate::FDeprecateVector2DParameter &InLastScreenSpacePosition, const UE::Slate::FDeprecateVector2DParameter &InDelta, const TSet< FKey > &InPressedButtons, const FModifierKeysState &InModifierKeys)
 
 FPointerEvent (uint32 InPointerIndex, const UE::Slate::FDeprecateVector2DParameter &InScreenSpacePosition, const UE::Slate::FDeprecateVector2DParameter &InLastScreenSpacePosition, const UE::Slate::FDeprecateVector2DParameter &InDelta, const TSet< FKey > &InPressedButtons, const FModifierKeysState &InModifierKeys)
 
 FPointerEvent (uint32 InUserIndex, uint32 InPointerIndex, const UE::Slate::FDeprecateVector2DParameter &InScreenSpacePosition, const UE::Slate::FDeprecateVector2DParameter &InLastScreenSpacePosition, float InForce, bool bPressLeftMouseButton, bool bInIsForceChanged=false, bool bInIsFirstMove=false, const FModifierKeysState &InModifierKeys=FModifierKeysState(), uint32 InTouchpadIndex=0)
 
 FPointerEvent (FInputDeviceId InDeviceId, uint32 InPointerIndex, const UE::Slate::FDeprecateVector2DParameter &InScreenSpacePosition, const UE::Slate::FDeprecateVector2DParameter &InLastScreenSpacePosition, float InForce, bool bPressLeftMouseButton, bool bInIsForceChanged=false, bool bInIsFirstMove=false, const FModifierKeysState &InModifierKeys=FModifierKeysState(), uint32 InTouchpadIndex=0, const TOptional< int32 > InOptionalSlateUserIndex=TOptional< int32 >())
 
 FPointerEvent (const UE::Slate::FDeprecateVector2DParameter &InScreenSpacePosition, const UE::Slate::FDeprecateVector2DParameter &InLastScreenSpacePosition, const TSet< FKey > &InPressedButtons, const FModifierKeysState &InModifierKeys, EGestureEvent InGestureType, const UE::Slate::FDeprecateVector2DParameter &InGestureDelta, bool bInIsDirectionInvertedFromDevice)
 
 FPointerEvent (const FPointerEvent &Other, const UE::Slate::FDeprecateVector2DParameter &InScreenSpacePosition, const UE::Slate::FDeprecateVector2DParameter &InLastScreenSpacePosition)
 
virtual SLATECORE_API ~FPointerEvent ()
 
const UE::Slate::FDeprecateVector2DResultGetScreenSpacePosition () const
 
const UE::Slate::FDeprecateVector2DResultGetLastScreenSpacePosition () const
 
const UE::Slate::FDeprecateVector2DResultGetCursorDelta () const
 
bool IsMouseButtonDown (FKey MouseButton) const
 
FKey GetEffectingButton () const
 
float GetWheelDelta () const
 
uint32 GetPointerIndex () const
 
uint32 GetTouchpadIndex () const
 
float GetTouchForce () const
 
bool IsTouchEvent () const
 
bool IsTouchForceChangedEvent () const
 
bool IsTouchFirstMoveEvent () const
 
EGestureEvent GetGestureType () const
 
const UE::Slate::FDeprecateVector2DResultGetGestureDelta () const
 
bool IsDirectionInvertedFromDevice () const
 
const TSet< FKey > & GetPressedButtons () const
 
virtual SLATECORE_API FText ToText () const override
 
virtual SLATECORE_API bool IsPointerEvent () const override
 
- Public Member Functions inherited from FInputEvent
 FInputEvent ()
 
 FInputEvent (const FModifierKeysState &InModifierKeys, const int32 InUserIndex, const bool bInIsRepeat)
 
 FInputEvent (const FModifierKeysState &InModifierKeys, const FInputDeviceId InDeviceId, const bool bInIsRepeat)
 
virtual SLATECORE_API ~FInputEvent ()
 
bool IsRepeat () const
 
bool IsShiftDown () const
 
bool IsLeftShiftDown () const
 
bool IsRightShiftDown () const
 
bool IsControlDown () const
 
bool IsLeftControlDown () const
 
bool IsRightControlDown () const
 
bool IsAltDown () const
 
bool IsLeftAltDown () const
 
bool IsRightAltDown () const
 
bool IsCommandDown () const
 
bool IsLeftCommandDown () const
 
bool IsRightCommandDown () const
 
bool AreCapsLocked () const
 
const FModifierKeysStateGetModifierKeys () const
 
uint32 GetUserIndex () const
 
FInputDeviceId GetInputDeviceId () const
 
FPlatformUserId GetPlatformUserId () const
 
uint64 GetEventTimestamp () const
 
double GetMillisecondsSinceEvent () const
 
SLATECORE_API FGeometry FindGeometry (const TSharedRef< SWidget > &WidgetToFind) const
 
SLATECORE_API TSharedRef< SWindowGetWindow () const
 
void SetEventPath (const FWidgetPath &InEventPath)
 
const FWidgetPathGetEventPath () const
 
virtual SLATECORE_API bool IsKeyEvent () const
 

Static Public Member Functions

template<typename PointerEventType >
static PointerEventType MakeTranslatedEvent (const PointerEventType &InPointerEvent, const FVirtualPointerPosition &VirtualPosition)
 

Additional Inherited Members

- Protected Attributes inherited from FInputEvent
FModifierKeysState ModifierKeys
 
bool bIsRepeat
 
uint32 UserIndex
 
FInputDeviceId InputDeviceId
 
const FWidgetPathEventPath
 
uint64 EventTimestamp
 

Detailed Description

FPointerEvent describes a mouse or touch action (e.g. Press, Release, Move, etc). It is passed to event handlers dealing with pointer-based input.

Examples
/work/Engine/Source/Runtime/UMG/Public/Components/Widget.h.

Constructor & Destructor Documentation

◆ FPointerEvent() [1/10]

FPointerEvent::FPointerEvent ( )
inline

UStruct Constructor. Not meant for normal usage.

◆ FPointerEvent() [2/10]

FPointerEvent::FPointerEvent ( uint32  InPointerIndex,
const UE::Slate::FDeprecateVector2DParameter InScreenSpacePosition,
const UE::Slate::FDeprecateVector2DParameter InLastScreenSpacePosition,
const TSet< FKey > &  InPressedButtons,
FKey  InEffectingButton,
float  InWheelDelta,
const FModifierKeysState InModifierKeys 
)
inline

Events are immutable once constructed.

◆ FPointerEvent() [3/10]

FPointerEvent::FPointerEvent ( uint32  InUserIndex,
uint32  InPointerIndex,
const UE::Slate::FDeprecateVector2DParameter InScreenSpacePosition,
const UE::Slate::FDeprecateVector2DParameter InLastScreenSpacePosition,
const TSet< FKey > &  InPressedButtons,
FKey  InEffectingButton,
float  InWheelDelta,
const FModifierKeysState InModifierKeys 
)
inline

◆ FPointerEvent() [4/10]

FPointerEvent::FPointerEvent ( FInputDeviceId  InDeviceId,
uint32  InPointerIndex,
const UE::Slate::FDeprecateVector2DParameter InScreenSpacePosition,
const UE::Slate::FDeprecateVector2DParameter InLastScreenSpacePosition,
const TSet< FKey > &  InPressedButtons,
FKey  InEffectingButton,
float  InWheelDelta,
const FModifierKeysState InModifierKeys,
const TOptional< int32 InOptionalSlateUserIndex = TOptional<int32>() 
)
inline

◆ FPointerEvent() [5/10]

FPointerEvent::FPointerEvent ( uint32  InUserIndex,
uint32  InPointerIndex,
const UE::Slate::FDeprecateVector2DParameter InScreenSpacePosition,
const UE::Slate::FDeprecateVector2DParameter InLastScreenSpacePosition,
const UE::Slate::FDeprecateVector2DParameter InDelta,
const TSet< FKey > &  InPressedButtons,
const FModifierKeysState InModifierKeys 
)
inline

◆ FPointerEvent() [6/10]

FPointerEvent::FPointerEvent ( uint32  InPointerIndex,
const UE::Slate::FDeprecateVector2DParameter InScreenSpacePosition,
const UE::Slate::FDeprecateVector2DParameter InLastScreenSpacePosition,
const UE::Slate::FDeprecateVector2DParameter InDelta,
const TSet< FKey > &  InPressedButtons,
const FModifierKeysState InModifierKeys 
)
inline

A constructor for raw mouse events

◆ FPointerEvent() [7/10]

FPointerEvent::FPointerEvent ( uint32  InUserIndex,
uint32  InPointerIndex,
const UE::Slate::FDeprecateVector2DParameter InScreenSpacePosition,
const UE::Slate::FDeprecateVector2DParameter InLastScreenSpacePosition,
float  InForce,
bool  bPressLeftMouseButton,
bool  bInIsForceChanged = false,
bool  bInIsFirstMove = false,
const FModifierKeysState InModifierKeys = FModifierKeysState(),
uint32  InTouchpadIndex = 0 
)
inline

◆ FPointerEvent() [8/10]

FPointerEvent::FPointerEvent ( FInputDeviceId  InDeviceId,
uint32  InPointerIndex,
const UE::Slate::FDeprecateVector2DParameter InScreenSpacePosition,
const UE::Slate::FDeprecateVector2DParameter InLastScreenSpacePosition,
float  InForce,
bool  bPressLeftMouseButton,
bool  bInIsForceChanged = false,
bool  bInIsFirstMove = false,
const FModifierKeysState InModifierKeys = FModifierKeysState(),
uint32  InTouchpadIndex = 0,
const TOptional< int32 InOptionalSlateUserIndex = TOptional<int32>() 
)
inline

◆ FPointerEvent() [9/10]

FPointerEvent::FPointerEvent ( const UE::Slate::FDeprecateVector2DParameter InScreenSpacePosition,
const UE::Slate::FDeprecateVector2DParameter InLastScreenSpacePosition,
const TSet< FKey > &  InPressedButtons,
const FModifierKeysState InModifierKeys,
EGestureEvent  InGestureType,
const UE::Slate::FDeprecateVector2DParameter InGestureDelta,
bool  bInIsDirectionInvertedFromDevice 
)
inline

A constructor for gesture events

◆ FPointerEvent() [10/10]

FPointerEvent::FPointerEvent ( const FPointerEvent Other,
const UE::Slate::FDeprecateVector2DParameter InScreenSpacePosition,
const UE::Slate::FDeprecateVector2DParameter InLastScreenSpacePosition 
)
inline

A constructor to alter cursor positions

◆ ~FPointerEvent()

FPointerEvent::~FPointerEvent ( )
virtualdefault

Member Function Documentation

◆ GetCursorDelta()

const UE::Slate::FDeprecateVector2DResult & FPointerEvent::GetCursorDelta ( ) const
inline

Returns the distance the mouse traveled since the last event was handled.

◆ GetEffectingButton()

FKey FPointerEvent::GetEffectingButton ( ) const
inline

Mouse button that caused this event to be raised (possibly FKey::Invalid)

◆ GetGestureDelta()

const UE::Slate::FDeprecateVector2DResult & FPointerEvent::GetGestureDelta ( ) const
inline

Returns the change in gesture value since the last gesture event of the same type.

◆ GetGestureType()

EGestureEvent FPointerEvent::GetGestureType ( ) const
inline

Returns the type of touch gesture

◆ GetLastScreenSpacePosition()

const UE::Slate::FDeprecateVector2DResult & FPointerEvent::GetLastScreenSpacePosition ( ) const
inline

Returns the position of the cursor in screen space last time we handled an input event

◆ GetPointerIndex()

uint32 FPointerEvent::GetPointerIndex ( ) const
inline

Returns the unique identifier of the pointer (e.g., finger index)

◆ GetPressedButtons()

const TSet< FKey > & FPointerEvent::GetPressedButtons ( ) const
inline

Returns the full set of pressed buttons

◆ GetScreenSpacePosition()

const UE::Slate::FDeprecateVector2DResult & FPointerEvent::GetScreenSpacePosition ( ) const
inline

Returns The position of the cursor in screen space

◆ GetTouchForce()

float FPointerEvent::GetTouchForce ( ) const
inline

Returns the force of a touch (1.0f is mapped to an general touch force, < 1 is "light", > 1 is "heavy", and 10 is the max force possible)

◆ GetTouchpadIndex()

uint32 FPointerEvent::GetTouchpadIndex ( ) const
inline

Returns the index of the touch pad that generated this event (for platforms with multiple touch pads per user)

◆ GetWheelDelta()

float FPointerEvent::GetWheelDelta ( ) const
inline

How much did the mouse wheel turn since the last mouse event

◆ IsDirectionInvertedFromDevice()

bool FPointerEvent::IsDirectionInvertedFromDevice ( ) const
inline

Is the gesture delta inverted

◆ IsMouseButtonDown()

bool FPointerEvent::IsMouseButtonDown ( FKey  MouseButton) const
inline

Mouse buttons that are currently pressed

◆ IsPointerEvent()

bool FPointerEvent::IsPointerEvent ( ) const
overridevirtual

Is this event a pointer event (touch or cursor).

Reimplemented from FInputEvent.

◆ IsTouchEvent()

bool FPointerEvent::IsTouchEvent ( ) const
inline

Is this event a result from a touch (as opposed to a mouse)

◆ IsTouchFirstMoveEvent()

bool FPointerEvent::IsTouchFirstMoveEvent ( ) const
inline

Is this event a special first-move touch event

◆ IsTouchForceChangedEvent()

bool FPointerEvent::IsTouchForceChangedEvent ( ) const
inline

Is this event a special force-change touch event

◆ MakeTranslatedEvent()

static PointerEventType FPointerEvent::MakeTranslatedEvent ( const PointerEventType InPointerEvent,
const FVirtualPointerPosition VirtualPosition 
)
inlinestatic

◆ ToText()

FText FPointerEvent::ToText ( ) const
overridevirtual

Reimplemented from FInputEvent.


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