2019-12-26 15:33:43 -05:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
2017-04-07 16:51:51 -04:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2022-08-24 22:45:13 -04:00
|
|
|
#include "Containers/Array.h"
|
2017-04-07 16:51:51 -04:00
|
|
|
#include "CoreMinimal.h"
|
2022-08-24 22:45:13 -04:00
|
|
|
#include "Delegates/Delegate.h"
|
2018-01-20 11:19:29 -05:00
|
|
|
#include "Modules/ModuleInterface.h"
|
2017-04-07 16:51:51 -04:00
|
|
|
#include "PropertyEditorDelegates.h"
|
2022-08-24 22:45:13 -04:00
|
|
|
#include "Templates/SharedPointer.h"
|
|
|
|
|
#include "UObject/NameTypes.h"
|
2017-04-07 16:51:51 -04:00
|
|
|
|
|
|
|
|
class FAdvancedPreviewScene;
|
2022-08-24 22:45:13 -04:00
|
|
|
class SWidget;
|
|
|
|
|
class UObject;
|
|
|
|
|
class UStruct;
|
2017-04-07 16:51:51 -04:00
|
|
|
|
|
|
|
|
class FAdvancedPreviewSceneModule : public IModuleInterface
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
/** Info about a per-instance details customization */
|
|
|
|
|
struct FDetailCustomizationInfo
|
|
|
|
|
{
|
|
|
|
|
UStruct* Struct;
|
|
|
|
|
FOnGetDetailCustomizationInstance OnGetDetailCustomizationInstance;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** Info about a per-instance property type customization */
|
|
|
|
|
struct FPropertyTypeCustomizationInfo
|
|
|
|
|
{
|
|
|
|
|
FName StructName;
|
|
|
|
|
FOnGetPropertyTypeCustomizationInstance OnGetPropertyTypeCustomizationInstance;
|
|
|
|
|
};
|
|
|
|
|
|
2019-12-19 18:07:47 -05:00
|
|
|
DECLARE_MULTICAST_DELEGATE_OneParam(FOnPreviewSceneChanged, TSharedRef<FAdvancedPreviewScene>);
|
|
|
|
|
|
|
|
|
|
/** Info about a Delegates to subscribe to */
|
|
|
|
|
struct FDetailDelegates
|
|
|
|
|
{
|
|
|
|
|
FOnPreviewSceneChanged& OnPreviewSceneChangedDelegate;
|
|
|
|
|
};
|
|
|
|
|
|
2017-04-07 16:51:51 -04:00
|
|
|
// IModuleInterface implementation
|
|
|
|
|
virtual void StartupModule() override;
|
|
|
|
|
virtual void ShutdownModule() override;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Create an advanced preview scene settings widget.
|
|
|
|
|
*
|
|
|
|
|
* @param InPreviewScene The preview scene to create the widget for
|
|
|
|
|
* @param InAdditionalSettings Additional settings object to display in the view
|
|
|
|
|
* @param InDetailCustomizations Customizations to use for this details tab
|
|
|
|
|
* @param InPropertyTypeCustomizations Customizations to use for this details tab
|
2019-12-19 18:07:47 -05:00
|
|
|
* @param InDelegates Delegates to use for this details tab. Array to match other args
|
2017-04-07 16:51:51 -04:00
|
|
|
* @return a new widget
|
|
|
|
|
*/
|
2019-12-19 18:07:47 -05:00
|
|
|
virtual TSharedRef<SWidget> CreateAdvancedPreviewSceneSettingsWidget(const TSharedRef<FAdvancedPreviewScene>& InPreviewScene, UObject* InAdditionalSettings = nullptr, const TArray<FDetailCustomizationInfo>& InDetailCustomizations = TArray<FDetailCustomizationInfo>(), const TArray<FPropertyTypeCustomizationInfo>& InPropertyTypeCustomizations = TArray<FPropertyTypeCustomizationInfo>(), const TArray<FDetailDelegates>& InDelegates = TArray<FDetailDelegates>());
|
2018-01-20 11:19:29 -05:00
|
|
|
};
|