// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "CoreMinimal.h" #include "Misc/EnumClassFlags.h" #include "Misc/Attribute.h" #include "Layout/Visibility.h" #include "Widgets/SWidget.h" #include "ITimeSlider.h" #include "Widgets/Input/NumericTypeInterface.h" #include "Modules/ModuleInterface.h" #include "Misc/QualifiedFrameTime.h" /** Enum denoting which time ranges to display on a time range */ enum class EShowRange { None = 0, WorkingRange = 1 << 0, ViewRange = 1 << 1, PlaybackRange = 1 << 2, }; ENUM_CLASS_FLAGS(EShowRange); /** Time range construction arguments */ struct FTimeRangeArgs { FTimeRangeArgs( EShowRange InShowRanges, TSharedRef InController, TAttribute InVisibilityDelegate, TAttribute>> InNumericTypeInterface, FLinearColor InPlaybackRangeStartColor = FLinearColor::Green, FLinearColor InPlaybackRangeEndColor = FLinearColor::Red ) : ShowRanges(InShowRanges) , EnableRanges(InShowRanges) , Controller(InController) , VisibilityDelegate(InVisibilityDelegate) , NumericTypeInterface(InNumericTypeInterface) , PlaybackRangeStartColor(InPlaybackRangeStartColor) , PlaybackRangeEndColor(InPlaybackRangeEndColor) { } FTimeRangeArgs( EShowRange InShowRanges, EShowRange InEnableRanges, TSharedRef InController, TAttribute InVisibilityDelegate, TAttribute>> InNumericTypeInterface, FLinearColor InPlaybackRangeStartColor = FLinearColor::Green, FLinearColor InPlaybackRangeEndColor = FLinearColor::Red ) : ShowRanges(InShowRanges) , EnableRanges(InEnableRanges) , Controller(InController) , VisibilityDelegate(InVisibilityDelegate) , NumericTypeInterface(InNumericTypeInterface) , PlaybackRangeStartColor(InPlaybackRangeStartColor) , PlaybackRangeEndColor(InPlaybackRangeEndColor) { } /** Which ranges to show */ EShowRange ShowRanges; /** Which ranges to enable editing on */ EShowRange EnableRanges; /** A time slider controller */ TSharedRef Controller; /** Visibility delegate */ TAttribute VisibilityDelegate; /** Numeric type interface to use for frame<->time conversion */ TAttribute>> NumericTypeInterface; /** Playback range start color */ FLinearColor PlaybackRangeStartColor = FLinearColor::Green; /** Playback range end color */ FLinearColor PlaybackRangeEndColor = FLinearColor::Red; }; /** * The public interface of SequencerModule */ class ISequencerWidgetsModule : public IModuleInterface { public: virtual TSharedRef CreateTimeSlider( const TSharedRef& InController, bool bMirrorLabels ) = 0; virtual TSharedRef CreateTimeSlider( const TSharedRef& InController, const TAttribute& VisibilityDelegate, bool bMirrorLabels ) = 0; virtual TSharedRef CreateTimeRangeSlider( const TSharedRef& InController ) = 0; virtual TSharedRef CreateTimeRange( const FTimeRangeArgs& InArgs, const TSharedRef& Content ) = 0; };