Navigation
API > API/Runtime > API/Runtime/SlateCore > API/Runtime/SlateCore/Application
Inheritance Hierarchy
- FSlateApplicationBase
- FSlateApplication
References
| Module | SlateCore |
| Header | /Engine/Source/Runtime/SlateCore/Public/Application/SlateApplicationBase.h |
| Include | #include "Application/SlateApplicationBase.h" |
Syntax
class FSlateApplicationBase
Remarks
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.
Variables
| Type | Name | Description | |
|---|---|---|---|
| TSharedRef< FSlateAccessibleMessageHandler > | AccessibleMessageHandler | Manager for widgets and application to interact with accessibility API | |
| FCriticalSection | ActiveTimerCS | Critical section for active timer registration as it can be called from the movie thread and the game thread | |
| bool | bIsSlateAsleep | Gets set when Slate goes to sleep and cleared when active. | |
| float | CachedDebugTitleSafeRatio | Caches the previous debug safe zone ratio. | |
| FDisplayMetrics | CachedDisplayMetrics | Caches the application's display metrics. | |
| FMargin | CustomSafeZoneRatio | Safe Zone ratio to override platform settings | |
| ECustomSafeZoneState | CustomSafeZoneState | If Safe Zone ratio has been manually set, unset, or set via debug | |
| FHitTesting | HitTesting | Private interface for select entities that are allowed to perform hittesting. | |
| FOnDebugSafeZoneChanged | OnDebugSafeZoneChanged | ||
| FOnGlobalInvalidationToggled | OnGlobalInvalidationToggledEvent | ||
| FOnInvalidateAllWidgets | OnInvalidateAllWidgetsEvent | Multicast delegate to broadcast when a global invalidate is requested | |
| TSharedPtr< FSlateRenderer > | Renderer | Holds the Slate renderer used to render this application. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| 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. | |
| bool | Used to determine if any active timer handles are ready to fire. | ||
| bool | |||
| void | ArrangeWindowToFrontVirtual
(
TArray< TSharedRef< SWindow >>& Windows, |
Reorders an array of windows so the specified window is "brought to the front" | |
| UE::Slate::FDeprecateVector2DResult | CalculateTooltipWindowPosition
(
const FSlateRect& InAnchorRect, |
Calculates the tooltip window position. | |
| bool | DoesWidgetHaveMouseCapture
(
const TSharedPtr< const SWidget > Widget |
Gets whether or not a particular widget has mouse capture. | |
| bool | DoesWidgetHaveMouseCaptureByUser
(
const TSharedPtr< const SWidget > Widget, |
Gets whether or not a particular widget has mouse capture by a user. | |
| bool | FindPathToWidget
(
TSharedRef< const SWidget > InWidget, |
Searches for the specified widget and generates a full path to it. | |
| TSharedPtr< SWindow > | FindWidgetWindow
(
TSharedRef< const SWidget > InWidget |
Returns the window the provided widget is contained in | |
| FSlateApplicationBase & | Get () |
Returns the current instance of the application. | |
| TSharedRef< FSlateAccessibleMessageHandler > | Accessor for the accessible message handler. One must always exist, even if it's never activated. | ||
| TSharedPtr< SWindow > | Gets the active regular top-level window. | ||
| TSharedPtr< SWindow > | Gets the active top-level window. | ||
| const FSlateBrush * | GetAppIcon () |
Gets the global application icon. | |
| const FSlateBrush * | |||
| float | Gets the ratio SlateUnit / ScreenPixel. | ||
| void | GetCachedDisplayMetrics
(
FDisplayMetrics& OutDisplayMetrics |
Gets the application's cached display metrics. | |
| TSharedPtr< SWidget > | |||
| const double | Gets Slate's current cached real time. | ||
| UE::Slate::FDeprecateVector2DResult | GetCursorPos () |
Gets the current position of the cursor. | |
| UE::Slate::FDeprecateVector2DResult | Gets the size of the cursor.. | ||
| const FMargin & | |||
| void | GetDisplayMetrics
(
FDisplayMetrics& OutDisplayMetrics |
Gets the application's display metrics. | |
| const FHitTesting & | |||
| TSharedPtr< SWidget > | Gets the widget that currently has keyboard focus, if any. | ||
| UE::Slate::FDeprecateVector2DResult | Gets the last known position of the cursor. | ||
| TSharedPtr< SWidget > | Implementation of GetMouseCaptor which can be overridden without warnings. | ||
| EUINavigationAction | GetNavigationActionForKey
(
const FKey& InKey |
||
| EUINavigationAction | GetNavigationActionFromKey
(
const FKeyEvent& InKeyEvent |
||
| EUINavigation | GetNavigationDirectionFromAnalog
(
const FAnalogInputEvent& InAnalogEvent |
||
| EUINavigation | GetNavigationDirectionFromKey
(
const FKeyEvent& InKeyEvent |
||
| TSharedPtr< class GenericApplication > | |||
| const TSharedPtr< GenericApplication > | Gets the platform application. | ||
| TSharedPtr< ICursor > | |||
| FSlateRect | Gets the rectangle of the current preferred work area. | ||
| FSlateRenderer * | GetRenderer () |
Gets the renderer being used to draw this application. | |
| void | GetSafeZoneRatio
(
FMargin& SafeZoneRatio |
||
| void | GetSafeZoneSize
(
FMargin& SafeZone, |
||
| bool | Whether the software cursor is enabled for this application. | ||
| EVisibility | Gets the desired visibility of the software cursor | ||
| const TArray< TSharedRef< SWindow > > | Get a list of all top-level windows in the application, excluding virtual windows. | ||
| TSharedPtr< SWidget > | GetUserFocusedWidget
(
uint32 UserIndex |
||
| EWindowTransparency | Get the highest level of window transparency support currently enabled by this application | ||
| bool | Gets whether or not a widget has captured the mouse. | ||
| 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). | |
| bool | HasFocusedDescendants
(
const TSharedRef< const SWidget >& Widget |
Checks whether the specified widget has any descendants which are currently focused. | |
| 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. | |
| bool | HasUserFocusedDescendants
(
const TSharedRef< const SWidget >& Widget, |
Checks whether the specified widget has any descendants which are currently focused for the specified user user. | |
| bool | HasUserMouseCapture
(
int32 UserIndex |
Gets whether or not a widget has captured the mouse for a particular user. | |
| 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 | |
| bool | IsActive () |
Whether the application is active. | |
| bool | |||
| bool | Checks whether an UI for external services such as Steam is open. | ||
| bool | Returns true if a Slate application instance is currently initialized and ready | ||
| bool | Is Slate currently sleeping or not. | ||
| bool | IsWidgetDirectlyHovered
(
const TSharedPtr< const SWidget > Widget |
Gets whether or not a particular widget is directly hovered. | |
| bool | IsWindowHousingInteractiveTooltip
(
const TSharedRef< const SWindow >& WindowToTest |
||
| 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. | |
| 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. | |
| TSharedRef< SImage > | MakeImage
(
const TAttribute< const FSlateBrush* >& Image, |
Creates an image widget. | |
| TSharedRef< IToolTip > | MakeToolTip
(
const FText& ToolTipText |
Creates a tool tip with the specified text. | |
| TSharedRef< IToolTip > | MakeToolTip
(
const TAttribute< FText >& ToolTipText |
Creates a tool tip with the specified text. | |
| TSharedRef< SWidget > | MakeWindowTitleBar
(
const FWindowTitleBarArgs& InArgs, |
Creates a title bar for the specified window. | |
| FOnGlobalInvalidationToggled & | |||
| FOnInvalidateAllWidgets & | |||
| void | RequestDestroyWindow
(
TSharedRef< SWindow > WindowToDestroy |
Destroying windows has implications on some OSs (e.g. destroying Win32 HWNDs can cause events to be lost). | |
| void | |||
| void | SetAllUserFocus
(
const FWidgetPath& InFocusPath, |
Sets the focus for all users to the specified widget. The widget must be allowed to receive focus. | |
| void | SetAllUserFocusAllowingDescendantFocus
(
const FWidgetPath& InFocusPath, |
Sets the focus for all users to the specified widget unless that user is focused on a descendant. | |
| void | SetCustomSafeZone
(
const FMargin& InSafeZone |
||
| bool | SetKeyboardFocus
(
const FWidgetPath& InFocusPath, |
Sets keyboard focus to the specified widget. The widget must be allowed to receive keyboard focus. | |
| bool | SetUserFocus
(
const uint32 InUserIndex, |
Sets user focus to the specified widget. The widget must be allowed to receive focus. | |
| bool | ShowUserFocus
(
const TSharedPtr< const SWidget > Widget |
Gets whether or not a particular widget should show user focus. | |
| void | |||
| void | ToggleGlobalInvalidation
(
bool bIsGlobalInvalidationEnabled |
||
| void | UpdateCustomSafeZone
(
const FMargin& NewSafeZoneRatio, |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FOnGlobalInvalidationToggled | |||
| FOnInvalidateAllWidgets | Gets a delegate that is invoked when a global invalidate of all widgets should occur |
Enums
| Type | Name | Description | |
|---|---|---|---|
| ECustomSafeZoneState |
Constants
| Name | Description |
|---|---|
| CurrentBaseApplication | Holds a pointer to the current application. |
| CursorPointerIndex | |
| CursorUserIndex | |
| PlatformApplication | Holds a pointer to the platform application. |
| SlateAppPrimaryPlatformUser | The primary platform user for this application. |
Deprecated Functions
| Type | Name | Description | |
|---|---|---|---|
| TSharedRef< SWidget > | MakeWindowTitleBar
(
const TSharedRef< SWindow >& Window, |
This version of MakeWindowTitleBar has been deprecated. Use the version that takes in an FWindowTitleBarArgs parameter instead. |