// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "IRewindDebuggerTrackCreator.h" #include "RewindDebuggerTrack.h" #include "SEventTimelineView.h" #include "Textures/SlateIcon.h" #include "Widgets/Views/SListView.h" struct FLogEntryItem; namespace RewindDebugger { /** * Tracks representing all log lines of a given category */ class FVisualLogCategoryTrack : public FRewindDebuggerTrack { public: FVisualLogCategoryTrack(uint64 InObjectId, const FName& Category); FName GetCategory() const { return Category; } private: virtual bool UpdateInternal() override; virtual TSharedPtr GetDetailsViewInternal() override; virtual TSharedPtr GetTimelineViewInternal() override; virtual FSlateIcon GetIconInternal() override { return Icon; } virtual FText GetDisplayNameInternal() const override { return TrackName; } virtual uint64 GetObjectIdInternal() const override { return ObjectId; } virtual FName GetNameInternal() const override { return Category; } TSharedPtr GetEventData() const; mutable TSharedPtr EventData; mutable int EventUpdateRequested = 0; uint64 ObjectId; FName Category; FSlateIcon Icon; FText TrackName; TSharedPtr>> ListView; TArray> LogEntries; double PreviousScrubTime = 0.0f; enum class EFilterType { VisualLog, VisualLogState, SyncMarker, }; }; /** * Parent track for category tracks */ class FVisualLogTrack : public FRewindDebuggerTrack { public: explicit FVisualLogTrack(uint64 InObjectId); private: virtual bool UpdateInternal() override; virtual TSharedPtr GetDetailsViewInternal() override; virtual FSlateIcon GetIconInternal() override { return Icon; } virtual FName GetNameInternal() const override { return "Visual Logging"; } virtual FText GetDisplayNameInternal() const override { return NSLOCTEXT("RewindDebugger", "VisualLoggerTrackName", "Visual Logging"); } virtual uint64 GetObjectIdInternal() const override { return ObjectId; } virtual TConstArrayView> GetChildrenInternal(TArray>& OutTracks) const override; FSlateIcon Icon; uint64 ObjectId; TArray> Children; }; /** * Track creator for VisualLogger recorded entries */ class FVisualLogTrackCreator : public IRewindDebuggerTrackCreator { virtual FName GetTargetTypeNameInternal() const override; virtual FName GetNameInternal() const override; virtual void GetTrackTypesInternal(TArray& Types) const override; virtual TSharedPtr CreateTrackInternal(const FObjectId& InObjectId) const override; virtual bool HasDebugInfoInternal(const FObjectId& InObjectId) const override; }; }