55 lines
1.3 KiB
C
55 lines
1.3 KiB
C
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
||
|
|
|
||
|
|
#pragma once
|
||
|
|
|
||
|
|
#include "CoreMinimal.h"
|
||
|
|
|
||
|
|
// Insights
|
||
|
|
#include "Insights/ViewModels/AxisViewportDouble.h"
|
||
|
|
|
||
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||
|
|
|
||
|
|
class FPacketContentViewport
|
||
|
|
{
|
||
|
|
public:
|
||
|
|
FPacketContentViewport()
|
||
|
|
{
|
||
|
|
Reset();
|
||
|
|
}
|
||
|
|
|
||
|
|
void Reset()
|
||
|
|
{
|
||
|
|
HorizontalAxisViewport.Reset();
|
||
|
|
Height = 0.0f;
|
||
|
|
}
|
||
|
|
|
||
|
|
const FAxisViewportDouble& GetHorizontalAxisViewport() const { return HorizontalAxisViewport; }
|
||
|
|
FAxisViewportDouble& GetHorizontalAxisViewport() { return HorizontalAxisViewport; }
|
||
|
|
|
||
|
|
float GetWidth() const { return HorizontalAxisViewport.GetSize(); }
|
||
|
|
float GetHeight() const { return Height; }
|
||
|
|
|
||
|
|
bool SetSize(const float InWidth, const float InHeight)
|
||
|
|
{
|
||
|
|
const bool bWidthChanged = HorizontalAxisViewport.SetSize(InWidth);
|
||
|
|
if (bWidthChanged || Height != InHeight)
|
||
|
|
{
|
||
|
|
Height = InHeight;
|
||
|
|
OnSizeChanged();
|
||
|
|
return true;
|
||
|
|
}
|
||
|
|
return false;
|
||
|
|
}
|
||
|
|
|
||
|
|
private:
|
||
|
|
void OnSizeChanged()
|
||
|
|
{
|
||
|
|
}
|
||
|
|
|
||
|
|
private:
|
||
|
|
FAxisViewportDouble HorizontalAxisViewport;
|
||
|
|
float Height;
|
||
|
|
};
|
||
|
|
|
||
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|