// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved. #pragma once /** * A list of filters currently applied to an asset view. */ class STimelinesContainer : public SCompoundWidget { public: SLATE_BEGIN_ARGS(STimelinesContainer){} SLATE_END_ARGS() 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 OnMouseWheel(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 MakeTimeline(TSharedPtr VisualLoggerView, TSharedPtr TimeSliderController, const FVisualLogDevice::FVisualLogEntryItem& Entry); TSharedRef GetRightClickMenuContent(); void OnTimelineSelected(TSharedPtr Widget); void ChangeSelection(class TSharedPtr, const FPointerEvent& MouseEvent); virtual bool SupportsKeyboardFocus() const override { return true; } void OnNewLogEntry(const FVisualLogDevice::FVisualLogEntryItem& Entry); 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 SelectedNodes; } 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: TSharedPtr TimeSliderController; TSharedPtr VisualLoggerView; TArray > TimelineItems; TArray< TSharedPtr > SelectedNodes; TSharedPtr ContainingBorder; float CachedMinTime, CachedMaxTime; };