UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FReply Class Reference

#include <Reply.h>

+ Inheritance diagram for FReply:

Public Member Functions

FReplyCaptureMouse (TSharedRef< SWidget > InMouseCaptor)
 
FReplyUseHighPrecisionMouseMovement (TSharedRef< SWidget > InMouseCaptor)
 
SLATECORE_API FReplySetMousePos (const FIntPoint &NewMousePos)
 
SLATECORE_API FReplySetUserFocus (TSharedRef< SWidget > GiveMeFocus, EFocusCause ReasonFocusIsChanging=EFocusCause::SetDirectly, bool bInAllUsers=false)
 
FReplyClearUserFocus (bool bInAllUsers=false)
 
SLATECORE_API FReplyClearUserFocus (EFocusCause ReasonFocusIsChanging, bool bInAllUsers=false)
 
SLATECORE_API FReplyCancelFocusRequest ()
 
FReplySetNavigation (EUINavigation InNavigationType, const ENavigationGenesis InNavigationGenesis, const ENavigationSource InNavigationSource=ENavigationSource::FocusedWidget)
 
FReplySetNavigation (TSharedRef< SWidget > InNavigationDestination, const ENavigationGenesis InNavigationGenesis, const ENavigationSource InNavigationSource=ENavigationSource::FocusedWidget)
 
FReplyLockMouseToWidget (TSharedRef< SWidget > InWidget)
 
FReplyReleaseMouseLock ()
 
FReplyReleaseMouseCapture ()
 
FReplyDetectDrag (const TSharedRef< SWidget > &DetectDragInMe, FKey MouseButton)
 
FReplyBeginDragDrop (TSharedRef< FDragDropOperation > InDragDropContent)
 
FReplyEndDragDrop ()
 
FReplyPreventThrottling ()
 
bool ShouldReleaseMouse () const
 
bool ShouldSetUserFocus () const
 
bool ShouldReleaseUserFocus () const
 
bool AffectsAllUsers () const
 
bool ShouldUseHighPrecisionMouse () const
 
bool ShouldReleaseMouseLock () const
 
bool ShouldThrottle () const
 
TSharedPtr< SWidgetGetMouseLockWidget () const
 
TSharedPtr< SWidgetGetUserFocusRecepient () const
 
EFocusCause GetFocusCause () const
 
TSharedPtr< SWidgetGetMouseCaptor () const
 
EUINavigation GetNavigationType () const
 
ENavigationGenesis GetNavigationGenesis () const
 
ENavigationSource GetNavigationSource () const
 
TSharedPtr< SWidgetGetNavigationDestination () const
 
const TSharedPtr< FDragDropOperation > & GetDragDropContent () const
 
bool ShouldEndDragDrop () const
 
TSharedPtr< SWidgetGetDetectDragRequest () const
 
FKey GetDetectDragRequestButton () const
 
const TOptional< FIntPoint > & GetRequestedMousePos () const
 
SLATECORE_API FString ToString ()
 
SLATECORE_API FReply (const FReply &)
 
SLATECORE_API FReplyoperator= (const FReply &)
 
- Public Member Functions inherited from TReplyBase< FReply >
 TReplyBase (bool bIsHandled)
 
- Public Member Functions inherited from FReplyBase
bool IsEventHandled () const
 
const TSharedPtr< SWidgetGetHandler () const
 

Static Public Member Functions

static FReply Handled ()
 
static FReply Unhandled ()
 

Friends

class FSlateApplication
 

Additional Inherited Members

- Protected Member Functions inherited from TReplyBase< FReply >
FReplySetHandler (const TSharedRef< SWidget > &InHandler)
 
FReplyMe ()
 
- Protected Member Functions inherited from FReplyBase
 FReplyBase (bool InIsHandled)
 
- Protected Attributes inherited from FReplyBase
bool bIsHandled
 
TSharedPtr< SWidgetEventHandler
 

Detailed Description

A Reply is something that a Slate event returns to the system to notify it about certain aspect of how an event was handled. For example, a widget may handle an OnMouseDown event by asking the system to give mouse capture to a specific Widget. To do this, return FReply::CaptureMouse( NewMouseCapture ).

Constructor & Destructor Documentation

◆ FReply()

FReply::FReply ( const FReply )
default

Default copy constructor.

Member Function Documentation

◆ AffectsAllUsers()

