![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <NotificationManager.h>
Static Public Member Functions | |
| static SLATE_API FSlateNotificationManager & | Get () |
Protected Member Functions | |
| SLATE_API | FSlateNotificationManager () |
| SLATE_API TSharedRef< SNotificationList > | CreateStackForArea (const FSlateRect &InRectangle, TSharedPtr< SWindow > Window) |
| SLATE_API void | ShutdownOnPreExit () |
Friends | |
| class | SNotificationList |
A class which manages a group of notification windows
|
protected |
Protect constructor as this is a singleton
| TSharedPtr< SNotificationItem > FSlateNotificationManager::AddNotification | ( | const FNotificationInfo & | Info | ) |
Adds a floating notification
| Info | Contains various settings used to initialize the notification |
|
inline |
Checks whether notifications are currently enabled.
| void FSlateNotificationManager::CancelProgressNotification | ( | FProgressNotificationHandle | InHandle | ) |
Cancels an active notification
|
protected |
Create a notification list for the specified screen rectangle
| 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'.
| ActivateEvent | Information about the activation event |
|
static |
Gets the instance of this manager
| void FSlateNotificationManager::GetWindows | ( | TArray< TSharedRef< SWindow > > & | OutWindows | ) | const |
Gets all the windows that represent notifications
| void FSlateNotificationManager::QueueNotification | ( | FNotificationInfo * | Info | ) |
Thread safe method of queuing a notification for presentation on the next tick
| Info | Pointer to heap allocated notification info. Released by FSlateNotificationManager once the notification is displayed; |
| void FSlateNotificationManager::RegisterStagedNotification | ( | TSharedPtr< IAsyncTaskNotificationImpl > | InNotification | ) |
Register a Staged Async Notification, allowing the NotificationManager to keep a reference to it
Sets whether notifications should be displayed at all. Note, notifications can be disabled via console variable Slate.bAllowNotificationWidget.
| bShouldAllow | Whether notifications should be enabled. It defaults to on. |
| 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)
| void FSlateNotificationManager::SetRootWindow | ( | const TSharedRef< SWindow > | InRootWindow | ) |
Provide a window under which all notifications should nest.
|
protected |
FCoreDelegates::OnPreExit shutdown callback
| 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
| DisplayText | Display text used to describe the type of work to the user |
| TotalWorkToDo | Arbitrary 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 |
| void FSlateNotificationManager::Tick | ( | ) |
Update the manager
| void FSlateNotificationManager::UnregisterStagedNotification | ( | TSharedPtr< IAsyncTaskNotificationImpl > | InNotification | ) |
Unregister a previously added Staged Notification
| void FSlateNotificationManager::UpdateProgressNotification | ( | FProgressNotificationHandle | InHandle, |
| int32 | TotalWorkDone, | ||
| int32 | UpdatedTotalWorkToDo = 0, |
||
| FText | UpdatedDisplayText = FText::GetEmpty() |
||
| ) |
Updates a progress notification.
| InHandle | Handle to the notification that was previously created with StartProgressNotification |
| TotalWorkDone | The 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 |
|
friend |