Moved definition to a header to appease Visual Studio's poor template instantiation

[CL 2705979 by Andrew Rodham in Main branch]
This commit is contained in:
Andrew Rodham
2015-09-25 06:42:16 -04:00
committed by Andrew.Rodham@epicgames.com
parent 555d6926ae
commit 59ec852fa9
2 changed files with 33 additions and 30 deletions

View File

@@ -11,38 +11,24 @@
#include "ISequencerSection.h"
#include "SSection.h"
/** Structure representing a slot in the track area */
class FTrackAreaSlot : public TSlotBase<FTrackAreaSlot>
FTrackAreaSlot::FTrackAreaSlot(const TSharedPtr<SSequencerTrackLane>& InSlotContent)
{
public:
/** Construction from a track lane */
FTrackAreaSlot(const TSharedPtr<SSequencerTrackLane>& InSlotContent)
{
TrackLane = InSlotContent;
HAlignment = HAlign_Fill;
VAlignment = VAlign_Top;
TrackLane = InSlotContent;
HAlignment = HAlign_Fill;
VAlignment = VAlign_Top;
this->AttachWidget(
SNew(SWeakWidget)
.PossiblyNullContent(InSlotContent)
);
}
this->AttachWidget(
SNew(SWeakWidget)
.PossiblyNullContent(InSlotContent)
);
}
/** Get the vertical position of this slot inside its parent */
float GetVerticalOffset() const
{
auto PinnedTrackLane = TrackLane.Pin();
return PinnedTrackLane.IsValid() ? PinnedTrackLane->GetPhysicalPosition() : 0.f;
}
/** Horizontal/Vertical alignment for the slot */
EHorizontalAlignment HAlignment;
EVerticalAlignment VAlignment;
/** The track lane that we represent */
TWeakPtr<SSequencerTrackLane> TrackLane;
};
float FTrackAreaSlot::GetVerticalOffset() const
{
auto PinnedTrackLane = TrackLane.Pin();
return PinnedTrackLane.IsValid() ? PinnedTrackLane->GetPhysicalPosition() : 0.f;
}
void SSequencerTrackArea::Construct( const FArguments& InArgs, TSharedRef<FSequencerTimeSliderController> InTimeSliderController, TSharedRef<SSequencer> InSequencerWidget )
{

View File

@@ -8,7 +8,24 @@ class SSequencerTrackLane;
class FSequencerTimeSliderController;
class FSequencer;
class FTrackAreaSlot;
/** Structure representing a slot in the track area */
class FTrackAreaSlot : public TSlotBase<FTrackAreaSlot>
{
public:
/** Construction from a track lane */
FTrackAreaSlot(const TSharedPtr<SSequencerTrackLane>& InSlotContent);
/** Get the vertical position of this slot inside its parent */
float GetVerticalOffset() const;
/** Horizontal/Vertical alignment for the slot */
EHorizontalAlignment HAlignment;
EVerticalAlignment VAlignment;
/** The track lane that we represent */
TWeakPtr<SSequencerTrackLane> TrackLane;
};
/**
* The area where tracks( rows of sections ) are displayed