FSlateApplication

Windows
MacOS
Linux

Inheritance Hierarchy

Syntax

class FSlateApplication :
    public FSlateApplicationBase,
    public FGenericApplicationMessageHandler

Variables

Name Description

Public variable

FSlateRect

 

LastComputedBounds

Desktop Space Rect that bounds the cursor.

Public variable

FSlateApplicati...

 

OnApplicationActivationStateChanged

Public variable

FDragDropChecki...

 

OnDragDropCheckOverride

Public variable

FWeakWidgetPath

 

PathToLockingWidget

Path to widget that currently holds the cursor lock; invalid path if no cursor lock.

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

FVector2D

 

CalculateTooltipWindowPosition

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

Calculates the tooltip window position.

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

Public 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

TSharedPtr< ...

 

FindMenuInWidgetPath

(
    const FWidgetPath& InWidgetPath
)

Attempt to locate a menu that contains the specified widget

Public function

TSharedRef< ...

 

FindOrCreateVirtualUser

(
    int32 VirtualUserIndex
)

Public function Const

TSharedPtr< ...

 

FindWidgetWindow

(
    TSharedRef< const SWidget > InWidge...
)

Finds the window that the provided widget resides in

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(FSlateUser*...,
    bool bIncludeVirtualUsers
)

Allows you do some operations for every registered user.

Public function Const

void

 

GeneratePathToWidgetChecked

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

Public function Const

bool

 

GeneratePathToWidgetUnchecked

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

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

TSharedPtr< ...

 

GetCachableElementList

(
    const TSharedPtr< SWindow >& Curre...,
    const ILayoutCache* LayoutCach...
)

Public function Const

float

 

GetCursorRadius()

Getter for the cursor radius

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

Mouse capturereturning 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

FSlateUser &...

 

GetOrCreateUser

(
    int32 UserIndex
)

Locates the SlateUser object corresponding to the index, if one can't be found, it will create a slate user at the provided index.

Public function

FPopupSuppor...

 

GetPopupSupport()

Public function Const

const TSet< ...

 

GetPressedMouseButtons()

Public function Const

const FStyle...

 

GetRootStyle()

Public function Const

float

 

GetSoundDuration

(
    const FSlateSound& Sound
)

Public function Const

ITextInputMe...

 

GetTextInputMethodSystem()

Protected function Const

const FSlate...

 

GetUser

(
    int32 UserIndex
)

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

Protected function

FSlateUser &...

 

GetUser

(
    int32 UserIndex
)

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

Public function Const

int32

 

GetUserIndexForController

(
    int32 ControllerId
)

Public function Const

int32

 

GetUserIndexForKeyboard()

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
)

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
)

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
)

Destroys an SWindow, removing it and all its children from the Slate window list.

Public function

void

 

NavigateToWidget

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

Destroys an SWindow, removing it and all its children from the Slate window list.

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

FSlateTickEv...

 

OnPostTick()

Event after slate application ticks.

Public function

FSlateTickEv...

 

OnPreTick()

Public 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 uint32 UserIndex,
    const uint32 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 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< ...

 

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

 

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

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

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.

Public function

FDelegateHan...

 

RegisterOnWindowActionNotification

(
    const FOnWindowAction& Notificatio...
)

Register for a notification when the window action occurs.

Protected function

void

 

RegisterUser

(
    TSharedRef< FSlateUser > User
)

Register a user with Slate.

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

 

ReleaseMouseCapture()

Releases the mouse capture from whatever it currently is on - for all users for all pointers.

Public function

void

 

ReleaseMouseCaptureForUser

(
    int32 UserIndex
)

Releases the mouse capture from whatever it currently is on for a particular user.

Public function

void

 

ReleaseResourcesForLayoutCache

(
    const ILayoutCache* LayoutCach...
)

Once a layout cache is destroyed it needs to free any resources it was using in a safe way to prevent any in-flight rendering from being interrupted by referencing resources that go away.

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

 

SetCursorPos

(
    const FVector2D& MouseCoordinate
)

Sets the position of the cursor.

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

 

SetInputManager

(
    TSharedRef< ISlateInputManager > In...
)

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

 

SetUnhandledKeyDownEventHandler

(
    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...,
    TArray< FColor >& OutColorData,
    FIntVector& OutSize
)

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

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.

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

 

TickApplication

(
    ESlateTickType TickType,
    float DeltaTime
)

Ticks and paints the actual Slate portion of the application.

Protected function

void

 

TickPlatform

(
    float DeltaTime
)

Pumps and ticks the platform.

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

Updates tool tip

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"

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

 

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

EUINavigatio...

 

GetNavigationDirectionFromAnalog

(
    const FAnalogInputEvent& InAnalogE...
)

Public function Virtual Const

EUINavigatio...

 

GetNavigationDirectionFromKey

(
    const FKeyEvent& InKeyEvent
)

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

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
)

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 TSharedRef< SWindow >& Windo...,
    const TSharedPtr< SWidget >& Cente...,
    EHorizontalAlignment CenterContentA...,
    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

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,
    const FVector2D CursorPos
)

Public function Virtual

bool

 

OnMouseUp

(
    const EMouseButtons::Type Button
)

Public function Virtual

bool

 

OnMouseWheel

(
    const float Delta,
    const FVector2D CursorPos
)

Public function Virtual

bool

 

OnMouseWheel

(
    const float Delta
)

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

Enums

Name

Description

Private enum

EToolTipOffsetDirection

Direction that tool-tip is being repelled from a force field in.

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

 

SetNavigationConfigFactory

Returning to a simpler method of registering navigation configs., is what you should use now. Note: You'll need to store per user state information yourself if you have any, like we do for repeats with the analog stick in FNavigationConfig::UserNavigationState, than Slate creating a new Navigation Config per user.

References

Module

Slate

Header

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

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback