UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
SCanvas::FSlot Class Reference

#include <SCanvas.h>

+ Inheritance diagram for SCanvas::FSlot:

Public Member Functions

 SLATE_SLOT_BEGIN_ARGS_OneMixin (FSlot, TSlotBase< FSlot >, TAlignmentWidgetSlotMixin< FSlot >) void SetPosition(TAttribute< FVector2D > InPosition)
 
FVector2D GetPosition () const
 
void SetSize (TAttribute< FVector2D > InSize)
 
FVector2D GetSize () const
 
 FSlot ()
 
SLATE_API void Construct (const FChildren &SlotOwner, FSlotArguments &&InArg)
 
- Public Member Functions inherited from TWidgetSlotWithAttributeSupport< FSlot >
virtual ~TWidgetSlotWithAttributeSupport ()
 
void Construct (const FChildren &SlotOwner, typename Super::FSlotArguments &&InArgs)
 
void RequestSortAttribute ()
 
virtual SWidgetGetContainerWidget () const override
 
virtual FName GetContainerName () const override
 
virtual uint32 GetContainerSortOrder () const override
 
- Public Member Functions inherited from TSlotBase< SlotType >
SlotType & operator[] (TSharedRef< SWidget > &&InChildWidget)
 
SlotType & operator[] (const TSharedRef< SWidget > &InChildWidget)
 
SlotType & Expose (SlotType *&OutVarToInit)
 
void Construct (const FChildren &SlotOwner, FSlotArguments &&InArgs)
 
SLATECORE_API FSlotBase ()
 
SLATECORE_API FSlotBase (const FChildren &InParent)
 
SLATECORE_API FSlotBase (const TSharedRef< SWidget > &InWidget)
 
 FSlotBase (const FSlotBase &)=delete
 
- Public Member Functions inherited from FSlotBase
SLATECORE_API FSlotBase ()
 
SLATECORE_API FSlotBase (const FChildren &InParent)
 
SLATECORE_API FSlotBase (const TSharedRef< SWidget > &InWidget)
 
FSlotBaseoperator= (const FSlotBase &)=delete
 
 FSlotBase (const FSlotBase &)=delete
 
virtual SLATECORE_API ~FSlotBase ()
 
const FChildrenGetOwner () const
 
SLATECORE_API SWidgetGetOwnerWidget () const
 
SLATECORE_API void SetOwner (const FChildren &Children)
 
void AttachWidget (TSharedRef< SWidget > &&InWidget)
 
void AttachWidget (const TSharedRef< SWidget > &InWidget)
 
const TSharedRef< SWidget > & GetWidget () const
 
SLATECORE_API const TSharedPtr< SWidgetDetachWidget ()
 
SLATECORE_API void Invalidate (EInvalidateWidgetReason InvalidateReason)
 
- Public Member Functions inherited from TAlignmentWidgetSlotMixin< FSlot >
 TAlignmentWidgetSlotMixin ()
 
 TAlignmentWidgetSlotMixin (const EHorizontalAlignment InHAlign, const EVerticalAlignment InVAlign)
 
void SetHorizontalAlignment (EHorizontalAlignment Alignment)
 
EHorizontalAlignment GetHorizontalAlignment () const
 
void SetVerticalAlignment (EVerticalAlignment Alignment)
 
EVerticalAlignment GetVerticalAlignment () const
 

Static Public Member Functions

static SLATE_API void RegisterAttributes (FSlateWidgetSlotAttributeInitializer &AttributeInitializer)
 
- Static Public Member Functions inherited from TWidgetSlotWithAttributeSupport< FSlot >
static void RegisterAttributes (FSlateWidgetSlotAttributeInitializer &AttributeInitializer)
 

Additional Inherited Members

- Public Types inherited from TSlotBase< SlotType >
enum  EConstructSlotIsFChildren { ConstructSlotIsFChildren }
 
- Protected Member Functions inherited from FSlotBase
template<typename TargetValueType , typename SourceValueType >
bool SetAttribute (TAttribute< TargetValueType > &TargetValue, const TAttribute< SourceValueType > &SourceValue, EInvalidateWidgetReason BaseInvalidationReason)
 
- Protected Member Functions inherited from SlateAttributePrivate::ISlateAttributeContainer
SLATECORE_API void RemoveContainerWidget (SWidget &Widget)
 
SLATECORE_API void UpdateContainerSortOrder (SWidget &Widget)
 
- Protected Member Functions inherited from TAlignmentWidgetSlotMixin< FSlot >
void ConstructMixin (const FChildren &SlotOwner, FSlotArgumentsMixin &&InArgs)
 

Detailed Description

Canvas slots allow child widgets to be positioned and sized

Horizontal Alignment Given a top aligned slot, where '+' represents the anchor point defined by PositionAttr.

Left Center Right

  • _ _ _ _ _ _ + _ _ _ _ _ _ + | | | | | | | _ _ _ _ | | _ _ _ _ _ | | _ _ _ _ |

Note: FILL is NOT supported.

Vertical Alignment Given a left aligned slot, where '+' represents the anchor point defined by PositionAttr.

Top Center Bottom +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | | | | | | | _ _ _ _ | + | | | | _ _ _ _ | + _ _ _ _ |

Note: FILL is NOT supported.

Constructor & Destructor Documentation

◆ FSlot()

SCanvas::FSlot::FSlot ( )
inline

Default values for a slot.

Member Function Documentation

◆ Construct()

void SCanvas::FSlot::Construct ( const FChildren SlotOwner,
FSlotArguments &&  InArg 
)

◆ GetPosition()

FVector2D SCanvas::FSlot::GetPosition ( ) const
inline

◆ GetSize()

FVector2D SCanvas::FSlot::GetSize ( ) const
inline

◆ RegisterAttributes()

void SCanvas::FSlot::RegisterAttributes ( FSlateWidgetSlotAttributeInitializer AttributeInitializer)
static

◆ SetSize()

void SCanvas::FSlot::SetSize ( TAttribute< FVector2D InSize)
inline

◆ SLATE_SLOT_BEGIN_ARGS_OneMixin()

SCanvas::FSlot::SLATE_SLOT_BEGIN_ARGS_OneMixin ( FSlot  ,
TSlotBase< FSlot ,
TAlignmentWidgetSlotMixin< FSlot  
)
inline

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