// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "CoreMinimal.h" #include "Styling/SlateColor.h" #include "Widgets/DeclarativeSyntaxSupport.h" #include "Widgets/SWidget.h" #include "Widgets/Views/STableViewBase.h" #include "Widgets/Views/STableRow.h" #include "Widgets/Views/SListView.h" #include "Models/WidgetReflectorNode.h" /** * Widget that visualizes the contents of a FReflectorNode. */ class SReflectorTreeWidgetItem : public SMultiColumnTableRow> { public: static FName NAME_WidgetName; static FName NAME_WidgetInfo; static FName NAME_Visibility; static FName NAME_Focusable; static FName NAME_Enabled; static FName NAME_Volatile; static FName NAME_HasActiveTimer; static FName NAME_Clipping; static FName NAME_LayerId; static FName NAME_ForegroundColor; static FName NAME_Address; static FName NAME_ActualSize; SLATE_BEGIN_ARGS(SReflectorTreeWidgetItem) : _WidgetInfoToVisualize() , _SourceCodeAccessor() , _AssetAccessor() { } SLATE_ARGUMENT(TSharedPtr, WidgetInfoToVisualize) SLATE_ARGUMENT(FAccessSourceCode, SourceCodeAccessor) SLATE_ARGUMENT(FAccessAsset, AssetAccessor) SLATE_END_ARGS() public: /** * Construct child widgets that comprise this widget. * * @param InArgs Declaration from which to construct this widget. */ void Construct(const FArguments& InArgs, const TSharedRef& InOwnerTableView); public: // SMultiColumnTableRow overrides virtual TSharedRef GenerateWidgetForColumn( const FName& ColumnName ) override; protected: /** @return The tint of the reflector node */ FSlateColor GetTint() const { return WidgetInfo->GetTint(); } void HandleHyperlinkNavigate(); private: /** The info about the widget that we are visualizing. */ TSharedPtr WidgetInfo; FAccessSourceCode OnAccessSourceCode; FAccessAsset OnAccessAsset; };