Files
UnrealEngineUWP/Engine/Source/Editor/GraphEditor/Public/SGraphPreviewer.h
Ryan Vance 7c51ff94af Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR)
CL 1 of 8
#rb integration

[CL 4748712 by Ryan Vance in Dev-VR branch]
2019-01-17 18:54:05 -05:00

40 lines
1.2 KiB
C++

// Copyright 1998-2019 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;
};