UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
SlateApplication.cpp File Reference
#include "Framework/Application/SlateApplication.h"
#include "Framework/Application/SlateUser.h"
#include "Rendering/SlateDrawBuffer.h"
#include "Misc/CommandLine.h"
#include "Misc/ScopeLock.h"
#include "Misc/TimeGuard.h"
#include "Misc/ConfigCacheIni.h"
#include "Misc/CoreDelegates.h"
#include "Misc/App.h"
#include "Modules/ModuleManager.h"
#include "InputCoreModule.h"
#include "Input/NavigationMetadata.h"
#include "Layout/LayoutUtils.h"
#include "Sound/ISlateSoundDevice.h"
#include "Sound/NullSlateSoundDevice.h"
#include "Framework/Text/PlatformTextField.h"
#include "Framework/Application/NavigationConfig.h"
#include "Widgets/SWeakWidget.h"
#include "Widgets/Images/SImage.h"
#include "Widgets/Layout/SBox.h"
#include "Widgets/SToolTip.h"
#include "Widgets/SViewport.h"
#include "Framework/Application/SWindowTitleBar.h"
#include "Input/Events.h"
#include "Input/HittestGrid.h"
#include "HAL/PlatformApplicationMisc.h"
#include "HAL/PlatformStackWalk.h"
#include "Null/NullPlatformApplicationMisc.h"
#include "GenericPlatform/GenericPlatformInputDeviceMapper.h"
#include "Framework/Application/IWidgetReflector.h"
#include "Framework/Commands/GenericCommands.h"
#include "Framework/Notifications/NotificationManager.h"
#include "Framework/Notifications/SlateAsyncTaskNotificationImpl.h"
#include "Framework/Application/IInputProcessor.h"
#include "GenericPlatform/ITextInputMethodSystem.h"
#include "Framework/Docking/TabCommands.h"
#include "Math/UnitConversion.h"
#include "ProfilingDebugging/CsvProfiler.h"
#include "ProfilingDebugging/StallDetector.h"
#include "Types/ReflectionMetadata.h"
#include "Trace/SlateMemoryTags.h"
#include "Trace/SlateTrace.h"
#include "Styling/StarshipCoreStyle.h"
#include "Styling/UMGCoreStyle.h"
#include "Debugging/SlateDebugging.h"
#include "Styling/StyleColors.h"

Classes

class  FFauxSlateCursor
 
class  FEventRouter
 
class  FEventRouter::FDirectPolicy
 
class  FEventRouter::FToLeafmostPolicy
 
class  FEventRouter::FTunnelPolicy
 
class  FEventRouter::FBubblePolicy
 
struct  FEventRouter::Translate< EventType >
 
struct  FEventRouter::Translate< FPointerEvent >
 
struct  FScopedNavigationTransition
 
struct  FDrawWindowArgs
 

Namespaces

namespace  SlateDefs
 

Macros

#define SLATE_HAS_WIDGET_REFLECTOR   !(UE_BUILD_TEST || UE_BUILD_SHIPPING) && PLATFORM_DESKTOP
 

