Navigation
API > API/Runtime > API/Runtime/SlateCore
Base class for Slate applications.
This class currently serves a temporary workaround for solving SlateCore dependencies to FSlateApplication. It should probably be removed once FSlateApplication has been refactored into SlateCore.
| Name | FSlateApplicationBase |
| Type | class |
| Header File | /Engine/Source/Runtime/SlateCore/Public/Application/SlateApplicationBase.h |
| Include Path | #include "Application/SlateApplicationBase.h" |
Syntax
class FSlateApplicationBase
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FSlateApplicationBase() |
Application/SlateApplicationBase.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FSlateApplicationBase() |
Application/SlateApplicationBase.h |
Classes
| Name | Remarks |
|---|---|
| FOnGlobalInvalidationToggled | |
| FOnInvalidateAllWidgets | Gets a delegate that is invoked when a global invalidate of all widgets should occur |
Enums
Protected
| Name | Remarks |
|---|---|
| ECustomSafeZoneState |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| CurrentBaseApplication | TSharedPtr< FSlateApplicationBase > | Holds a pointer to the current application. | Application/SlateApplicationBase.h |
| CursorPointerIndex | const uint32 | Application/SlateApplicationBase.h | |
| CursorUserIndex | const uint32 | Application/SlateApplicationBase.h | |
| PlatformApplication | TSharedPtr< class GenericApplication > | Holds a pointer to the platform application. | Application/SlateApplicationBase.h |
| SlateAppPrimaryPlatformUser | const FPlatformUserId | The primary platform user for this application. | Application/SlateApplicationBase.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| OnConstrainedAspectRatioChanged | FOnConstrainedAspectRatioChanged | Application/SlateApplicationBase.h | ||
| OnDebugSafeZoneChanged | FOnDebugSafeZoneChanged | Application/SlateApplicationBase.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ActiveTimerHandles | TSet< TWeakPtr< FActiveTimerHandle > > | The set of active timer handles. | Application/SlateApplicationBase.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TSharedRef< SWindow > AddWindow
(
TSharedRef< SWindow > InSlateWindow, |
Associates a top level Slate Window with a native window and ensures that it is tracked properly by the application. | Application/SlateApplicationBase.h | |
bool AnyMenusVisible() |
Application/SlateApplicationBase.h | ||
void ArrangeWindowToFrontVirtual
(
TArray< TSharedRef< SWindow > >& Windows, |
Reorders an array of windows so the specified window is "brought to the front" | Application/SlateApplicationBase.h | |
UE::Slate::FDeprecateVector2DResult CalculateTooltipWindowPosition
(
const FSlateRect& InAnchorRect, |
Calculates the tooltip window position. | Application/SlateApplicationBase.h | |
bool FindPathToWidget
(
TSharedRef< const SWidget > InWidget, |
Searches for the specified widget and generates a full path to it. | Application/SlateApplicationBase.h | |
TSharedPtr< SWindow > FindWidgetWindow
(
TSharedRef< const SWidget > InWidget |
Returns the window the provided widget is contained in | Application/SlateApplicationBase.h | |
TSharedRef< FSlateAccessibleMessageHandler > GetAccessibleMessageHandler() |
Accessor for the accessible message handler. One must always exist, even if it's never activated. | Application/SlateApplicationBase.h | |
| Gets the active regular top-level window. | Application/SlateApplicationBase.h | ||
TSharedPtr< SWindow > GetActiveTopLevelWindow() |
Gets the active top-level window. | Application/SlateApplicationBase.h | |
const FSlateBrush * GetAppIcon() |
Gets the global application icon. | Application/SlateApplicationBase.h | |
const FSlateBrush * GetAppIconSmall() |
Application/SlateApplicationBase.h | ||
float GetApplicationScale() |
Gets the ratio SlateUnit / ScreenPixel. | Application/SlateApplicationBase.h | |
void GetCachedDisplayMetrics
(
FDisplayMetrics& OutDisplayMetrics |
Gets the application's cached display metrics. | Application/SlateApplicationBase.h | |
TSharedPtr< SWidget > GetCurrentDebugContextWidget() |
Application/SlateApplicationBase.h | ||
const double GetCurrentTime () |
Gets Slate's current cached real time. | Application/SlateApplicationBase.h | |
UE::Slate::FDeprecateVector2DResult GetCursorPos() |
Gets the current position of the cursor. | Application/SlateApplicationBase.h | |
UE::Slate::FDeprecateVector2DResult GetCursorSize() |
Gets the size of the cursor.. | Application/SlateApplicationBase.h | |
const FMargin & GetCustomSafeZone() |
Application/SlateApplicationBase.h | ||
void GetDisplayMetrics
(
FDisplayMetrics& OutDisplayMetrics |
Gets the application's display metrics. | Application/SlateApplicationBase.h | |
const FHitTesting & GetHitTesting() |
Application/SlateApplicationBase.h | ||
TSharedPtr< SWidget > GetKeyboardFocusedWidget() |
Gets the widget that currently has keyboard focus, if any. | Application/SlateApplicationBase.h | |
UE::Slate::FDeprecateVector2DResult GetLastCursorPos() |
Gets the last known position of the cursor. | Application/SlateApplicationBase.h | |
EUINavigationAction GetNavigationActionForKey
(
const FKey& InKey |
Application/SlateApplicationBase.h | ||
EUINavigationAction GetNavigationActionFromKey
(
const FKeyEvent& InKeyEvent |
Application/SlateApplicationBase.h | ||
EUINavigation GetNavigationDirectionFromAnalog
(
const FAnalogInputEvent& InAnalogEvent |
Application/SlateApplicationBase.h | ||
EUINavigation GetNavigationDirectionFromKey
(
const FKeyEvent& InKeyEvent |
Application/SlateApplicationBase.h | ||
TSharedPtr< class GenericApplication > GetPlatformApplication () |
Application/SlateApplicationBase.h | ||
virtual const TSharedPtr< GenericApplication > GetPlatformApplication () |
Gets the platform application. | Application/SlateApplicationBase.h | |
TSharedPtr< ICursor > GetPlatformCursor() |
Application/SlateApplicationBase.h | ||
FSlateRect GetPreferredWorkArea() |
Gets the rectangle of the current preferred work area. | Application/SlateApplicationBase.h | |
FSlateRenderer * GetRenderer() |
Gets the renderer being used to draw this application. | Application/SlateApplicationBase.h | |
void GetSafeZoneSize
(
FMargin& SafeZone, |
Application/SlateApplicationBase.h | ||
bool GetSoftwareCursorAvailable() |
Whether the software cursor is enabled for this application. | Application/SlateApplicationBase.h | |
EVisibility GetSoftwareCursorVis() |
Gets the desired visibility of the software cursor | Application/SlateApplicationBase.h | |
const TArray< TSharedRef< SWindow > > GetTopLevelWindows() |
Get a list of all top-level windows in the application, excluding virtual windows. | Application/SlateApplicationBase.h | |
TSharedPtr< SWidget > GetUserFocusedWidget
(
uint32 UserIndex |
Application/SlateApplicationBase.h | ||
EWindowTransparency GetWindowTransparencySupport() |
Get the highest level of window transparency support currently enabled by this application | Application/SlateApplicationBase.h | |
bool HasAnyMouseCaptor() |
Gets whether or not a widget has captured the mouse. | Application/SlateApplicationBase.h | |
bool HasFocusedDescendants
(
const TSharedRef< const SWidget >& Widget |
Checks whether the specified widget has any descendants which are currently focused. | Application/SlateApplicationBase.h | |
bool HasUserFocusedDescendants
(
const TSharedRef< const SWidget >& Widget, |
Checks whether the specified widget has any descendants which are currently focused for the specified user user. | Application/SlateApplicationBase.h | |
bool HasUserMouseCapture
(
int32 UserIndex |
Gets whether or not a widget has captured the mouse for a particular user. | Application/SlateApplicationBase.h | |
void InvalidateAllWidgets
(
bool bClearResourcesImmediately |
Notifies all invalidation panels that they should invalidate their contents Note: this is a very expensive call and should only be done in non-performance critical situations | Application/SlateApplicationBase.h | |
bool IsActive() |
Whether the application is active. | Application/SlateApplicationBase.h | |
bool IsCustomSafeZoneSet() |
Application/SlateApplicationBase.h | ||
bool IsExternalUIOpened() |
Checks whether an UI for external services such as Steam is open. | Application/SlateApplicationBase.h | |
bool IsSlateAsleep() |
Is Slate currently sleeping or not. | Application/SlateApplicationBase.h | |
bool IsWindowHousingInteractiveTooltip
(
const TSharedRef< const SWindow >& WindowToTest |
Application/SlateApplicationBase.h | ||
FWidgetPath LocateWindowUnderMouse
(
UE::Slate::FDeprecateVector2DParameter ScreenspaceMouseCoordinate, |
Given the screen-space coordinate of the mouse cursor, searches for a string of widgets that are under the mouse. | Application/SlateApplicationBase.h | |
TSharedRef< SImage > MakeImage
(
const TAttribute< const FSlateBrush* >& Image, |
Creates an image widget. | Application/SlateApplicationBase.h | |
TSharedRef< IToolTip > MakeToolTip
(
const TAttribute< FText >& ToolTipText |
Creates a tool tip with the specified text. | Application/SlateApplicationBase.h | |
TSharedRef< IToolTip > MakeToolTip
(
const FText& ToolTipText |
Creates a tool tip with the specified text. | Application/SlateApplicationBase.h | |
TSharedRef< SWidget > MakeWindowTitleBar
(
const FWindowTitleBarArgs& InArgs, |
Creates a title bar for the specified window. | Application/SlateApplicationBase.h | |
FOnGlobalInvalidationToggled & OnGlobalInvalidationToggled() |
Application/SlateApplicationBase.h | ||
FOnInvalidateAllWidgets & OnInvalidateAllWidgets() |
Application/SlateApplicationBase.h | ||
void RequestDestroyWindow
(
TSharedRef< SWindow > WindowToDestroy |
Destroying windows has implications on some OSs (e.g. destroying Win32 HWNDs can cause events to be lost). | Application/SlateApplicationBase.h | |
void ResetCustomSafeZone() |
Application/SlateApplicationBase.h | ||
void SetAllUserFocus
(
const FWidgetPath& InFocusPath, |
Sets the focus for all users to the specified widget. The widget must be allowed to receive focus. | Application/SlateApplicationBase.h | |
void SetAllUserFocusAllowingDescendantFocus
(
const FWidgetPath& InFocusPath, |
Sets the focus for all users to the specified widget unless that user is focused on a descendant. | Application/SlateApplicationBase.h | |
void SetCustomSafeZone
(
const FMargin& InSafeZone |
Application/SlateApplicationBase.h | ||
bool SetKeyboardFocus
(
const FWidgetPath& InFocusPath, |
Sets keyboard focus to the specified widget. The widget must be allowed to receive keyboard focus. | Application/SlateApplicationBase.h | |
bool SetUserFocus
(
const uint32 InUserIndex, |
Sets user focus to the specified widget. The widget must be allowed to receive focus. | Application/SlateApplicationBase.h | |
bool SetUserFocusAllowingDescendantFocus
(
const uint32 InUserIndex, |
Sets the focus for the specified user to the specified widget unless that user is focused on a descendant. | Application/SlateApplicationBase.h | |
void ToggleGlobalInvalidation
(
bool bIsGlobalInvalidationEnabled |
Application/SlateApplicationBase.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool DoesWidgetHaveMouseCapture
(
const TSharedPtr< const SWidget > Widget |
Gets whether or not a particular widget has mouse capture. | Application/SlateApplicationBase.h | |
bool DoesWidgetHaveMouseCaptureByUser
(
const TSharedPtr< const SWidget > Widget, |
Gets whether or not a particular widget has mouse capture by a user. | Application/SlateApplicationBase.h | |
TSharedPtr< SWidget > GetMouseCaptorImpl() |
Implementation of GetMouseCaptor which can be overridden without warnings. | Application/SlateApplicationBase.h | |
void GetSafeZoneRatio
(
FMargin& SafeZoneRatio |
Application/SlateApplicationBase.h | ||
TOptional< EFocusCause > HasAnyUserFocus
(
const TSharedPtr< const SWidget > Widget |
Gets whether or not a particular widget has any users focus, and if so the type of focus (first one found). | Application/SlateApplicationBase.h | |
TOptional< EFocusCause > HasUserFocus
(
const TSharedPtr< const SWidget > Widget, |
Gets whether or not a particular widget has the specified users focus, and if so the type of focus. | Application/SlateApplicationBase.h | |
bool IsWidgetDirectlyHovered
(
const TSharedPtr< const SWidget > Widget |
Gets whether or not a particular widget is directly hovered. | Application/SlateApplicationBase.h | |
FWidgetPath LocateWidgetInWindow
(
UE::Slate::FDeprecateVector2DParameter ScreenspaceMouseCoordinate, |
Given a window, locate a widget under the cursor in it; returns an invalid path if cursor is not over this window. | Application/SlateApplicationBase.h | |
bool ShowUserFocus
(
const TSharedPtr< const SWidget > Widget |
Gets whether or not a particular widget should show user focus. | Application/SlateApplicationBase.h | |
void SwapSafeZoneTypes() |
Application/SlateApplicationBase.h | ||
void UpdateAnyActiveTimersArePending () |
Used to determine if any active timer handles are ready to fire. | Application/SlateApplicationBase.h | |
void UpdateCustomSafeZone
(
const FMargin& NewSafeZoneRatio, |
Application/SlateApplicationBase.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FSlateApplicationBase & Get () |
Returns the current instance of the application. | Application/SlateApplicationBase.h | |
static bool IsInitialized() |
Returns true if a Slate application instance is currently initialized and ready | Application/SlateApplicationBase.h |