Files
UnrealEngineUWP/Engine/Source/Editor/ReferenceViewer/Private/SReferenceViewer.h
Jaroslaw Palczynski ebce413232 UE4 Refactoring. Changed OVERRIDE and FINAL macros to keywords override and final.
[CL 2104397 by Jaroslaw Palczynski in Main branch]
2014-06-13 06:14:46 -04:00

101 lines
3.0 KiB
C++

// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CollectionManagerTypes.h"
/**
*
*/
class SReferenceViewer : public SCompoundWidget
{
public:
SLATE_BEGIN_ARGS( SReferenceViewer ){}
SLATE_END_ARGS()
~SReferenceViewer();
/** Constructs this widget with InArgs */
void Construct( const FArguments& InArgs );
/** Sets a new root package name */
void SetGraphRootPackageNames(const TArray<FName>& NewGraphRootPackageNames);
// SWidget implementation
virtual void Tick(const FGeometry& AllottedGeometry, const double InCurrentTime, const float InDeltaTime) override;
// End SWidget implementation
private:
void OnNodeDoubleClicked(class UEdGraphNode* Node);
/** True if the user may use the history back button */
bool IsBackEnabled() const;
/** True if the user may use the history forward button */
bool IsForwardEnabled() const;
/** Handler for clicking the history back button */
FReply BackClicked();
/** Handler for clicking the history forward button */
FReply ForwardClicked();
/** Handler for when the graph panel tells us to go back in history (like using the mouse thumb button) */
void GraphNavigateHistoryBack();
/** Handler for when the graph panel tells us to go forward in history (like using the mouse thumb button) */
void GraphNavigateHistoryForward();
/** Gets the tool tip text for the history back button */
FString GetHistoryBackTooltip() const;
/** Gets the tool tip text for the history forward button */
FString GetHistoryForwardTooltip() const;
/** Gets the text to be displayed in the address bar */
FText GetAddressBarText() const;
void OnApplyHistoryData(const FReferenceViewerHistoryData& History);
void OnUpdateHistoryData(FReferenceViewerHistoryData& HistoryData) const;
void OnSearchDepthEnabledChanged( ESlateCheckBoxState::Type NewState );
ESlateCheckBoxState::Type IsSearchDepthEnabledChecked() const;
int32 GetSearchDepthCount() const;
void OnSearchDepthCommitted(int32 NewValue);
void OnSearchBreadthEnabledChanged( ESlateCheckBoxState::Type NewState );
ESlateCheckBoxState::Type IsSearchBreadthEnabledChecked() const;
int32 GetSearchBreadthCount() const;
void OnSearchBreadthCommitted(int32 NewValue);
void RegisterActions();
void ShowSelectionInContentBrowser();
void OpenSelectedInAssetEditor();
void ReCenterGraph();
void ListReferencedObjects();
void ListObjectsThatReference();
void MakeCollectionWithReferencedAssets(ECollectionShareType::Type ShareType);
void ShowReferenceTree();
void ReCenterGraphOnNodes(const TSet<UObject*>& Nodes);
UObject* GetObjectFromSingleSelectedNode() const;
bool HasExactlyOneNodeSelected() const;
bool IsSingleSelectedItemValidObject() const;
void OnInitialAssetRegistrySearchComplete();
private:
/** The manager that keeps track of history data for this browser */
FReferenceViewerHistoryManager HistoryManager;
TSharedPtr<SGraphEditor> GraphEditorPtr;
TSharedPtr<FUICommandList> ReferenceViewerActions;
UEdGraph_ReferenceViewer* GraphObj;
};