UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FSlotProxy Struct Reference

#include <LayoutUtils.h>

Public Member Functions

 FSlotProxy ()=default
 
template<typename SlotType >
 FSlotProxy (const int32 InSlotIndex, const SlotType &InSlot)
 
SLATECORE_API FGeometry MakeGeometry (const FGeometry &InParentGeometry, const FVector2f &InChildOffset, const FVector2f &InLocalSize) const
 
template<typename SlotType , bool CompareArranged = false>
bool UpdateFromSlot (const int32 InSlotIndex, const SlotType &InSlot)
 
bool operator== (const int32 InSlotIndex) const
 
bool operator< (const FSlotProxy &InOtherSlot) const
 

Public Attributes

int32 SlotIndex = INDEX_NONE
 
FMargin Padding = FMargin(0)
 
FVector2f DesiredSize = FVector2f::ZeroVector
 
FVector2f ArrangedSize = FVector2f::ZeroVector
 
FSizeParam SizeParam = FAuto()
 
float MinSize = 0.0f
 
float MaxSize = 0.0f
 
EVisibility Visibility = EVisibility::Visible
 
EHorizontalAlignment HorizontalAlignment = HAlign_Fill
 
EVerticalAlignment VerticalAlignment = VAlign_Fill
 
TOptional< FSlateRenderTransformRenderTransform
 
FVector2f RenderTransformPivot = FVector2f::ZeroVector
 
TSharedPtr< SWidgetWidget = nullptr
 

Detailed Description

Represents a single slot, used to perform arrangement operations. Allows layout with an arbitrary child order that can map back to a sequential array.

Constructor & Destructor Documentation

◆ FSlotProxy() [1/2]

FSlotProxy::FSlotProxy ( )
default

◆ FSlotProxy() [2/2]

template<typename SlotType >
FSlotProxy::FSlotProxy ( const int32  InSlotIndex,
const SlotType &  InSlot 
)
inlineexplicit

Constructs a SlotProxy for the given slot index and FSlot.

Member Function Documentation

◆ MakeGeometry()

FGeometry FSlotProxy::MakeGeometry ( const FGeometry InParentGeometry,
const FVector2f InChildOffset,
const FVector2f InLocalSize 
) const

Performs the same functionality as FGeometry::MakeChild, without the need for the original Widget reference.

◆ operator<()

bool FSlotProxy::operator< ( const FSlotProxy InOtherSlot) const
inline

Default comparison operator for sorting by slot index.

◆ operator==()

bool FSlotProxy::operator== ( const int32  InSlotIndex) const
inline

Equality tested against the slot index. This makes it simple to find a slot by its index, even if the slot proxies are differently ordered.

◆ UpdateFromSlot()

template<typename SlotType , bool CompareArranged = false>
bool FSlotProxy::UpdateFromSlot ( const int32  InSlotIndex,
const SlotType &  InSlot 
)
inline

Applies the given slot's values to this proxy. Will return true if any values have changed from those stored. If CompareArranged is true, the "changed" flag is only true if the new DesiredSize doesn't match the previous ArrangedSize, rather than previous DesiredSize.

Member Data Documentation

◆ ArrangedSize

FVector2f FSlotProxy::ArrangedSize = FVector2f::ZeroVector

Contained widget's arranged size (as it was last calculated).

◆ DesiredSize

FVector2f FSlotProxy::DesiredSize = FVector2f::ZeroVector

Contained widget's desired size.

◆ HorizontalAlignment

EHorizontalAlignment FSlotProxy::HorizontalAlignment = HAlign_Fill

Horizontal slot alignment.

◆ MaxSize

float FSlotProxy::MaxSize = 0.0f

Max Size, if any.

◆ MinSize

float FSlotProxy::MinSize = 0.0f

Min Size, if any.

◆ Padding

FMargin FSlotProxy::Padding = FMargin(0)

Padding margin.

◆ RenderTransform

TOptional<FSlateRenderTransform> FSlotProxy::RenderTransform

Last calculated RenderTransform.

◆ RenderTransformPivot

FVector2f FSlotProxy::RenderTransformPivot = FVector2f::ZeroVector

Corresponds with the RenderTransform.

◆ SizeParam

FSizeParam FSlotProxy::SizeParam = FAuto()

Sizing option, ie. Auto, Fill.

◆ SlotIndex

int32 FSlotProxy::SlotIndex = INDEX_NONE

The original index of the slot represented by this proxy.

◆ VerticalAlignment

EVerticalAlignment FSlotProxy::VerticalAlignment = VAlign_Fill

Vertical slot alignment.

◆ Visibility

EVisibility FSlotProxy::Visibility = EVisibility::Visible

Current visibility state.

◆ Widget

TSharedPtr<SWidget> FSlotProxy::Widget = nullptr

Here for convenience and backwards compatibility. Not always valid.


The documentation for this struct was generated from the following files: