Navigation
API > API/Developer > API/Developer/ToolMenus
Context class containing a collection of widgets that can be added for later retrieval.
| Name | UToolMenuWidgetCollectionContext |
| Type | class |
| Header File | /Engine/Source/Developer/ToolMenus/Public/ToolMenuWidgetCollectionContext.h |
| Include Path | #include "ToolMenuWidgetCollectionContext.h" |
Syntax
UCLASS (MinimalAPI)
class UToolMenuWidgetCollectionContext : public UToolMenuContextBase
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UToolMenuContextBase → UToolMenuWidgetCollectionContext
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Widgets | TArray< TWeakPtr< SWidget > > | ToolMenuWidgetCollectionContext.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddWidget
(
const TSharedRef< SWidget >& Widget |
Add a widget to this context for later retrieval. | ToolMenuWidgetCollectionContext.h | |
void EnumerateWidgets
(
const TFunctionRef< bool(const TSharedPtr< SWidget >&Widget)>& Callback |
Enumerate all the previously added widgets. | ToolMenuWidgetCollectionContext.h | |
TSharedPtr< WidgetType > FindWidget () |
Find a previously added widget. | ToolMenuWidgetCollectionContext.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static UToolMenuWidgetCollectionContext * Get
(
FToolMenuContext& Context, |
Get the widget collection context object from the parameter context. | ToolMenuWidgetCollectionContext.h |