Files
UnrealEngineUWP/Engine/Source/Editor/EditorWidgets/Private/STransportControl.h
Dan Hertzka 1ce19a5ffa Full rename of the Slate "active tick" system to "active timer"
[CL 2394301 by Dan Hertzka in Main branch]
2014-12-19 17:44:49 -05:00

52 lines
1.4 KiB
C++

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
#pragma once
class STransportControl : public ITransportControl, public FTickableEditorObject
{
public:
SLATE_BEGIN_ARGS(STransportControl)
: _TransportArgs() {}
SLATE_ARGUMENT(FTransportControlArgs, TransportArgs)
SLATE_END_ARGS()
/**
* Construct the widget
*
* @param InArgs A declaration from which to construct the widget
*/
void Construct( const FArguments& InArgs );
virtual ~STransportControl() {}
using SWidget::Tick;
// Begin FTickableObjectBase implementation
virtual bool IsTickable() const override;
virtual void Tick( float DeltaTime ) override;
virtual TStatId GetStatId() const override { RETURN_QUICK_DECLARE_CYCLE_STAT( STransportControl, STATGROUP_Tickables ); }
// End FTickableObjectBase
private:
const FSlateBrush* GetForwardStatusIcon() const;
FText GetForwardStatusTooltip() const;
FText GetRecordStatusTooltip() const;
const FSlateBrush* GetBackwardStatusIcon() const;
FSlateColor GetLoopStatusColor() const;
/** Executes the OnTickPlayback delegate */
EActiveTimerReturnType TickPlayback( double InCurrentTime, float InDeltaTime );
FReply OnToggleLooping();
private:
/** The handle to the active timer */
TWeakPtr<FActiveTimerHandle> ActiveTimerHandle;
/** Whether the active timer is currently registered */
bool bIsActiveTimerRegistered;
FTransportControlArgs TransportControlArgs;
};