UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FSlateNotificationManager Class Reference

#include <NotificationManager.h>

Public Member Functions

SLATE_API void Tick ()
 
SLATE_API void SetRootWindow (const TSharedRef< SWindow > InRootWindow)
 
SLATE_API TSharedPtr< SNotificationItemAddNotification (const FNotificationInfo &Info)
 
SLATE_API void QueueNotification (FNotificationInfo *Info)
 
SLATE_API FProgressNotificationHandle StartProgressNotification (FText DisplayText, int32 TotalWorkToDo)
 
SLATE_API void UpdateProgressNotification (FProgressNotificationHandle InHandle, int32 TotalWorkDone, int32 UpdatedTotalWorkToDo=0, FText UpdatedDisplayText=FText::GetEmpty())
 
SLATE_API void CancelProgressNotification (FProgressNotificationHandle InHandle)
 
SLATE_API void SetProgressNotificationHandler (IProgressNotificationHandler *NewHandler)
 
SLATE_API void ForceNotificationsInFront (const TSharedRef< SWindow > InWindow)
 
SLATE_API void GetWindows (TArray< TSharedRef< SWindow > > &OutWindows) const
 
void SetAllowNotifications (const bool bShouldAllow)
 
bool AreNotificationsAllowed () const
 
SLATE_API void RegisterStagedNotification (TSharedPtr< IAsyncTaskNotificationImpl > InNotification)
 
SLATE_API void UnregisterStagedNotification (TSharedPtr< IAsyncTaskNotificationImpl > InNotification)
 

Static Public Member Functions

static SLATE_API FSlateNotificationManagerGet ()
 

Protected Member Functions

SLATE_API FSlateNotificationManager ()
 
SLATE_API TSharedRef< SNotificationListCreateStackForArea (const FSlateRect &InRectangle, TSharedPtr< SWindow > Window)
 
SLATE_API void ShutdownOnPreExit ()
 

Friends

class SNotificationList
 

Detailed Description

A class which manages a group of notification windows

Constructor & Destructor Documentation

◆ FSlateNotificationManager()

FSlateNotificationManager::FSlateNotificationManager ( )
protected

Protect constructor as this is a singleton

Member Function Documentation

◆ AddNotification()

TSharedPtr< SNotificationItem > FSlateNotificationManager::AddNotification ( const FNotificationInfo Info)

Adds a floating notification

Parameters
InfoContains various settings used to initialize the notification

◆ AreNotificationsAllowed()

bool FSlateNotificationManager::AreNotificationsAllowed ( ) const
inline

Checks whether notifications are currently enabled.

Returns
true if allowed, false otherwise.

◆ CancelProgressNotification()

void FSlateNotificationManager::CancelProgressNotification ( FProgressNotificationHandle  InHandle)

Cancels an active notification

◆ CreateStackForArea()

TSharedRef< SNotificationList > FSlateNotificationManager::CreateStackForArea ( const FSlateRect InRectangle,
TSharedPtr< SWindow Window 
)
protected

Create a notification list for the specified screen rectangle

◆ ForceNotificationsInFront()

void FSlateNotificationManager::ForceNotificationsInFront ( const TSharedRef< SWindow InWindow)

Called back from the SlateApplication when a window is activated/resized We need to keep notifications topmost in the z-order so we manage it here directly as there isn't a cross-platform OS-level way of making a 'topmost child'.

Parameters
ActivateEventInformation about the activation event

◆ Get()

FSlateNotificationManager & FSlateNotificationManager::Get ( )
static

Gets the instance of this manager

◆ GetWindows()

void FSlateNotificationManager::GetWindows ( TArray< TSharedRef< SWindow > > &  OutWindows) const

Gets all the windows that represent notifications

Returns
an array of windows that contain notifications.

◆ QueueNotification()

void FSlateNotificationManager::QueueNotification ( FNotificationInfo Info)

Thread safe method of queuing a notification for presentation on the next tick

Parameters
InfoPointer to heap allocated notification info. Released by FSlateNotificationManager once the notification is displayed;

◆ RegisterStagedNotification()

void FSlateNotificationManager::RegisterStagedNotification ( TSharedPtr< IAsyncTaskNotificationImpl InNotification)

Register a Staged Async Notification, allowing the NotificationManager to keep a reference to it

◆ SetAllowNotifications()

void FSlateNotificationManager::SetAllowNotifications ( const bool  bShouldAllow)
inline

Sets whether notifications should be displayed at all. Note, notifications can be disabled via console variable Slate.bAllowNotificationWidget.

Parameters
bShouldAllowWhether notifications should be enabled. It defaults to on.

◆ SetProgressNotificationHandler()

void FSlateNotificationManager::SetProgressNotificationHandler ( IProgressNotificationHandler NewHandler)

Sets the progress notification handler for the current application. Only one handler is used at a time. This handler is not managed in any way. If your handler is being destroyed call SetProgressNotificationHandler(nullptr)

◆ SetRootWindow()

void FSlateNotificationManager::SetRootWindow ( const TSharedRef< SWindow InRootWindow)

Provide a window under which all notifications should nest.

◆ ShutdownOnPreExit()

void FSlateNotificationManager::ShutdownOnPreExit ( )
protected

FCoreDelegates::OnPreExit shutdown callback

◆ StartProgressNotification()

FProgressNotificationHandle FSlateNotificationManager::StartProgressNotification ( FText  DisplayText,
int32  TotalWorkToDo 
)

Begin a progress notification. These notifications should be used for background work not blocking work. Use SlowTask for blocking work

Parameters
DisplayTextDisplay text used to describe the type of work to the user
TotalWorkToDoArbitrary number of work units to perform. If more than one progress notification is active this work is summed with any other active notifications. This value usually represents the number of steps to be completed
Returns
NotificationHandle A handle that can be used to update the progress or cancel the notification

◆ Tick()

void FSlateNotificationManager::Tick ( )

Update the manager

◆ UnregisterStagedNotification()

void FSlateNotificationManager::UnregisterStagedNotification ( TSharedPtr< IAsyncTaskNotificationImpl InNotification)

Unregister a previously added Staged Notification

◆ UpdateProgressNotification()

void FSlateNotificationManager::UpdateProgressNotification ( FProgressNotificationHandle  InHandle,
int32  TotalWorkDone,
int32  UpdatedTotalWorkToDo = 0,
FText  UpdatedDisplayText = FText::GetEmpty() 
)

Updates a progress notification.

Parameters
InHandleHandle to the notification that was previously created with StartProgressNotification
TotalWorkDoneThe total number of work uits done for the notification. This is NOT an incremental value.
UpdatedTotalWorkToDo(Optional) If the total work to do changes you can update the value here. Note that if the total work left increases but the total work done does not, the progress bar may go backwards
UpdatedDisplayText(Optional) Updated display text of the notification
Returns
NotificationHandle A handle that can be used to update the progress or cancel the notification

Friends And Related Symbol Documentation

◆ SNotificationList

friend class SNotificationList
friend

The documentation for this class was generated from the following files: