// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved. /*============================================================================= FeedbackContextEditor.h: Feedback context tailored to UnrealEd =============================================================================*/ #pragma once #include "CoreMinimal.h" #include "Misc/MessageDialog.h" #include "Misc/FeedbackContext.h" #include "Widgets/SWindow.h" class FContextSupplier; class SExtBuildProgressWidget; /** * A FFeedbackContext implementation for use in UnrealEd. */ class FExtFeedbackContextEditor : public FFeedbackContext { /** Slate slow task widget */ TWeakPtr SlowTaskWindow; /** Special Windows/Widget popup for building */ TWeakPtr BuildProgressWindow; TSharedPtr BuildProgressWidget; bool HasTaskBeenCancelled; public: FExtFeedbackContextEditor(); virtual void Serialize( const TCHAR* V, ELogVerbosity::Type Verbosity, const class FName& Category ) override; virtual void StartSlowTask( const FText& Task, bool bShowCancelButton=false ) override; virtual void FinalizeSlowTask( ) override; virtual void ProgressReported( const float TotalProgressInterp, FText DisplayMessage ) override; virtual bool IsPlayingInEditor() const override; void SetContext( FContextSupplier* InSupplier ) override {} /** Whether or not the user has canceled out of this dialog */ virtual bool ReceivedUserCancel() override; void OnUserCancel(); virtual bool YesNof( const FText& Question ) override { return EAppReturnType::Yes == FMessageDialog::Open( EAppMsgType::YesNo, Question ); } /** * Show the Build Progress Window * @return Handle to the Build Progress Widget created */ TWeakPtr ShowBuildProgressWindow() override; /** Close the Build Progress Window */ void CloseBuildProgressWindow() override; };