Navigation
API > API/Plugins > API/Plugins/UMGWidgetPreview
| Name | UWidgetPreview |
| Type | class |
| Header File | /Engine/Plugins/Editor/UMGWidgetPreview/Source/UMGWidgetPreview/Public/WidgetPreview.h |
| Include Path | #include "WidgetPreview.h" |
Syntax
UCLASS (MinimalAPI, BlueprintType, NotBlueprintable, AutoExpandCategories="Widgets")
class UWidgetPreview : public UObject
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UWidgetPreview
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UWidgetPreview
(
const FObjectInitializer& ObjectInitializer |
WidgetPreview.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FOnWidgetChanged | TMulticastDelegate< void(const EWidgetPreviewWidgetChangeType)> | WidgetPreview.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bShouldOverrideWidgetSize | bool | Widget Custom Size Override | WidgetPreview.h |
|
| OnWidgetChangedDelegate | FOnWidgetChanged | WidgetPreview.h | ||
| OverriddenWidgetSize | FVector2D | WidgetPreview.h |
|
|
| SlateWidgetInstance | TSharedPtr< SWidget > | WidgetPreview.h | ||
| SlotNameCache | TArray< FName > | Slot names available in WidgetType (if any). | WidgetPreview.h |
|
| SlotWidgetTypes | TMap< FName, FPreviewableWidgetVariant > | Widget per-slot, if WidgetType has any. | WidgetPreview.h |
|
| WidgetInstance | TObjectPtr< UUserWidget > | WidgetPreview.h |
|
|
| WidgetReferenceCache | TArray< TWeakObjectPtr< const UUserWidget > > | Widgets here should be checked for validity when a new one is assigned, to allow tear-down functionality. | WidgetPreview.h |
|
| WidgetType | FPreviewableWidgetVariant | Widget to preview. | WidgetPreview.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void BeginDestroy() |
WidgetPreview.h | ||
bool CanCallInitializedWithoutPlayerContext
(
const bool bInRecursive, |
Convenience function to check that all utilized widgets have bCanCallInitializedWithoutPlayerContext set to true, and reports any that don't. | WidgetPreview.h | |
void ClearWidgetInstance() |
Stores the current instance in PreviousWidgetInstance, and clears WidgetInstance. | WidgetPreview.h | |
const bool GetbShouldOverrideWidgetSize() |
WidgetPreview.h | ||
UUserWidget * GetOrCreateWidgetInstance
(
UWorld* InWorld, |
Returns or builds and returns an instance of the root widget for previewing. | WidgetPreview.h | |
const FVector2D GetOverriddenWidgetSize() |
WidgetPreview.h | ||
TSharedPtr< SWidget > GetSlateWidgetInstance() |
Returns the current underlying slate widget instance, if any. | WidgetPreview.h | |
const TMap< FName, FPreviewableWidgetVariant > & GetSlotWidgetTypes() |
WidgetPreview.h | ||
const UUserWidget * GetWidgetCDO() |
WidgetPreview.h | ||
const UUserWidget * GetWidgetCDOForSlot
(
const FName InSlotName |
WidgetPreview.h | ||
UUserWidget * GetWidgetInstance() |
Returns the current widget instance, if any. | WidgetPreview.h | |
const TArray< FName > & GetWidgetSlotNames() |
WidgetPreview.h |
|
|
const FPreviewableWidgetVariant & GetWidgetType() |
WidgetPreview.h | ||
FOnWidgetChanged & OnWidgetChanged() |
WidgetPreview.h | ||
void SetbShouldOverrideWidgetSize
(
bool InOverride |
WidgetPreview.h | ||
void SetOverriddenWidgetSize
(
FVector2D InWidgetSize |
WidgetPreview.h | ||
void SetSlotWidgetTypes
(
const TMap< FName, FPreviewableWidgetVariant >& InWidgets |
WidgetPreview.h | ||
void SetWidgetType
(
const FPreviewableWidgetVariant& InWidget |
WidgetPreview.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void CleanupReferences() |
WidgetPreview.h | ||
UUserWidget * CreateWidgetInstance
(
UWorld* InWorld |
Creates a new WidgetInstance, replacing the current one if it exists. | WidgetPreview.h | |
TArray< FName > GetAvailableWidgetSlotNames() |
Returns slot names not already occupied in SlotWidgets. | WidgetPreview.h |
|
void OnWidgetBlueprintChanged
(
UBlueprint* InBlueprint |
WidgetPreview.h | ||
virtual void PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
WidgetPreview.h | ||
virtual void PostLoad() |
WidgetPreview.h | ||
void UpdateWidgets() |
Misc. functionality to perform after a widget assignment is changed. | WidgetPreview.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static bool CanCallInitializedWithoutPlayerContextOnWidget
(
const UUserWidget* InUserWidget, |
Convenience function to check that the provided widget (and it's children) has bCanCallInitializedWithoutPlayerContext set to true, and reports any that don't. | WidgetPreview.h |