// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "Math/Vector2D.h" #include "Misc/Attribute.h" #include "Misc/Optional.h" #include "Templates/SharedPointer.h" #include "Widgets/DeclarativeSyntaxSupport.h" #include "Widgets/SCompoundWidget.h" class SWidget; class SConstrainedBox : public SCompoundWidget { public: SLATE_BEGIN_ARGS(SConstrainedBox) : _MinWidth() , _MaxWidth() {} SLATE_DEFAULT_SLOT(FArguments, Content) SLATE_ATTRIBUTE(TOptional, MinWidth) SLATE_ATTRIBUTE(TOptional, MaxWidth) SLATE_END_ARGS() void Construct(const FArguments& InArgs); virtual FVector2D ComputeDesiredSize(float LayoutScaleMultiplier) const override; private: TAttribute< TOptional > MinWidth; TAttribute< TOptional > MaxWidth; };