FReply

A Reply is something that a Slate event returns to the system to notify it about certain aspect of how an event was handled.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

SlateCore

Header

/Engine/Source/Runtime/SlateCore/Public/Input/Reply.h

Include

#include "Input/Reply.h"

Syntax

class FReply : public TReplyBase< FReply >

Remarks

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

Constructors

No constructors are accessible with public or protected access.

Functions

Name Description

Public function Const

bool

 

AffectsAllUsers()

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

Public function

FReply &

 

BeginDragDrop

(
    TSharedRef< FDragDropOperation > In...
)

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

Public function

FReply &

 

CancelFocusRequest()

An event should rarely invoke FReply::CancelFocusRequest.

Public function

FReply &

 

CaptureMouse

(
    TSharedRef< SWidget > InMouseCaptor
)

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

Public function

FReply &

 

ClearUserFocus

(
    EFocusCause ReasonFocusIsChanging,
    bool bInAllUsers
)

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

Public function

FReply &

 

ClearUserFocus

(
    bool bInAllUsers
)

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

Public function

FReply &

 

DetectDrag

(
    const TSharedRef< SWidget >& Detec...,
    FKey MouseButton
)

Ask Slate to detect if a user started dragging in this widget.

Public function

FReply &

 

EndDragDrop()

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

Public function Const

TSharedPtr< ...

 

GetDetectDragRequest()

Public function Const

FKey

 

GetDetectDragRequestButton()

Public function Const

const TShare...

 

GetDragDropContent()

Public function Const

EFocusCause

 

GetFocusCause()

Get the reason that a focus change is being requested.

Public function Const

TSharedPtr< ...

 

GetMouseCaptor()

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

Public function Const

TSharedPtr< ...

 

GetMouseLockWidget()

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

Public function Const

TSharedPtr< ...

 

GetNavigationDestination()

Get the widget that is the navigation destination.

Public function Const

ENavigationG...

 

GetNavigationGenesis()

Get the genesis of the navigation.

Public function Const

ENavigationS...

 

GetNavigationSource()

Get the source of the navigation.

Public function Const

EUINavigatio...

 

GetNavigationType()

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

Public function Const

const TOptio...

 

GetRequestedMousePos()

Public function Const

TSharedPtr< ...

 

GetUserFocusRecepient()

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

Public function Static

FReply

 

Handled()

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

Public function

FReply &

 

LockMouseToWidget

(
    TSharedRef< SWidget > InWidget
)

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.

Public function

FReply &

 

PreventThrottling()

Ensures throttling for SlateUI responsiveness is not done on mouse down

Public function

FReply &

 

ReleaseMouseCapture()

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

Public function

FReply &

 

ReleaseMouseLock()

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

Public function

FReply &

 

SetMousePos

(
    const FIntPoint& NewMousePos
)

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

Public function

FReply &

 

SetNavigation

(
    EUINavigation InNavigationType,
    const ENavigationGenesis InNavigati...,
    const ENavigationSource InNavigatio...
)

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

Public function

FReply &

 

SetNavigation

(
    TSharedRef< SWidget > InNavigationD...,
    const ENavigationGenesis InNavigati...,
    const ENavigationSource InNavigatio...
)

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

Public function

FReply &

 

SetUserFocus

(
    TSharedRef< SWidget > GiveMeFocus,
    EFocusCause ReasonFocusIsChanging,
    bool bInAllUsers
)

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

Public function Const

bool

 

ShouldEndDragDrop()

Public function Const

bool

 

ShouldReleaseMouse()

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

Public function Const

bool

 

ShouldReleaseMouseLock()

True if the reply indicated that we should release mouse lock

Public function Const

bool

 

ShouldReleaseUserFocus()

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

Public function Const

bool

 

ShouldSetUserFocus()

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

Public function Const

bool

 

ShouldThrottle()

Whether or not we should throttle on mouse down

Public function Const

bool

 

ShouldUseHighPrecisionMouse()

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

Public function

FString

 

ToString()

Converts the reply into an string representation.

Public function Static

FReply

 

Unhandled()

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

Public function

FReply &

 

UseHighPrecisionMouseMovement

(
    TSharedRef< SWidget > InMouseCaptor
)

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.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss