Files
UnrealEngineUWP/Engine/Source/Editor/Blutility/Classes/EditorUtilityWidget.h
daren cheng 36cbbda965 Fix checkbox style on editor utility widgets.
#jira UE-117887
#rb Vincent.Gauthier
#preflight 6148f759315f54000134958f

[CL 17576768 by daren cheng in ue5-main branch]
2021-09-20 18:38:24 -04:00

57 lines
1.6 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
/**
* Widget for editor utilities
*/
#pragma once
#include "CoreMinimal.h"
#include "UObject/ObjectMacros.h"
#include "UObject/Object.h"
#include "UObject/ScriptMacros.h"
#include "Blueprint/UserWidget.h"
#include "EditorUtilityWidget.generated.h"
class AActor;
class UEditorPerProjectUserSettings;
UCLASS(Abstract, meta = (ShowWorldContextPin), config = Editor)
class BLUTILITY_API UEditorUtilityWidget : public UUserWidget
{
GENERATED_UCLASS_BODY()
public:
// The default action called when the widget is invoked if bAutoRunDefaultAction=true (it is never called otherwise)
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent, Category = "Editor")
void Run();
// Run the default action
void ExecuteDefaultAction();
bool ShouldAlwaysReregisterWithWindowsMenu() const
{
return bAlwaysReregisterWithWindowsMenu;
}
bool ShouldAutoRunDefaultAction() const
{
return bAutoRunDefaultAction;
}
virtual bool IsEditorUtility() const override { return true; }
protected:
UPROPERTY(Category = Config, EditDefaultsOnly, BlueprintReadWrite, AssetRegistrySearchable)
FString HelpText;
// Should this widget always be re-added to the windows menu once it's opened
UPROPERTY(Config, Category = Settings, EditDefaultsOnly)
bool bAlwaysReregisterWithWindowsMenu;
// Should this blueprint automatically run OnDefaultActionClicked, or should it open up a details panel to edit properties and/or offer multiple buttons
UPROPERTY(Category = Settings, EditDefaultsOnly, BlueprintReadOnly)
bool bAutoRunDefaultAction;
};