Functions

 CSV_DECLARE_CATEGORY_MODULE_EXTERN (CORE_API, Basic)
 
 CSV_DECLARE_CATEGORY_MODULE_EXTERN (SLATECORE_API, Slate)
 
 DECLARE_CYCLE_STAT (TEXT("Message Tick Time"), STAT_SlateMessageTick, STATGROUP_Slate)
 
 DECLARE_CYCLE_STAT (TEXT("Slate App Input"), STAT_SlateApplicationInput, STATGROUP_Slate)
 
 DECLARE_CYCLE_STAT (TEXT("Total Slate Tick Time"), STAT_SlateTickTime, STATGROUP_Slate)
 
 DECLARE_CYCLE_STAT (TEXT("Draw Window And Children Time"), STAT_SlateDrawWindowTime, STATGROUP_Slate)
 
 DECLARE_CYCLE_STAT (TEXT("TickRegisteredWidgets"), STAT_SlateTickRegisteredWidgets, STATGROUP_Slate)
 
 DECLARE_CYCLE_STAT (TEXT("PreTickEvent"), STAT_SlatePreTickEvent, STATGROUP_Slate)
 
 DECLARE_CYCLE_STAT (TEXT("ShowVirtualKeyboard"), STAT_ShowVirtualKeyboard, STATGROUP_Slate)
 
 DECLARE_CYCLE_STAT (TEXT("ProcessKeyDown"), STAT_ProcessKeyDown, STATGROUP_Slate)
 
 DECLARE_CYCLE_STAT (TEXT("ProcessKeyUp"), STAT_ProcessKeyUp, STATGROUP_Slate)
 
 DECLARE_CYCLE_STAT (TEXT("ProcessKeyChar"), STAT_ProcessKeyChar, STATGROUP_Slate)
 
 DECLARE_CYCLE_STAT (TEXT("ProcessKeyChar (route focus)"), STAT_ProcessKeyChar_RouteAlongFocusPath, STATGROUP_Slate)
 
 DECLARE_CYCLE_STAT (TEXT("ProcessKeyChar (call OnKeyChar)"), STAT_ProcessKeyChar_Call_OnKeyChar, STATGROUP_Slate)
 
 DECLARE_CYCLE_STAT (TEXT("ProcessAnalogInput"), STAT_ProcessAnalogInput, STATGROUP_Slate)
 
 DECLARE_CYCLE_STAT (TEXT("ProcessMouseButtonDown"), STAT_ProcessMouseButtonDown, STATGROUP_Slate)
 
 DECLARE_CYCLE_STAT (TEXT("ProcessMouseButtonDoubleClick"), STAT_ProcessMouseButtonDoubleClick, STATGROUP_Slate)
 
 DECLARE_CYCLE_STAT (TEXT("ProcessMouseButtonUp"), STAT_ProcessMouseButtonUp, STATGROUP_Slate)
 
 DECLARE_CYCLE_STAT (TEXT("ProcessMouseWheelGesture"), STAT_ProcessMouseWheelGesture, STATGROUP_Slate)
 
 DECLARE_CYCLE_STAT (TEXT("ProcessMouseMove"), STAT_ProcessMouseMove, STATGROUP_Slate)
 
TArray< SWindow * > GatherAllDescendants (const TArray< TSharedRef< SWindow > > &InWindowList)
 
void TakeScreenshotCommon (const TSharedRef< SWidget > &Widget, const FIntRect &InnerWidgetArea, FIntRect &ScreenshotRect, SWindow *WidgetWindow)
 
FKey TranslateMouseButtonToKey (const EMouseButtons::Type Button)
 
bool ValidateTouchIndex (int32 TouchIndex)
 
FWindowActivateEvent::EActivationType TranslationWindowActivationMessage (const EWindowActivation ActivationType)
 

Variables

bool GSlateInputMotionFiresUserInteractionEvents = true
 
bool GSlateEnableGamepadEditorNavigation = true
 
TAutoConsoleVariable< int32ThrottleWhenMouseIsMoving (TEXT("Slate.ThrottleWhenMouseIsMoving"), false, TEXT("Whether to attempt to increase UI responsiveness based on mouse cursor movement."))
 
TAutoConsoleVariable< int32TargetFrameRateForResponsiveness (TEXT("Slate.TargetFrameRateForResponsiveness"), 35, TEXT("Minimum sustained average frame rate required before we consider the editor to be \"responsive\" for a smooth UI experience"))
 
TAutoConsoleVariable< int32AllowSlateToSleep (TEXT("Slate.AllowSlateToSleep"), GIsEditor, TEXT("Whether Slate should go to sleep when there are no active timers and the user is idle"))
 
TAutoConsoleVariable< floatSleepBufferPostInput (TEXT("Slate.SleepBufferPostInput"), 0.0f, TEXT("The amount of time that must pass without any user action before Slate is put to sleep (provided that there are no active timers)."))
 
FAutoConsoleVariableRef CVarRequireFocusForGamepadInput (TEXT("Slate.RequireFocusForGamepadInput"), bRequireFocusForGamepadInput,)
 
FAutoConsoleVariableRef CVarSlateTransformFullscreenMouseInput (TEXT("Slate.Transform.FullscreenMouseInput"), TransformFullscreenMouseInput,)
 
FAutoConsoleVariableRef CVarEnableTooltips (TEXT("Slate.EnableTooltips"), bEnableTooltips, TEXT("Whether to allow tooltips to spawn at all."))
 

Macro Definition Documentation

◆ SLATE_HAS_WIDGET_REFLECTOR

#define SLATE_HAS_WIDGET_REFLECTOR   !(UE_BUILD_TEST || UE_BUILD_SHIPPING) && PLATFORM_DESKTOP

Function Documentation

◆ CSV_DECLARE_CATEGORY_MODULE_EXTERN() [1/2]

CSV_DECLARE_CATEGORY_MODULE_EXTERN ( CORE_API  ,
Basic   
)

