2014-12-07 19:09:38 -05:00
|
|
|
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
2014-11-19 07:43:07 -05:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
/* Dependencies
|
|
|
|
|
*****************************************************************************/
|
2014-11-19 09:04:58 -05:00
|
|
|
#include "Engine.h"
|
2014-11-19 07:43:07 -05:00
|
|
|
#include "Messaging.h"
|
|
|
|
|
#include "ModuleManager.h"
|
|
|
|
|
#include "SlateBasics.h"
|
|
|
|
|
#include "SlateStyle.h"
|
2014-11-19 09:04:58 -05:00
|
|
|
#include "EditorStyle.h"
|
2014-11-19 07:43:07 -05:00
|
|
|
|
|
|
|
|
/* Private includes
|
|
|
|
|
*****************************************************************************/
|
2015-01-15 06:19:24 -05:00
|
|
|
#include "ILogVisualizer.h"
|
2014-11-19 07:43:07 -05:00
|
|
|
#include "VisualLogger/VisualLogger.h"
|
2014-12-18 08:37:06 -05:00
|
|
|
#include "LogVisualizerSettings.h"
|
|
|
|
|
#include "LogVisualizerSessionSettings.h"
|
2014-11-19 07:43:07 -05:00
|
|
|
|
|
|
|
|
DECLARE_DELEGATE_OneParam(FOnItemSelectionChanged, const FVisualLogDevice::FVisualLogEntryItem&);
|
|
|
|
|
DECLARE_DELEGATE_OneParam(FOnObjectSelectionChanged, TSharedPtr<class STimeline>);
|
|
|
|
|
DECLARE_DELEGATE_OneParam(FOnFiltersSearchChanged, const FText&);
|
|
|
|
|
DECLARE_DELEGATE(FOnFiltersChanged);
|
2015-04-24 07:10:23 -04:00
|
|
|
DECLARE_DELEGATE_ThreeParams(FOnLogLineSelectionChanged, TSharedPtr<FLogEntryItem> /*SelectedItem*/, int64 /*UserData*/, FName /*TagName*/);
|
2014-11-19 07:43:07 -05:00
|
|
|
|
|
|
|
|
struct FVisualLoggerEvents
|
|
|
|
|
{
|
|
|
|
|
FVisualLoggerEvents()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FOnItemSelectionChanged OnItemSelectionChanged;
|
|
|
|
|
FOnFiltersChanged OnFiltersChanged;
|
|
|
|
|
FOnObjectSelectionChanged OnObjectSelectionChanged;
|
2015-04-24 07:10:23 -04:00
|
|
|
FOnLogLineSelectionChanged OnLogLineSelectionChanged;
|
2014-11-19 07:43:07 -05:00
|
|
|
};
|
|
|
|
|
|
2015-01-29 19:21:24 -05:00
|
|
|
class FVisualLoggerTimeSliderController;
|
2015-01-15 06:19:24 -05:00
|
|
|
struct LOGVISUALIZER_API FLogVisualizer
|
|
|
|
|
{
|
|
|
|
|
/** LogVisualizer interface*/
|
|
|
|
|
void Goto(float Timestamp, FName LogOwner = NAME_None);
|
|
|
|
|
void GotoNextItem();
|
|
|
|
|
void GotoPreviousItem();
|
|
|
|
|
|
|
|
|
|
FLinearColor GetColorForCategory(int32 Index) const;
|
|
|
|
|
FLinearColor GetColorForCategory(const FString& InFilterName) const;
|
2015-01-29 19:21:24 -05:00
|
|
|
TSharedPtr<FVisualLoggerTimeSliderController> GetTimeSliderController() { return TimeSliderController; }
|
2015-01-15 06:19:24 -05:00
|
|
|
UWorld* GetWorld(UObject* OptionalObject = nullptr);
|
|
|
|
|
class AActor* GetVisualLoggerHelperActor();
|
|
|
|
|
FVisualLoggerEvents& GetVisualLoggerEvents() { return VisualLoggerEvents; }
|
|
|
|
|
|
|
|
|
|
void SetCurrentVisualizer(TSharedPtr<class SVisualLogger> Visualizer) { CurrentVisualizer = Visualizer; }
|
|
|
|
|
|
|
|
|
|
void OnObjectSelectionChanged(TSharedPtr<class STimeline> TimeLine) { CurrentTimeLine = TimeLine; }
|
|
|
|
|
|
|
|
|
|
/** Static access */
|
|
|
|
|
static void Initialize();
|
|
|
|
|
static void Shutdown();
|
|
|
|
|
static FLogVisualizer& Get();
|
|
|
|
|
protected:
|
|
|
|
|
static TSharedPtr< struct FLogVisualizer > StaticInstance;
|
|
|
|
|
|
2015-01-29 19:21:24 -05:00
|
|
|
TSharedPtr<FVisualLoggerTimeSliderController> TimeSliderController;
|
2015-01-15 06:19:24 -05:00
|
|
|
FVisualLoggerEvents VisualLoggerEvents;
|
|
|
|
|
TWeakPtr<class STimeline> CurrentTimeLine;
|
|
|
|
|
TWeakPtr<class SVisualLogger> CurrentVisualizer;
|
|
|
|
|
};
|
2014-11-19 07:43:07 -05:00
|
|
|
|
|
|
|
|
#include "LogVisualizerStyle.h"
|
|
|
|
|
#include "SVisualLogger.h"
|
|
|
|
|
#include "SVisualLoggerToolbar.h"
|
|
|
|
|
#include "VisualLoggerCommands.h"
|
|
|
|
|
#include "SVisualLoggerFilters.h"
|
|
|
|
|
#include "SVisualLoggerView.h"
|
|
|
|
|
#include "SVisualLoggerLogsList.h"
|
|
|
|
|
#include "SVisualLoggerStatusView.h"
|
|
|
|
|
#include "STimeline.h"
|