// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "CoreMinimal.h" #include "Input/Reply.h" #include "Widgets/SWidget.h" #include "Widgets/DeclarativeSyntaxSupport.h" #include "Widgets/SCompoundWidget.h" #include "SVisualLoggerView.h" class FVisualLoggerTimeSliderController; class SLogVisualizerTimeline; class STimelinesBar; struct FVisualLoggerDBRow; /** * A list of filters currently applied to an asset view. */ class SVisualLoggerTimelinesContainer : public SCompoundWidget { public: SLATE_BEGIN_ARGS(SVisualLoggerTimelinesContainer){} SLATE_END_ARGS() virtual ~SVisualLoggerTimelinesContainer(); virtual FReply OnMouseButtonDown(const FGeometry& MyGeometry, const FPointerEvent& MouseEvent) override; virtual FReply OnMouseButtonUp(const FGeometry& MyGeometry, const FPointerEvent& MouseEvent) override; virtual FReply OnMouseMove(const FGeometry& MyGeometry, const FPointerEvent& MouseEvent) override; virtual FReply OnKeyDown(const FGeometry& MyGeometry, const FKeyEvent& InKeyEvent) override; /** Constructs this widget with InArgs */ void Construct(const FArguments& InArgs, TSharedRef, TSharedRef TimeSliderController); TSharedRef GetRightClickMenuContent(); void OnTimelineSelected(TSharedPtr Widget); void ChangeSelection(TSharedPtr, const FPointerEvent& MouseEvent); virtual bool SupportsKeyboardFocus() const override { return true; } void OnFiltersChanged(); void OnSearchChanged(const FText& Filter); void OnFiltersSearchChanged(const FText& Filter); void ResetData(); void GenerateReport(); /** * Selects a node in the tree * * @param AffectedNode The node to select * @param bSelect Whether or not to select * @param bDeselectOtherNodes Whether or not to deselect all other nodes */ void SetSelectionState(TSharedPtr AffectedNode, bool bSelect, bool bDeselectOtherNodes = true); /** * @return All currently selected nodes */ const TArray< TSharedPtr >& GetSelectedNodes() const { return CachedSelectedTimelines; } const TArray< TSharedPtr >& GetAllNodes() const { return TimelineItems; } /** * Returns whether or not a node is selected * * @param Node The node to check for selection * @return true if the node is selected */ bool IsNodeSelected(TSharedPtr Node) const; protected: void OnNewRowHandler(const FVisualLoggerDBRow& DBRow); void OnNewItemHandler(const FVisualLoggerDBRow& BDRow, int32 ItemIndex); void OnObjectSelectionChanged(const TArray& RowNames); void OnRowChangedVisibility(const FName&); protected: TSharedPtr ContainingBorder; TSharedPtr TimeSliderController; TSharedPtr VisualLoggerView; TArray > TimelineItems; TArray > CachedSelectedTimelines; double CachedMinTime; double CachedMaxTime; FText CurrentSearchText; };