Files
UnrealEngineUWP/Engine/Source/Editor/RewindDebuggerInterface/Public/RewindDebuggerTrack.h
keith yerex d8cb0c9c81 Rewind Debugger timelines
#rb thomas.sarkanen
#preflight 627be6e9a85e625d6f6da85a

#ROBOMERGE-OWNER: keith.yerex
#ROBOMERGE-AUTHOR: keith.yerex
#ROBOMERGE-SOURCE: CL 20151054 via CL 20152640 via CL 20153506
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20157277 by keith yerex in ue5-main branch]
2022-05-11 21:58:41 -04:00

98 lines
2.2 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "IRewindDebuggerViewCreator.h"
namespace TraceServices
{
class IAnalysisSession;
}
namespace RewindDebugger
{
class FRewindDebuggerTrack
{
public:
FRewindDebuggerTrack(): bExpanded(true)
{
}
virtual ~FRewindDebuggerTrack()
{
}
bool GetIsExpanded()
{
return bExpanded;
}
void SetIsExpanded(bool bIsExpanded)
{
bExpanded = bIsExpanded;
}
// Update should do work to compute children etc for the current time range. Return true if children have changed.
bool Update()
{
return UpdateInternal();
}
// Get a widget to show in the timeline view for this track
TSharedPtr<SWidget> GetTimelineView()
{
return GetTimelineViewInternal();
}
// Get a widget to show in the details tab, when this track is selected
TSharedPtr<SWidget> GetDetailsView()
{
return GetDetailsViewInternal();
}
// unique name for track (must match creator name if track is created by an IRewindDebuggerViewCreator)
FName GetName() const
{
return GetNameInternal();
}
// icon to display in the tree view
FSlateIcon GetIcon()
{
return GetIconInternal();
}
// display name for track in Tree View
FText GetDisplayName() const
{
return GetDisplayNameInternal();
}
// insights object id for an object associated with this track
uint64 GetObjectId() const
{
return GetObjectIdInternal();
}
// iterate over all sub-tracks of this track and call Iterator function
void IterateSubTracks(TFunction<void(TSharedPtr<FRewindDebuggerTrack> SubTrack)> IteratorFunction)
{
IterateSubTracksInternal(IteratorFunction);
}
private:
virtual bool UpdateInternal() { return false; }
virtual TSharedPtr<SWidget> GetTimelineViewInternal() { return TSharedPtr<SWidget>(); }
virtual TSharedPtr<SWidget> GetDetailsViewInternal() { return TSharedPtr<SWidget>(); }
virtual FSlateIcon GetIconInternal() { return FSlateIcon(); }
virtual FName GetNameInternal() const { return ""; }
virtual FText GetDisplayNameInternal() const { return FText(); }
virtual uint64 GetObjectIdInternal() const { return 0; }
virtual void IterateSubTracksInternal(TFunction<void(TSharedPtr<FRewindDebuggerTrack> SubTrack)> IteratorFunction) { }
bool bExpanded;
};
}