Files
UnrealEngineUWP/Engine/Source/Editor/GraphEditor/Public/SGraphPreviewer.h
ryan durand 627baf970a Updating copyright for Engine Editor.
#rnx
#rb none


#ROBOMERGE-SOURCE: CL 10869241 via CL 10869527 via CL 10869904
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870586 by ryan durand in Main branch]
2019-12-26 15:33:43 -05:00

40 lines
1.2 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Widgets/DeclarativeSyntaxSupport.h"
#include "Widgets/SCompoundWidget.h"
class SGraphPanel;
class UEdGraph;
// This widget provides a fully-zoomed-out preview of a specified graph
class GRAPHEDITOR_API SGraphPreviewer : public SCompoundWidget
{
public:
SLATE_BEGIN_ARGS(SGraphPreviewer)
: _ShowGraphStateOverlay(true)
{}
SLATE_ATTRIBUTE( FText, CornerOverlayText )
/** Show overlay elements for the graph state such as the PIE and read-only borders and text */
SLATE_ATTRIBUTE(bool, ShowGraphStateOverlay)
SLATE_ARGUMENT( TSharedPtr<SWidget>, TitleBar )
SLATE_END_ARGS()
void Construct(const FArguments& InArgs, UEdGraph* InGraphObj);
private:
/** Helper function used to refresh the graph */
EActiveTimerReturnType RefreshGraphTimer(const double InCurrentTime, const float InDeltaTime);
protected:
/// The Graph we are currently viewing
UEdGraph* EdGraphObj;
// As node's bounds dont get updated immediately, to truly zoom out to fit we need to tick a few times
int32 NeedsRefreshCounter;
// The underlying graph panel
TSharedPtr<SGraphPanel> GraphPanel;
};