UDocumentation
UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
WidgetList.h
Go to the documentation of this file.
1
// Copyright Epic Games, Inc. All Rights Reserved.
2
3
#pragma once
4
5
#include "
CoreMinimal.h
"
6
#include "
Types/SlateAttribute.h
"
7
#include "
Debugging/SlateDebugging.h
"
8
9
#if UE_WITH_SLATE_DEBUG_WIDGETLIST && (UE_BUILD_SHIPPING || UE_BUILD_TEST)
10
#error "UE_WITH_SLATE_DEBUG_WIDGETLIST is defined in a non-debug build"
11
#endif
12
13
#if UE_WITH_SLATE_DEBUG_WIDGETLIST
14
15
class
SWidget
;
16
17
namespace
UE
18
{
19
namespace
Slate
20
{
21
22
class
FWidgetList
23
{
24
public
:
25
static
void
AddWidget(
const
SWidget
*
Widget
) {
AllWidgets
.Add(
Widget
); }
26
static
void
RemoveWidget(
const
SWidget
*
Widget
) {
AllWidgets
.RemoveSingleSwap(
Widget
); }
27
28
static
const
TArray<const SWidget*>
& GetAllWidgets() {
return
AllWidgets
; }
29
30
static
void
ExportToCSV
(
FStringView
FileName);
31
32
private
:
33
FWidgetList
() =
delete
;
34
35
static
TArray<const SWidget*>
AllWidgets
;
36
};
37
38
#define UE_SLATE_DEBUG_WIDGETLIST_ADD_WIDGET(Widget) { ::UE::Slate::FWidgetList::AddWidget(Widget); }
39
#define UE_SLATE_DEBUG_WIDGETLIST_REMOVE_WIDGET(Widget) { ::UE::Slate::FWidgetList::RemoveWidget(Widget); }
40
41
}
//Slate
42
}
//UE
43
44
#else
45
#define UE_SLATE_DEBUG_WIDGETLIST_ADD_WIDGET(Widget)
46
#define UE_SLATE_DEBUG_WIDGETLIST_REMOVE_WIDGET(Widget)
47
#endif
//UE_WITH_SLATE_DEBUG_WIDGETLIST
CoreMinimal.h
StaticCastSharedRef
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition
SharedPointer.h:127
EMultiBlockType::Widget
@ Widget
SlateAttribute.h
SlateDebugging.h
SWidget
Definition
SWidget.h:165
TArray
Definition
Array.h:670
TStringView< TCHAR >
Slate
Definition
SScissorRectBox.cpp:10
UE
Definition
AdvancedWidgetsModule.cpp:13
Engine
Source
Runtime
SlateCore
Private
Debugging
WidgetList.h
Generated by
1.9.8