◆ CSV_DECLARE_CATEGORY_MODULE_EXTERN() [2/2]

CSV_DECLARE_CATEGORY_MODULE_EXTERN ( SLATECORE_API  ,
Slate   
)

◆ DECLARE_CYCLE_STAT() [1/18]

DECLARE_CYCLE_STAT ( TEXT("Draw Window And Children Time" ,
STAT_SlateDrawWindowTime  ,
STATGROUP_Slate   
)

◆ DECLARE_CYCLE_STAT() [2/18]

DECLARE_CYCLE_STAT ( TEXT("Message Tick Time" ,
STAT_SlateMessageTick  ,
STATGROUP_Slate   
)

◆ DECLARE_CYCLE_STAT() [3/18]

DECLARE_CYCLE_STAT ( TEXT("PreTickEvent")  ,
STAT_SlatePreTickEvent  ,
STATGROUP_Slate   
)

◆ DECLARE_CYCLE_STAT() [4/18]

DECLARE_CYCLE_STAT ( TEXT("ProcessAnalogInput")  ,
STAT_ProcessAnalogInput  ,
STATGROUP_Slate   
)

◆ DECLARE_CYCLE_STAT() [5/18]

DECLARE_CYCLE_STAT ( TEXT("ProcessKeyChar (call OnKeyChar)")  ,
STAT_ProcessKeyChar_Call_OnKeyChar  ,
STATGROUP_Slate   
)

◆ DECLARE_CYCLE_STAT() [6/18]

DECLARE_CYCLE_STAT ( TEXT("ProcessKeyChar (route focus)")  ,
STAT_ProcessKeyChar_RouteAlongFocusPath  ,
STATGROUP_Slate   
)

◆ DECLARE_CYCLE_STAT() [7/18]

DECLARE_CYCLE_STAT ( TEXT("ProcessKeyChar")  ,
STAT_ProcessKeyChar  ,
STATGROUP_Slate   
)

◆ DECLARE_CYCLE_STAT() [8/18]

DECLARE_CYCLE_STAT ( TEXT("ProcessKeyDown")  ,
STAT_ProcessKeyDown  ,
STATGROUP_Slate   
)

◆ DECLARE_CYCLE_STAT() [9/18]

DECLARE_CYCLE_STAT ( TEXT("ProcessKeyUp")  ,
STAT_ProcessKeyUp  ,
STATGROUP_Slate   
)

◆ DECLARE_CYCLE_STAT() [10/18]

DECLARE_CYCLE_STAT ( TEXT("ProcessMouseButtonDoubleClick")  ,
STAT_ProcessMouseButtonDoubleClick  ,
STATGROUP_Slate   
)

◆ DECLARE_CYCLE_STAT() [11/18]

DECLARE_CYCLE_STAT ( TEXT("ProcessMouseButtonDown")  ,
STAT_ProcessMouseButtonDown  ,
STATGROUP_Slate   
)

◆ DECLARE_CYCLE_STAT() [12/18]

DECLARE_CYCLE_STAT ( TEXT("ProcessMouseButtonUp")  ,
STAT_ProcessMouseButtonUp  ,
STATGROUP_Slate   
)

◆ DECLARE_CYCLE_STAT() [13/18]

DECLARE_CYCLE_STAT ( TEXT("ProcessMouseMove")  ,
STAT_ProcessMouseMove  ,
STATGROUP_Slate   
)

◆ DECLARE_CYCLE_STAT() [14/18]

DECLARE_CYCLE_STAT ( TEXT("ProcessMouseWheelGesture")  ,
STAT_ProcessMouseWheelGesture  ,
STATGROUP_Slate   
)

◆ DECLARE_CYCLE_STAT() [15/18]

DECLARE_CYCLE_STAT ( TEXT("ShowVirtualKeyboard")  ,
STAT_ShowVirtualKeyboard  ,
STATGROUP_Slate   
)

◆ DECLARE_CYCLE_STAT() [16/18]

DECLARE_CYCLE_STAT ( TEXT("Slate App Input" ,
STAT_SlateApplicationInput  ,
STATGROUP_Slate   
)

◆ DECLARE_CYCLE_STAT() [17/18]

DECLARE_CYCLE_STAT ( TEXT("TickRegisteredWidgets")  ,
STAT_SlateTickRegisteredWidgets  ,
STATGROUP_Slate   
)

◆ DECLARE_CYCLE_STAT() [18/18]

DECLARE_CYCLE_STAT ( TEXT("Total Slate Tick Time" ,
STAT_SlateTickTime  ,
STATGROUP_Slate   
)

◆ GatherAllDescendants()

TArray< SWindow * > GatherAllDescendants ( const TArray< TSharedRef< SWindow > > &  InWindowList)

◆ TakeScreenshotCommon()

void TakeScreenshotCommon ( const TSharedRef< SWidget > &  Widget,
const FIntRect InnerWidgetArea,
FIntRect ScreenshotRect,
SWindow WidgetWindow 
)

◆ TranslateMouseButtonToKey()

FKey TranslateMouseButtonToKey ( const EMouseButtons::Type  Button)

◆ TranslationWindowActivationMessage()

FWindowActivateEvent::EActivationType TranslationWindowActivationMessage ( const EWindowActivation  ActivationType)

◆ ValidateTouchIndex()

bool ValidateTouchIndex ( int32  TouchIndex)

Variable Documentation

◆ AllowSlateToSleep

TAutoConsoleVariable< int32 > AllowSlateToSleep(TEXT("Slate.AllowSlateToSleep"), GIsEditor, TEXT("Whether Slate should go to sleep when there are no active timers and the user is idle")) ( TEXT("Slate.AllowSlateToSleep")  ,
GIsEditor  ,
TEXT("Whether Slate should go to sleep when there are no active timers and the user is idle"  
)

Whether Slate should go to sleep when there are no active timers and the user is idle

◆ CVarEnableTooltips

FAutoConsoleVariableRef CVarEnableTooltips(TEXT("Slate.EnableTooltips"), bEnableTooltips, TEXT("Whether to allow tooltips to spawn at all.")) ( TEXT("Slate.EnableTooltips")  ,
bEnableTooltips  ,
TEXT("Whether to allow tooltips to spawn at all."  
)

◆ CVarRequireFocusForGamepadInput

FAutoConsoleVariableRef CVarRequireFocusForGamepadInput(TEXT("Slate.RequireFocusForGamepadInput"), bRequireFocusForGamepadInput,) ( TEXT("Slate.RequireFocusForGamepadInput")  ,
bRequireFocusForGamepadInput   
)

◆ CVarSlateTransformFullscreenMouseInput

FAutoConsoleVariableRef CVarSlateTransformFullscreenMouseInput(TEXT("Slate.Transform.FullscreenMouseInput"), TransformFullscreenMouseInput,) ( TEXT("Slate.Transform.FullscreenMouseInput")  ,
TransformFullscreenMouseInput   
)

◆ GSlateEnableGamepadEditorNavigation

bool GSlateEnableGamepadEditorNavigation = true

◆ GSlateInputMotionFiresUserInteractionEvents

bool GSlateInputMotionFiresUserInteractionEvents = true

◆ SleepBufferPostInput

TAutoConsoleVariable< float > SleepBufferPostInput(TEXT("Slate.SleepBufferPostInput"), 0.0f, TEXT("The amount of time that must pass without any user action before Slate is put to sleep (provided that there are no active timers).")) ( TEXT("Slate.SleepBufferPostInput")  ,
0.  0f,
TEXT("The amount of time that must pass without any user action before Slate is put to sleep (provided that there are no active timers).")   
)

The amount of time that must pass without any user action before Slate is put to sleep (provided that there are no active timers).

◆ TargetFrameRateForResponsiveness

TAutoConsoleVariable< int32 > TargetFrameRateForResponsiveness(TEXT("Slate.TargetFrameRateForResponsiveness"), 35, TEXT("Minimum sustained average frame rate required before we consider the editor to be \"responsive\" for a smooth UI experience")) ( TEXT("Slate.TargetFrameRateForResponsiveness")  ,
35  ,
TEXT("Minimum sustained average frame rate required before we consider the editor to be \"responsive\" for a smooth UI experience"  
)

Minimum sustained average frame rate required before we consider the editor to be "responsive" for a smooth UI experience

◆ ThrottleWhenMouseIsMoving

TAutoConsoleVariable< int32 > ThrottleWhenMouseIsMoving(TEXT("Slate.ThrottleWhenMouseIsMoving"), false, TEXT("Whether to attempt to increase UI responsiveness based on mouse cursor movement.")) ( TEXT("Slate.ThrottleWhenMouseIsMoving")  ,
false  ,
TEXT("Whether to attempt to increase UI responsiveness based on mouse cursor movement."  
)

True if we should allow throttling based on mouse movement activity. int32 instead of bool only for console variable system.