Files
UnrealEngineUWP/Engine/Source/Editor/Sequencer/Private/SelectedKey.h
Matt Kuhlenschmidt 9fbcefd1df Fixed sequencer not opening once it has been closed (world centric bug)
Removed ISequencerInternals interface as it was not necessary and confusing.

[CL 2082317 by Matt Kuhlenschmidt in Main branch]
2014-05-22 16:10:01 -04:00

50 lines
1.3 KiB
C++

// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
#pragma once
class UMovieSceneSection;
class IKeyArea;
/**
* Represents a selected key in the sequencer
*/
struct FSelectedKey
{
/** Section that the key belongs to */
UMovieSceneSection* Section;
/** Key area providing the key */
TSharedPtr<IKeyArea> KeyArea;
/** Index of the key in the key area */
TOptional<FKeyHandle> KeyHandle;
FSelectedKey( UMovieSceneSection& InSection, TSharedPtr<IKeyArea> InKeyArea, FKeyHandle InKeyHandle )
: Section( &InSection )
, KeyArea( InKeyArea )
, KeyHandle(InKeyHandle)
{}
FSelectedKey()
: Section( NULL )
, KeyArea( NULL )
, KeyHandle()
{}
/** @return Whether or not this is a valid selected key */
bool IsValid() const { return Section != NULL && KeyArea.IsValid() && KeyHandle.IsSet(); }
friend uint32 GetTypeHash( const FSelectedKey& SelectedKey )
{
return GetTypeHash( SelectedKey.Section ) ^ GetTypeHash( SelectedKey.KeyArea ) ^
(SelectedKey.KeyHandle.IsSet() ? GetTypeHash(SelectedKey.KeyHandle.GetValue()) : 0);
}
bool operator==( const FSelectedKey& OtherKey ) const
{
return Section == OtherKey.Section && KeyArea == OtherKey.KeyArea &&
KeyHandle.IsSet() && OtherKey.KeyHandle.IsSet() &&
KeyHandle.GetValue() == OtherKey.KeyHandle.GetValue();
}
};