FSlateApplication

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Slate

Header

/Engine/Source/Runtime/Slate/Public/Framework/Application/SlateApplication.h

Include

#include "Framework/Application/SlateApplication.h"

Syntax

class FSlateApplication :
    public FSlateApplicationBase,
    public FGenericApplicationMessageHandler

Variables

Constructors

No constructors are accessible with public or protected access.

Destructors

Name Description

Public function Virtual

~FSlateApplication()

Virtual destructor.

Functions

Name Description

Public function

void

 

ActivateGameViewport()

Activates the Game Viewport if it is properly childed under a window

Public function

void

 

AddModalWindow

(
    TSharedRef< SWindow > InSlateWindow,
    const TSharedPtr< const SWidget > I...,
    bool bSlowTaskWindow
)

Adds a modal window to the application.

Public function

TSharedRef< ...

 

AddWindowAsNativeChild

(
    TSharedRef< SWindow > InSlateWindow,
    TSharedRef< SWindow > InParentWindo...,
    const bool bShowImmediately
)

Associates a top level Slate Window with a native window, and "natively" parents that window to the specified Slate window.

Public function

bool

 

AllowMoveCursor()

Public function Const

bool

 

AreMenuAnimationsEnabled()

Public function Virtual Const

FVector2D

 

CalculatePopupWindowPosition

(
    const FSlateRect& InAnchor,
    const FVector2D& InSize,
    bool bAutoAdjustForDPIScale,
    const FVector2D& InProposedPlaceme...,
    const EOrientation Orientation
)

Calculates the popup window position from the passed in window position and size.

Public function Const

bool

 

CanAddModalWindow()

Returns true if this slate application is ready to open modal windows

Public function

void

 

CancelDragDrop()

Cancels any in flight drag and drops

Public function Const

bool

 

CanDisplayWindows()

Returns true if this slate application is ready to display windows.

Public function

void

 

ClearAllUserFocus

(
    EFocusCause ReasonFocusIsChanging
)

Releases the focus for all users from whatever it currently is on.

Public function

void

 

ClearKeyboardFocus

(
    const EFocusCause ReasonFocusIsChan...
)

Clears keyboard focus, if any widget is currently focused

Public function

void

 

ClearUserFocus

(
    uint32 UserIndex,
    EFocusCause ReasonFocusIsChanging
)

Releases the users focus from whatever it currently is on.

Public function

void

 

CloseAllWindowsImmediately()

Closes all active windows immediately

Public function

void

 

CloseToolTip()

Closes the open tool-tip, if a tool-tip is open

Public function Static

TSharedRef< ...

 

Create

(
    const TSharedRef< class GenericAppl...
)

Public function Static

void

 

Create()

Protected function

void

 

DestroyRenderer()

Public function

void

 

DestroyWindowImmediately

(
    TSharedRef< SWindow > WindowToDestr...
)

HACK: Don't use this unless shutting down a game viewport Game viewport windows need to be destroyed instantly or else the viewport could tick and access deleted data

Public function

void

 

DestroyWindowsImmediately()

Destroy the native and slate windows in the array provided.

Public function

void

 

DismissAllMenus()

Dismisses all open menus

Public function

void

 

DismissMenu

(
    const TSharedPtr< IMenu >& InFromM...
)

Dismisses a menu and all its children

Public function

void

 

DismissMenuByWidget

(
    const TSharedRef< SWidget >& InWid...
)

Dismisses a menu and all its children.

Protected function

void

 

DrawPrepass

(
    TSharedPtr< SWindow > DrawOnlyThisW...
)

Pre-pass step before drawing windows to compute geometry size and reshape autosized windows

Protected function

void

 

DrawWindowAndChildren

(
    const TSharedRef< SWindow >& Windo...,
    FDrawWindowArgs& DrawWindowArgs
)

Draws a window and its children

Protected function

void

 

DrawWindows()

Draws Slate windows. Should only be called by the application's main loop or renderer.

Public function

void

 

EnableMenuAnimations

(
    const bool bEnableAnimations
)

Sets whether transition effects for new menus and windows should be played.

Public function

void

 

EnterDebuggingMode()

Enters debugging mode which is a special state that causes the Slate application to tick in place which in the middle of a stack frame

Public function

void

 

ExternalModalStart()

Disable Slate components when an external, non-slate, modal window is brought up.

Public function

void

 

ExternalModalStop()

Re-enable disabled Slate components when a non-slate modal window is dismissed.

Public function

void

 

ExternalUIChange

(
    bool bIsOpening
)

Sets the display state of external UI such as Steam.

Public function

TSharedPtr< ...

 

FindBestParentWindowForDialogs

(
    const TSharedPtr< SWidget >& InWid...,
    const ESlateParentWindowSearchMetho...
)

Given an optional widget, try and get the most suitable parent window to use with dialogs (such as file and directory pickers).

Public function

const void &...

 

FindBestParentWindowHandleForDialogs

(
    const TSharedPtr< SWidget >& InWid...,
    const ESlateParentWindowSearchMetho...
)

Given an optional widget, try and get the most suitable parent window handle to use with dialogs (such as file and directory pickers).

Public function Const

int32

 

FindInputPreProcessor

(
    TSharedPtr< class IInputProcessor >...
)

Get the index of a registered pre-processor.

Public function Const

TSharedPtr< ...

 

FindMenuInWidgetPath

(
    const FWidgetPath& InWidgetPath
)

Attempt to locate a menu that contains the specified widget

Public function

TSharedRef< ...

 

FindOrCreateVirtualUser

(
    int32 VirtualUserIndex
)

Public function

void

 

FinishedInputThisFrame()

Occurs before Tick(), after all pointer and keyboard input has been processed.

Public function

void

 

FlushRenderState()

Flushes the render state of slate, releasing accesses and flushing all render commands.

Public function

void

 

ForceRedrawWindow

(
    const TSharedRef< SWindow >& InWin...
)

Forces the window to redraw immediately.

Public function

void

 

ForEachUser

(
    TFunctionRef< void&)> I...,
    bool bIncludeVirtualUsers
)

Allows you do some operations for every registered user.

Public function Const

void

 

GeneratePathToWidgetChecked

(
    TSharedRef< const SWidget > InWidge...,
    FWidgetPath& OutWidgetPath,
    EVisibility VisibilityFilter
)