bool FReply::AffectsAllUsers ( ) const
inline

If the event replied with a request to change the user focus whether it should do it for all users or just the current UserIndex

◆ BeginDragDrop()

FReply & FReply::BeginDragDrop ( TSharedRef< FDragDropOperation InDragDropContent)
inline

An event should return FReply::Handled().BeginDragDrop( Content ) to initiate a drag and drop operation.

Parameters
InDragDropContentThe content that is being dragged. This could be a widget, or some arbitrary data
Returns
reference back to the FReply so that this call can be chained.

◆ CancelFocusRequest()

FReply & FReply::CancelFocusRequest ( )

An event should rarely invoke FReply::CancelFocusRequest. This will change the reply so that it no longer contains a request for the system to set or clear focus. This is most useful when a reply has been cached for use in async operations.

◆ CaptureMouse()

FReply & FReply::CaptureMouse ( TSharedRef< SWidget InMouseCaptor)
inline

An event should return a FReply::Handled().CaptureMouse( SomeWidget ) as a means of asking the system to forward all mouse events to SomeWidget

◆ ClearUserFocus() [1/2]

FReply & FReply::ClearUserFocus ( bool  bInAllUsers = false)
inline

An event should return a FReply::Handled().ClearUserFocus() to ask the system to clear user focus

◆ ClearUserFocus() [2/2]

FReply & FReply::ClearUserFocus ( EFocusCause  ReasonFocusIsChanging,
bool  bInAllUsers = false 
)

An event should return a FReply::Handled().ClearUserFocus() to ask the system to clear user focus

◆ DetectDrag()

FReply & FReply::DetectDrag ( const TSharedRef< SWidget > &  DetectDragInMe,
FKey  MouseButton 
)
inline

Ask Slate to detect if a user started dragging in this widget. If a drag is detected, Slate will send an OnDragDetected event.

Parameters
DetectDragInMeDetect dragging in this widget
MouseButtonThis button should be pressed to detect the drag

◆ EndDragDrop()

FReply & FReply::EndDragDrop ( )
inline

An event should return FReply::Handled().EndDragDrop() to request that the current drag/drop operation be terminated.

◆ GetDetectDragRequest()

TSharedPtr< SWidget > FReply::GetDetectDragRequest ( ) const
inline
Returns
a widget for which to detect a drag; Invalid SharedPtr if no drag detection requested

◆ GetDetectDragRequestButton()

FKey FReply::GetDetectDragRequestButton ( ) const
inline
Returns
the mouse button for which we are detecting a drag

◆ GetDragDropContent()

const TSharedPtr< FDragDropOperation > & FReply::GetDragDropContent ( ) const
inline
Returns
the Content that we should use for the Drag and Drop operation; Invalid SharedPtr if a drag and drop operation is not requested

◆ GetFocusCause()

EFocusCause FReply::GetFocusCause ( ) const
inline

Get the reason that a focus change is being requested.

◆ GetMouseCaptor()

TSharedPtr< SWidget > FReply::GetMouseCaptor ( ) const
inline

If the event replied with a request to capture the mouse, this returns the desired mouse captor. Otherwise returns an invalid pointer.

◆ GetMouseLockWidget()

TSharedPtr< SWidget > FReply::GetMouseLockWidget ( ) const
inline

Returns the widget that the mouse should be locked to (if any)

◆ GetNavigationDestination()

TSharedPtr< SWidget > FReply::GetNavigationDestination ( ) const
inline

Get the widget that is the navigation destination.

◆ GetNavigationGenesis()

ENavigationGenesis FReply::GetNavigationGenesis ( ) const
inline

Get the genesis of the navigation.

◆ GetNavigationSource()

ENavigationSource FReply::GetNavigationSource ( ) const
inline

Get the source of the navigation.

◆ GetNavigationType()

EUINavigation FReply::GetNavigationType ( ) const
inline

Get the navigation type (Invalid if no navigation is requested).

◆ GetRequestedMousePos()

const TOptional< FIntPoint > & FReply::GetRequestedMousePos ( ) const
inline
Returns
The coordinates of the requested mouse position

◆ GetUserFocusRecepient()

TSharedPtr< SWidget > FReply::GetUserFocusRecepient ( ) const
inline

When not nullptr, user focus has been requested to be set on the FocusRecipient.

◆ Handled()

static FReply FReply::Handled ( )
inlinestatic

An event should return a FReply::Handled() to let the system know that an event was handled.

◆ LockMouseToWidget()

FReply & FReply::LockMouseToWidget ( TSharedRef< SWidget InWidget)
inline

An event should return FReply::Handled().LockMouseToWidget( SomeWidget ) as a means of asking the system to Lock the mouse so it cannot move out of the bounds of the widget.

◆ operator=()

FReply & FReply::operator= ( const FReply )
default

Default copy-assignment operator.

◆ PreventThrottling()

FReply & FReply::PreventThrottling ( )
inline

Ensures throttling for Slate UI responsiveness is not done on mouse down

◆ ReleaseMouseCapture()

FReply & FReply::ReleaseMouseCapture ( )
inline

An event should return a FReply::Handled().ReleaseMouse() to ask the system to release mouse capture NOTE: Deactivates high precision mouse movement if activated.

◆ ReleaseMouseLock()

FReply & FReply::ReleaseMouseLock ( )
inline

An event should return a FReply::Handled().ReleaseMouseLock() to ask the system to release mouse lock on a widget

◆ SetMousePos()

FReply & FReply::SetMousePos ( const FIntPoint NewMousePos)

An event should return FReply::Handled().SetMousePos to ask Slate to move the mouse cursor to a different location

◆ SetNavigation() [1/2]

FReply & FReply::SetNavigation ( EUINavigation  InNavigationType,
const ENavigationGenesis  InNavigationGenesis,
const ENavigationSource  InNavigationSource = ENavigationSource::FocusedWidget 
)
inline

An event should return FReply::Handled().SetNavigation( NavigationType ) as a means of asking the system to attempt a navigation

◆ SetNavigation() [2/2]

FReply & FReply::SetNavigation ( TSharedRef< SWidget InNavigationDestination,
const ENavigationGenesis  InNavigationGenesis,
const ENavigationSource  InNavigationSource = ENavigationSource::FocusedWidget 
)
inline

An event should return FReply::Handled().SetNavigation( NavigationDestination ) as a means of asking the system to attempt a navigation to the specified destination

◆ SetUserFocus()

FReply & FReply::SetUserFocus ( TSharedRef< SWidget GiveMeFocus,
EFocusCause  ReasonFocusIsChanging = EFocusCause::SetDirectly,
bool  bInAllUsers = false 
)

An event should return FReply::Handled().SetUserFocus( SomeWidget ) as a means of asking the system to set users focus to the provided widget

◆ ShouldEndDragDrop()

bool FReply::ShouldEndDragDrop ( ) const
inline
Returns
true if the user has asked us to terminate the ongoing drag/drop operation

◆ ShouldReleaseMouse()

bool FReply::ShouldReleaseMouse ( ) const
inline

True if this reply indicated that we should release mouse capture as a result of the event being handled

◆ ShouldReleaseMouseLock()

bool FReply::ShouldReleaseMouseLock ( ) const
inline

True if the reply indicated that we should release mouse lock

◆ ShouldReleaseUserFocus()

bool FReply::ShouldReleaseUserFocus ( ) const
inline

true if this reply indicated that we should release focus as a result of the event being handled

◆ ShouldSetUserFocus()

bool FReply::ShouldSetUserFocus ( ) const
inline

true if this reply indicated that we should set focus as a result of the event being handled

◆ ShouldThrottle()

bool FReply::ShouldThrottle ( ) const
inline

Whether or not we should throttle on mouse down

◆ ShouldUseHighPrecisionMouse()

bool FReply::ShouldUseHighPrecisionMouse ( ) const
inline

True if this reply indicated that we should use high precision mouse movement

◆ ToString()

FString FReply::ToString ( )

Converts the reply into an string representation.

◆ Unhandled()

static FReply FReply::Unhandled ( )
inlinestatic

An event should return a FReply::Unhandled() to let the system know that an event was unhandled.

◆ UseHighPrecisionMouseMovement()

FReply & FReply::UseHighPrecisionMouseMovement ( TSharedRef< SWidget InMouseCaptor)
inline

Enables the use of high precision (raw input) mouse movement, for more accurate mouse movement without mouse ballistics NOTE: This implies mouse capture and hidden mouse movement. Releasing mouse capture deactivates this mode.

Friends And Related Symbol Documentation

◆ FSlateApplication

friend class FSlateApplication
friend

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