That this is a relatively slow operation! Asserts if the widget isn't found.

Public function Const

bool

 

GeneratePathToWidgetUnchecked

(
    TSharedRef< const SWidget > InWidge...,
    FWidgetPath& OutWidgetPath,
    EVisibility VisibilityFilter
)

That this is a relatively slow operation! It can fail, in which case OutWidgetPath.IsValid() will be false.

Public function Static

FSlateApplic...

 

Get()

Returns the current instance of the application.

Public function Const

TSharedPtr< ...

 

GetActiveModalWindow()

Public function Const

bool

 

GetAllowTooltips()

Protected function

void

 

GetAllVisibleChildWindows

(
    TArray< TSharedRef< SWindow > >& O...,
    TSharedRef< SWindow > CurrentWindow
)

Gets all visible child windows of a window.

Public function

void

 

GetAllVisibleWindowsOrdered

(
    TArray< TSharedRef< SWindow > >& O...
)

Gets all visible slate windows ordered from back to front based on child hierarchies

Public function Const

const float

 

GetAverageDeltaTime()

Returns the running average delta time (smoothed over several frames)

Public function Const

float

 

GetAverageDeltaTimeForResponsiveness()

Returns the running average delta time (smoothed over several frames) Unlike GetAverageDeltaTime() it excludes exceptional situations, such as when throttling mode is active.

Public function Const

float

 

GetCursorRadius()

Getter for the cursor radius

Public function

TSharedPtr< ...

 

GetCursorUser()

Public function Const

TSharedPtr< ...

 

GetCursorUser()

Get the standard 'default' user (there's always guaranteed to be at least one).

Public function Const

const float

 

GetDeltaTime()

Returns the real time delta since Slate last ticked widgets

Public function Const

TSharedPtr< ...

 

GetDragDroppingContent()

Get the current drag-dropping content

Public function Const

float

 

GetDragTriggerDistance()

Public function Const

float

 

GetDragTriggerDistanceSquared()

Public function Const

TSharedPtr< ...

 

GetGameViewport()

Returns the game viewport registered with the slate application

Public function Static

TSharedRef< ...

 

GetGlobalTabManager()

Public function Const

bool

 

GetHandleDeviceInputWhenApplicationNotActive()

Public function Virtual Const

void

 

GetInitialDisplayMetrics

(
    FDisplayMetrics& OutDisplayMetrics
)

Public function Const

IInputInterf...

 

GetInputInterface()

Public function

TArray< TSha...

 

GetInteractiveTopLevelWindows()

Public function Const

double

 

GetLastUserInteractionTime()

Public function

FSlateLastUs...

 

GetLastUserInteractionTimeUpdateEvent()

Public function Const

FModifierKey...

 

GetModifierKeys()

Returns the current modifier keys state

Public function Virtual Const

void *

 

GetMouseCaptureWindow()

Returning platform-specific value designating window that captures mouse, or nullptr if mouse isn't captured

Public function Const

TSharedRef< ...

 

GetNavigationConfig()

Public function Const

const TAttri...

 

GetNormalExecutionAttribute()

Returns the attribute that can be used by widgets to check if the application is in normal execution mode Don't hold a reference to this anywhere that can exist when this application closes

Public function

FOnModalLoop...

 

GetOnModalLoopTickEvent()

Get the FOnModalLoopTickEvent for the Slate Application.

Protected function

TSharedRef< ...

 

GetOrCreateUser

(
    const FInputEvent& InputEvent
)

Protected function

TSharedRef< ...

 

GetOrCreateUser

(
    int32 UserIndex
)

Locates the SlateUser object corresponding to the index, creating a new one if it doesn't exist.

Public function

FPopupSuppor...

 

GetPopupSupport()

Public function Const

const TSet< ...

 

GetPressedMouseButtons()

Protected function Const

TSharedRef< ...

 

GetRelevantNavConfig

(
    int32 UserIndex
)

Public function Const

const FStyle...

 

GetRootStyle()

Public function Const

float

 

GetSoundDuration

(
    const FSlateSound& Sound
)

Public function Const

ITextInputMe...

 

GetTextInputMethodSystem()

Public function Const

TSharedPtr< ...

 

GetUser

(
    int32 UserIndex
)

Gets the user at the given index, null if the user does not exist.

Public function

TSharedPtr< ...

 

GetUser

(
    int32 UserIndex
)

Public function Const

TSharedPtr< ...

 

GetUser

(
    const FInputEvent& InputEvent
)

Public function

TSharedPtr< ...

 

GetUser

(
    const FInputEvent& InputEvent
)

Public function

TSharedPtr< ...

 

GetUserFromControllerId

(
    int32 ControllerId
)

Public function Const

TSharedPtr< ...

 

GetUserFromControllerId

(
    int32 ControllerId
)

Gets the user at the given index, null if the user does not exist.

Public function Const

TOptional< i...

 

GetUserIndexForController

(
    int32 ControllerId,
    FKey InKey
)

Public function Const

int32

 

GetUserIndexForController

(
    int32 ControllerId
)

Public function Const

int32

 

GetUserIndexForKeyboard()

Public function Const

int32

 

GetUserIndexForMouse()

Public function Const

TSharedPtr< ...

 

GetVisibleMenuWindow()

Public function Const

FSlateRect

 

GetWorkArea

(
    const FSlateRect& InRect
)

Get the work area that has the largest intersection with the specified rectangle

Public function Const

void

 

GotoLineInSource

(
    const FString& FileName,
    int32 LineNumber
)

Opens the current platform's code editing IDE (if necessary) and focuses the specified line in the specified file.

Public function Const

bool

 

HasOpenSubMenus

(
    TSharedPtr< IMenu > InMenu
)

Public function Const

bool

 

HasTraveledFarEnoughToTriggerDrag

(
    const FPointerEvent& PointerEvent,
    const FVector2D ScreenSpaceOrigin,
    EOrientation Orientation
)

Public function Const

bool

 

HasTraveledFarEnoughToTriggerDrag

(
    const FPointerEvent& PointerEvent,
    const FVector2D ScreenSpaceOrigin
)

Public function Static

void

 

InitHighDPI

(
    const bool bForceEnable
)

Initializes high dpi support for the process

Public function Static

TSharedRef< ...

 

InitializeAsStandaloneApplication

(
    const TSharedRef< class FSlateRende...
)

Public function Static

TSharedRef< ...

 

InitializeAsStandaloneApplication

(
    const TSharedRef< class FSlateRende...,
    const TSharedRef< class GenericAppl...
)

Public function Virtual

bool

 

InitializeRenderer

(
    TSharedRef< FSlateRenderer > InRend...,
    bool bQuietMode
)

Initializes the renderer responsible for drawing all elements in this application

Public function Virtual

void

 

InitializeSound

(
    const TSharedRef< ISlateSoundDevice...
)

Set the slate sound provider that the slate app should use.

Public function Const

bool

 

InKismetDebuggingMode()

Public function

void

 

InvalidateAllViewports()

Removes references to FViewportRHI's.

Public function Const

bool

 

IsDragDropping()

Are we drag-dropping right now?

Public function Const

bool

 

IsDragDroppingAffected

(
    const FPointerEvent& InPointerEven...
)

Are we drag-dropping and are we affected by this pointer event?

Public function Const

bool

 

IsFakingTouchEvents()

Public function Const

bool

 

IsGamepadAttached()

Public function Static

bool

 

IsInitialized()

Returns true if a Slate application instance is currently initialized and ready

Public function Const

bool

 

IsMouseAttached()

Public function Const

bool

 

IsNormalExecution()

Public function Const

bool

 

IsProcessingInput()

Returns true if the we're currently processing mouse, keyboard, touch or gamepad input.

Public function Const

bool

 

IsRenderingOffScreen()

Public function Const

bool

 

IsRunningAtTargetFrameRate()

Public function Const

bool

 

IsUsingHighPrecisionMouseMovment()

Public function Const

bool

 

IsUsingTrackpad()

Public function Const

bool

 

IsWindowInDestroyQueue

(
    TSharedRef< SWindow > Window
)

Is the window in the app's destroy queue? If so it will be destroyed next tick.

Public function

void

 

LeaveDebuggingMode

(
    bool bLeavingDebugForSingleStep
)

Leaves debugging mode

Public function Virtual

FWidgetPath

 

LocateWindowUnderMouse

(
    FVector2D ScreenspaceMouseCoordinat...,
    const TArray< TSharedRef< SWindow >...,
    bool bIgnoreEnabledStatus,
    int32 UserIndex
)

Public function Virtual

void

 

NativeApp_ShowKeyboard

(
    bool bShow,
    FString InitialString,
    int32 SelectionStart,
    int32 SelectionEnd
)

Shows or hides an onscreen keyboard

Public function

void

 

NavigateFromWidgetUnderCursor

(
    const uint32 InUserIndex,
    EUINavigation InNavigationType,
    TSharedRef< SWindow > InWindow
)

Attempts to navigate directly to the widget currently under the given user's cursor

Public function

void

 

NavigateToWidget

(
    const uint32 UserIndex,
    const TSharedPtr< SWidget >& Navig...,
    ENavigationSource NavigationSource
)

Attempts to navigate directly to the given widget

Public function

FSlateApplic...

 

OnApplicationActivationStateChanged()

Public function

FOnApplicati...

 

OnApplicationMousePreInputButtonDownListener()

Public function

FOnApplicati...

 

OnApplicationPreInputKeyDownListener()

Public function

EDropEffect:...

 

OnDragEnter

(
    const TSharedRef< SWindow >& Windo...,
    const TSharedRef< FExternalDragOper...
)

Public function

FOnFocusChan...

 

OnFocusChanging()

Public function

FSlateTickEv...

 

OnPostTick()

Event after slate application ticks.

Public function

FSimpleMulti...

 

OnPreShutdown()

Event when the application is about to shutdown.

Public function

FSlateTickEv...

 

OnPreTick()

Protected function

void

 

OnShutdown()

Called when the slate application is being shut down.

Public function

FOnWindowDPI...

 

OnSystemSignalsDPIChanged()

Event used to signal that a DPI change is about to happen

Public function

FUserRegiste...

 

OnUserRegistered()

Public function

FOnWindowBei...

 

OnWindowBeingDestroyed()

Public function

FOnWindowDPI...

 

OnWindowDPIScaleChanged()

Public function

void

 

OverridePlatformApplication

(
    TSharedPtr< class GenericApplicatio...
)

Replace the current platform application with a custom version.

Public function Const

void

 

PlaySound

(
    const FSlateSound& SoundToPlay,
    int32 UserIndex
)

Play SoundToPlay. Interrupt previous sound if one is playing.

Public function

void

 

PollGameDeviceState()

Polls game devices for input

Protected function

void

 

PrivateDrawWindows

(
    TSharedPtr< SWindow > DrawOnlyThisW...
)

Draws slate windows, optionally only drawing the passed in window

Public function

bool

 

ProcessAnalogInputEvent

(
    const FAnalogInputEvent& InAnalogI...
)

Called when a analog input values change

Public function

void

 

ProcessApplicationActivationEvent

(
    bool InAppActivated
)

Called when the application is activated (i.e. one of its windows becomes active) or deactivated.

Public function

void

 

ProcessCursorReply

(
    const FCursorReply& CursorReply
)

Apply any requests from the CursorReply

Public function

bool

 

ProcessDragEnterEvent

(
    TSharedRef< SWindow > WindowEntered,
    const FDragDropEvent& DragDropEven...
)

Called when a drag from an external (non-slate) source enters a window

Public function

void

 

ProcessExternalReply

(
    const FWidgetPath& CurrentEventPat...,
    const FReply TheReply,
    const int32 UserIndex,
    const int32 PointerIndex
)

Apply any requests from the Reply to the application. E.g. Capture mouse

Public function

bool

 

ProcessKeyCharEvent

(
    const FCharacterEvent& InCharacter...
)

Called when a character is entered

Public function

bool

 

ProcessKeyDownEvent

(
    const FKeyEvent& InKeyEvent
)

Called when a key is pressed

Public function

bool

 

ProcessKeyUpEvent

(
    const FKeyEvent& InKeyEvent
)

Called when a key is released

Public function

void

 

ProcessMotionDetectedEvent

(
    const FMotionEvent& InMotionEvent
)

Called when motion is detected (controller or device) when polling game device state

Public function

bool

 

ProcessMouseButtonDoubleClickEvent

(
    const TSharedPtr< FGenericWindow > ...,
    const FPointerEvent& InMouseEvent
)

Called by the native application in response to a mouse release. Routs the event to Slate Widgets.

Public function

bool

 

ProcessMouseButtonDownEvent

(
    const TSharedPtr< FGenericWindow > ...,
    const FPointerEvent& InMouseEvent
)

Called by the native application in response to a mouse button press.

Public function

bool

 

ProcessMouseButtonUpEvent

(
    const FPointerEvent& MouseEvent
)

Called by the native application in response to a mouse button release.

Public function

bool

 

ProcessMouseMoveEvent

(
    const FPointerEvent& MouseEvent,
    bool bIsSynthetic
)

Called by the native application in response to a mouse move. Routs the event to Slate Widgets.

Public function

bool

 

ProcessMouseWheelOrGestureEvent

(
    const FPointerEvent& InWheelEvent,
    const FPointerEvent* InGesture...
)

Called by the native application in response to a mouse wheel spin or a touch gesture.

Public function

void

 

ProcessReply

(
    const FWidgetPath& CurrentEventPat...,
    const FReply& TheReply,
    const FWidgetPath* WidgetsUnde...,
    const FPointerEvent* InMouseEv...,
    const uint32 UserIndex
)

Apply any requests from the Reply to the application. E.g. Capture mouse

Public function

void

 

ProcessTouchEndedEvent

(
    const FPointerEvent& InTouchEvent
)

Called when a touchpad touch is ended (finger lifted) when polling game device state

Public function

void

 

ProcessTouchMovedEvent

(
    const FPointerEvent& InTouchEvent
)

Called when a touchpad touch is moved (finger moved) when polling game device state

Public function

void

 

ProcessTouchStartedEvent

(
    const TSharedPtr< FGenericWindow > ...,
    const FPointerEvent& InTouchEvent
)

Called when a touchpad touch is started (finger down) when polling game device state

Public function

bool

 

ProcessWindowActivatedEvent

(
    const FWindowActivateEvent& Activa...
)

Called by the native application in response to an activation or deactivation.

Public function

void

 

PumpMessages()

Pumps OS messages when a modal window or intra-frame debugging session exists

Public function

TSharedPtr< ...

 

PushHostedMenu

(
    const TSharedRef< SWidget >& InPar...,
    const FWidgetPath& InOwnerPath,
    const TSharedRef< IMenuHost >& InM...,
    const TSharedRef< SWidget >& InCon...,
    TSharedPtr< SWidget >& OutWrappedC...,
    const FPopupTransitionEffect& Tran...,
    EShouldThrottle ShouldThrottle,
    const bool bIsCollapsedByParent
)

Creates a new hosted Menu and adds it to the menu stack.

Public function

TSharedPtr< ...

 

PushHostedMenu

(
    const TSharedPtr< IMenu >& InParen...,
    const TSharedRef< IMenuHost >& InM...,
    const TSharedRef< SWidget >& InCon...,
    TSharedPtr< SWidget >& OutWrappedC...,
    const FPopupTransitionEffect& Tran...,
    EShouldThrottle ShouldThrottle,
    const bool bIsCollapsedByParent
)

Creates a new hosted child Menu and adds it to the menu stack under the specified parent menu.

Public function

TSharedPtr< ...

 

PushMenu

(
    const TSharedRef< SWidget >& InPar...,
    const FWidgetPath& InOwnerPath,
    const TSharedRef< SWidget >& InCon...,
    const FVector2D& SummonLocation,
    const FPopupTransitionEffect& Tran...,
    const bool bFocusImmediately,
    const FVector2D& SummonLocationSiz...,
    TOptional< EPopupMethod > Method,
    const bool bIsCollapsedByParent
)

Creates a new Menu and adds it to the menu stack.

Public function

TSharedPtr< ...

 

PushMenu

(
    const TSharedPtr< IMenu >& InParen...,
    const TSharedRef< SWidget >& InCon...,
    const FVector2D& SummonLocation,
    const FPopupTransitionEffect& Tran...,
    const bool bFocusImmediately,
    const FVector2D& SummonLocationSiz...,
    const bool bIsCollapsedByParent
)

Creates a new Menu and adds it to the menu stack under the specified parent menu.

Public function

void

 

QueryCursor()

Bubble a request for which cursor to display for widgets under the mouse or the widget that captured the mouse.

Public function

void

 

RegisterGameViewport

(
    TSharedRef< SViewport > InViewport
)

Registers a game viewport with the Slate application so that specific messages can be routed directly to a viewport

Public function

bool

 

RegisterInputPreProcessor

(
    TSharedPtr< class IInputProcessor >...,
    const int32 Index
)

Adds input pre-processor if unique.

Protected function

TSharedRef< ...

 

RegisterNewUser

(
    int32 UserIndex,
    bool bIsVirtual
)

Register a new user with Slate.

Public function

FDelegateHan...

 

RegisterOnWindowActionNotification

(
    const FOnWindowAction& Notificatio...
)

Register for a notification when the window action occurs.

Public function

void

 

RegisterViewport

(
    TSharedRef< SViewport > InViewport
)

Registers a viewport with the Slate application so that specific messages can be routed directly to a viewport This is for all viewports, there can be multiple of these as opposed to the singular "Game Viewport"

Public function

void

 

RegisterVirtualWindow

(
    TSharedRef< SWindow > InWindow
)

Register another window that may be visible in a non-top level way that still needs to be able to maintain focus paths.

Public function

void

 

ReleaseAllPointerCapture()

Releases capture for every pointer on every user from whatever it currently is on.

Public function

void

 

ReleaseAllPointerCapture

(
    int32 UserIndex
)

Releases capture for every pointer belonging to the given user index particular user.

Public function

void

 

ResetToDefaultInputSettings()

Restores all input settings to their original values

Public function

void

 

ResetToDefaultPointerInputSettings()

Restores all pointer input settings to their original values

Public function

FReply

 

RouteMouseWheelOrGestureEvent

(
    const FWidgetPath& WidgetsUnderPoi...,
    const FPointerEvent& InWheelEvent,
    const FPointerEvent* InGesture...
)

Directly routes a pointer mouse wheel or gesture event to the widgets in the specified widget path.

Public function

FReply

 

RoutePointerDoubleClickEvent

(
    const FWidgetPath& WidgetsUnderPoi...,
    const FPointerEvent& PointerEvent
)

Directly routes a pointer double click event to the widgets in the specified widget path

Public function

FReply

 

RoutePointerDownEvent

(
    const FWidgetPath& WidgetsUnderPoi...,
    const FPointerEvent& PointerEvent
)

Directly routes a pointer down event to the widgets in the specified widget path

Public function

bool

 

RoutePointerMoveEvent

(
    const FWidgetPath& WidgetsUnderPoi...,
    const FPointerEvent& PointerEvent,
    bool bIsSynthetic
)

Directly routes a pointer move event to the widgets in the specified widget path

Public function

FReply

 

RoutePointerUpEvent

(
    const FWidgetPath& WidgetsUnderPoi...,
    const FPointerEvent& PointerEvent
)

Directly routes a pointer up event to the widgets in the specified widget path

Public function

void

 

SetAllowTooltips

(
    bool bCanShow
)

Public function

void

 

SetAllUserFocus

(
    const TSharedPtr< SWidget >& Widge...,
    EFocusCause ReasonFocusIsChanging
)

Sets focus for all users to the SWidget passed in.

Public function

void

 

SetAllUserFocusToGameViewport

(
    EFocusCause ReasonFocusIsChanging
)

Sets all users focus to the SWidget representing the currently active game viewport

Public function

void

 

SetAppIcon

(
    const FSlateBrush*const InAppI...
)

Set the global application icon

Public function

void

 

SetApplicationScale

(
    float InScale
)

Public function

void

 

SetCursorRadius

(
    float NewRadius
)

Sets the hit detection radius of the cursor

Public function

void

 

SetDragTriggerDistance

(
    float ScreenPixels
)

Set the size of the deadzone for dragging in screen pixels

Public function

void

 

SetExitRequestedHandler

(
    const FSimpleDelegate& OnExitReque...
)

Assign a delegate to be called when this application is requesting an exit (e.g. when the last window is closed).

Public function

void

 

SetGameIsFakingTouchEvents

(
    const bool bIsFaking,
    FVector2D* CursorLocation
)

Sets whether the application is treating mouse events as imitating touch events.

Public function

void

 

SetHandleDeviceInputWhenApplicationNotActive

(
    bool bAllow
)

Mouse capture

Public function

void

 

SetInputManager

(
    TSharedRef< ISlateInputManager > In...
)

Establishes the input mapping object used to map input sources to SlateUser indices

Public function

bool

 

SetKeyboardFocus

(
    const TSharedPtr< SWidget >& Optio...,
    EFocusCause ReasonFocusIsChanging
)

Sets the Keyboard focus to the specified SWidget

Public function

void

 

SetModalWindowStackEndedDelegate

(
    FModalWindowStackEnded StackEndedDe...
)

Sets the delegate for when a modal window stack ends

Public function

void

 

SetModalWindowStackStartedDelegate

(
    FModalWindowStackStarted StackStart...
)

Sets the delegate for when a modal window stack begins

Public function

void

 

SetNavigationConfig

(
    TSharedRef< FNavigationConfig > InN...
)

Sets the navigation config.

Public function

void

 

SetPlatformApplication

(
    const TSharedRef< class GenericAppl...
)

Public function

void

 

SetPlatformCursorVisibility

(
    bool bNewVisibility
)

Changes the cursor type to Default (Visible) or None (Not Visible)

Public function

void

 

SetUnhandledKeyDownEventHandler

(
    const FOnKeyEvent& NewHandler
)

Sets the handler for otherwise unhandled key down events.

Public function

void

 

SetUnhandledKeyUpEventHandler

(
    const FOnKeyEvent& NewHandler
)

Sets the handler for otherwise unhandled key down events.

Protected function

void

 

SetupPhysicalSensitivities()

Sets up any values that need to be based on the physical dimensions of the device.

Public function

bool

 

SetUserFocus

(
    uint32 UserIndex,
    const TSharedPtr< SWidget >& Widge...,
    EFocusCause ReasonFocusIsChanging
)

Sets specified user focus to the SWidget passed in.

Public function

void

 

SetUserFocusToGameViewport

(
    uint32 UserIndex,
    EFocusCause ReasonFocusIsChanging
)

Sets specified user focus to the SWidget representing the currently active game viewport

Public function

void

 

SetWidgetReflector

(
    const TSharedRef< IWidgetReflector ...
)

Sets the widget reflector.

Public function

void

 

SetWidgetReflectorAssetAccessDelegate

(
    FAccessAsset AccessDelegate
)

Public function

void

 

SetWidgetReflectorQuerySourceAccessDelegate

(
    FQueryAccessSourceCode QueryAccessD...
)

Public function

void

 

SetWidgetReflectorSourceAccessDelegate

(
    FAccessSourceCode AccessDelegate
)

Public function

void

 

ShowSystemHelp()

Public function

void

 

ShowVirtualKeyboard

(
    bool bShow,
    int32 UserIndex,
    TSharedPtr< IVirtualKeyboardEntry >...
)

Shows or hides an onscreen keyboard

Public function Static

void

 

Shutdown

(
    bool bShutdownPlatform
)

Public function

void

 

SpawnToolTip

(
    const TSharedRef< IToolTip >& InTo...,
    const FVector2D& InSpawnLocation
)

Spawns a tool tip window. If an existing tool tip window is open, it will be dismissed first.

Public function Const

bool

 

SupportsSourceAccess()

Public function Const

bool

 

SupportsSystemHelp()

Public function

bool

 

TakeScreenshot

(
    const TSharedRef< SWidget >& Widge...,
    const FIntRect& InnerWidgetArea,
    TArray< FColor >& OutColorData,
    FIntVector& OutSize
)

Takes a screenshot of the widget writing the results into the color buffer provided, this version allows you to provide an inner area to screenshot.

Public function

bool

 

TakeScreenshot

(
    const TSharedRef< SWidget >& Widge...,
    TArray< FColor >& OutColorData,
    FIntVector& OutSize
)

Takes a screenshot of the widget writing the results into the color buffer provided.

Protected function

void

 

ThrottleApplicationBasedOnMouseMovement()

Engages or disengages application throttling based on user behavior

Public function

void

 

Tick

(
    ESlateTickType TickType
)

Ticks this application

Protected function

void

 

TickAndDrawWidgets

(
    float DeltaTime
)

Ticks and paints the actual Slate portion of the application.

Protected function

void

 

TickPlatform

(
    float DeltaTime
)

Pumps and ticks the platform.

Protected function

void

 

TickTime()

Advances time for the application.

Public function

void

 

UnregisterGameViewport()

Unregisters the current game viewport from Slate.

Public function

void

 

UnregisterInputPreProcessor

(
    TSharedPtr< class IInputProcessor >...
)

Removes an input pre-processor.

Public function

void

 

UnregisterOnWindowActionNotification

(
    FDelegateHandle Handle
)

Unregister the notification because it is no longer desired.

Public function

void

 

UnregisterUser

(
    int32 UserIndex
)

Public function

void

 

UnregisterVirtualWindow

(
    TSharedRef< SWindow > InWindow
)

Unregister a virtual window.

Public function

void

 

UpdateToolTip

(
    bool bAllowSpawningOfNewToolTips
)

Public function

void

 

UsePlatformCursorForCursorUser

(
    bool bUsePlatformCursor
)

Updates the cursor user's cursor to either the platform cursor or fake cursor

Overridden from FSlateApplicationBase

Name Description

Public function Virtual

TSharedRef< ...

 

AddWindow

(
    TSharedRef< SWindow > InSlateWindow,
    const bool bShowImmediately
)

Associates a top level Slate Window with a native window and ensures that it is tracked properly by the application.

Public function Virtual Const

bool

 

AnyMenusVisible()

Public function Virtual

void

 

ArrangeWindowToFrontVirtual

(
    TArray< TSharedRef< SWindow >>& Wi...,
    const TSharedRef< SWindow >& Windo...
)

Reorders an array of windows so the specified window is "brought to the front"

Public function Virtual Const

FVector2D

 

CalculateTooltipWindowPosition

(
    const FSlateRect& InAnchorRect,
    const FVector2D& InSize,
    bool bAutoAdjustForDPIScale
)

Calculates the tooltip window position.

Protected function Virtual Const

bool

 

DoesWidgetHaveMouseCapture

(
    const TSharedPtr< const SWidget > W...
)

Gets whether or not a particular widget has mouse capture.

Protected function Virtual Const

bool

 

DoesWidgetHaveMouseCaptureByUser

(
    const TSharedPtr< const SWidget > W...,
    int32 UserIndex,
    TOptional< int32 > PointerIndex
)

Gets whether or not a particular widget has mouse capture by a user.

Public function Virtual

bool

 

FindPathToWidget

(
    TSharedRef< const SWidget > InWidge...,
    FWidgetPath& OutWidgetPath,
    EVisibility VisibilityFilter
)

Searches for the specified widget and generates a full path to it.

Public function Virtual Const

TSharedPtr< ...

 

FindWidgetWindow

(
    TSharedRef< const SWidget > InWidge...
)

Finds the window that the provided widget resides in

Public function Virtual Const

TSharedPtr< ...

 

GetActiveTopLevelWindow()

Gets the active top-level window.

Public function Virtual Const

const FSlate...

 

GetAppIcon()

Gets the global application icon.

Public function Virtual Const

float

 

GetApplicationScale()

Gets the ratio SlateUnit / ScreenPixel.

Public function Virtual Const

const double

 

GetCurrentTime()

Gets Slate's current cached real time.

Public function Virtual Const

FVector2D

 

GetCursorPos()

Gets the current position of the cursor.

Public function Virtual Const

FVector2D

 

GetCursorSize()

Gets the size of the cursor..

Public function Virtual Const

TSharedPtr< ...

 

GetKeyboardFocusedWidget()

Gets the widget that currently has keyboard focus, if any.

Public function Virtual Const

FVector2D

 

GetLastCursorPos()

Gets the last known position of the cursor.

Protected function Virtual Const

TSharedPtr< ...

 

GetMouseCaptorImpl()

Implementation of GetMouseCaptor which can be overridden without warnings.

Public function Virtual Const

EUINavigatio...

 

GetNavigationActionFromKey

(
    const FKeyEvent& InKeyEvent
)

Returns the navigation action corresponding to a key event.

Public function Virtual

EUINavigatio...

 

GetNavigationDirectionFromAnalog

(
    const FAnalogInputEvent& InAnalogE...
)

Returns navigation direction matching an anlog event, this is determined in the FNavigationConfig

Public function Virtual Const

EUINavigatio...

 

GetNavigationDirectionFromKey

(
    const FKeyEvent& InKeyEvent
)

Returns navigation direction matching a key event, this is determined in the FNavigationConfig

Public function Virtual Const

FSlateRect

 

GetPreferredWorkArea()

Gets the rectangle of the current preferred work area.

Public function Virtual Const

bool

 

GetSoftwareCursorAvailable()

Whether the software cursor is enabled for this application.

Public function Virtual Const

EVisibility

 

GetSoftwareCursorVis()

Gets the desired visibility of the software cursor

Public function Virtual Const

const TArray...

 

GetTopLevelWindows()

Get a list of all top-level windows in the application, excluding virtual windows.

Public function Virtual Const

TSharedPtr< ...

 

GetUserFocusedWidget

(
    uint32 UserIndex
)

Public function Virtual Const

EWindowTrans...

 

GetWindowTransparencySupport()

Get the highest level of window transparency support currently enabled by this application

Public function Virtual Const

bool

 

HasAnyMouseCaptor()

Gets whether or not a widget has captured the mouse.

Protected function Virtual Const

TOptional< E...

 

HasAnyUserFocus

(
    const TSharedPtr< const SWidget > W...
)

Gets whether or not a particular widget has any users focus, and if so the type of focus (first one found).

Public function Virtual Const

bool

 

HasFocusedDescendants

(
    const TSharedRef< const SWidget >&...
)

Checks whether the specified widget has any descendants which are currently focused.

Protected function Virtual Const

TOptional< E...

 

HasUserFocus

(
    const TSharedPtr< const SWidget > W...,
    int32 UserIndex
)

Gets whether or not a particular widget has the specified users focus, and if so the type of focus.

Public function Virtual Const

bool

 

HasUserFocusedDescendants

(
    const TSharedRef< const SWidget >&...,
    int32 UserIndex
)

Checks whether the specified widget has any descendants which are currently focused for the specified user user.

Public function Virtual Const

bool

 

HasUserMouseCapture

(
    int32 UserIndex
)

Gets whether or not a widget has captured the mouse for a particular user.

Public function Virtual Const

bool

 

IsActive()

Whether the application is active.

Public function Virtual

bool

 

IsExternalUIOpened()

Checks whether an UI for external services such as Steam is open.

Protected function Virtual Const

bool

 

IsWidgetDirectlyHovered

(
    const TSharedPtr< const SWidget > W...
)

Gets whether or not a particular widget is directly hovered.

Public function Virtual Const

bool

 

IsWindowHousingInteractiveTooltip

(
    const TSharedRef< const SWindow >&...
)

Protected function Virtual Const

FWidgetPath

 

LocateWidgetInWindow

(
    FVector2D ScreenspaceMouseCoordinat...,
    const TSharedRef< SWindow >& Windo...,
    bool bIgnoreEnabledStatus,
    int32 UserIndex
)

Given a window, locate a widget under the cursor in it; returns an invalid path if cursor is not over this window.

Public function Virtual Const

TSharedRef< ...

 

MakeImage

(
    const TAttribute< const FSlateBrush...,
    const TAttribute< FSlateColor >& C...,
    const TAttribute< EVisibility >& V...
)

Creates an image widget.

Public function Virtual

TSharedRef< ...

 

MakeToolTip

(
    const FText& ToolTipText
)

Creates a tool tip with the specified text.

Public function Virtual

TSharedRef< ...

 

MakeToolTip

(
    const TAttribute< FText >& ToolTip...
)

Creates a tool tip with the specified text.

Public function Virtual Const

TSharedRef< ...

 

MakeWindowTitleBar

(
    const FWindowTitleBarArgs& InArgs,
    TSharedPtr< IWindowTitleBar >& Out...
)

Creates a title bar for the specified window.

Public function Virtual

void

 

RequestDestroyWindow

(
    TSharedRef< SWindow > WindowToDestr...
)

Destroying windows has implications on some OSs (e.g. destroying Win32 HWNDs can cause events to be lost).

Public function Virtual

void

 

SetAllUserFocus

(
    const FWidgetPath& InFocusPath,
    const EFocusCause InCause
)

Sets the focus for all users to the specified widget. The widget must be allowed to receive focus.

Public function Virtual

void

 

SetAllUserFocusAllowingDescendantFocus

(
    const FWidgetPath& InFocusPath,
    const EFocusCause InCause
)

Sets the focus for all users to the specified widget unless that user is focused on a descendant.

Public function Virtual

bool

 

SetKeyboardFocus

(
    const FWidgetPath& InFocusPath,
    const EFocusCause InCause
)

Sets keyboard focus to the specified widget. The widget must be allowed to receive keyboard focus.

Public function Virtual

bool

 

SetUserFocus

(
    const uint32 InUserIndex,
    const FWidgetPath& InFocusPath,
    const EFocusCause InCause
)

Sets user focus to the specified widget. The widget must be allowed to receive focus.

Protected function Virtual Const

bool

 

ShowUserFocus

(
    const TSharedPtr< const SWidget > W...
)

Gets whether or not a particular widget should show user focus.

Overridden from FGenericApplicationMessageHandler

Name Description

Public function Virtual

bool

 

BeginReshapingWindow

(
    const TSharedRef< FGenericWindow > ...
)

Public function Virtual

void

 

FinishedReshapingWindow

(
    const TSharedRef< FGenericWindow > ...
)

Public function Virtual Const

FWindowSizeL...

 

GetSizeLimitsForWindow

(
    const TSharedRef< FGenericWindow > ...
)

Public function Virtual

EWindowZone:...

 

GetWindowZoneForPoint

(
    const TSharedRef< FGenericWindow > ...,
    const int32 X,
    const int32 Y
)

Public function Virtual

void

 

HandleDPIScaleChanged

(
    const TSharedRef< FGenericWindow > ...
)

Public function Virtual

bool

 

OnApplicationActivationChanged

(
    const bool IsActive
)

Public function Virtual

bool

 

OnControllerAnalog

(
    FGamepadKeyNames::Type KeyName,
    int32 ControllerId,
    float AnalogValue
)

Public function Virtual

bool

 

OnControllerButtonPressed

(
    FGamepadKeyNames::Type KeyName,
    int32 ControllerId,
    bool IsRepeat
)

Public function Virtual

bool

 

OnControllerButtonReleased

(
    FGamepadKeyNames::Type KeyName,
    int32 ControllerId,
    bool IsRepeat
)

Public function Virtual

bool

 

OnConvertibleLaptopModeChanged()

Public function Virtual

bool

 

OnCursorSet()

Public function Virtual

EDropEffect:...

 

OnDragDrop

(
    const TSharedPtr< FGenericWindow > ...
)

Public function Virtual

EDropEffect:...

 

OnDragEnterExternal

(
    const TSharedRef< FGenericWindow > ...,
    const FString& Text,
    const TArray< FString >& Files
)

Public function Virtual

EDropEffect:...

 

OnDragEnterFiles

(
    const TSharedRef< FGenericWindow > ...,
    const TArray< FString >& Files
)

Public function Virtual

EDropEffect:...

 

OnDragEnterText

(
    const TSharedRef< FGenericWindow > ...,
    const FString& Text
)

Public function Virtual

void

 

OnDragLeave

(
    const TSharedPtr< FGenericWindow > ...
)

Public function Virtual

EDropEffect:...

 

OnDragOver

(
    const TSharedPtr< FGenericWindow > ...
)

Public function Virtual

void

 

OnInputLanguageChanged()

Public function Virtual

bool

 

OnKeyChar

(
    const TCHAR Character,
    const bool IsRepeat
)

Public function Virtual

bool

 

OnKeyDown

(
    const int32 KeyCode,
    const uint32 CharacterCode,
    const bool IsRepeat
)

Public function Virtual

bool

 

OnKeyUp

(
    const int32 KeyCode,
    const uint32 CharacterCode,
    const bool IsRepeat
)

Public function Virtual

bool

 

OnMotionDetected

(
    const FVector& Tilt,
    const FVector& RotationRate,
    const FVector& Gravity,
    const FVector& Acceleration,
    int32 ControllerId
)

Public function Virtual

bool

 

OnMouseDoubleClick

(
    const TSharedPtr< FGenericWindow > ...,
    const EMouseButtons::Type Button,
    const FVector2D CursorPos
)

Public function Virtual

bool

 

OnMouseDoubleClick

(
    const TSharedPtr< FGenericWindow > ...,
    const EMouseButtons::Type Button
)

Public function Virtual

bool

 

OnMouseDown

(
    const TSharedPtr< FGenericWindow > ...,
    const EMouseButtons::Type Button,
    const FVector2D CursorPos
)

Public function Virtual

bool

 

OnMouseDown

(
    const TSharedPtr< FGenericWindow > ...,
    const EMouseButtons::Type Button
)

Public function Virtual

bool

 

OnMouseMove()

Public function Virtual

bool

 

OnMouseUp

(
    const EMouseButtons::Type Button
)

Public function Virtual

bool

 

OnMouseUp

(
    const EMouseButtons::Type Button,
    const FVector2D CursorPos
)

Public function Virtual

bool

 

OnMouseWheel

(
    const float Delta
)

Public function Virtual

bool

 

OnMouseWheel

(
    const float Delta,
    const FVector2D CursorPos
)

Public function Virtual

void

 

OnMovedWindow

(
    const TSharedRef< FGenericWindow > ...,
    const int32 X,
    const int32 Y
)

Public function Virtual

void

 

OnOSPaint

(
    const TSharedRef< FGenericWindow > ...
)

Public function Virtual

bool

 

OnRawMouseMove

(
    const int32 X,
    const int32 Y
)

Public function Virtual

void

 

OnResizingWindow

(
    const TSharedRef< FGenericWindow > ...
)

Public function Virtual

bool

 

OnSizeChanged

(
    const TSharedRef< FGenericWindow > ...,
    const int32 Width,
    const int32 Height,
    bool bWasMinimized
)

Public function Virtual

bool

 

OnTouchEnded

(
    const FVector2D& Location,
    int32 TouchIndex,
    int32 ControllerId
)

Public function Virtual

bool

 

OnTouchFirstMove

(
    const FVector2D& Location,
    float Force,
    int32 TouchIndex,
    int32 ControllerId
)

Public function Virtual

bool

 

OnTouchForceChanged

(
    const FVector2D& Location,
    float Force,
    int32 TouchIndex,
    int32 ControllerId
)

Public function Virtual

bool

 

OnTouchGesture

(
    EGestureEvent GestureType,
    const FVector2D& Delta,
    float WheelDelta,
    bool bIsDirectionInvertedFromDevice
)

Public function Virtual

bool

 

OnTouchMoved

(
    const FVector2D& Location,
    float Force,
    int32 TouchIndex,
    int32 ControllerId
)

Public function Virtual

bool

 

OnTouchStarted

(
    const TSharedPtr< FGenericWindow > ...,
    const FVector2D& Location,
    float Force,
    int32 TouchIndex,
    int32 ControllerId
)

Public function Virtual

bool

 

OnWindowAction

(
    const TSharedRef< FGenericWindow > ...,
    const EWindowAction::Type InActionT...
)

Public function Virtual

bool

 

OnWindowActivationChanged

(
    const TSharedRef< FGenericWindow > ...,
    const EWindowActivation ActivationT...
)

Public function Virtual

void

 

OnWindowClose

(
    const TSharedRef< FGenericWindow > ...
)

Public function Virtual

void

 

SetCursorPos

(
    const FVector2D& MouseCoordinate
)

Sets the position of the cursor.

Public function Virtual Const

bool

 

ShouldProcessUserInputMessages

(
    const TSharedPtr< FGenericWindow > ...
)

Public function Virtual

void

 

ShouldSimulateGesture

(
    EGestureEvent Gesture,
    bool bEnable
)

Public function Virtual

void

 

SignalSystemDPIChanged

(
    const TSharedRef< FGenericWindow > ...
)

Classes

Name

Description

Public class

FApplicationActivationStateChangedEvent

Public class

FOnApplicationMousePreInputButtonDownListener

Gets a delegate that is invoked before the mouse input button down get process by slate widgets bubble system.

Public class

FOnApplicationPreInputKeyDownListener

Gets a delegate that is invoked before the input key get process by slate widgets bubble system.

Public class

FOnModalLoopTickEvent

Event type for when Slate is ticking during a modal dialog loop

Public class

FOnWindowBeingDestroyed

Delegate called when a window is about to be destroyed

Public class

FOnWindowDPIScaleChanged

Gets a delegate that is invoked in the editor when a windows dpi scale changes or when a widget window may have changed and DPI scale info needs to be checked

Public class

FSlateLastUserInteractionTimeUpdateEvent

Public class

FSlateTickEvent

Event before slate application ticks.

Public class

FUserRegisteredEvent

Delegate for when a new user has been registered.

Typedefs

Name

Description

FOnFocusChanging

Delegate called just before possible focus change

Constants

Name

Description

CurrentApplication

Application singleton

Deprecated Functions

Name Description

Public function Const

TSharedPtr< ...

 

FindWidgetWindow

(
    TSharedRef< const SWidget > InWidge...,
    FWidgetPath& OutWidgetPath
)

The FindWidgetWindow method that takes an FWidgetPath has been deprecated. If you dont need the widget path, use FindWidgetWindow(MyWidget) instead. If you need the path use GeneratePathToWidget

Public function

void

 

ForEachUser

(
    TFunctionRef< void*...,
    bool bIncludeVirtualUsers
)

ForEachUser now provides an FSlateUser& parameter to the lambda instead of an FSlateUser*

Public function Virtual Const

EUINavigatio...

 

GetNavigationActionForKey

(
    const FKey& InKey
)

GetNavigationActionForKey doesn't handle multiple users properly, use GetNavigationActionFromKey instead

Public function

void

 

ReleaseMouseCapture()

ReleaseMouseCapture has been renamed to ReleaseAllPointerCapture()

Public function

void

 

ReleaseMouseCaptureForUser

(
    int32 UserIndex
)

ReleaseMouseCaptureForUser has been renamed to ReleaseAllPointerCapture(int32 UserIndex)

Public function

void

 

SetNavigationConfigFactory

Returning to a simpler method of registering navigation configs., is what you should use now.

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